Topic: Client Hello / OCSP stapling / set responder id list
Hello,
I try to implement a POC to use OSCP stapling
I coded a client that requires OCSP stapling and wants to provide the URL of OCSP responder to the server.
I used the API "wolfSSL_CTX_SetOCSP_OverrideURL" to do that.
By examining the client hello with wireshark, I can see the status_request (OCSP type) that's fine but the field
"Responder Id list length" is null.
Bellow is there an extract of code, is there something missing
By advance
Thanks
*********************************************************************
ret = wolfSSL_CTX_EnableOCSPStapling(ctx);
if (ret != SSL_SUCCESS) {
fprintf(stderr, "Error set OCSP override URL.\n");
wolfSSL_CTX_free(ctx);
goto cleanup;
}
ret = wolfSSL_CTX_EnableOCSPMustStaple(ctx);
if (ret != SSL_SUCCESS) {
fprintf(stderr, "Error set OCSP override URL.\n");
wolfSSL_CTX_free(ctx);
goto cleanup;
}
const char * ocsp_responder_url = "www.my-ocsp-responder.test";
ret = wolfSSL_CTX_SetOCSP_OverrideURL(ctx, ocsp_responder_url);
if (ret != SSL_SUCCESS) {
fprintf(stderr, "Error set OCSP override URL.\n");
wolfSSL_CTX_free(ctx);
goto cleanup;
}
/* Créer un objet SSL */
ssl = wolfSSL_new(ctx);
if (ssl == NULL) {
fprintf(stderr, "wolfSSL_new error.\n");
wolfSSL_CTX_free(ctx);
return -1;
}
ret = wolfSSL_UseOCSPStapling(ssl, WOLFSSL_CSR_OCSP,
WOLFSSL_CSR_OCSP_USE_NONCE);
if (ret != SSL_SUCCESS) {
fprintf(stderr, "Error set OCSP override URL.\n");
wolfSSL_CTX_free(ctx);
goto cleanup;
}