projects
/
libeap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41e650a
)
OpenSSL: Fix public key length in DH group 5 operations
author
Jouni Malinen
<jouni.malinen@atheros.com>
Sun, 27 Jun 2010 04:03:25 +0000
(21:03 -0700)
committer
Jouni Malinen
<j@w1.fi>
Sun, 27 Jun 2010 04:03:25 +0000
(21:03 -0700)
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).
src/crypto/crypto_openssl.c
patch
|
blob
|
history
diff --git
a/src/crypto/crypto_openssl.c
b/src/crypto/crypto_openssl.c
index
e1fcf47
..
08c98af
100644
(file)
--- a/
src/crypto/crypto_openssl.c
+++ b/
src/crypto/crypto_openssl.c
@@
-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->p
ub_key
);
pubkey = wpabuf_alloc(publen);
if (pubkey == NULL)
goto err;