Lines Matching refs:sk

21 static int add_attribute(STACK_OF(X509_ATTRIBUTE) **sk, int nid, int atrtype,
23 static ASN1_TYPE *get_attribute(const STACK_OF(X509_ATTRIBUTE) *sk, int nid);
775 STACK_OF(X509_ATTRIBUTE) *sk; in PKCS7_dataFinal()
877 sk = si->auth_attr; in PKCS7_dataFinal()
883 if (sk_X509_ATTRIBUTE_num(sk) > 0) { in PKCS7_dataFinal()
1069 STACK_OF(X509_ATTRIBUTE) *sk; in PKCS7_signatureVerify()
1120 sk = si->auth_attr; in PKCS7_signatureVerify()
1121 if ((sk != NULL) && (sk_X509_ATTRIBUTE_num(sk) != 0)) { in PKCS7_signatureVerify()
1129 message_digest = PKCS7_digest_from_attributes(sk); in PKCS7_signatureVerify()
1155 alen = ASN1_item_i2d((ASN1_VALUE *)sk, &abuf, in PKCS7_signatureVerify()
1217 static ASN1_TYPE *get_attribute(const STACK_OF(X509_ATTRIBUTE) *sk, int nid) in get_attribute() argument
1219 int idx = X509at_get_attr_by_NID(sk, nid, -1); in get_attribute()
1223 return X509_ATTRIBUTE_get0_type(X509at_get_attr(sk, idx), 0); in get_attribute()
1226 ASN1_OCTET_STRING *PKCS7_digest_from_attributes(STACK_OF(X509_ATTRIBUTE) *sk) in PKCS7_digest_from_attributes() argument
1229 if ((astype = get_attribute(sk, NID_pkcs9_messageDigest)) == NULL) in PKCS7_digest_from_attributes()
1235 STACK_OF(X509_ATTRIBUTE) *sk) in PKCS7_set_signed_attributes()
1238 p7si->auth_attr = sk_X509_ATTRIBUTE_deep_copy(sk, X509_ATTRIBUTE_dup, X509_ATTRIBUTE_free); in PKCS7_set_signed_attributes()
1245 STACK_OF(X509_ATTRIBUTE) *sk) in PKCS7_set_attributes()
1248 p7si->unauth_attr = sk_X509_ATTRIBUTE_deep_copy(sk, X509_ATTRIBUTE_dup, X509_ATTRIBUTE_free); in PKCS7_set_attributes()
1266 static int add_attribute(STACK_OF(X509_ATTRIBUTE) **sk, int nid, int atrtype, in add_attribute() argument
1272 if (*sk == NULL) { in add_attribute()
1273 if ((*sk = sk_X509_ATTRIBUTE_new_null()) == NULL) in add_attribute()
1276 n = sk_X509_ATTRIBUTE_num(*sk); in add_attribute()
1278 attr = sk_X509_ATTRIBUTE_value(*sk, i); in add_attribute()
1282 if (!sk_X509_ATTRIBUTE_push(*sk, NULL)) in add_attribute()
1289 sk_X509_ATTRIBUTE_pop(*sk); in add_attribute()
1292 X509_ATTRIBUTE_free(sk_X509_ATTRIBUTE_value(*sk, i)); in add_attribute()
1293 (void) sk_X509_ATTRIBUTE_set(*sk, i, attr); in add_attribute()