diff options
author | Damian Hobson-Garcia <dhobsong@igel.co.jp> | 2023-06-30 17:12:38 -0400 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2024-04-24 14:05:35 +0100 |
commit | 62960b8710a39d58fe386a51dccbd35bd973220f (patch) | |
tree | bc6dfdf65b953011a67b10dd096d6cdd45fc3691 /include | |
parent | 6b167313f422b8744c1f4edc8688f7e6923a3a73 (diff) |
x509_acert: Add, remove and get attribute certificate attributes
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15857)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/x509_acert.h.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/openssl/x509_acert.h.in b/include/openssl/x509_acert.h.in index 867eab7869..8e5744c0d8 100644 --- a/include/openssl/x509_acert.h.in +++ b/include/openssl/x509_acert.h.in @@ -66,6 +66,13 @@ int X509_ACERT_print(BIO *bp, X509_ACERT *x); int X509_ACERT_print_ex(BIO *bp, X509_ACERT *x, unsigned long nmflags, unsigned long cflag); +int X509_ACERT_get_attr_count(const X509_ACERT *x); +int X509_ACERT_get_attr_by_NID(const X509_ACERT *x, int nid, int lastpos); +int X509_ACERT_get_attr_by_OBJ(const X509_ACERT *x, const ASN1_OBJECT *obj, + int lastpos); +X509_ATTRIBUTE *X509_ACERT_get_attr(const X509_ACERT *x, int loc); +X509_ATTRIBUTE *X509_ACERT_delete_attr(X509_ACERT *x, int loc); + # define OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEY 0 # define OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEY_CERT 1 # define OSSL_OBJECT_DIGEST_INFO_OTHER 2 /* must not be used in RFC 5755 profile */ @@ -75,6 +82,14 @@ void X509_ACERT_set0_holder_baseCertId(X509_ACERT *x, OSSL_ISSUER_SERIAL *isss); void X509_ACERT_set0_holder_digest(X509_ACERT *x, OSSL_OBJECT_DIGEST_INFO *dinfo); +int X509_ACERT_add1_attr(X509_ACERT *x, X509_ATTRIBUTE *attr); +int X509_ACERT_add1_attr_by_OBJ(X509_ACERT *x, const ASN1_OBJECT *obj, + int type, const void *bytes, int len); +int X509_ACERT_add1_attr_by_NID(X509_ACERT *x, int nid, int type, + const void *bytes, int len); +int X509_ACERT_add1_attr_by_txt(X509_ACERT *x, const char *attrname, int type, + const unsigned char *bytes, int len); + int X509_ACERT_set1_issuerName(X509_ACERT *x, const X509_NAME *name); int X509_ACERT_set1_serialNumber(X509_ACERT *x, const ASN1_INTEGER *serial); int X509_ACERT_set1_notBefore(X509_ACERT *x, const ASN1_GENERALIZEDTIME *time); |