Skip to content

Commit f373ae8

Browse files
author
Test User
committed
Add correct config and replace default macro
1 parent 8f91bb9 commit f373ae8

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

configure.ac

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,27 @@ if test "x$have_openssl" = "xyes"; then
4040
LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
4141
fi
4242

43+
# Check if OpenSSL is built with replace-default mode
44+
AC_MSG_CHECKING([if OpenSSL is built with replace-default mode])
45+
AC_RUN_IFELSE(
46+
[AC_LANG_PROGRAM(
47+
[[#include <openssl/opensslv.h>
48+
#include <string.h>
49+
#include <stdio.h>]],
50+
[[const char *version = OPENSSL_VERSION_TEXT;
51+
if (strstr(version, "replace-default") != NULL) {
52+
return 0;
53+
}
54+
return 1;]])],
55+
[replace_default=yes],
56+
[replace_default=no],
57+
[replace_default=no])
58+
AC_MSG_RESULT([$replace_default])
59+
60+
if test "$replace_default" = "yes"; then
61+
AM_CFLAGS="$AM_CFLAGS -DREPLACE_DEFAULT"
62+
fi
63+
4364
# wolfSSL
4465
AX_CHECK_WOLFSSL(
4566
[have_wolfssl=yes],

debian/rules

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,4 @@ override_dh_auto_clean:
8282
rm -rf test/standalone/tests/.libs
8383

8484
override_dh_auto_test:
85-
@if [ "$$WOLFSSL_ISFIPS" = "1" ]; then \
86-
echo "WARNING: Skipping tests in FIPS mode (test issues being resolved)"; \
87-
else \
88-
$(MAKE) test; \
89-
fi
85+
$(MAKE) test

test/test_rsa.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,12 +589,13 @@ int test_rsa_sign_sha1(void *data)
589589
if (err == 0) {
590590
err = RAND_bytes(buf, sizeof(buf)) == 0;
591591
}
592-
592+
#ifdef REPLACE_DEFAULT
593593
if (err == 0) {
594594
PRINT_MSG("Sign with OpenSSL");
595595
err = test_digest_sign(pkey, osslLibCtx, buf, sizeof(buf), "SHA-1",
596596
rsaSig, &rsaSigLen, 0);
597597
}
598+
#endif
598599
if (err == 0) {
599600
PRINT_MSG("Verify with wolfprovider");
600601
err = test_digest_verify(pkey, wpLibCtx, buf, sizeof(buf), "SHA-1",

0 commit comments

Comments
 (0)