Skip to content

Commit 4a1df83

Browse files
committed
configure.ac: Add in --enable-rpk option
By default RPK (RFC7250) support is not enabled, but is enabled when --enable-rpk, --enable-all or --enable-dist is used. Makes use of the HAVE_RPK compile time option. Fix clang issue reported in tests/api.c during test suites
1 parent a75c2be commit 4a1df83

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

configure.ac

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,7 @@ then
868868
test "$enable_earlydata" = "" && enable_earlydata=yes
869869
test "$enable_ech" = "" && enable_ech=yes
870870
test "$enable_srtp" = "" && enable_srtp=yes
871+
test "$enable_rpk" = "" && enable_rpk=yes
871872

872873
if test "$ENABLED_LINUXKM_DEFAULTS" != "yes"
873874
then
@@ -8451,6 +8452,13 @@ AC_ARG_ENABLE([dual-alg-certs],
84518452
84528453
AS_IF([ test "$ENABLED_DUAL_ALG_CERTS" != "no" && test "$ENABLED_EXPERIMENTAL" != "yes" ],[ AC_MSG_ERROR([dual-alg-certs requires --enable-experimental.]) ])
84538454
8455+
# Adds functionality to support Raw Public Key (RPK) RFC7250
8456+
AC_ARG_ENABLE([rpk],
8457+
[AS_HELP_STRING([--enable-rpk],[Enable support for Raw Public Key (RPK) RFC7250 (default: disabled)])],
8458+
[ ENABLED_RPK=$enableval ],
8459+
[ ENABLED_RPK=no ]
8460+
)
8461+
84548462
# check if should run the trusted peer certs test
84558463
# (for now checking both C_FLAGS and C_EXTRA_FLAGS)
84568464
AS_CASE(["$CFLAGS $CPPFLAGS"],[*'WOLFSSL_TRUST_PEER_CERT'*],[ENABLED_TRUSTED_PEER_CERT=yes])
@@ -8819,6 +8827,9 @@ AS_IF([test "x$ENABLED_SYS_CA_CERTS" = "xyes"],
88198827
AS_IF([test "x$ENABLED_DUAL_ALG_CERTS" = "xyes"],
88208828
[AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DUAL_ALG_CERTS"])
88218829
8830+
AS_IF([test "x$ENABLED_RPK" = "xyes"],
8831+
[AM_CFLAGS="$AM_CFLAGS -DHAVE_RPK"])
8832+
88228833
AS_IF([test "x$ENABLED_ALTNAMES" = "xyes"],
88238834
[AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALT_NAMES"])
88248835
@@ -9883,6 +9894,7 @@ echo " * TLS v1.0 (Old): $ENABLED_TLSV10"
98839894
echo " * TLS v1.1 (Old): $ENABLED_OLD_TLS"
98849895
echo " * TLS v1.2: $ENABLED_TLSV12"
98859896
echo " * TLS v1.3: $ENABLED_TLS13"
9897+
echo " * RPK: $ENABLED_RPK"
98869898
echo " * Post-handshake Auth: $ENABLED_TLS13_POST_AUTH"
98879899
echo " * Early Data: $ENABLED_TLS13_EARLY_DATA"
98889900
echo " * QUIC: $ENABLED_QUIC"

tests/api.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68186,6 +68186,9 @@ static int test_tls13_rpk_handshake(void)
6818668186
int typeCnt_c;
6818768187
int typeCnt_s;
6818868188
int tp;
68189+
#if defined(WOLFSSL_ALWAYS_VERIFY_CB)
68190+
int isServer;
68191+
#endif
6818968192

6819068193
(void)err;
6819168194
(void)typeCnt_c;
@@ -68805,7 +68808,7 @@ static int test_tls13_rpk_handshake(void)
6880568808
WOLFSSL_SUCCESS);
6880668809

6880768810
/* set certificate verify callback to both client and server */
68808-
int isServer = 0;
68811+
isServer = 0;
6880968812
wolfSSL_SetCertCbCtx(ssl_c, &isServer);
6881068813
wolfSSL_set_verify(ssl_c, SSL_VERIFY_PEER, MyRpkVerifyCb);
6881168814

0 commit comments

Comments
 (0)