From d6513447e40337c8a93bdea3b91bbab0e830fd31 Mon Sep 17 00:00:00 2001 From: Anthony Hu Date: Wed, 20 Oct 2021 14:02:43 -0400 Subject: [PATCH] WOLFSSL_BAD_FILE and OPENSSL over-rideable. --- certmanager/falcon_certverify.c | 4 ++-- certmanager/generate_falcon_chains.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/certmanager/falcon_certverify.c b/certmanager/falcon_certverify.c index 6e9f5130..fb7f0e6c 100644 --- a/certmanager/falcon_certverify.c +++ b/certmanager/falcon_certverify.c @@ -48,7 +48,7 @@ int main(void) ret = wolfSSL_CertManagerLoadCA(cm, caCert, NULL); if (ret != WOLFSSL_SUCCESS) { - if (ret == -4) { + if (ret == WOLFSSL_BAD_FILE) { printf("No root certificate found. Please see the README.md file" " to learn how to generate the certificates.\n"); } @@ -59,7 +59,7 @@ int main(void) ret = wolfSSL_CertManagerVerify(cm, verifyCert, WOLFSSL_FILETYPE_PEM); if (ret != WOLFSSL_SUCCESS) { - if (ret == -4) { + if (ret == WOLFSSL_BAD_FILE) { printf("No entity certificate found. Please see the README.md file " "to learn how to generate the certificates.\n"); } diff --git a/certmanager/generate_falcon_chains.sh b/certmanager/generate_falcon_chains.sh index 84f9000e..bd97c6b5 100755 --- a/certmanager/generate_falcon_chains.sh +++ b/certmanager/generate_falcon_chains.sh @@ -8,7 +8,9 @@ # Execute this script in the openssl directory after building OQS's fork of # OpenSSL. Please see the README.md file for more details. -OPENSSL="./apps/openssl" +if [[ ! -v OPENSSL ]]; then + OPENSSL=./apps/openssl +fi # Generate conf files. printf "\