Skip to content

Commit 6378c47

Browse files
davidbenBoringssl LUCI CQ
authored and
Boringssl LUCI CQ
committed
Unexport X509_CERT_AUX and remove X509_CERT_AUX.other
This type is opaque, with no accessors or setters, and there is no way to get a hold of one except by parsing it. It's only used indirectly via X509 functions. The 'other' field is unused and appears to be impossible to set or query, in either us or upstream. Change-Id: I4aca665872792f75e9d92e5af68da597b849d4b6 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/51746 Reviewed-by: Adam Langley <[email protected]> Commit-Queue: David Benjamin <[email protected]>
1 parent d0f14f3 commit 6378c47

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

crypto/x509/internal.h

+6-3
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,14 @@ struct x509_attributes_st {
106106
STACK_OF(ASN1_TYPE) *set;
107107
} /* X509_ATTRIBUTE */;
108108

109-
struct x509_cert_aux_st {
109+
typedef struct x509_cert_aux_st {
110110
STACK_OF(ASN1_OBJECT) *trust; // trusted uses
111111
STACK_OF(ASN1_OBJECT) *reject; // rejected uses
112112
ASN1_UTF8STRING *alias; // "friendly name"
113113
ASN1_OCTET_STRING *keyid; // key id of private key
114-
STACK_OF(X509_ALGOR) *other; // other unspecified info
115-
} /* X509_CERT_AUX */;
114+
} X509_CERT_AUX;
115+
116+
DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX)
116117

117118
struct X509_extension_st {
118119
ASN1_OBJECT *object;
@@ -370,6 +371,8 @@ struct x509_store_ctx_st {
370371

371372
ASN1_TYPE *ASN1_generate_v3(const char *str, X509V3_CTX *cnf);
372373

374+
int X509_CERT_AUX_print(BIO *bp, X509_CERT_AUX *x, int indent);
375+
373376

374377
/* RSA-PSS functions. */
375378

crypto/x509/x_x509a.c

-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ ASN1_SEQUENCE(X509_CERT_AUX) = {
7878
ASN1_IMP_SEQUENCE_OF_OPT(X509_CERT_AUX, reject, ASN1_OBJECT, 0),
7979
ASN1_OPT(X509_CERT_AUX, alias, ASN1_UTF8STRING),
8080
ASN1_OPT(X509_CERT_AUX, keyid, ASN1_OCTET_STRING),
81-
ASN1_IMP_SEQUENCE_OF_OPT(X509_CERT_AUX, other, X509_ALGOR, 1)
8281
} ASN1_SEQUENCE_END(X509_CERT_AUX)
8382

8483
IMPLEMENT_ASN1_FUNCTIONS(X509_CERT_AUX)

include/openssl/base.h

-1
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@ typedef struct trust_token_issuer_st TRUST_TOKEN_ISSUER;
448448
typedef struct trust_token_method_st TRUST_TOKEN_METHOD;
449449
typedef struct v3_ext_ctx X509V3_CTX;
450450
typedef struct x509_attributes_st X509_ATTRIBUTE;
451-
typedef struct x509_cert_aux_st X509_CERT_AUX;
452451
typedef struct x509_crl_method_st X509_CRL_METHOD;
453452
typedef struct x509_lookup_st X509_LOOKUP;
454453
typedef struct x509_lookup_method_st X509_LOOKUP_METHOD;

include/openssl/x509.h

-2
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,6 @@ DECLARE_ASN1_FUNCTIONS(X509_NAME)
858858
OPENSSL_EXPORT int X509_NAME_set(X509_NAME **xn, X509_NAME *name);
859859

860860
DECLARE_ASN1_FUNCTIONS(X509)
861-
DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX)
862861

863862
// X509_up_ref adds one to the reference count of |x509| and returns one.
864863
OPENSSL_EXPORT int X509_up_ref(X509 *x509);
@@ -1362,7 +1361,6 @@ OPENSSL_EXPORT int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag,
13621361
unsigned long cflag);
13631362
OPENSSL_EXPORT int X509_print(BIO *bp, X509 *x);
13641363
OPENSSL_EXPORT int X509_ocspid_print(BIO *bp, X509 *x);
1365-
OPENSSL_EXPORT int X509_CERT_AUX_print(BIO *bp, X509_CERT_AUX *x, int indent);
13661364
OPENSSL_EXPORT int X509_CRL_print(BIO *bp, X509_CRL *x);
13671365
OPENSSL_EXPORT int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
13681366
unsigned long cflag);

0 commit comments

Comments
 (0)