Fix excert logic.
If no keyfile has been specified use the certificate file instead. Fix typo: we need to check the chain is not NULL, not the chain file. Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
parent
56e8dc542b
commit
786370b1b0
14
apps/s_cb.c
14
apps/s_cb.c
@ -1402,9 +1402,15 @@ int load_excert(SSL_EXCERT **pexc, BIO *err)
|
|||||||
if (!exc->cert)
|
if (!exc->cert)
|
||||||
return 0;
|
return 0;
|
||||||
if (exc->keyfile)
|
if (exc->keyfile)
|
||||||
exc->keyfile = exc->certfile;
|
{
|
||||||
exc->key = load_key(err, exc->certfile, exc->certform, 0,
|
exc->key = load_key(err, exc->keyfile, exc->keyform,
|
||||||
NULL, NULL, "Server Certificate");
|
0, NULL, NULL, "Server Key");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
exc->key = load_key(err, exc->certfile, exc->certform,
|
||||||
|
0, NULL, NULL, "Server Key");
|
||||||
|
}
|
||||||
if (!exc->key)
|
if (!exc->key)
|
||||||
return 0;
|
return 0;
|
||||||
if (exc->chainfile)
|
if (exc->chainfile)
|
||||||
@ -1413,7 +1419,7 @@ int load_excert(SSL_EXCERT **pexc, BIO *err)
|
|||||||
exc->chainfile, FORMAT_PEM,
|
exc->chainfile, FORMAT_PEM,
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
"Server Chain");
|
"Server Chain");
|
||||||
if (!exc->chainfile)
|
if (!exc->chain)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user