projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make X509_ATTRIBUTE opaque.
[openssl.git]
/
apps
/
pkcs12.c
diff --git
a/apps/pkcs12.c
b/apps/pkcs12.c
index 0de46f008d2d7f8cd4dbc7ae32e7ab1d9804f3d1..e33fe243eed353da077a5aa89c9717536d88fd5f 100644
(file)
--- a/
apps/pkcs12.c
+++ b/
apps/pkcs12.c
@@
-892,7
+892,6
@@
int dump_certs_pkeys_bag(BIO *out, PKCS12_SAFEBAG *bag, char *pass,
i2a_ASN1_OBJECT(bio_err, bag->type);
BIO_printf(bio_err, "\n");
return 1;
i2a_ASN1_OBJECT(bio_err, bag->type);
BIO_printf(bio_err, "\n");
return 1;
- break;
}
return 1;
}
}
return 1;
}
@@
-994,17
+993,19
@@
int print_attribs(BIO *out, STACK_OF(X509_ATTRIBUTE) *attrlst,
}
BIO_printf(out, "%s\n", name);
for (i = 0; i < sk_X509_ATTRIBUTE_num(attrlst); i++) {
}
BIO_printf(out, "%s\n", name);
for (i = 0; i < sk_X509_ATTRIBUTE_num(attrlst); i++) {
+ ASN1_OBJECT *attr_obj;
attr = sk_X509_ATTRIBUTE_value(attrlst, i);
attr = sk_X509_ATTRIBUTE_value(attrlst, i);
- attr_nid = OBJ_obj2nid(attr->object);
+ attr_obj = X509_ATTRIBUTE_get0_object(attr);
+ attr_nid = OBJ_obj2nid(attr_obj);
BIO_printf(out, " ");
if (attr_nid == NID_undef) {
BIO_printf(out, " ");
if (attr_nid == NID_undef) {
- i2a_ASN1_OBJECT(out, attr
->object
);
+ i2a_ASN1_OBJECT(out, attr
_obj
);
BIO_printf(out, ": ");
} else
BIO_printf(out, "%s: ", OBJ_nid2ln(attr_nid));
BIO_printf(out, ": ");
} else
BIO_printf(out, "%s: ", OBJ_nid2ln(attr_nid));
- if (
sk_ASN1_TYPE_num(attr->value.set
)) {
- av =
sk_ASN1_TYPE_value(attr->value.set
, 0);
+ if (
X509_ATTRIBUTE_count(attr
)) {
+ av =
X509_ATTRIBUTE_get0_type(attr
, 0);
switch (av->type) {
case V_ASN1_BMPSTRING:
value = OPENSSL_uni2asc(av->value.bmpstring->data,
switch (av->type) {
case V_ASN1_BMPSTRING:
value = OPENSSL_uni2asc(av->value.bmpstring->data,