diff options
author | Ben Laurie <ben@openssl.org> | 1999-05-01 18:29:59 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-05-01 18:29:59 +0000 |
commit | d35ea5b00b32eb30eaaffd3c5e504d6c003c17dc (patch) | |
tree | b88a7b2510ac63d5c5fd733e5595a3347271402e /crypto/pkcs7 | |
parent | d500de16725216503786dba48db519d3031614e7 (diff) |
Another stack.
Diffstat (limited to 'crypto/pkcs7')
-rw-r--r-- | crypto/pkcs7/pk7_doit.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/crypto/pkcs7/pk7_doit.c b/crypto/pkcs7/pk7_doit.c index cb0bd95f9c..67085e3956 100644 --- a/crypto/pkcs7/pk7_doit.c +++ b/crypto/pkcs7/pk7_doit.c @@ -809,8 +809,8 @@ static ASN1_TYPE *get_attribute(STACK *sk, int nid) xa=(X509_ATTRIBUTE *)sk_value(sk,i); if (OBJ_cmp(xa->object,o) == 0) { - if (xa->set && sk_num(xa->value.set)) - return((ASN1_TYPE *)sk_value(xa->value.set,0)); + if (xa->set && sk_ASN1_TYPE_num(xa->value.set)) + return(sk_ASN1_TYPE_value(xa->value.set,0)); else return(NULL); } @@ -831,9 +831,10 @@ ASN1_OCTET_STRING *PKCS7_digest_from_attributes(STACK *sk) if (OBJ_obj2nid(attr->object) == NID_pkcs9_messageDigest) { if (!attr->set) return NULL; - if (!attr->value.set || - !sk_num (attr->value.set) ) return NULL; - astype = (ASN1_TYPE *) sk_value(attr->value.set, 0); + if (!attr->value.set + || !sk_ASN1_TYPE_num(attr->value.set) ) + return NULL; + astype = sk_ASN1_TYPE_value(attr->value.set, 0); return astype->value.octet_string; } } |