I'm applying the following patches from the hg repo. 0001-Fix-CFLAGS-passing-to-recursive-makefiles.patch 0002-Install-man-pages-only-for-tools-that-are-installed.patch 0003-Add-man-pages-for-all-installed-commands.patch 0004-Fix-spelling-errors.patch 0005-All-TXT-tools-now-have-txt-prefix.patch 0006-Update-man-pages-for-txt-tools.patch 0007-Clarify-license-issues.patch 0008-Fix-issues-reported-by-Coverity-Scan.patch 0009-Fix-man-page-syntax-error.patch 0010-Ensure-txt-acminfo-does-not-print-false-information-.patch 0011-Do-not-try-to-read-EFI-mem-map-when-booted-with-mult.patch 0012-Use-SHA1-based-default-policy-when-TPM1.2-is-detecte.patch 0013-Unmask-NMI-after-returning-from-SINIT.patch 0014-Update-GRUB-scripts-to-use-multiboot2-only.patch 0015-Update-lcptools-v2-to-meet-requirements-from-MLE-DG-.patch 0016-Implement-SM2-signing-and-SM2-signature-verification.patch
After applying this patch ... changeset: 599:d4c520cbea8c user: Mateusz Mowka <mateusz.mo...@intel.com> date: Fri Jul 17 14:19:31 2020 +0200 summary: Implement SM2 signing and SM2 signature verification. I get the following build errors. What am I missing? lcputils.c: In function 'verify_ec_signature': lcputils.c:730:19: error: 'NID_sm2' undeclared (first use in this function) curveId = NID_sm2; ^ lcputils.c:730:19: note: each undeclared identifier is reported only once for each function it appears in lcputils.c:731:9: error: implicit declaration of function 'EVP_sm3' [-Werror=implicit-function-declaration] mdtype = EVP_sm3(); ^ lcputils.c:731:16: error: assignment makes pointer from integer without a cast [-Werror] mdtype = EVP_sm3(); ^ lcputils.c:772:5: error: implicit declaration of function 'EVP_MD_CTX_new' [-Werror=implicit-function-declaration] mctx = EVP_MD_CTX_new(); ^ lcputils.c:772:10: error: assignment makes pointer from integer without a cast [-Werror] mctx = EVP_MD_CTX_new(); ^ lcputils.c:779:9: error: implicit declaration of function 'EVP_PKEY_set_alias_type' [-Werror=implicit-function-declaration] result = EVP_PKEY_set_alias_type(evp_key, EVP_PKEY_SM2); ^ lcputils.c:779:51: error: 'EVP_PKEY_SM2' undeclared (first use in this function) result = EVP_PKEY_set_alias_type(evp_key, EVP_PKEY_SM2); ^ lcputils.c:792:9: error: implicit declaration of function 'EVP_PKEY_CTX_set1_id' [-Werror=implicit-function-declaration] result = EVP_PKEY_CTX_set1_id(pctx, SM2_ID, SM2_ID_LEN); ^ lcputils.c:798:5: error: implicit declaration of function 'EVP_MD_CTX_set_pkey_ctx' [-Werror=implicit-function-declaration] EVP_MD_CTX_set_pkey_ctx(mctx, pctx); ^ lcputils.c: In function 'ec_sign_data': lcputils.c:889:10: error: assignment makes pointer from integer without a cast [-Werror] mctx = EVP_MD_CTX_new(); ^ lcputils.c:919:51: error: 'EVP_PKEY_SM2' undeclared (first use in this function) result = EVP_PKEY_set_alias_type(evp_key, EVP_PKEY_SM2); ^ lcputils.c:942:9: error: passing argument 3 of 'EVP_DigestSignInit' makes pointer from integer without a cast [-Werror] result = EVP_DigestSignInit(mctx, &pctx, EVP_sm3(), NULL, evp_key); ^ In file included from /usr/include/openssl/x509.h:73:0, from /usr/include/openssl/engine.h:99, from lcputils.c:46: /usr/include/openssl/evp.h:660:5: note: expected 'const struct EVP_MD *' but argument is of type 'int' int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, ^ lcputils.c:985:5: error: implicit declaration of function 'ECDSA_SIG_get0_r' [-Werror=implicit-function-declaration] sig_r = ECDSA_SIG_get0_r(ecdsa_sig); ^ lcputils.c:985:11: error: assignment makes pointer from integer without a cast [-Werror] sig_r = ECDSA_SIG_get0_r(ecdsa_sig); ^ lcputils.c:986:5: error: implicit declaration of function 'ECDSA_SIG_get0_s' [-Werror=implicit-function-declaration] sig_s = ECDSA_SIG_get0_s(ecdsa_sig); ^ lcputils.c:986:11: error: assignment makes pointer from integer without a cast [-Werror] sig_s = ECDSA_SIG_get0_s(ecdsa_sig); ^ lcputils.c: In function 'der_encode_sig_comps': lcputils.c:1274:5: error: implicit declaration of function 'ECDSA_SIG_set0' [-Werror=implicit-function-declaration] if (!ECDSA_SIG_set0(sig, r, s)) { ^ hash.c: In function 'hash_buffer': hash.c:124:9: error: implicit declaration of function 'EVP_sm3' [-Werror=implicit-function-declaration] md = EVP_sm3(); ^ hash.c:124:12: error: assignment makes pointer from integer without a cast [-Werror] md = EVP_sm3(); ^ _______________________________________________ tboot-devel mailing list tboot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tboot-devel