diff --git a/.azure-pipelins/build-template.yml b/.azure-pipelines/build-template.yml similarity index 98% rename from .azure-pipelins/build-template.yml rename to .azure-pipelines/build-template.yml index 91fa098..494d460 100644 --- a/.azure-pipelins/build-template.yml +++ b/.azure-pipelines/build-template.yml @@ -56,7 +56,7 @@ jobs: submodules: true - script: | cd src/SymCrypt - git submodule update --init -- jitterentropy-library + git submodule update --init -- 3rdparty/jitterentropy-library displayName: 'Checkout Symcrypt submodules' - script: | set -ex diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ec979ee..d7d8aa2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,8 +18,8 @@ pr: - main jobs: -- template: .azure-pipelins/build-template.yml -- template: .azure-pipelins/build-template.yml +- template: .azure-pipelines/build-template.yml +- template: .azure-pipelines/build-template.yml parameters: pool: sonicbld-arm64 arch: arm64 diff --git a/rules/symcrypt-openssl.mk b/rules/symcrypt-openssl.mk index cdfa92e..8d0ee63 100644 --- a/rules/symcrypt-openssl.mk +++ b/rules/symcrypt-openssl.mk @@ -1,6 +1,6 @@ # SYMCRYPT_OPENSSL -SYMCRYPT_OPENSSL_VERSION = 0.5 +SYMCRYPT_OPENSSL_VERSION = 0.6 SYMCRYPT_OPENSSL = symcrypt-openssl_$(SYMCRYPT_OPENSSL_VERSION)_$(ARCH).deb $(SYMCRYPT_OPENSSL)_SRC_PATH = $(SRC_PATH)/SymCrypt-OpenSSL-Debian $(SYMCRYPT_OPENSSL)_MAKEFILE = Makefile diff --git a/src/SymCrypt b/src/SymCrypt index e875f1f..4d3fd51 160000 --- a/src/SymCrypt +++ b/src/SymCrypt @@ -1 +1 @@ -Subproject commit e875f1f957dcb1308f8e712e9f4a8edc6f4f6207 +Subproject commit 4d3fd5136855648d2a5e987f3b95473b056876b1 diff --git a/src/SymCrypt-OpenSSL b/src/SymCrypt-OpenSSL index 6e95a78..0d5c05d 160000 --- a/src/SymCrypt-OpenSSL +++ b/src/SymCrypt-OpenSSL @@ -1 +1 @@ -Subproject commit 6e95a781ff2087e4499ff9a43b331a4365e6f8ec +Subproject commit 0d5c05dc9d15d9bf843a3b5492ec9075cef49c81 diff --git a/src/SymCrypt-OpenSSL-Debian/Makefile b/src/SymCrypt-OpenSSL-Debian/Makefile index 9e22b30..14efa70 100644 --- a/src/SymCrypt-OpenSSL-Debian/Makefile +++ b/src/SymCrypt-OpenSSL-Debian/Makefile @@ -4,6 +4,7 @@ SHELL = /bin/bash ARCH ?= amd64 CMAKE_BUILD_TYPE ?= Release +BUILD_JOBS ?= $(shell nproc) BUILD_NAME = symcrypt-openssl SYMCRYPT_OPENSSL_VERSION ?= 0.1 SYMCRYPT_PACKAGE = $(BUILD_NAME)_$(SYMCRYPT_OPENSSL_VERSION)_$(ARCH).deb @@ -38,12 +39,11 @@ list: $(LIBSYMCRYPT): cd ../SymCrypt - mkdir -p bin - cd bin - cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake-toolchain/LinuxUserMode-$(CMAKE_ARCH).cmake -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) - cmake --build . - mkdir -p $(DEST) - cp -a module/$(CMAKE_ARCH)/LinuxUserMode/generic/libsymcrypt.so* $(DEST)/ + cmake -S . -B bin -DSYMCRYPT_TARGET_ARCH=$(CMAKE_ARCH) -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ + cmake --build bin -j$(BUILD_JOBS) + mkdir -p $(DEST)/debug + cp -a bin/module/generic/libsymcrypt.so* $(DEST)/ + cp -a bin/module/generic/.debug/libsymcrypt.so* $(DEST)/debug/ $(LIBSYMCRYPTENGINE): $(LIBSYMCRYPT) cd ../SymCrypt-OpenSSL diff --git a/src/openssl.patch/debian.patch/60-disable-evpmac-tests-for-fips.patch b/src/openssl.patch/debian.patch/60-disable-evpmac-tests-for-fips.patch new file mode 100644 index 0000000..adf8366 --- /dev/null +++ b/src/openssl.patch/debian.patch/60-disable-evpmac-tests-for-fips.patch @@ -0,0 +1,142 @@ +diff --git a/test/recipes/30-test_evp_data/evpmac.txt b/test/recipes/30-test_evp_data/evpmac.txt +index 716897dc73..99a604e2db 100644 +--- a/test/recipes/30-test_evp_data/evpmac.txt ++++ b/test/recipes/30-test_evp_data/evpmac.txt +@@ -161,24 +161,6 @@ Result = EVPPKEYCTXCTRL_ERROR + + Title = HMAC tests (from RFC2104 and others) + +-MAC = HMAC +-Algorithm = MD5 +-Key = 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b +-Input = "Hi There" +-Output = 9294727a3638bb1c13f48ef8158bfc9d +- +-MAC = HMAC +-Algorithm = MD5 +-Key = "Jefe" +-Input = "what do ya want for nothing?" +-Output = 750c783e6ab0b503eaa86e310a5db738 +- +-MAC = HMAC +-Algorithm = MD5 +-Key = AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +-Input = DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD +-Output = 56be34521d144c88dbb8c733f0e8b3f6 +- + Title = SHA1 + + # HMAC tests from NIST test data +@@ -203,24 +185,6 @@ Output = 2D51B2F7750E410584662E38F133435F4C4FD42A + + Title = SHA2 + +-MAC = HMAC +-Algorithm = SHA224 +-Input = "Sample message for keylen=blocklen" +-Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F +-Output = C7405E3AE058E8CD30B08B4140248581ED174CB34E1224BCC1EFC81B +- +-MAC = HMAC +-Algorithm = SHA224 +-Input = "Sample message for keylen