Lines Matching refs:attr

83                                                 const X509_ATTRIBUTE *attr)  in STACK_OF()
88 if (x == NULL || attr == NULL) { in STACK_OF()
102 if ((new_attr = X509_ATTRIBUTE_dup(attr)) == NULL) in STACK_OF()
119 X509_ATTRIBUTE *attr) in STACK_OF()
121 if (x == NULL || attr == NULL) { in STACK_OF()
125 if (*x != NULL && X509at_get_attr_by_OBJ(*x, attr->object, -1) != -1) { in STACK_OF()
127 "name=%s", OBJ_nid2sn(OBJ_obj2nid(attr->object))); in STACK_OF()
131 return ossl_x509at_add1_attr(x, attr); in STACK_OF()
140 X509_ATTRIBUTE *attr; in STACK_OF() local
143 attr = X509_ATTRIBUTE_create_by_OBJ(NULL, obj, type, bytes, len); in STACK_OF()
144 if (attr == NULL) in STACK_OF()
146 ret = ossl_x509at_add1_attr(x, attr); in STACK_OF()
147 X509_ATTRIBUTE_free(attr); in STACK_OF()
175 X509_ATTRIBUTE *attr; in STACK_OF() local
178 attr = X509_ATTRIBUTE_create_by_NID(NULL, nid, type, bytes, len); in STACK_OF()
179 if (attr == NULL) in STACK_OF()
181 ret = ossl_x509at_add1_attr(x, attr); in STACK_OF()
182 X509_ATTRIBUTE_free(attr); in STACK_OF()
210 X509_ATTRIBUTE *attr; in STACK_OF() local
213 attr = X509_ATTRIBUTE_create_by_txt(NULL, attrname, type, bytes, len); in STACK_OF()
214 if (attr == NULL) in STACK_OF()
216 ret = ossl_x509at_add1_attr(x, attr); in STACK_OF()
217 X509_ATTRIBUTE_free(attr); in STACK_OF()
227 X509_ATTRIBUTE *attr; in STACK_OF() local
230 attr = X509_ATTRIBUTE_create_by_txt(NULL, attrname, type, bytes, len); in STACK_OF()
231 if (attr == NULL) in STACK_OF()
233 ret = X509at_add1_attr(x, attr); in STACK_OF()
234 X509_ATTRIBUTE_free(attr); in STACK_OF()
268 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, in X509_ATTRIBUTE_create_by_NID() argument
279 ret = X509_ATTRIBUTE_create_by_OBJ(attr, obj, atrtype, data, len); in X509_ATTRIBUTE_create_by_NID()
285 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr, in X509_ATTRIBUTE_create_by_OBJ() argument
292 if (attr == NULL || *attr == NULL) { in X509_ATTRIBUTE_create_by_OBJ()
298 ret = *attr; in X509_ATTRIBUTE_create_by_OBJ()
306 if (attr != NULL && *attr == NULL) in X509_ATTRIBUTE_create_by_OBJ()
307 *attr = ret; in X509_ATTRIBUTE_create_by_OBJ()
310 if (attr == NULL || ret != *attr) in X509_ATTRIBUTE_create_by_OBJ()
315 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr, in X509_ATTRIBUTE_create_by_txt() argument
328 nattr = X509_ATTRIBUTE_create_by_OBJ(attr, obj, type, bytes, len); in X509_ATTRIBUTE_create_by_txt()
333 int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj) in X509_ATTRIBUTE_set1_object() argument
335 if (attr == NULL || obj == NULL) { in X509_ATTRIBUTE_set1_object()
339 ASN1_OBJECT_free(attr->object); in X509_ATTRIBUTE_set1_object()
340 attr->object = OBJ_dup(obj); in X509_ATTRIBUTE_set1_object()
341 return attr->object != NULL; in X509_ATTRIBUTE_set1_object()
344 int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, in X509_ATTRIBUTE_set1_data() argument
351 if (attr == NULL) { in X509_ATTRIBUTE_set1_data()
357 OBJ_obj2nid(attr->object)); in X509_ATTRIBUTE_set1_data()
393 if (!sk_ASN1_TYPE_push(attr->set, ttmp)) { in X509_ATTRIBUTE_set1_data()
404 int X509_ATTRIBUTE_count(const X509_ATTRIBUTE *attr) in X509_ATTRIBUTE_count() argument
406 if (attr == NULL) in X509_ATTRIBUTE_count()
408 return sk_ASN1_TYPE_num(attr->set); in X509_ATTRIBUTE_count()
411 ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr) in X509_ATTRIBUTE_get0_object() argument
413 if (attr == NULL) { in X509_ATTRIBUTE_get0_object()
417 return attr->object; in X509_ATTRIBUTE_get0_object()
420 void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, in X509_ATTRIBUTE_get0_data() argument
423 ASN1_TYPE *ttmp = X509_ATTRIBUTE_get0_type(attr, idx); in X509_ATTRIBUTE_get0_data()
436 ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx) in X509_ATTRIBUTE_get0_type() argument
438 if (attr == NULL) { in X509_ATTRIBUTE_get0_type()
442 return sk_ASN1_TYPE_value(attr->set, idx); in X509_ATTRIBUTE_get0_type()