Skip to content

Commit ad115fa

Browse files
committed
fix compile and unit test failure
1 parent 34282bb commit ad115fa

2 files changed

Lines changed: 16 additions & 10 deletions

File tree

src/x509/clu_x509_sign.c

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ int wolfCLU_GenChimeraCertSign(WOLFSSL_BIO *bioCaKey, WOLFSSL_BIO *bioAltCaKey,
257257
const char *altSigAlgOid = "2.5.29.73";
258258
const char *altSigValOid = "2.5.29.74";
259259

260-
/*
260+
/*
261261
* LARGE_TEMO_SZ defines the size of temporary buffers used for signature key,
262262
* verification key and signature value buffers.
263263
* The value 11264 is enough for P-521 and ML-DSA-87 PEM certs.
@@ -397,7 +397,7 @@ int wolfCLU_GenChimeraCertSign(WOLFSSL_BIO *bioCaKey, WOLFSSL_BIO *bioAltCaKey,
397397
ret = WOLFCLU_FATAL_ERROR;
398398
}
399399
}
400-
400+
401401
if (ret == 0) {
402402
XMEMSET(caKeyBuf, 0, caKeySz); /* clear original buffer */
403403
caKeySz = derObj->length;
@@ -667,13 +667,13 @@ int wolfCLU_GenChimeraCertSign(WOLFSSL_BIO *bioCaKey, WOLFSSL_BIO *bioAltCaKey,
667667

668668
if (ret == WOLFCLU_SUCCESS) {
669669
switch (level) {
670-
case 2:
670+
case 2:
671671
newCert.sigType = CTC_SHA256wECDSA;
672672
break;
673-
case 3:
673+
case 3:
674674
newCert.sigType = CTC_SHA384wECDSA;
675675
break;
676-
case 5:
676+
case 5:
677677
newCert.sigType = CTC_SHA512wECDSA;
678678
break;
679679
}
@@ -691,7 +691,7 @@ int wolfCLU_GenChimeraCertSign(WOLFSSL_BIO *bioCaKey, WOLFSSL_BIO *bioAltCaKey,
691691
else {
692692
ret = WOLFCLU_SUCCESS;
693693
}
694-
}
694+
}
695695
}
696696

697697
if (ret == WOLFCLU_SUCCESS) {
@@ -715,7 +715,7 @@ int wolfCLU_GenChimeraCertSign(WOLFSSL_BIO *bioCaKey, WOLFSSL_BIO *bioAltCaKey,
715715
}
716716

717717
if (ret == WOLFCLU_SUCCESS && isCA) {
718-
ret = wc_MakeCert(&newCert, scratchBuf,
718+
ret = wc_MakeCert(&newCert, scratchBuf,
719719
scratchSz, NULL, &caKey, &rng);
720720
if (ret <= 0) {
721721
wolfCLU_LogError("Error making certificate");
@@ -732,7 +732,7 @@ int wolfCLU_GenChimeraCertSign(WOLFSSL_BIO *bioCaKey, WOLFSSL_BIO *bioAltCaKey,
732732
scratchSz = ret;
733733
ret = WOLFCLU_SUCCESS;
734734
}
735-
}
735+
}
736736
}
737737
else if (ret == WOLFCLU_SUCCESS && !isCA) {
738738
ret = wc_MakeCert(&newCert, scratchBuf, scratchSz,
@@ -1274,7 +1274,13 @@ int wolfCLU_CertSign(WOLFCLU_CERT_SIGN* csign, WOLFSSL_X509* x509)
12741274
case WC_HASH_TYPE_BLAKE2B:
12751275
case WC_HASH_TYPE_BLAKE2S:
12761276

1277-
#if LIBWOLFSSL_VERSION_HEX > 0x05001000
1277+
#if LIBWOLFSSL_VERSION_HEX >= 0x05009000
1278+
case WC_HASH_TYPE_SHA512_224:
1279+
case WC_HASH_TYPE_SHA512_256:
1280+
case WC_HASH_TYPE_SHAKE128:
1281+
case WC_HASH_TYPE_SHAKE256:
1282+
case WC_HASH_TYPE_SM3:
1283+
#elif LIBWOLFSSL_VERSION_HEX > 0x05001000
12781284
#ifndef WOLFSSL_NOSHA512_224
12791285
case WC_HASH_TYPE_SHA512_224:
12801286
#endif

tests/ocsp/ocsp-interop-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ if [ $RESULT = 0 ]; then
293293
fi
294294

295295
# Check for error message
296-
grep -qi "fail\|error\|not found\|unable" "$TEST_DIR/test6.log"
296+
grep -qi "fail\|error\|not found\|unable\|no such\|could not" "$TEST_DIR/test6.log"
297297
if [ $? != 0 ]; then
298298
echo "Test 6 failed: expected error message about invalid file"
299299
exit 99

0 commit comments

Comments
 (0)