Name
SPVM::Net::SSLeay::OCSP - OCSP Name Space in OpenSSL
Description
Net::SSLeay::OCSP class in SPVM represents OCSP Name Space in OpenSSL
Usage
use Net::SSLeay::OCSP;
Class Methods
response_status_str
static method response_status_str : string ($code : long);
Calls native OCSP_response_status_str function given $code, and returns its return value.
response_status
static method response_status : int ($resp : Net::SSLeay::OCSP_RESPONSE);
Calls native OCSP_response_status function given the pointer value of $resp, and returns its return value.
Exceptions:
The OCSP response $resp must be defined. Otherwise an exception is thrown.
Exceptions:
If SSL_CTX_new failed, an exception is thrown with eval_error_id
set to the basic type ID of Net::SSLeay::Error class.
basic_verify
static method basic_verify : int ($bs : Net::SSLeay::OCSP_BASICRESP, $certs : Net::SSLeay::X509[], $st : Net::SSLeay::X509_STORE, $flags : long);
Calls native OCSP_basic_verify function, and returns its return value.
Exceptions:
If OCSP_basic_verify failed, an exception is thrown with eval_error_id
set to the basic type ID of Net::SSLeay::Error class.
basic_add1_cert
static basic_add1_cert : int ($resp : Net::SSLeay::OCSP_BASICRESP, $cert : Net::SSLeay::X509);
Calls native OCSP_basic_add1_cert function given the pointer value of $resp, the pointer value of $cert, puses $cert to the end of certs_list field of $resp, and returns its return value.
Exceptions:
The OCSP_BASICRESP object $resp must be defined. Otherwise an exception is thrown.
The X509 object $cert must be defined. Otherwise an exception is thrown.
If OCSP_basic_add1_cert failed, an exception is thrown with eval_error_id
set to the basic type ID of Net::SSLeay::Error class.
check_nonce
static method check_nonce : int ($req : Net::SSLeay::OCSP_REQUEST, $resp : Net::SSLeay::OCSP_BASICRESP);
Calls native OCSP_check_nonce function given the pointer value of $req, the pointer value of $resp, and returns its return value.
Exceptions:
The OCSP_REQUEST object $req must be defined. Otherwise an exception is thrown.
The OCSP_BASICRESP $resp must be defined. Otherwise an exception is thrown.
check_validity
static method check_validity : int ($thisupd : Net::SSLeay::ASN1_GENERALIZEDTIME, $nextupd : Net::SSLeay::ASN1_GENERALIZEDTIME, $sec : long, $maxsec : long);
Calls native OCSP_check_nonce function given the pointer value of $req, the pointer value of $resp, and returns its return value.
Exceptions:
The ASN1_GENERALIZEDTIME object $thisupd must be defined. Otherwise an exception is thrown.
The ASN1_GENERALIZEDTIME $nextupd must be defined. Otherwise an exception is thrown.
If OCSP_check_validity failed, an exception is thrown with eval_error_id
set to the basic type ID of Net::SSLeay::Error class.
resp_count
static method resp_count : int ($bs : Net::SSLeay::OCSP_BASICRESP);
Calls native OCSP_resp_count function given the pointer value of $bs, and returns its return value.
Exceptions:
The OCSP_BASICRESP object $bs must be defined. Otherwise an exception is thrown.
single_get0_status
static method single_get0_status : int ($single : Net::SSLeay::OCSP_SINGLERESP, $reason_ref : int*, $revtime_ref : Net::SSLeay::ASN1_GENERALIZEDTIME[], $thisupd_ref : Net::SSLeay::ASN1_GENERALIZEDTIME[], $nextupd_ref : Net::SSLeay::ASN1_GENERALIZEDTIME[]);
Calls native OCSP_single_get0_status function given the pointer value of $single, $reason_ref, $revtime_ref, $thisupd_ref, $nextupd_ref, and returns its return value.
The first element of $reason_ref, the first element of $revtime_ref, the first element of $thisupd_ref are copied using native ASN1_STRING_dup function.
Exceptions:
The OCSP_SINGLERESP object $single must be undef. Otherwise an exception is thrown.
$revtime_ref must be defined. Otherwise an exception is thrown.
The length of $revtime_ref must be 1. Otherwise an exception is thrown.
$thisupd_ref must be defined. Otherwise an exception is thrown.
The length of $thisupd_ref must be 1. Otherwise an exception is thrown.
$nextupd_ref must be defined. Otherwise an exception is thrown.
The length of $nextupd_ref must be 1. Otherwise an exception is thrown.
If OCSP_single_get0_status failed, an exception is thrown with eval_error_id
set to the basic type ID of Net::SSLeay::Error class.
See Also
resp_find
static method resp_find : int ($bs : Net::SSLeay::OCSP_BASICRESP, $id : Net::SSLeay::OCSP_CERTID, $last : int);
Calls native OCSP_resp_find function given the pointer value of $bs, the pointer value of $id, $last, and returns its return value.
Exceptions:
The OCSP_BASICRESP object $bs must be defined. Otherwise an exception is thrown.
The OCSP_CERTID object $id must be defined. Otherwise an exception is thrown.
If OCSP_resp_find failed, an exception is thrown with eval_error_id
set to the basic type ID of Net::SSLeay::Error class.
resp_get0
static method resp_get0 : Net::SSLeay::OCSP_SINGLERESP ($bs : Net::SSLeay::OCSP_BASICRESP, $idx : int);
Calls native OCSP_resp_get0 function given the pointer value of $bs, $idx, creates a new Net::SSLeay::OCSP_SINGLERESP object, sets no_free
flag of the new object to 1, sets Net::SSLeay::OCSP_SINGLERESP#ref_ocsp_basicresp field to the new object, and returns the new object.
Exceptions:
The OCSP_BASICRESP object $bs must be defined. Otherwise an exception is thrown.
If OCSP_resp_get0 failed, an exception is thrown with eval_error_id
set to the basic type ID of Net::SSLeay::Error class.
response_get1_basic
static method response_get1_basic : Net::SSLeay::OCSP_BASICRESP ($resp : Net::SSLeay::OCSP_RESPONSE);
Calls native OCSP_response_get1_basic function given the pointer value of $resp, creates a new Net::SSLeay::OCSP_BASICRESP object, sets no_free
flag of the new object to 1, sets Net::SSLeay::OCSP_BASICRESPP#ref_ocsp_response field to the new object, and returns the new object.
Exceptions:
The OCSP_RESPONSE object $resp must be defined. Otherwise an exception is thrown.
OCSP_response_status($resp) must be OCSP_RESPONSE_STATUS_SUCCESSFUL. Otherwise an exception is thrown.
If OCSP_response_get1_basic failed, an exception is thrown with eval_error_id
set to the basic type ID of Net::SSLeay::Error class.
cert_to_id
static method cert_to_id : Net::SSLeay::OCSP_CERTID ($dgst : Net::SSLeay::EVP_MD, $subject : Net::SSLeay::X509, $issuer : Net::SSLeay::X509);
Calls native OCSP_cert_to_id function given the pointer value of $resp, creates a new Net::SSLeay::OCSP_CERTID object, sets the pointer value of the new object to the return value of the native function, and returns the new object.
request_add0_id
static method request_add0_id : Net::SSLeay::OCSP_ONEREQ ($req : Net::SSLeay::OCSP_REQUEST, $cid : Net::SSLeay::OCSP_CERTID);
Calls native OCSP_request_add0_id function given the pointer value of $resp, the pointer value of $cid, creates a new Net::SSLeay::OCSP_ONEREQ object, sets the pointer value of the new object to the return value of the native function, push $cid to Net::SSLeay::OCSP_REQUEST#ocsp_certids_list field, sets Net::SSLeay::OCSP_ONEREQ#ref_ocsp_request field of the new object to $req, and returns the new object.
Exceptions:
The OCSP_REQUEST object $req must be defined. Otherwise an exception is thrown.
The Net::SSLeay::OCSP_CERTID object $cid must be defined. Otherwise an exception is thrown.
If request_add0_id failed, an exception is thrown with eval_error_id
set to the basic type ID of Net::SSLeay::Error class.
request_add1_nonce
static method request_add1_nonce : int ($req : Net::SSLeay::OCSP_REQUEST, $val : string, $len : int);
Calls native OCSP_request_add1_nonce function given the pointer value of $req, $val, $len, , and returns its return value.
Exceptions:
The OCSP_REQUEST object $req must be defined.
If OCSP_request_add1_nonce failed, an exception is thrown with eval_error_id
set to the basic type ID of Net::SSLeay::Error class.
See Also
Copyright & License
Copyright (c) 2024 Yuki Kimoto
MIT License