[core] Fixed passing of the private key file path to OpenSSL;

v0.4.xx
leonid-ed 8 years ago
parent 2efff40697
commit 23d47adaf4

@ -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;

Loading…
Cancel
Save