projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68e71e9
)
Fix param order in RSA_get0_key
author
Matt Caswell
<matt@openssl.org>
Mon, 1 Aug 2016 11:10:11 +0000
(12:10 +0100)
committer
Matt Caswell
<matt@openssl.org>
Mon, 1 Aug 2016 11:10:11 +0000
(12:10 +0100)
Some calls to RSA_get0_key had the parameters in the wrong order causing a
failure.
GitHub Issue #1368
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/pem/pvkfmt.c
patch
|
blob
|
history
diff --git
a/crypto/pem/pvkfmt.c
b/crypto/pem/pvkfmt.c
index bf512ecdf064424ba8469cd886d74ce0a5d02d27..05a79e69445d7804a769f7c66580b356ade87329 100644
(file)
--- a/
crypto/pem/pvkfmt.c
+++ b/
crypto/pem/pvkfmt.c
@@
-497,7
+497,7
@@
static int check_bitlen_rsa(RSA *rsa, int ispub, unsigned int *pmagic)
int nbyte, hnbyte, bitlen;
const BIGNUM *e;
- RSA_get0_key(rsa,
&e, NULL
, NULL);
+ RSA_get0_key(rsa,
NULL, &e
, NULL);
if (BN_num_bits(e) > 32)
goto badkey;
bitlen = RSA_bits(rsa);
@@
-539,7
+539,7
@@
static void write_rsa(unsigned char **out, RSA *rsa, int ispub)
nbyte = RSA_size(rsa);
hnbyte = (RSA_bits(rsa) + 15) >> 4;
- RSA_get0_key(rsa, &
e, &n
, &d);
+ RSA_get0_key(rsa, &
n, &e
, &d);
write_lebn(out, e, 4);
write_lebn(out, n, -1);
if (ispub)