diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2008-06-04 22:39:29 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2008-06-04 22:39:29 +0000 |
commit | 591371566ec012fef6ec8797c540903bf4b4dd3d (patch) | |
tree | 782d90eecfa542b034c985363e441cdfc6f7fc8f /ssl | |
parent | 5799b72178a6e55938712781901e054be3cb7ace (diff) |
Update from HEAD.
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssl_lib.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 065411aea8..7df4388427 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1513,6 +1513,21 @@ SSL_CTX *SSL_CTX_new(SSL_METHOD *meth) #endif +#ifndef OPENSSL_NO_ENGINE + ret->client_cert_engine = NULL; +#ifdef OPENSSL_SSL_CLIENT_ENGINE_AUTO +#define eng_strx(x) #x +#define eng_str(x) eng_strx(x) + /* Use specific client engine automatically... ignore errors */ + { + ENGINE *eng; + eng = ENGINE_by_id(eng_str(OPENSSL_SSL_CLIENT_ENGINE_AUTO)); + if (!eng || !SSL_CTX_set_client_cert_engine(ret, eng)) + ERR_clear_error(); + } +#endif +#endif + return(ret); err: SSLerr(SSL_F_SSL_CTX_NEW,ERR_R_MALLOC_FAILURE); @@ -1583,6 +1598,10 @@ void SSL_CTX_free(SSL_CTX *a) #else a->comp_methods = NULL; #endif +#ifndef OPENSSL_NO_ENGINE + if (a->client_cert_engine) + ENGINE_finish(a->client_cert_engine); +#endif OPENSSL_free(a); } |