Rename CTX_TEST to X509V3_CTX_TEST.

Squat fewer unprefixed macros.

Update-Note: CTX_TEST appears to be unused. If affected, switch to using
X509V3_set_ctx_test instead.

Change-Id: I43b86c0b6f147bbca85b8bc6b43602fc4f6697c1
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/56108
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
fips-20230428
David Benjamin 2 years ago committed by Boringssl LUCI CQ
parent db38fc5593
commit 65ad925f51
  1. 2
      crypto/x509v3/v3_akey.c
  2. 4
      crypto/x509v3/v3_alt.c
  3. 2
      crypto/x509v3/v3_skey.c
  4. 5
      include/openssl/x509v3.h

@ -164,7 +164,7 @@ static void *v2i_AUTHORITY_KEYID(const X509V3_EXT_METHOD *method,
}
if (!ctx || !ctx->issuer_cert) {
if (ctx && (ctx->flags == CTX_TEST)) {
if (ctx && (ctx->flags == X509V3_CTX_TEST)) {
return AUTHORITY_KEYID_new();
}
OPENSSL_PUT_ERROR(X509V3, X509V3_R_NO_ISSUER_CERTIFICATE);

@ -302,7 +302,7 @@ err:
// Append subject altname of issuer to issuer alt name of subject
static int copy_issuer(const X509V3_CTX *ctx, GENERAL_NAMES *gens) {
if (ctx && (ctx->flags == CTX_TEST)) {
if (ctx && (ctx->flags == X509V3_CTX_TEST)) {
return 1;
}
if (!ctx || !ctx->issuer_cert) {
@ -382,7 +382,7 @@ static int copy_email(const X509V3_CTX *ctx, GENERAL_NAMES *gens, int move_p) {
X509_NAME_ENTRY *ne;
GENERAL_NAME *gen = NULL;
int i;
if (ctx != NULL && ctx->flags == CTX_TEST) {
if (ctx != NULL && ctx->flags == X509V3_CTX_TEST) {
return 1;
}
if (!ctx || (!ctx->subject_cert && !ctx->subject_req)) {

@ -113,7 +113,7 @@ static void *s2i_skey_id(const X509V3_EXT_METHOD *method, const X509V3_CTX *ctx,
return NULL;
}
if (ctx && (ctx->flags == CTX_TEST)) {
if (ctx && (ctx->flags == X509V3_CTX_TEST)) {
return oct;
}

@ -577,8 +577,7 @@ struct v3_ext_ctx {
const CONF *db;
};
// TODO(davidben): Rename this to |X509V3_CTX_TEST|.
#define CTX_TEST 0x1
#define X509V3_CTX_TEST 0x1
// X509V3_set_ctx partially initializes |ctx| with the specified objects. Some
// string formats will reference fields in these objects. Each object may be
@ -603,7 +602,7 @@ OPENSSL_EXPORT void X509V3_set_ctx(X509V3_CTX *ctx, const X509 *issuer,
//
// TODO(davidben): Can we remove this?
#define X509V3_set_ctx_test(ctx) \
X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, CTX_TEST)
X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, X509V3_CTX_TEST)
// X509V3_set_nconf partially initializes |ctx| with |conf| as the config
// database. Some string formats will reference sections in |conf|. |conf| may

Loading…
Cancel
Save