OpenSSL: Fix public key length in DH group 5 operations
The length of the prime was used incorrectly and this resulted in WPS DH operation failing whenever the public key ended up having leading zeros (i.e., about every 1/256th time).
This commit is contained in:
parent
41e650ae5c
commit
cc91e07e57
1 changed files with 1 additions and 1 deletions
|
@ -434,7 +434,7 @@ void * dh5_init(struct wpabuf **priv, struct wpabuf **publ)
|
|||
if (DH_generate_key(dh) != 1)
|
||||
goto err;
|
||||
|
||||
publen = BN_num_bytes(dh->p);
|
||||
publen = BN_num_bytes(dh->pub_key);
|
||||
pubkey = wpabuf_alloc(publen);
|
||||
if (pubkey == NULL)
|
||||
goto err;
|
||||
|
|
Loading…
Reference in a new issue