mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-20 02:42:09 +03:00
pem: add passphrase-protected PEM file support for libgcrypt and wincng
Since they use our own PEM parser which did not support encrypted PEM files, trying to use such files on these backends failed. Fix that by augmenting the PEM parser to support encrypted PEM files.
This commit is contained in:
committed by
Marc Hoersken
parent
674299c346
commit
386e012292
@@ -884,6 +884,7 @@ struct _LIBSSH2_HOSTKEY_METHOD
|
||||
struct _LIBSSH2_CRYPT_METHOD
|
||||
{
|
||||
const char *name;
|
||||
const char *pem_annotation;
|
||||
|
||||
int blocksize;
|
||||
|
||||
@@ -1041,6 +1042,7 @@ const LIBSSH2_HOSTKEY_METHOD **libssh2_hostkey_methods(void);
|
||||
int _libssh2_pem_parse(LIBSSH2_SESSION * session,
|
||||
const char *headerbegin,
|
||||
const char *headerend,
|
||||
const unsigned char *passphrase,
|
||||
FILE * fp, unsigned char **data, unsigned int *datalen);
|
||||
int _libssh2_pem_parse_memory(LIBSSH2_SESSION * session,
|
||||
const char *headerbegin,
|
||||
|
||||
Reference in New Issue
Block a user