X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fopenssl.c;h=f5239ede6e8f0b478a81625261a805165e13403c;hp=8a5cc0edd6f77a6b43179e491e696c9d2eb5a6d4;hb=e72b57629bf49cdfd663002a8bb336a67b958979;hpb=3323b84c30b9d7fa16a6065225cb7135e7a6bcd7 diff --git a/src/openssl.c b/src/openssl.c index 8a5cc0ed..f5239ede 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -210,6 +210,13 @@ ssl_init () than examining the error stack after a failed SSL_connect. */ SSL_CTX_set_verify (ssl_ctx, SSL_VERIFY_NONE, NULL); + /* Use the private key from the cert file unless otherwise specified. */ + if (opt.cert_file && !opt.private_key) + { + opt.private_key = opt.cert_file; + opt.private_key_type = opt.cert_type; + } + if (opt.cert_file) if (SSL_CTX_use_certificate_file (ssl_ctx, opt.cert_file, key_type_to_ssl_type (opt.cert_type))