Method: OpenSSL::OCSP::Request#check_nonce
- Defined in:
- ossl_ocsp.c
#check_nonce(response) ⇒ Object
Checks the nonce validity for this request and response.
The return value is one of the following:
- -1
-
nonce in request only.
- 0
-
nonces both present and not equal.
- 1
-
nonces present and equal.
- 2
-
nonces both absent.
- 3
-
nonce present in response only.
For most responses, clients can check result > 0. If a responder doesn’t handle nonces result.nonzero? may be necessary. A result of 0 is always an error.
279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'ossl_ocsp.c', line 279 static VALUE ossl_ocspreq_check_nonce(VALUE self, VALUE basic_resp) { OCSP_REQUEST *req; OCSP_BASICRESP *bs; int res; GetOCSPReq(self, req); GetOCSPBasicRes(basic_resp, bs); res = OCSP_check_nonce(req, bs); return INT2NUM(res); } |