summaryrefslogtreecommitdiff
path: root/ssl
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2016-03-02 12:53:40 +0100
committerMatt Caswell <matt@openssl.org>2016-03-02 17:15:46 +0000
commit0c452abc162d348876e136979230a06d0d83641b (patch)
treec68661fa144434d9a5ba6425e5f9620ec2711b13 /ssl
parentfdfb8c848679d74fd492e3b306500f2da0570c17 (diff)
downloadopenssl-new-0c452abc162d348876e136979230a06d0d83641b.tar.gz
Provide getters for default_passwd_cb and userdata
This patch provides getters for default_passwd_cb and userdata for SSL and SSL_CTX. The getter functions are required to port Python's ssl module to OpenSSL 1.1.0. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r--ssl/ssl_lib.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 359b58b996..98489a17e7 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -2474,6 +2474,16 @@ void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u)
ctx->default_passwd_callback_userdata = u;
}
+pem_password_cb *SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx)
+{
+ return ctx->default_passwd_callback;
+}
+
+void *SSL_CTX_get_default_passwd_cb_userdata(SSL_CTX *ctx)
+{
+ return ctx->default_passwd_callback_userdata;
+}
+
void SSL_set_default_passwd_cb(SSL *s, pem_password_cb *cb)
{
s->default_passwd_callback = cb;
@@ -2484,6 +2494,16 @@ void SSL_set_default_passwd_cb_userdata(SSL *s, void *u)
s->default_passwd_callback_userdata = u;
}
+pem_password_cb *SSL_get_default_passwd_cb(SSL *s)
+{
+ return s->default_passwd_callback;
+}
+
+void *SSL_get_default_passwd_cb_userdata(SSL *s)
+{
+ return s->default_passwd_callback_userdata;
+}
+
void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx,
int (*cb) (X509_STORE_CTX *, void *),
void *arg)