From a974e64aaaa8a6f99f55a68d28c07c04ecea2f50 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 9 Nov 2015 14:38:59 +0000 Subject: Fix SSL_use_certificate_chain_file The new function SSL_use_certificate_chain_file was always crashing in the internal function use_certificate_chain_file because it would pass a NULL value for SSL_CTX *, but use_certificate_chain_file would unconditionally try to dereference it. Reviewed-by: Stephen Henson --- doc/ssl/SSL_CTX_set_default_passwd_cb.pod | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/ssl/SSL_CTX_set_default_passwd_cb.pod b/doc/ssl/SSL_CTX_set_default_passwd_cb.pod index 945513984b..452737feb9 100644 --- a/doc/ssl/SSL_CTX_set_default_passwd_cb.pod +++ b/doc/ssl/SSL_CTX_set_default_passwd_cb.pod @@ -2,7 +2,9 @@ =head1 NAME -SSL_CTX_set_default_passwd_cb, SSL_CTX_set_default_passwd_cb_userdata - set passwd callback for encrypted PEM file handling +SSL_CTX_set_default_passwd_cb, SSL_CTX_set_default_passwd_cb_userdata, +SSL_set_default_passwd_cb, SSL_set_default_passwd_cb_userdata - set passwd +callback for encrypted PEM file handling =head1 SYNOPSIS @@ -10,6 +12,8 @@ SSL_CTX_set_default_passwd_cb, SSL_CTX_set_default_passwd_cb_userdata - set pass void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb); void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u); + void SSL_set_default_passwd_cb(SSL *s, pem_password_cb *cb); + void SSL_set_default_passwd_cb_userdata(SSL *s, void *u); int pem_passwd_cb(char *buf, int size, int rwflag, void *userdata); @@ -21,6 +25,9 @@ when loading/storing a PEM certificate with encryption. SSL_CTX_set_default_passwd_cb_userdata() sets a pointer to B which will be provided to the password callback on invocation. +SSL_set_default_passwd_cb() and SSL_set_default_passwd_cb_userdata() perform the +same function as their SSL_CTX counterparts, but using an SSL object. + The pem_passwd_cb(), which must be provided by the application, hands back the password to be used during decryption. On invocation a pointer to B is provided. The pem_passwd_cb must write the password into the provided buffer @@ -51,8 +58,7 @@ however not usual, as certificate information is considered public. =head1 RETURN VALUES -SSL_CTX_set_default_passwd_cb() and SSL_CTX_set_default_passwd_cb_userdata() -do not provide diagnostic information. +These functions do not provide diagnostic information. =head1 EXAMPLES -- cgit v1.2.3