mirror of
https://github.com/mirror/wget.git
synced 2024-12-29 14:30:48 +08:00
openssl: Read cert from private key file when needed
* src/openssl.c (ssl_init): Assign opt.cert_{file, type} from opt.private_key(_type)
This commit is contained in:
parent
8654f7e2e7
commit
3765a1b266
@ -296,6 +296,13 @@ ssl_init (void)
|
||||
opt.private_key_type = opt.cert_type;
|
||||
}
|
||||
|
||||
/* Use cert from private key file unless otherwise specified. */
|
||||
if (opt.private_key && !opt.cert_file)
|
||||
{
|
||||
opt.cert_file = xstrdup (opt.private_key);
|
||||
opt.cert_type = opt.private_key_type;
|
||||
}
|
||||
|
||||
if (opt.cert_file)
|
||||
if (SSL_CTX_use_certificate_file (ssl_ctx, opt.cert_file,
|
||||
key_type_to_ssl_type (opt.cert_type))
|
||||
|
Loading…
Reference in New Issue
Block a user