summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/n_pkey.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2000-05-24 13:09:59 +0000
committerDr. Stephen Henson <steve@openssl.org>2000-05-24 13:09:59 +0000
commitb4b41f48d1cfb6151e24e9c5f28019d3cfa5ec96 (patch)
treea7b95ab971ed86b880d1b62202b607a956fcf192 /crypto/asn1/n_pkey.c
parent447a9638b77ab1998ce1f246d1fd044df01a49e2 (diff)
Add DSA library string. Workaround for IIS .key file invalid
ASN1 encoding.
Diffstat (limited to 'crypto/asn1/n_pkey.c')
-rw-r--r--crypto/asn1/n_pkey.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/asn1/n_pkey.c b/crypto/asn1/n_pkey.c
index d804986b73..5a7d494ff0 100644
--- a/crypto/asn1/n_pkey.c
+++ b/crypto/asn1/n_pkey.c
@@ -211,7 +211,11 @@ RSA *d2i_Netscape_RSA(RSA **a, unsigned char **pp, long length, int (*cb)())
M_ASN1_BIT_STRING_free(os);
c.q=c.p;
if ((ret=d2i_Netscape_RSA_2(a,&c.p,c.slen,cb)) == NULL) goto err;
- c.slen-=(c.p-c.q);
+ /* Note: some versions of IIS key files use length values that are
+ * too small for the surrounding SEQUENCEs. This following line
+ * effectively disable length checking.
+ */
+ c.slen = 0;
M_ASN1_D2I_Finish(a,RSA_free,ASN1_F_D2I_NETSCAPE_RSA);
}