View | Details | Raw Unified | Return to bug 229021 | Differences between
and this patch

Collapse All | Expand All

(-)net/netsslcredentials.cc (+5 lines)
Lines 42-47 extern "C" Link Here
42
# include <openssl/x509v3.h>
42
# include <openssl/x509v3.h>
43
# include <openssl/ssl.h>
43
# include <openssl/ssl.h>
44
# include <openssl/x509_vfy.h>
44
# include <openssl/x509_vfy.h>
45
# include <openssl/opensslv.h>
45
}
46
}
46
# include <stdio.h>
47
# include <stdio.h>
47
# include "netdebug.h"
48
# include "netdebug.h"
Lines 218-224 NetSslCredentials::ReadCredentials( Error *e ) Link Here
218
	privateKey = PEM_read_PrivateKey(fp, NULL, 0, NULL );
219
	privateKey = PEM_read_PrivateKey(fp, NULL, 0, NULL );
219
	SSLNULLHANDLER( privateKey, e, "NetSslCredentials::ReadCredentials PEM_read_PrivateKey", failSetError );
220
	SSLNULLHANDLER( privateKey, e, "NetSslCredentials::ReadCredentials PEM_read_PrivateKey", failSetError );
220
	// verify that RSA key
221
	// verify that RSA key
222
#if OPENSSL_VERSION_NUMBER < 0x10100000L
221
	if (privateKey->type != EVP_PKEY_RSA)
223
	if (privateKey->type != EVP_PKEY_RSA)
224
#else
225
	if (EVP_PKEY_base_id(privateKey) != EVP_PKEY_RSA)
226
#endif
222
	{
227
	{
223
	    e->Set( MsgRpc::SslKeyNotRSA );
228
	    e->Set( MsgRpc::SslKeyNotRSA );
224
	    goto fail;
229
	    goto fail;

Return to bug 229021