我通过openssl获得了OCSP_RESPONSE结构。
Typedef struct ocsp_response_st OCSP_RESPONSE;
Struct ocsp_response_st {
ASN1_ENUMERATED *responseStatus;
OCSP_RESPBYTES *responseBytes;
};
Typedef struct ocsp_resp_bytes_st {
ASN1_OBJECT *responseType;
ASN1_OCTET_STRING *response;
} OCSP_RESPBY
现在,我想通过它获取VRI中的哈希键。如何计算? enter image description here
但是我通过了
Auto spbuff = GenerateHashData(CALG_SHA1, pOCSPR->responseBytes->response->data, pOCSPR->responseBytes->response->length, nplen);
Auto pkey = csToHex(spbuff, nplen));
为什么不呢? 如何获得正确的结果?