Skip to content

Commit

Permalink
Move MSCrypto down in the default crypto library selection
Browse files Browse the repository at this point in the history
  • Loading branch information
lsh123 committed Jun 25, 2023
1 parent 6f4eae4 commit 824842c
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1755,13 +1755,6 @@ AC_ARG_WITH([default_crypto], [AS_HELP_STRING([--with-default-crypto=name],[defa

# check the argument
case "z$with_default_crypto" in
'zmscrypto')
if test "z$XMLSEC_NO_MSCRYPTO" != "z1" ; then
XMLSEC_DEFAULT_CRYPTO="mscrypto"
else
AC_MSG_ERROR('$with_default_crypto' is specified as default crypto library but it is not configured or found)
fi
;;
'zmscng')
if test "z$XMLSEC_NO_MSCNG" != "z1" ; then
XMLSEC_DEFAULT_CRYPTO="mscng"
Expand Down Expand Up @@ -1790,6 +1783,13 @@ case "z$with_default_crypto" in
AC_MSG_ERROR('$with_default_crypto' is specified as default crypto library but it is not configured or found)
fi
;;
'zmscrypto')
if test "z$XMLSEC_NO_MSCRYPTO" != "z1" ; then
XMLSEC_DEFAULT_CRYPTO="mscrypto"
else
AC_MSG_ERROR('$with_default_crypto' is specified as default crypto library but it is not configured or found)
fi
;;
'zgcrypt')
if test "z$XMLSEC_NO_GCRYPT" != "z1" ; then
XMLSEC_DEFAULT_CRYPTO="gcrypt"
Expand All @@ -1798,17 +1798,20 @@ case "z$with_default_crypto" in
fi
;;
'z')
dnl The first crypto library wins
if test "z$XMLSEC_NO_MSCRYPTO" != "z1" ; then
XMLSEC_DEFAULT_CRYPTO="mscrypto"
elif test "z$XMLSEC_NO_MSCNG" != "z1" ; then
dnl The first crypto library wins:
dnl - if on Windows and MSCng is available -- use it
dnl - Then choose one with most supported features: OpenSSL > NSS > GnuTLS
dnl - MSCrypto and GCrypt are in maintanance mode and go last
if test "z$XMLSEC_NO_MSCNG" != "z1" ; then
XMLSEC_DEFAULT_CRYPTO="mscng"
elif test "z$XMLSEC_NO_OPENSSL" != "z1" ; then
XMLSEC_DEFAULT_CRYPTO="openssl"
elif test "z$XMLSEC_NO_NSS" != "z1" ; then
XMLSEC_DEFAULT_CRYPTO="nss"
elif test "z$XMLSEC_NO_GNUTLS" != "z1" ; then
XMLSEC_DEFAULT_CRYPTO="gnutls"
elif test "z$XMLSEC_NO_MSCRYPTO" != "z1" ; then
XMLSEC_DEFAULT_CRYPTO="mscrypto"
elif test "z$XMLSEC_NO_GCRYPT" != "z1" ; then
XMLSEC_DEFAULT_CRYPTO="gcrypt"
else
Expand Down

0 comments on commit 824842c

Please sign in to comment.