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>
diff --git a/crypto/x509v3/v3_akey.c b/crypto/x509v3/v3_akey.c
index 76ac834..b4093bf 100644
--- a/crypto/x509v3/v3_akey.c
+++ b/crypto/x509v3/v3_akey.c
@@ -164,7 +164,7 @@
}
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);
diff --git a/crypto/x509v3/v3_alt.c b/crypto/x509v3/v3_alt.c
index cec354a..660ced5 100644
--- a/crypto/x509v3/v3_alt.c
+++ b/crypto/x509v3/v3_alt.c
@@ -302,7 +302,7 @@
// 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 @@
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)) {
diff --git a/crypto/x509v3/v3_skey.c b/crypto/x509v3/v3_skey.c
index 56fdabc..eac7c1d 100644
--- a/crypto/x509v3/v3_skey.c
+++ b/crypto/x509v3/v3_skey.c
@@ -113,7 +113,7 @@
return NULL;
}
- if (ctx && (ctx->flags == CTX_TEST)) {
+ if (ctx && (ctx->flags == X509V3_CTX_TEST)) {
return oct;
}
diff --git a/include/openssl/x509v3.h b/include/openssl/x509v3.h
index affbc76..a3d0d33 100644
--- a/include/openssl/x509v3.h
+++ b/include/openssl/x509v3.h
@@ -577,8 +577,7 @@
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 @@
//
// 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