diff options
author | Benjamin Kaduk <bkaduk@akamai.com> | 2016-02-29 15:47:12 -0600 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-05-08 21:20:31 +0200 |
commit | 7671342e550ed2de676b23c79d0e7f45a381c76e (patch) | |
tree | d474ef749646ba89f5001634955e229a0a60b580 /include | |
parent | 204afd81b12c71d625e89599c0eef33588afc1f0 (diff) | |
download | openssl-new-7671342e550ed2de676b23c79d0e7f45a381c76e.tar.gz |
Add PEM_bytes_read_bio_secmem()
Split the PEM_bytes_read_bio() implementation out into a
pem_bytes_read_bio_flags() helper, to allow it to pass PEM_FLAG_SECURE
as needed. Adjust the cleanup to properly use OPENSSL_secure_free()
when needed, and reimplement PEM_bytes_read() as a wrapper around
the _flags helper.
Add documentation for PEM_bytes_read_bio() and the new secmem variant.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1700)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/pem.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/openssl/pem.h b/include/openssl/pem.h index d6f76ebe73..105c81064b 100644 --- a/include/openssl/pem.h +++ b/include/openssl/pem.h @@ -241,6 +241,9 @@ int PEM_read_bio(BIO *bp, char **name, char **header, # define PEM_FLAG_ONLY_B64 0x4 int PEM_read_bio_ex(BIO *bp, char **name, char **header, unsigned char **data, long *len, unsigned int flags); +int PEM_bytes_read_bio_secmem(unsigned char **pdata, long *plen, char **pnm, + const char *name, BIO *bp, pem_password_cb *cb, + void *u); int PEM_write_bio(BIO *bp, const char *name, const char *hdr, const unsigned char *data, long len); int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, |