From d1bf79b1e3504ee8d5fbfab1f1549f37ab864788 Mon Sep 17 00:00:00 2001 From: leonid-ed Date: Fri, 27 May 2016 15:12:45 +0300 Subject: [PATCH] [core] Fixed passing of the private key file path to OpenSSL; --- sxmp/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sxmp/hub.c b/sxmp/hub.c index da92491..944173d 100644 --- a/sxmp/hub.c +++ b/sxmp/hub.c @@ -830,7 +830,7 @@ int _sxhub_settls_ctx_s(sxhub_t *hub) /* set the local certificate from CertFile */ if(SSL_CTX_use_certificate_file(hub->ctx, hub->certpem, SSL_FILETYPE_PEM) <= 0) return SXE_ESSL; /* set the private key from KeyFile (may be the same as CertFile) */ - if(SSL_CTX_use_PrivateKey_file(hub->ctx, hub->certpem, SSL_FILETYPE_PEM) <= 0) return SXE_ESSL; + if(SSL_CTX_use_PrivateKey_file(hub->ctx, hub->certkey, SSL_FILETYPE_PEM) <= 0) return SXE_ESSL; /* verify private key */ if (!SSL_CTX_check_private_key(hub->ctx)) return SXE_ESSL;