(void)SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
#endif
(void)SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3);
- if(!SSL_CTX_use_certificate_chain_file(ctx, cert))
+ #ifdef HAVE_SSL_CTX_SET_SECURITY_LEVEL
+ SSL_CTX_set_security_level(ctx, 0); /* for keys in tests */
+ #endif
- int e = ERR_peek_error();
- printf("error string: %s\n", ERR_reason_error_string(e));
+ if(!SSL_CTX_use_certificate_chain_file(ctx, cert)) {
++ int e = ERR_peek_error();
++ printf("error string: %s\n", ERR_reason_error_string(e));
print_exit("cannot read cert");
+ }
if(!SSL_CTX_use_PrivateKey_file(ctx, key, SSL_FILETYPE_PEM))
print_exit("cannot read key");
if(!SSL_CTX_check_private_key(ctx))