Skip to content

Commit 435b86a

Browse files
committed
Fix a compilation warning
1 parent 7432721 commit 435b86a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

native/src/sslutils.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ static int process_ocsp_response(OCSP_REQUEST *ocsp_req, OCSP_RESPONSE *ocsp_res
10011001
OCSP_CERTID *certid;
10021002
ASN1_GENERALIZEDTIME *thisupd;
10031003
ASN1_GENERALIZEDTIME *nextupd;
1004-
STACK_OF(X509) *certStack;
1004+
const STACK_OF(X509) *certStack;
10051005

10061006
r = OCSP_response_status(ocsp_resp);
10071007

@@ -1017,7 +1017,8 @@ static int process_ocsp_response(OCSP_REQUEST *ocsp_req, OCSP_RESPONSE *ocsp_res
10171017
}
10181018

10191019
certStack = OCSP_resp_get0_certs(bs);
1020-
if (OCSP_basic_verify(bs, certStack, X509_STORE_CTX_get0_store(ctx), verifyFlags) <= 0) {
1020+
// Cast to non-const pointer is OK here since OCSP_basic_verify does not modify the provided certs
1021+
if (OCSP_basic_verify(bs, (STACK_OF(X509) *)certStack, X509_STORE_CTX_get0_store(ctx), verifyFlags) <= 0) {
10211022
X509_STORE_CTX_set_error(ctx, X509_V_ERR_OCSP_SIGNATURE_FAILURE);
10221023
o = OCSP_STATUS_UNKNOWN;
10231024
goto clean_bs;

0 commit comments

Comments
 (0)