From f3a59c721e38a663405093e2bbb30e2bf45853a2 Mon Sep 17 00:00:00 2001 From: lsh123 Date: Fri, 18 Dec 2020 16:22:40 -0800 Subject: [PATCH] Remove MD5 for NSS 3.59 and above; enable nss test on osx and mingw (issue #305) (#306) --- .github/workflows/make-check.yml | 7 ++++--- include/xmlsec/nss/crypto.h | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/make-check.yml b/.github/workflows/make-check.yml index 7d9b2f26d..b6bf3c073 100644 --- a/.github/workflows/make-check.yml +++ b/.github/workflows/make-check.yml @@ -44,12 +44,11 @@ jobs: - static_linking: false steps: - name: install dependencies - # nss is disabled for now run: | brew update brew install automake autoconf libtool - brew install libxml2 libxslt - brew install openssl libgcrypt gnutls + # brew install libxml2 libxslt + brew install openssl nspr nss libgcrypt gnutls - uses: actions/checkout@v2 - run: mkdir build - name: configure @@ -101,6 +100,8 @@ jobs: mingw-w64-${{ matrix.arch }}-libxml2 mingw-w64-${{ matrix.arch }}-libxslt mingw-w64-${{ matrix.arch }}-openssl + mingw-w64-${{ matrix.arch }}-nspr + mingw-w64-${{ matrix.arch }}-nss mingw-w64-${{ matrix.arch }}-gnutls - run: git config --global core.autocrlf input shell: bash diff --git a/include/xmlsec/nss/crypto.h b/include/xmlsec/nss/crypto.h index 223c1d85b..614ac9313 100644 --- a/include/xmlsec/nss/crypto.h +++ b/include/xmlsec/nss/crypto.h @@ -19,6 +19,12 @@ #include #include + +/* MD5 was removed from NSS */ +#if (NSS_VMAJOR > 3) || ((NSS_VMAJOR == 3) && (NSS_VMINOR > 58)) +#define XMLSEC_NO_MD5 1 +#endif /* (NSS_VMAJOR > 3) || ((NSS_VMAJOR == 3) && (NSS_VMINOR > 58)) */ + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */