aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/d2i_r_pu.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>1999-05-14 18:21:21 +0000
committerDr. Stephen Henson <steve@openssl.org>1999-05-14 18:21:21 +0000
commit1ad2ecb66f24dc4d03e137b9f73224dc376ab5f4 (patch)
tree148aaf10ddaacff24f37a92a004c2e763d5ef9a2 /crypto/asn1/d2i_r_pu.c
parent2a82c7cf252387b67d79383d518fad4a10bb253e (diff)
downloadopenssl-1ad2ecb66f24dc4d03e137b9f73224dc376ab5f4.tar.gz
The encoding of negative ASN1 INTEGERs and the conversion of BNs to negative
integers was completely broken. Also added a NEG_PUBKEY_BUG compilation option to compensate for public keys improperly encoded as negative integers.
Diffstat (limited to 'crypto/asn1/d2i_r_pu.c')
-rw-r--r--crypto/asn1/d2i_r_pu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/asn1/d2i_r_pu.c b/crypto/asn1/d2i_r_pu.c
index 04cfe5671e..c4ae58b594 100644
--- a/crypto/asn1/d2i_r_pu.c
+++ b/crypto/asn1/d2i_r_pu.c
@@ -64,6 +64,10 @@
#include <openssl/objects.h>
#include <openssl/asn1_mac.h>
+#ifdef NEG_PUBKEY_BUG
+#define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER
+#endif
+
RSA *d2i_RSAPublicKey(RSA **a, unsigned char **pp, long length)
{
int i=ASN1_R_PARSING;