@@ -5420,65 +5420,6 @@ then
54205420 esac
54215421fi
54225422
5423-
5424- # USER CRYPTO
5425- ENABLED_USER_CRYPTO="no"
5426- ENABLED_USER_RSA="no"
5427- AC_DEFINE ( [ BUILD_USER_RSA] , [ ] , [ User RSA is being defined] )
5428- trycryptodir=""
5429- AC_ARG_WITH ( [ user-crypto] ,
5430- [ AS_HELP_STRING ( [ --with-user-crypto=PATH] ,[ Path to USER_CRYPTO install (default /usr/local)] ) ] ,
5431- [
5432- CPPFLAGS="$CPPFLAGS -DHAVE_USER_CRYPTO"
5433- LIBS="$LIBS -lusercrypto"
5434-
5435- if test "x$withval" != "xno" ; then
5436- trycryptodir=$withval
5437- fi
5438- if test "x$withval" = "xyes" ; then
5439- trycryptodir="/usr/local"
5440- fi
5441-
5442- LDFLAGS="$LDFLAGS -L$trycryptodir/lib"
5443- CPPFLAGS="$CPPFLAGS -I$trycryptodir/include"
5444-
5445- #Look for RSA Init function in usercrypto lib
5446- AC_CHECK_LIB ( [ usercrypto] , [ wc_InitRsaKey] , [ user_rsa_linked=yes] , [ user_rsa_linked=no] )
5447-
5448- if test "x$user_rsa_linked" = "xyes" ; then
5449- AC_MSG_NOTICE ( [ User user_rsa.h being used] )
5450- AM_CFLAGS="$AM_CFLAGS -DHAVE_USER_RSA"
5451- ENABLED_USER_RSA=yes
5452- ENABLED_USER_CRYPTO=yes
5453- fi
5454-
5455-
5456- #Display check and find result of link attempts
5457- AC_MSG_CHECKING ( [ for USER_CRYPTO] )
5458- if test "x$ENABLED_USER_CRYPTO" = "xno" ; then
5459- AC_MSG_RESULT ( [ no] )
5460- AC_MSG_ERROR ( [ USER_CRYPTO not found. Either move to /usr/include and /usr/lib or
5461- Specify its path using --with-user-crypto=/dir/] )
5462- else
5463- AC_MSG_RESULT ( [ yes] )
5464- # Check if .la is available if not then rely on exported path
5465- if test -e $trycryptodir/lib/libusercrypto.la
5466- then
5467- LIB_ADD="$trycryptodir/lib/libusercrypto.la $LIB_ADD"
5468- else
5469- LIB_ADD="-lusercrypto $LIB_ADD"
5470- fi
5471- AM_LDFLAGS="$AM_LDFLAGS -L$trycryptodir/lib"
5472- AM_CFLAGS="$AM_CFLAGS -DHAVE_USER_CRYPTO"
5473- fi
5474- ]
5475- )
5476-
5477- if test "$ENABLED_USER_CRYPTO" = "yes" && test "$ENABLED_FIPS" = "yes"
5478- then
5479- AC_MSG_ERROR ( [ cannot enable user crypto and fips, user crypto possibility of using code in fips boundary.] )
5480- fi
5481-
54825423# Whitewood netRandom client library
54835424ENABLED_WNR="no"
54845425trywnrdir=""
@@ -7795,171 +7736,6 @@ fi
77957736# End - Single Precision option handling #
77967737# ###############################################################################
77977738
7798- # Fast RSA using Intel IPP
7799- ippdir="${srcdir}/IPP"
7800- ipplib="lib" # if autoconf guesses 32bit system changes lib directory
7801- fastRSA_found=no
7802- abs_path=`pwd`
7803-
7804- # set up variables used
7805- IPPLIBS=
7806- IPPHEADERS=
7807- IPPLINK=
7808-
7809- AC_ARG_ENABLE ( [ fast-rsa] ,
7810- [ AS_HELP_STRING ( [ --enable-fast-rsa] ,[ Enable RSA using Intel IPP (default: disabled)] ) ] ,
7811- [ ENABLED_FAST_RSA=$enableval ] ,
7812- [ ENABLED_FAST_RSA=no ] ,
7813- )
7814-
7815- # Fast RSA does not support RSA-PSS
7816- if test "$ENABLED_RSAPSS" = "yes"; then
7817- ENABLED_FAST_RSA=no
7818- fi
7819-
7820- if test "$ENABLED_USER_RSA" = "no" && test "$ENABLED_FIPS" = "no"; then
7821-
7822- if test "$ac_cv_sizeof_long" = "4" && test "$ac_cv_sizeof_long_long" = "8"; then
7823- ipplib="lib_32" # 32 bit OS detected
7824- fi
7825-
7826- # Use static IPP Libraries
7827- if test "$enable_shared" = "no" && test "$ENABLED_FAST_RSA" = "yes"; then
7828- case $host_os in
7829- *darwin*)
7830- ipplib="$ipplib/mac_static"
7831- AC_MSG_ERROR ( [ Issue with static linking to libippcp.a on Mac.
7832- Dynamic IPP libraries supported on Mac] )
7833- break;;
7834-
7835- *linux*)
7836- ipplib="$ipplib/linux_static"
7837- break;;
7838- *)
7839- ENABLED_FAST_RSA=no
7840- esac
7841-
7842- if test -e $srcdir/IPP/$ipplib/libippcore.a && test -e $srcdir/IPP/$ipplib/libippcp.a
7843- then
7844- :
7845- else
7846- ENABLED_FAST_RSA=no
7847- fi
7848- AC_CHECK_HEADERS ( [ IPP/include/ipp.h IPP/include/ippcp.h] , [ AM_CPPFLAGS="-I$srcdir/IPP/include $AM_CPPFLAGS"] , [ ENABLED_FAST_RSA=no] )
7849- LIB_STATIC_ADD="$srcdir/IPP/$ipplib/libippcp.a $srcdir/IPP/$ipplib/libippcore.a $LIB_STATIC_ADD"
7850- if test "$ENABLED_FAST_RSA" = "no"; then
7851- AC_MSG_ERROR ( [ Could not find fast rsa libraries] )
7852- fi
7853- else
7854-
7855- # Check for and use bundled IPP libraries
7856- if test "$ENABLED_FAST_RSA" = "yes"; then
7857- AC_MSG_NOTICE ( [ Using local IPP crypto library] )
7858-
7859- AC_CHECK_HEADER ( [ $abs_path/IPP/include/ippcp.h] ,
7860- [
7861- # build and default locations on linux and mac
7862- STORE_LDFLAGS=${LDFLAGS}
7863- STORE_CPPFLAGS=${CPPFLAGS}
7864-
7865- # using LDFLAGS instead of AM_ temporarily to test link to library
7866- LDFLAGS="-L$ippdir/$ipplib -lippcp -lippcore"
7867- CPPFLAGS="-I$ippdir/include"
7868- AC_CHECK_HEADERS ( [ ippcp.h] , [ AC_CHECK_LIB ( [ ippcp] , [ ippsRSAEncrypt_PKCSv15] , [ fastRSA_found=yes] , [ fastRSA_found=no] ) ] , [ fastRSA_found=no] )
7869- name="$ippdir/$ipplib/libippcp"
7870- case $host_os in
7871- *darwin*)
7872- # check file existence and conditionally set variables
7873- if test -e $abs_path/IPP/$ipplib/libippcp.dylib
7874- then
7875- IPPLIBS="${name}.dylib ${name}-9.0.dylib ${name}e9-9.0.dylib ${name}g9-9.0.dylib ${name}h9-9.0.dylib ${name}k0-9.0.dylib ${name}l9-9.0.dylib ${name}n8-9.0.dylib ${name}p8-9.0.dylib ${name}s8-9.0.dylib ${name}y8-9.0.dylib IPP/lib/libippcore.dylib IPP/lib/libippcore-9.0.dylib"
7876- IPPLINK="mkdir -p src/.libs && ln -f ${name}.dylib src/.libs/libippcp.dylib && ln -f ${srcdir}/${name}-9.0.dylib src/.libs/libippcp-9.0.dylib && ln -f ${srcdir}/${name}e9-9.0.dylib src/.libs/libippcpe9-9.0.dylib && ln -f ${srcdir}/${name}g9-9.0.dylib src/.libs/libippcpg9-9.0.dylib && ln -f ${srcdir}/${name}h9-9.0.dylib src/.libs/libippcph9-9.0.dylib && ln -f ${srcdir}/${name}k0-9.0.dylib src/.libs/libippcpk0-9.0.dylib && ln -f ${srcdir}/${name}l9-9.0.dylib src/.libs/libippcpl9-9.0.dylib && ln -f ${srcdir}/${name}n8-9.0.dylib src/.libs/libippcpn8-9.0.dylib && ln -f ${srcdir}/${name}p8-9.0.dylib src/.libs/libippcpp8-9.0.dylib && ln -f ${srcdir}/${name}s8-9.0.dylib src/.libs/libippcps8-9.0.dylib && ln -f ${srcdir}/${name}y8-9.0.dylib src/.libs/libippcpy8-9.0.dylib && ln -f ${srcdir}/IPP/lib/libippcore.dylib src/.libs/libippcore.dylib && ln -f ${srcdir}/IPP/lib/libippcore-9.0.dylib src/.libs/libippcore-9.0.dylib"
7877- else
7878- fastRSA_found=no
7879- fi
7880- break;;
7881-
7882- *linux*)
7883- # check file existence and conditionally set variables
7884- if test -e $abs_path/IPP/$ipplib/libippcp.so.9.0
7885- then
7886- if test "$ac_cv_sizeof_long" = "4" && test "$ac_cv_sizeof_long_long" = "8"; then
7887- IPPLIBS="${name}.so.9.0 ${name}g9.so.9.0 ${name}h9.so.9.0 ${name}p8.so.9.0 ${name}px.so.9.0 ${name}s8.so.9.0 ${name}.so ${name}w7.so.9.0 IPP/$ipplib/libippcore.so IPP/$ipplib/libippcore.so.9.0"
7888- IPPLINK="mkdir -p src/.libs && ln -f ${name}.so.9.0 src/.libs/libippcp.so.9.0 && ln -f ${name}g9.so.9.0 src/.libs/libippcpg9.so.9.0 && ln -f ${name}h9.so.9.0 src/.libs/libippcph9.so.9.0 && ln -f ${name}p8.so.9.0 src/.libs/libippcpp8.so.9.0 && ln -f ${name}px.so.9.0 src/.libs/libippcppx.so.9.0 && ln -f ${name}s8.so.9.0 src/.libs/libippcps8.so.9.0 && ln -f ${name}.so src/.libs/libippcp.so && ln -f ${name}w7.so.9.0 src/.libs/libippcpw7.so.9.0 && ln -f IPP/$ipplib/libippcore.so src/.libs/libippcore.so && ln -f IPP/$ipplib/libippcore.so.9.0 src/.libs/libippcore.so.9.0"
7889- else
7890- IPPLIBS="${name}.so.9.0 ${name}e9.so.9.0 ${name}k0.so.9.0 ${name}l9.so.9.0 ${name}m7.so.9.0 ${name}mx.so.9.0 ${name}.so ${name}n8.so.9.0 ${name}y8.so.9.0 IPP/lib/libippcore.so IPP/lib/libippcore.so.9.0"
7891- IPPLINK="mkdir -p src/.libs && ln -f ${name}.so.9.0 src/.libs/libippcp.so.9.0 && ln -f ${name}e9.so.9.0 src/.libs/libippcpe9.so.9.0 && ln -f ${name}k0.so.9.0 src/.libs/libippcpk0.so.9.0 && ln -f ${name}l9.so.9.0 src/.libs/libippcpl9.so.9.0 && ln -f ${name}m7.so.9.0 src/.libs/libippcpm7.so.9.0 && ln -f ${name}mx.so.9.0 src/.libs/libippcpmx.so.9.0 && ln -f ${name}.so src/.libs/libippcp.so && ln -f ${name}n8.so.9.0 src/.libs/libippcpn8.so.9.0 && ln -f ${name}y8.so.9.0 src/.libs/libippcpy8.so.9.0 && ln -f IPP/lib/libippcore.so src/.libs/libippcore.so && ln -f IPP/lib/libippcore.so.9.0 src/.libs/libippcore.so.9.0"
7892- fi
7893- else
7894- fastRSA_found=no
7895- fi
7896- break;;
7897- *)
7898- fastRSA_found=no
7899- esac
7900-
7901- if test "$fastRSA_found" = "yes"; then
7902- # was successful so add tested LDFLAGS to AM_ flags
7903- AM_LDFLAGS="${AM_LDFLAGS} ${LDFLAGS}"
7904- AM_CPPFLAGS="${AM_CPPFLAGS} ${CPPFLAGS}"
7905- IPPHEADERS="${srcdir}/IPP/include/*.h"
7906- fi
7907-
7908- # restore LDFLAGS to user set
7909- LDFLAGS=${STORE_LDFLAGS}
7910- CPPFLAGS=${STORE_CPPFLAGS}
7911- ] , [ fastRSA_found=no] )
7912- fi
7913-
7914- # Don't cache the result so it can be checked
7915- AS_UNSET ( [ ac_cv_header_ippcp_h] )
7916- AS_UNSET ( [ ac_cv_header_ipp_h] )
7917- AS_UNSET ( [ ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15] ) ;
7918-
7919- # Check link and see if user has pre-existing IPP Libraries if not using local
7920- if test "$ENABLED_FAST_RSA" = "yes" && test "$fastRSA_found" = "no"; then
7921- AC_MSG_NOTICE ( [ Checking if IPP crypto library installed] )
7922- AC_CHECK_HEADER ( [ ippcp.h] , [ AC_CHECK_LIB ( [ ippcp] , [ ippsRSAEncrypt_PKCSv15] ,
7923- [
7924- fastRSA_found=yes
7925- AM_LDFLAGS="${AM_LDFLAGS} -lippcore -lippcp"
7926- ] , [ fastRSA_found=no] )
7927- ] , [ fastRSA_found=no] )
7928-
7929- # Error out on not finding libraries
7930- if test "$fastRSA_found" = "no"; then
7931- AC_MSG_ERROR ( [ Could not find fast rsa libraries] )
7932- fi
7933- fi
7934- fi # end of if for shared library
7935- else # if user rsa is set than do not use fast rsa option
7936- if test "$ENABLED_FAST_RSA" = "yes"; then
7937- AC_MSG_ERROR ( [ Could not use fast rsa libraries with user crypto or fips] )
7938- fi
7939- fi # end of if for user rsa crypto or fips
7940-
7941- # End result of checking for IPP Libraries
7942- AC_MSG_CHECKING ( [ for fast RSA] )
7943- if test "$ENABLED_FAST_RSA" = "yes"; then
7944- AM_CFLAGS="$AM_CFLAGS -DHAVE_FAST_RSA -DHAVE_USER_RSA"
7945- # add in user crypto header that uses Intel IPP
7946- AM_CPPFLAGS="$AM_CPPFLAGS -I$srcdir/wolfcrypt/user-crypto/include"
7947- if test "$enable_shared" = "yes"; then
7948- LIBS="$LIBS -lippcore -lippcp"
7949- LIB_ADD="-lippcp -lippcore $LIB_ADD"
7950- else
7951- LIB_ADD="$srcdir/IPP/$ipplib/libippcp.a $srcdir/IPP/$ipplib/libippcore.a $LIB_ADD"
7952- fi
7953- AC_MSG_RESULT ( [ yes] )
7954- else
7955- AC_MSG_RESULT ( [ no] )
7956- fi
7957-
7958- AC_SUBST ( [ IPPLIBS] )
7959- AC_SUBST ( [ IPPHEADERS] )
7960- AC_SUBST ( [ IPPLINK] )
7961-
7962-
79637739# static memory use
79647740AC_ARG_ENABLE ( [ staticmemory] ,
79657741 [ AS_HELP_STRING ( [ --enable-staticmemory] ,[ Enable static memory use (default: disabled)] ) ] ,
@@ -9123,9 +8899,6 @@ if test "x$ENABLED_LINUXKM" = "xyes"; then
91238899 if test "$ENABLED_FASTMATH" = "yes"; then
91248900 AC_MSG_ERROR ( [ --enable-fastmath is incompatible with --enable-linuxkm (exceeds stack limit).] )
91258901 fi
9126- if test "$ENABLED_FAST_RSA" = "yes"; then
9127- AC_MSG_ERROR ( [ --enable-fastrsa is incompatible with --enable-linuxkm.] )
9128- fi
91298902 if test "$ENABLED_LIBZ_RSA" = "yes"; then
91308903 AC_MSG_ERROR ( [ --with-libz is incompatible with --enable-linuxkm.] )
91318904 fi
@@ -9243,8 +9016,6 @@ AM_CONDITIONAL([BUILD_OCSP_STAPLING],[test "x$ENABLED_CERTIFICATE_STATUS_REQUEST
92439016AM_CONDITIONAL([ BUILD_OCSP_STAPLING_V2] ,[ test "x$ENABLED_CERTIFICATE_STATUS_REQUEST_V2" = "xyes"] )
92449017AM_CONDITIONAL([ BUILD_CRL] ,[ test "x$ENABLED_CRL" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"] )
92459018AM_CONDITIONAL([ BUILD_CRL_MONITOR] ,[ test "x$ENABLED_CRL_MONITOR" = "xyes"] )
9246- AM_CONDITIONAL([ BUILD_USER_RSA] ,[ test "x$ENABLED_USER_RSA" = "xyes"] )
9247- AM_CONDITIONAL([ BUILD_USER_CRYPTO] ,[ test "x$ENABLED_USER_CRYPTO" = "xyes"] )
92489019AM_CONDITIONAL([ BUILD_LIBLMS] ,[ test "x$ENABLED_LIBLMS" = "xyes"] )
92499020AM_CONDITIONAL([ BUILD_LIBXMSS] ,[ test "x$ENABLED_LIBXMSS" = "xyes"] )
92509021AM_CONDITIONAL([ BUILD_LIBOQS] ,[ test "x$ENABLED_LIBOQS" = "xyes"] )
@@ -9290,7 +9061,6 @@ AM_CONDITIONAL([BUILD_SP_INT],[test "x$ENABLED_SP_MATH" = "xyes" || test "x$ENAB
92909061AM_COND_IF([ BUILD_SP] , [ INCLUDE_SP_INT="yes"] )
92919062AM_COND_IF([ BUILD_SP_INT] , [ INCLUDE_SP_INT="yes"] )
92929063AC_SUBST ( [ INCLUDE_SP_INT] )
9293- AM_CONDITIONAL([ BUILD_FAST_RSA] ,[ test "x$ENABLED_FAST_RSA" = "xyes"] )
92949064AM_CONDITIONAL([ BUILD_MCAPI] ,[ test "x$ENABLED_MCAPI" = "xyes"] )
92959065AM_CONDITIONAL([ BUILD_ASYNCCRYPT] ,[ test "x$ENABLED_ASYNCCRYPT" = "xyes"] )
92969066AM_CONDITIONAL([ BUILD_WOLFEVENT] ,[ test "x$ENABLED_ASYNCCRYPT" = "xyes"] )
@@ -9780,8 +9550,6 @@ echo " * Examples: $ENABLED_EXAMPLES"
97809550echo " * Crypt tests: $ENABLED_CRYPT_TESTS"
97819551echo " * Stack sizes in tests: $ENABLED_STACKSIZE"
97829552echo " * Heap stats in tests: $ENABLED_TRACKMEMORY"
9783- echo " * User Crypto: $ENABLED_USER_CRYPTO"
9784- echo " * Fast RSA: $ENABLED_FAST_RSA"
97859553echo " * Asynchronous Crypto: $ENABLED_ASYNCCRYPT"
97869554echo " * Asynchronous Crypto (sim): $ENABLED_ASYNCCRYPT_SW"
97879555echo " * Cavium Nitrox: $ENABLED_CAVIUM"
0 commit comments