Commit a257c5cb22 for openssl.org
commit a257c5cb2265890bca83816a76810f44216f0398
Author: rafael-almeida <13210596+rafael-almeida@users.noreply.github.com>
Date: Wed Oct 28 01:36:24 2026 -0400
test/dtlsv1listentest.c: avoid enum name collisions
The DTLSv1_listen test uses generic outcome constants GOOD, VERIFY,
and DROP, which may conflict with platform-specific headers.
On AIX 6.1, <sys/param.h> already defines GOOD. Rename these constants
to OTT_GOOD, OTT_VERIFY, and OTT_DROP, respectively, and update their
references and comments.
Resolves: https://github.com/openssl/openssl/issues/33367
CLA: trivial
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Merge-date: Fri Oct 30 02:49:12 2026
Merged-from: https://github.com/openssl/openssl/pull/33427
diff --git a/test/dtlsv1listentest.c b/test/dtlsv1listentest.c
index 2f103ecfa3..933b604e6c 100644
--- a/test/dtlsv1listentest.c
+++ b/test/dtlsv1listentest.c
@@ -453,37 +453,37 @@ typedef struct {
const unsigned char *in;
unsigned int inlen;
/*
- * GOOD == positive return value from DTLSv1_listen, no output yet
- * VERIFY == 0 return value, HelloVerifyRequest sent
- * DROP == 0 return value, no output
+ * OTT_GOOD == positive return value from DTLSv1_listen, no output yet
+ * OTT_VERIFY == 0 return value, HelloVerifyRequest sent
+ * OTT_DROP == 0 return value, no output
*/
- enum { GOOD,
- VERIFY,
- DROP } outtype;
+ enum { OTT_GOOD,
+ OTT_VERIFY,
+ OTT_DROP } outtype;
} tests;
static tests testpackets[] = {
- { clienthello_nocookie, sizeof(clienthello_nocookie), VERIFY },
- { clienthello_nocookie_frag, sizeof(clienthello_nocookie_frag), VERIFY },
- { clienthello_nocookie_short, sizeof(clienthello_nocookie_short), DROP },
- { clienthello_2ndfrag, sizeof(clienthello_2ndfrag), DROP },
- { clienthello_cookie, sizeof(clienthello_cookie), GOOD },
- { clienthello_cookie_frag, sizeof(clienthello_cookie_frag), GOOD },
- { clienthello_badcookie, sizeof(clienthello_badcookie), VERIFY },
- { clienthello_cookie_short, sizeof(clienthello_cookie_short), DROP },
- { record_short, sizeof(record_short), DROP }
+ { clienthello_nocookie, sizeof(clienthello_nocookie), OTT_VERIFY },
+ { clienthello_nocookie_frag, sizeof(clienthello_nocookie_frag), OTT_VERIFY },
+ { clienthello_nocookie_short, sizeof(clienthello_nocookie_short), OTT_DROP },
+ { clienthello_2ndfrag, sizeof(clienthello_2ndfrag), OTT_DROP },
+ { clienthello_cookie, sizeof(clienthello_cookie), OTT_GOOD },
+ { clienthello_cookie_frag, sizeof(clienthello_cookie_frag), OTT_GOOD },
+ { clienthello_badcookie, sizeof(clienthello_badcookie), OTT_VERIFY },
+ { clienthello_cookie_short, sizeof(clienthello_cookie_short), OTT_DROP },
+ { record_short, sizeof(record_short), OTT_DROP }
};
static tests testpackets13[] = {
- { clienthello13_nocookie, sizeof(clienthello13_nocookie), VERIFY },
- { clienthello13_nocookie_frag, sizeof(clienthello13_nocookie_frag), VERIFY },
- { clienthello_nocookie_short, sizeof(clienthello_nocookie_short), DROP },
- { clienthello13_2ndfrag, sizeof(clienthello13_2ndfrag), DROP },
- { clienthello13_cookie, sizeof(clienthello13_cookie), GOOD },
- { clienthello_cookie_frag, sizeof(clienthello_cookie_frag), GOOD },
- { clienthello13_badcookie, sizeof(clienthello13_badcookie), VERIFY },
- { clienthello13_cookie_short, sizeof(clienthello13_cookie_short), DROP },
- { record_short, sizeof(record_short), DROP }
+ { clienthello13_nocookie, sizeof(clienthello13_nocookie), OTT_VERIFY },
+ { clienthello13_nocookie_frag, sizeof(clienthello13_nocookie_frag), OTT_VERIFY },
+ { clienthello_nocookie_short, sizeof(clienthello_nocookie_short), OTT_DROP },
+ { clienthello13_2ndfrag, sizeof(clienthello13_2ndfrag), OTT_DROP },
+ { clienthello13_cookie, sizeof(clienthello13_cookie), OTT_GOOD },
+ { clienthello_cookie_frag, sizeof(clienthello_cookie_frag), OTT_GOOD },
+ { clienthello13_badcookie, sizeof(clienthello13_badcookie), OTT_VERIFY },
+ { clienthello13_cookie_short, sizeof(clienthello13_cookie_short), OTT_DROP },
+ { record_short, sizeof(record_short), OTT_DROP }
};
#define COOKIE_LEN 20
@@ -594,13 +594,13 @@ static int dtls_listen_test(int i)
goto err;
datalen = BIO_get_mem_data(outbio, &data);
- if (tp->outtype == VERIFY) {
+ if (tp->outtype == OTT_VERIFY) {
if (!TEST_int_eq(ret, 0)
|| !TEST_mem_eq(data, datalen, verify, sizeof(verify)))
goto err;
} else if (datalen == 0) {
- if (!TEST_true((ret == 0 && tp->outtype == DROP)
- || (ret == 1 && tp->outtype == GOOD)))
+ if (!TEST_true((ret == 0 && tp->outtype == OTT_DROP)
+ || (ret == 1 && tp->outtype == OTT_GOOD)))
goto err;
} else {
TEST_info("Test %d: unexpected data output", i);