diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2003-02-25 19:03:31 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2003-02-25 19:03:31 +0000 |
commit | e9ec63961be610bbd386f482335772bc23dc095e (patch) | |
tree | 4c315799588e5d459fc804c47d74f56c6fc702af /crypto/asn1/tasn_enc.c | |
parent | 0185803cc224c8d88ca39ae07c296a4f1854e478 (diff) |
Fix indefinite length encoding so EOC correctly updates
the buffer pointer.
Rename PKCS7_PARTSIGN to PKCS7_STREAM.
Guess what that's for :-)
Diffstat (limited to 'crypto/asn1/tasn_enc.c')
-rw-r--r-- | crypto/asn1/tasn_enc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/asn1/tasn_enc.c b/crypto/asn1/tasn_enc.c index 5ce38e1920..2e80655074 100644 --- a/crypto/asn1/tasn_enc.c +++ b/crypto/asn1/tasn_enc.c @@ -494,7 +494,10 @@ static int asn1_i2d_ex_primitive(ASN1_VALUE **pval, unsigned char **out, const A if(out) { if(usetag) ASN1_put_object(out, ndef, len, tag, aclass); asn1_ex_i2c(pval, *out, &utype, it); - *out += len; + if (ndef) + ASN1_put_eoc(out); + else + *out += len; } if(usetag) return ASN1_object_size(ndef, len, tag); @@ -598,7 +601,6 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout, int *putype, const ASN1_ { strtmp->data = cout; strtmp->length = 0; - ASN1_put_eoc(&cout); } /* Special return code */ return -2; |