diff options
author | Kris Kennaway <kris@FreeBSD.org> | 2001-05-20 03:07:21 +0000 |
---|---|---|
committer | Kris Kennaway <kris@FreeBSD.org> | 2001-05-20 03:07:21 +0000 |
commit | 5740a5e34c49bfc6885d8602958155fc91b62765 (patch) | |
tree | af21ae7d0d7d432ead379f1689adfee9ffe965f6 /crypto/openssl/crypto/asn1 | |
parent | de7cdddab120ecc07d412749bfb3f191c4e0afe3 (diff) | |
download | src-5740a5e34c49bfc6885d8602958155fc91b62765.tar.gz src-5740a5e34c49bfc6885d8602958155fc91b62765.zip |
Initial import of OpenSSL 0.9.6a
Notes
Notes:
svn path=/vendor-crypto/openssl/dist/; revision=76866
Diffstat (limited to 'crypto/openssl/crypto/asn1')
-rw-r--r-- | crypto/openssl/crypto/asn1/asn1_lib.c | 2 | ||||
-rw-r--r-- | crypto/openssl/crypto/asn1/p7_lib.c | 2 | ||||
-rw-r--r-- | crypto/openssl/crypto/asn1/x_name.c | 6 |
3 files changed, 7 insertions, 3 deletions
diff --git a/crypto/openssl/crypto/asn1/asn1_lib.c b/crypto/openssl/crypto/asn1/asn1_lib.c index 77447a524095..a8b651e54e7c 100644 --- a/crypto/openssl/crypto/asn1/asn1_lib.c +++ b/crypto/openssl/crypto/asn1/asn1_lib.c @@ -301,7 +301,7 @@ int asn1_GetSequence(ASN1_CTX *c, long *length) return(0); } if (c->inf == (1|V_ASN1_CONSTRUCTED)) - c->slen= *length+ *(c->pp)-c->p; + c->slen= *length; c->eos=0; return(1); } diff --git a/crypto/openssl/crypto/asn1/p7_lib.c b/crypto/openssl/crypto/asn1/p7_lib.c index b1196ef581ce..8a340b01190e 100644 --- a/crypto/openssl/crypto/asn1/p7_lib.c +++ b/crypto/openssl/crypto/asn1/p7_lib.c @@ -307,12 +307,14 @@ PKCS7 *d2i_PKCS7(PKCS7 **a, unsigned char **pp, long length) } if (Tinf == (1|V_ASN1_CONSTRUCTED)) { + c.q=c.p; if (!ASN1_check_infinite_end(&c.p,c.slen)) { c.error=ERR_R_MISSING_ASN1_EOS; c.line=__LINE__; goto err; } + c.slen-=(c.p-c.q); } } else diff --git a/crypto/openssl/crypto/asn1/x_name.c b/crypto/openssl/crypto/asn1/x_name.c index b832deb928b0..1885d699efd5 100644 --- a/crypto/openssl/crypto/asn1/x_name.c +++ b/crypto/openssl/crypto/asn1/x_name.c @@ -141,10 +141,12 @@ static int i2d_X509_NAME_entries(X509_NAME *a) } size+=i2d_X509_NAME_ENTRY(ne,NULL); } - - ret+=ASN1_object_size(1,size,V_ASN1_SET); if (fe != NULL) + { + /* SET OF needed only if entries is non empty */ + ret+=ASN1_object_size(1,size,V_ASN1_SET); fe->size=size; + } r=ASN1_object_size(1,ret,V_ASN1_SEQUENCE); |