From: Dr. Stephen Henson Date: Wed, 4 Jun 2008 22:39:29 +0000 (+0000) Subject: Update from HEAD. X-Git-Tag: OpenSSL_0_9_8i~61 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=591371566ec012fef6ec8797c540903bf4b4dd3d;p=oweals%2Fopenssl.git Update from HEAD. --- 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 @@ -1511,6 +1511,21 @@ SSL_CTX *SSL_CTX_new(SSL_METHOD *meth) ret->tlsext_status_cb = 0; ret->tlsext_status_arg = NULL; +#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); @@ -1582,6 +1597,10 @@ void SSL_CTX_free(SSL_CTX *a) sk_SSL_COMP_pop_free(a->comp_methods,SSL_COMP_free); #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); }