1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-10-31 23:30:25 +03:00

pem.c: add _libssh2_pem_parse_memory to parse PEM from memory

Requirement to implement 18cfec8336 for Libgcrypt and WinCNG.
This commit is contained in:
Marc Hoersken
2015-03-22 14:39:14 +01:00
parent 1429ad749d
commit daa2dfa2db
2 changed files with 98 additions and 0 deletions

View File

@@ -1026,6 +1026,11 @@ int _libssh2_pem_parse(LIBSSH2_SESSION * session,
const char *headerbegin,
const char *headerend,
FILE * fp, unsigned char **data, unsigned int *datalen);
int _libssh2_pem_parse_memory(LIBSSH2_SESSION * session,
const char *headerbegin,
const char *headerend,
const char *filedata, size_t filedata_len,
unsigned char **data, unsigned int *datalen);
int _libssh2_pem_decode_sequence(unsigned char **data, unsigned int *datalen);
int _libssh2_pem_decode_integer(unsigned char **data, unsigned int *datalen,
unsigned char **i, unsigned int *ilen);