(load_ocsp): test that we got back a BasicReponse

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16913 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-04-01 02:15:02 +00:00
parent 3bf4bb0e77
commit feb71a9269

View File

@@ -208,15 +208,18 @@ load_ocsp(hx509_context context, struct revoke_ocsp *ocsp)
return EINVAL; return EINVAL;
} }
/*
* XXX find BasicReponse and act on it
*/
if (resp.responseBytes == NULL) { if (resp.responseBytes == NULL) {
free_OCSPResponse(&resp); free_OCSPResponse(&resp);
return EINVAL; return EINVAL;
} }
ret = heim_oid_cmp(&resp.responseBytes->responseType,
oid_id_pkix_ocsp_basic());
if (ret != 0) {
free_OCSPResponse(&resp);
return EINVAL;
}
ret = decode_OCSPBasicOCSPResponse(resp.responseBytes->response.data, ret = decode_OCSPBasicOCSPResponse(resp.responseBytes->response.data,
resp.responseBytes->response.length, resp.responseBytes->response.length,
&basic, &basic,