diff options
author | Ben Laurie <ben@openssl.org> | 1999-05-30 15:40:21 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-05-30 15:40:21 +0000 |
commit | e5e932d212aea2f9acceb4779b44f123050347a7 (patch) | |
tree | 377ef0fda10c61269a77f7a6675068895be319ef /crypto/asn1/nsseq.c | |
parent | ee8ba0b26c101262521a0bc10233cdd5a136d126 (diff) |
Another safe stack.
Diffstat (limited to 'crypto/asn1/nsseq.c')
-rw-r--r-- | crypto/asn1/nsseq.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/crypto/asn1/nsseq.c b/crypto/asn1/nsseq.c index bb447d76e8..417d024b81 100644 --- a/crypto/asn1/nsseq.c +++ b/crypto/asn1/nsseq.c @@ -70,14 +70,14 @@ int i2d_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE *a, unsigned char **pp) int v = 0; M_ASN1_I2D_vars(a); M_ASN1_I2D_len (a->type, i2d_ASN1_OBJECT); - M_ASN1_I2D_len_EXP_SEQUENCE_opt(a->certs, i2d_X509, 0, - V_ASN1_SEQUENCE, v); + M_ASN1_I2D_len_EXP_SEQUENCE_opt_type(X509,a->certs,i2d_X509,0, + V_ASN1_SEQUENCE,v); M_ASN1_I2D_seq_total(); M_ASN1_I2D_put (a->type, i2d_ASN1_OBJECT); - M_ASN1_I2D_put_EXP_SEQUENCE_opt(a->certs, i2d_X509, 0, - V_ASN1_SEQUENCE, v); + M_ASN1_I2D_put_EXP_SEQUENCE_opt_type(X509,a->certs,i2d_X509,0, + V_ASN1_SEQUENCE,v); M_ASN1_I2D_finish(); } @@ -102,15 +102,17 @@ NETSCAPE_CERT_SEQUENCE *d2i_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE **a, M_ASN1_D2I_Init(); M_ASN1_D2I_start_sequence(); M_ASN1_D2I_get (ret->type, d2i_ASN1_OBJECT); - M_ASN1_D2I_get_EXP_set_opt(ret->certs, d2i_X509, X509_free, 0, - V_ASN1_SEQUENCE); - M_ASN1_D2I_Finish(a, NETSCAPE_CERT_SEQUENCE_free, ASN1_F_D2I_NETSCAPE_CERT_SEQUENCE); + M_ASN1_D2I_get_EXP_set_opt_type(X509,ret->certs,d2i_X509,X509_free,0, + V_ASN1_SEQUENCE); + M_ASN1_D2I_Finish(a, NETSCAPE_CERT_SEQUENCE_free, + ASN1_F_D2I_NETSCAPE_CERT_SEQUENCE); } void NETSCAPE_CERT_SEQUENCE_free (NETSCAPE_CERT_SEQUENCE *a) { if (a == NULL) return; ASN1_OBJECT_free(a->type); - if(a->certs) sk_pop_free(a->certs, X509_free); - Free ((char *)a); + if(a->certs) + sk_X509_pop_free(a->certs, X509_free); + Free (a); } |