Author: kgiusti
Date: Mon Oct 8 18:51:05 2012
New Revision: 1395719
URL: http://svn.apache.org/viewvc?rev=1395719&view=rev
Log:
NO-JIRA: add additional verification of keyfile
Modified:
qpid/proton/trunk/proton-c/src/ssl/openssl.c
Modified: qpid/proton/trunk/proton-c/src/ssl/openssl.c
URL:
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/ssl/openssl.c?rev=1395719&r1=1395718&r2=1395719&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/ssl/openssl.c (original)
+++ qpid/proton/trunk/proton-c/src/ssl/openssl.c Mon Oct 8 18:51:05 2012
@@ -218,6 +218,12 @@ int pn_ssl_set_credentials( pn_ssl_t *ss
return -4;
}
+ if (SSL_CTX_check_private_key(ssl->ctx) != 1) {
+ _log_error("The key file %s is not consistent with the certificate %s\n",
+ private_key_file, certificate_file);
+ return -5;
+ }
+
_log( ssl, "Configured local certificate file %s\n", certificate_file );
return 0;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]