Created attachment 1475331 [details] reproducer Description of problem: On Fedora 29, SSL_CTX_new(TLSv1_method()) succeeds but leaves error code 337146240 (ERR_LIB_SSL, SSL_F_SSL_DO_CONFIG, SSL_R_BAD_VALUE) on the error stack. Version-Release number of selected component (if applicable): openssl-1.1.1-0.pre8.2.fc29.x86_64 How reproducible: always Steps to Reproduce: 1. gcc -lssl -lcrypto -o ctxerr ctxerr.c 2. ./ctxerr Actual results: err: 337146240, lib: 20, func: 391, reason: 384, msg: 'bad value' Expected results: OK
The error code is set in ssl_do_config(). For TLSv1_method, SSL_CONF_cmd(cctx, cmdstr, arg) with cmdstr "MinProtocol" and value "TLSv1" results in SSL_R_BAD_VALUE. call stack: #0 ssl_do_config (s=s@entry=0x0, ctx=ctx@entry=0x42bc20, name=<optimized out>, name@entry=0x0, system=system@entry=1) at ssl/ssl_mcnf.c:74 #1 0x00007ffff7f71545 in ssl_ctx_system_config (ctx=ctx@entry=0x42bc20) at ssl/ssl_mcnf.c:98 #2 0x00007ffff7f6cb57 in SSL_CTX_new (meth=0x7ffff7fbdda0 <tlsv1_method_data>) at ssl/ssl_lib.c:3059 #3 0x000000000040124d in main ()