diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2008-06-04 22:34:38 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2008-06-04 22:34:38 +0000 |
commit | 4db9677bac4938b624fb63eaf108810bfb99f50d (patch) | |
tree | a3c00f853327fb99da98896dc7e76cc73a683d04 | |
parent | 1381bf90f425079fad0938aceafbaa9a8cbe9145 (diff) |
Compilation option to use a specific ssl client auth engine automatically.
-rw-r--r-- | ssl/ssl_lib.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index ebff8e23e6..afd8845d4e 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1599,6 +1599,22 @@ SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth) ret->wbuf_freelist->len = 0; ret->wbuf_freelist->head = 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)); +fprintf(stderr, "Engine is %p\n", eng); + 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); |