diff options
author | Ping Yu <ping.yu@intel.com> | 2018-05-31 14:01:04 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2018-05-31 18:44:17 +0000 |
commit | cb91e603bc82083fc762206edfe4530f993a6c36 (patch) | |
tree | c707257d9b41de0982f1ed31231d1b262b98acde /src | |
parent | aa8f63ca4bd73dbb007e8828ed1967f90517aa72 (diff) |
Fix TLS issue to load certification and key
Change-Id: If1ef2d4bc6f90a4d4b6a345c63723117834c6504
Signed-off-by: Ping Yu <ping.yu@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/tlsopenssl/tls_openssl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/tlsopenssl/tls_openssl.c b/src/plugins/tlsopenssl/tls_openssl.c index 0817f606ad8..596dba9977f 100644 --- a/src/plugins/tlsopenssl/tls_openssl.c +++ b/src/plugins/tlsopenssl/tls_openssl.c @@ -519,6 +519,7 @@ openssl_ctx_init_server (tls_ctx_t * ctx) clib_warning ("unable to parse certificate"); return -1; } + SSL_CTX_use_certificate (oc->ssl_ctx, oc->srvcert); BIO_free (cert_bio); cert_bio = BIO_new (BIO_s_mem ()); BIO_write (cert_bio, app->tls_key, vec_len (app->tls_key)); @@ -529,6 +530,7 @@ openssl_ctx_init_server (tls_ctx_t * ctx) return -1; } + SSL_CTX_use_PrivateKey (oc->ssl_ctx, oc->pkey); BIO_free (cert_bio); oc->ssl = SSL_new (oc->ssl_ctx); |