Skip to content

Commit c8b4066

Browse files
committed
Add key type check
1 parent 0a1db97 commit c8b4066

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/ocsp.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2629,10 +2629,14 @@ static int OcspResponse_WriteResponse(OcspResponder* responder, byte* response,
26292629
rsaKey = &ca->key.rsa;
26302630
resp.sigOID = CTC_SHA256wRSA;
26312631
}
2632-
else {
2632+
else if (ca->keyType == ECDSAk) {
26332633
eccKey = &ca->key.ecc;
26342634
resp.sigOID = CTC_SHA256wECDSA;
26352635
}
2636+
else {
2637+
ret = NOT_COMPILED_IN;
2638+
goto out;
2639+
}
26362640

26372641
ret = OcspResponseEncode(&resp, response, responseSz, rsaKey, eccKey,
26382642
&responder->rng);

0 commit comments

Comments
 (0)