Skip to content

Commit 8d54e22

Browse files
committed
Guard OCSP signature params with WC_RSA_PSS ifdef
OCSPBASICRESPASN_IDX_SIGNATURE_PARAMS is only defined when WC_RSA_PSS is enabled but was used unconditionally in EncodeBasicOcspResponse, causing a build error when WC_RSA_PSS is not defined.
1 parent b5874a6 commit 8d54e22

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32932,6 +32932,7 @@ WC_MAYBE_UNUSED static int EncodeBasicOcspResponse(OcspResponse* resp,
3293232932
if (ret == 0) {
3293332933
SetASN_OID(&dataASN[OCSPBASICRESPASN_IDX_SIGALGO_OID], resp->sigOID,
3293432934
oidSigType);
32935+
#ifdef WC_RSA_PSS
3293532936
if (resp->sigParams != NULL && resp->sigParamsSz != 0) {
3293632937
SetASN_Buffer(&dataASN[OCSPBASICRESPASN_IDX_SIGNATURE_PARAMS],
3293732938
resp->sigParams, resp->sigParamsSz);
@@ -32941,6 +32942,7 @@ WC_MAYBE_UNUSED static int EncodeBasicOcspResponse(OcspResponse* resp,
3294132942
OCSPBASICRESPASN_IDX_SIGNATURE_PARAMS,
3294232943
ocspBasicRespASN_Length);
3294332944
}
32945+
#endif
3294432946
if (resp->cert != NULL && resp->certSz > 0) {
3294532947
SetASN_Buffer(&dataASN[OCSPBASICRESPASN_IDX_CERTS_SEQ],
3294632948
resp->cert, resp->certSz);

0 commit comments

Comments
 (0)