diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-11-17 00:03:43 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-11-17 04:53:02 +0100 |
commit | 159f6e7ecfde9e98194d6111c85587b85b6a8fc5 (patch) | |
tree | 0743bde0f6ea1f942357efa3686bf72be6963365 /crypto/pem/pvkfmt.c | |
parent | Raise an error on memory alloc failure. (diff) | |
download | openssl-159f6e7ecfde9e98194d6111c85587b85b6a8fc5.tar.xz openssl-159f6e7ecfde9e98194d6111c85587b85b6a8fc5.zip |
Fix MSBLOB format with RSA.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/pem/pvkfmt.c')
-rw-r--r-- | crypto/pem/pvkfmt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/pem/pvkfmt.c b/crypto/pem/pvkfmt.c index 416bfc2a47..248704ec59 100644 --- a/crypto/pem/pvkfmt.c +++ b/crypto/pem/pvkfmt.c @@ -548,7 +548,7 @@ static void write_rsa(unsigned char **out, RSA *rsa, int ispub) hnbyte = (RSA_bits(rsa) + 15) >> 4; RSA_get0_key(rsa, &n, &e, &d); write_lebn(out, e, 4); - write_lebn(out, n, -1); + write_lebn(out, n, nbyte); if (ispub) return; RSA_get0_factors(rsa, &p, &q); |