mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
Fix DH key generation.
Contributed by: Anonymous <nobody@replay.com>
This commit is contained in:
parent
c13d4799dd
commit
6fa89f94c4
4
CHANGES
4
CHANGES
@ -5,6 +5,10 @@
|
|||||||
|
|
||||||
Changes between 0.9.1c and 0.9.2
|
Changes between 0.9.1c and 0.9.2
|
||||||
|
|
||||||
|
*) If a DH key is generated in s3_srvr.c, don't blow it by trying to use
|
||||||
|
NULL pointers.
|
||||||
|
[Anonymous <nobody@replay.com>]
|
||||||
|
|
||||||
*) s_server should send the CAfile as acceptable CAs, not its own cert.
|
*) s_server should send the CAfile as acceptable CAs, not its own cert.
|
||||||
[Bodo Moeller <3moeller@informatik.uni-hamburg.de>]
|
[Bodo Moeller <3moeller@informatik.uni-hamburg.de>]
|
||||||
|
|
||||||
|
@ -953,14 +953,17 @@ SSL *s;
|
|||||||
}
|
}
|
||||||
|
|
||||||
s->s3->tmp.dh=dh;
|
s->s3->tmp.dh=dh;
|
||||||
if (((dhp->pub_key == NULL) ||
|
if ((dhp->pub_key == NULL ||
|
||||||
(dhp->priv_key == NULL) ||
|
dhp->priv_key == NULL ||
|
||||||
(s->options & SSL_OP_SINGLE_DH_USE)) &&
|
(s->options & SSL_OP_SINGLE_DH_USE)))
|
||||||
(!DH_generate_key(dh)))
|
|
||||||
{
|
{
|
||||||
SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_DH_LIB);
|
if(!DH_generate_key(dh))
|
||||||
|
{
|
||||||
|
SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,
|
||||||
|
ERR_R_DH_LIB);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dh->pub_key=BN_dup(dhp->pub_key);
|
dh->pub_key=BN_dup(dhp->pub_key);
|
||||||
|
Loading…
Reference in New Issue
Block a user