From d2aa7d0a370f1b99fa51d2288bdd15f2e6c58213 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Fri, 23 Mar 2018 16:31:17 -0600 Subject: [PATCH 1/2] exclude ecc_import_unsigned test when building for CAVP selftest --- wolfcrypt/test/test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index c7f262c1b..94de04890 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -14566,12 +14566,14 @@ static int ecc_exp_imp_test(ecc_key* key) goto done; } +#ifndef HAVE_SELFTEST /* test import of public */ ret = wc_ecc_import_unsigned(&keyImp, pub, &pub[32], NULL, ECC_SECP256R1); if (ret != 0) { ret = -6638; goto done; } +#endif wc_ecc_free(&keyImp); wc_ecc_init(&keyImp); @@ -14585,12 +14587,14 @@ static int ecc_exp_imp_test(ecc_key* key) goto done; } +#ifndef HAVE_SELFTEST /* test import of private and public */ ret = wc_ecc_import_unsigned(&keyImp, pub, &pub[32], priv, ECC_SECP256R1); if (ret != 0) { ret = -6640; goto done; } +#endif done: wc_ecc_free(&keyImp); From 021560035b8697338325aefa8542ad11a91640d7 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Mon, 26 Mar 2018 09:43:37 -0600 Subject: [PATCH 2/2] fix unused var warning for extNameConsOid with IGNORE_NAME_CONSTRAINTS --- wolfcrypt/src/asn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 9769dfed7..e7b647bec 100755 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -1208,7 +1208,9 @@ static const byte extCertPolicyOid[] = {85, 29, 32}; static const byte extKeyUsageOid[] = {85, 29, 15}; static const byte extInhibitAnyOid[] = {85, 29, 54}; static const byte extExtKeyUsageOid[] = {85, 29, 37}; -static const byte extNameConsOid[] = {85, 29, 30}; +#ifndef IGNORE_NAME_CONSTRAINTS + static const byte extNameConsOid[] = {85, 29, 30}; +#endif /* certAuthInfoType */ #ifdef HAVE_OCSP