forked from wolfSSL/wolfssl
adjust saving new OCSP cert
This commit is contained in:
@ -327,6 +327,8 @@ int CheckOcspResponse(WOLFSSL_OCSP *ocsp, byte *response, int responseSz,
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
if (ocspRequest != NULL) {
|
if (ocspRequest != NULL) {
|
||||||
|
/* Has the chance to bubble up response changing ocspResponse->single to
|
||||||
|
no longer be pointing at newSingle */
|
||||||
ret = CompareOcspReqResp(ocspRequest, ocspResponse);
|
ret = CompareOcspReqResp(ocspRequest, ocspResponse);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
goto end;
|
goto end;
|
||||||
@ -368,7 +370,7 @@ int CheckOcspResponse(WOLFSSL_OCSP *ocsp, byte *response, int responseSz,
|
|||||||
status = (CertStatus*)XMALLOC(sizeof(CertStatus),
|
status = (CertStatus*)XMALLOC(sizeof(CertStatus),
|
||||||
ocsp->cm->heap, DYNAMIC_TYPE_OCSP_STATUS);
|
ocsp->cm->heap, DYNAMIC_TYPE_OCSP_STATUS);
|
||||||
if (status != NULL) {
|
if (status != NULL) {
|
||||||
XMEMCPY(status, newSingle->status, sizeof(CertStatus));
|
XMEMCPY(status, ocspResponse->single->status, sizeof(CertStatus));
|
||||||
status->next = entry->status;
|
status->next = entry->status;
|
||||||
entry->status = status;
|
entry->status = status;
|
||||||
entry->ownStatus = 1;
|
entry->ownStatus = 1;
|
||||||
|
Reference in New Issue
Block a user