Skip to content

Commit

Permalink
SM3 ASM file: protect with check for WOLFSSL_SM3
Browse files Browse the repository at this point in the history
Protect sm3_asm.S with check for WOLFSSL_SM3.
Change configure.ac to define WOLFSSL_SM3 in ASM flags when SM3 enabled
and enabling intelasm.
  • Loading branch information
SparkiDev committed Jul 20, 2023
1 parent b7b4be8 commit 9b2345d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2733,6 +2733,7 @@ then
esac
fi
AS_IF([test "x$ENABLED_AESGCM" != "xno"],[AM_CCASFLAGS="$AM_CCASFLAGS -DHAVE_AESGCM"])
AS_IF([test "x$ENABLED_SM3" != "xno"],[AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SM3"])
fi

if test "$ENABLED_INTELASM" = "yes"
Expand Down
10 changes: 10 additions & 0 deletions wolfcrypt/src/sm3_asm.S
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <wolfssl/wolfcrypt/settings.h>

#ifdef WOLFSSL_SM3

#error "Contact wolfSSL to get the implementation of this file"

#endif

0 comments on commit 9b2345d

Please sign in to comment.