|
745 | 745 | test "$enable_psk" = "" && enable_psk=yes |
746 | 746 | test "$enable_cmac" = "" && enable_cmac=yes |
747 | 747 | test "$enable_siphash" = "" && enable_siphash=yes |
748 | | - test "$enable_xts" = "" && enable_xts=yes |
| 748 | + test "$enable_aesxts" = "" && enable_aesxts=yes |
749 | 749 | test "$enable_ocsp" = "" && enable_ocsp=yes |
750 | 750 | test "$enable_ocspstapling" = "" && test "$enable_ocsp" != "no" && enable_ocspstapling=yes |
751 | 751 | test "$enable_ocspstapling2" = "" && test "$enable_ocsp" != "no" && enable_ocspstapling2=yes |
|
933 | 933 | test "$enable_psk" = "" && enable_psk=yes |
934 | 934 | test "$enable_cmac" = "" && enable_cmac=yes |
935 | 935 | test "$enable_siphash" = "" && enable_siphash=yes |
936 | | - test "$enable_xts" = "" && enable_xts=yes |
| 936 | + test "$enable_aesxts" = "" && enable_aesxts=yes |
937 | 937 | test "$enable_ocsp" = "" && enable_ocsp=yes |
938 | 938 | test "$enable_ocspstapling" = "" && test "$enable_ocsp" != "no" && enable_ocspstapling=yes |
939 | 939 | test "$enable_ocspstapling2" = "" && test "$enable_ocsp" != "no" && enable_ocspstapling2=yes |
@@ -4836,17 +4836,23 @@ AS_IF([test "x$ENABLED_CMAC" = "xyes"], |
4836 | 4836 |
|
4837 | 4837 |
|
4838 | 4838 | # AES-XTS |
| 4839 | +AC_ARG_ENABLE([aesxts], |
| 4840 | + [AS_HELP_STRING([--enable-aesxts],[Enable AES XTS (default: disabled)])], |
| 4841 | + [ ENABLED_AESXTS=$enableval ], |
| 4842 | + [ ENABLED_AESXTS=no ] |
| 4843 | + ) |
| 4844 | + |
| 4845 | +# legacy old option name, for compatibility: |
4839 | 4846 | AC_ARG_ENABLE([xts], |
4840 | | - [AS_HELP_STRING([--enable-xts],[Enable XTS (default: disabled)])], |
4841 | | - [ ENABLED_XTS=$enableval ], |
4842 | | - [ ENABLED_XTS=no ] |
| 4847 | + [AS_HELP_STRING([--enable-xts],[Please use --enable-aesxts])], |
| 4848 | + [ ENABLED_AESXTS=$enableval ] |
4843 | 4849 | ) |
4844 | 4850 |
|
4845 | | -AS_IF([test "x$ENABLED_XTS" = "xyes"], |
| 4851 | +AS_IF([test "x$ENABLED_AESXTS" = "xyes"], |
4846 | 4852 | [AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_XTS -DWOLFSSL_AES_DIRECT"]) |
4847 | | -AS_IF([test "x$ENABLED_XTS" = "xyes" && test "x$ENABLED_INTELASM" = "xyes"], |
| 4853 | +AS_IF([test "x$ENABLED_AESXTS" = "xyes" && test "x$ENABLED_INTELASM" = "xyes"], |
4848 | 4854 | [AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_AES_XTS"]) |
4849 | | -AS_IF([test "x$ENABLED_XTS" = "xyes" && test "x$ENABLED_AESNI" = "xyes"], |
| 4855 | +AS_IF([test "x$ENABLED_AESXTS" = "xyes" && test "x$ENABLED_AESNI" = "xyes"], |
4850 | 4856 | [AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_AES_XTS"]) |
4851 | 4857 |
|
4852 | 4858 | # Web Server Build |
@@ -8028,6 +8034,37 @@ if test -n "$MPI_MAX_KEY_BITS" -o -n "$WITH_MAX_ECC_BITS"; then |
8028 | 8034 | fi |
8029 | 8035 | fi |
8030 | 8036 |
|
| 8037 | +AC_ARG_ENABLE([linuxkm-lkcapi-register], |
| 8038 | + [AS_HELP_STRING([--enable-linuxkm-lkcapi-register],[Register wolfCrypt implementations with the Linux Kernel Crypto API backplane. Possible values are "none", "all", "cbc(aes)", "cfb(aes)", "gcm(aes)", and "xts(aes)", or a comma-separate combination. (default: none)])], |
| 8039 | + [ENABLED_LINUXKM_LKCAPI_REGISTER=$enableval], |
| 8040 | + [ENABLED_LINUXKM_LKCAPI_REGISTER=none] |
| 8041 | + ) |
| 8042 | +if test "$ENABLED_LINUXKM_LKCAPI_REGISTER" != "none" |
| 8043 | +then |
| 8044 | + AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER" |
| 8045 | + |
| 8046 | + if test "$ENABLED_AESGCM" != "no" && test "$ENABLED_AESGCM_STREAM" = "no" && test "$ENABLED_AESNI" = "no" && test "$ENABLED_ARMASM" = "no" && test "$ENABLED_FIPS" = "no"; then |
| 8047 | + ENABLED_AESGCM_STREAM=yes |
| 8048 | + fi |
| 8049 | + |
| 8050 | + for lkcapi_alg in $(echo "$ENABLED_LINUXKM_LKCAPI_REGISTER" | tr ',' ' ') |
| 8051 | + do |
| 8052 | + case "$lkcapi_alg" in |
| 8053 | + all) AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_ALL" ;; |
| 8054 | + 'cbc(aes)') test "$ENABLED_AESCBC" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: AES-CBC implementation not enabled.]) |
| 8055 | + AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESCBC" ;; |
| 8056 | + 'cfb(aes)') test "$ENABLED_AESCFB" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: AES-CFB implementation not enabled.]) |
| 8057 | + AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESCFB" ;; |
| 8058 | + 'gcm(aes)') test "$ENABLED_AESGCM" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: AES-GCM implementation not enabled.]) |
| 8059 | + test "$ENABLED_AESGCM_STREAM" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: --enable-aesgcm-stream is required for LKCAPI.]) |
| 8060 | + AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESGCM" ;; |
| 8061 | + 'xts(aes)') test "$ENABLED_AESXTS" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: AES-XTS implementation not enabled.]) |
| 8062 | + AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESXTS" ;; |
| 8063 | + *) AC_MSG_ERROR([Unsupported LKCAPI algorithm "$lkcapi_alg".]) ;; |
| 8064 | + esac |
| 8065 | + done |
| 8066 | +fi |
| 8067 | + |
8031 | 8068 | # Library Suffix |
8032 | 8069 | LIBSUFFIX="" |
8033 | 8070 | AC_ARG_WITH([libsuffix], |
@@ -8958,7 +8995,7 @@ AM_CONDITIONAL([BUILD_SNIFFER], [ test "x$ENABLED_SNIFFER" = "xyes" || test " |
8958 | 8995 | AM_CONDITIONAL([BUILD_SNIFFTEST],[ test "x$ENABLED_SNIFFTEST" = "xyes"]) |
8959 | 8996 | AM_CONDITIONAL([BUILD_AESGCM],[test "x$ENABLED_AESGCM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"]) |
8960 | 8997 | AM_CONDITIONAL([BUILD_AESCCM],[test "x$ENABLED_AESCCM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"]) |
8961 | | -AM_CONDITIONAL([BUILD_XTS],[test "x$ENABLED_XTS" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"]) |
| 8998 | +AM_CONDITIONAL([BUILD_AESXTS],[test "x$ENABLED_AESXTS" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"]) |
8962 | 8999 | AM_CONDITIONAL([BUILD_ARMASM],[test "x$ENABLED_ARMASM" = "xyes"]) |
8963 | 9000 | AM_CONDITIONAL([BUILD_ARMASM_INLINE],[test "x$ENABLED_ARMASM_INLINE" = "xyes"]) |
8964 | 9001 | AM_CONDITIONAL([BUILD_ARMASM_CRYPTO],[test "x$ENABLED_ARMASM_CRYPTO" = "xyes"]) |
@@ -9397,6 +9434,7 @@ echo " * AES-CCM: $ENABLED_AESCCM" |
9397 | 9434 | echo " * AES-CTR: $ENABLED_AESCTR" |
9398 | 9435 | echo " * AES-CFB: $ENABLED_AESCFB" |
9399 | 9436 | echo " * AES-OFB: $ENABLED_AESOFB" |
| 9437 | +echo " * AES-XTS: $ENABLED_AESXTS" |
9400 | 9438 | echo " * AES-SIV: $ENABLED_AESSIV" |
9401 | 9439 | echo " * AES-EAX: $ENABLED_AESEAX" |
9402 | 9440 | echo " * AES Bitspliced: $ENABLED_AESBS" |
|
0 commit comments