|
Botan 3.13.0
Crypto and TLS for C&
|
#include <ocsp.h>
Public Member Functions | |
| std::vector< uint8_t > | BER_encode () const |
| size_t | cert_status () const |
| const CertID & | certid () const |
| void | decode_from (BER_Decoder &from) override |
| void | encode_into (DER_Encoder &to) const override |
| bool | has_unknown_critical_extension () const |
| const X509_Time & | next_update () const |
| const std::optional< CRL_Code > & | revocation_reason () const |
| The revocationReason, when cert_status() is 1 and one was provided. | |
| const std::optional< X509_Time > & | revocation_time () const |
| The revocationTime; set only when cert_status() is 1 (revoked). | |
| SingleResponse ()=default | |
| const X509_Time & | this_update () const |
Static Public Member Functions | |
| static SingleResponse | good (CertID certid, X509_Time this_update, X509_Time next_update) |
| static SingleResponse | revoked (CertID certid, X509_Time revocation_time, std::optional< CRL_Code > reason, X509_Time this_update, X509_Time next_update) |
| As good(), but asserting a revoked status with the given RevokedInfo. | |
| static SingleResponse | unknown (CertID certid, X509_Time this_update, X509_Time next_update) |
| As good(), but asserting an unknown status. | |
|
default |
References certid(), good(), next_update(), revocation_time(), revoked(), SingleResponse(), this_update(), and unknown().
Referenced by good(), revoked(), SingleResponse(), and unknown().
|
inherited |
Return the encoding of this object. This is a convenience method when just one object needs to be serialized. Use DER_Encoder for complicated encodings.
Definition at line 21 of file asn1_obj.cpp.
References encode_into().
Referenced by decode_from(), Botan::PKCS12::export_to(), Botan::Certificate_Store_In_SQL::find_all_certs(), Botan::Certificate_Store_In_SQL::find_cert(), Botan::X509_Certificate::fingerprint(), Botan::Certificate_Store_In_SQL::insert_cert(), Botan::X509_Object::PEM_encode(), and Botan::PSS_Params::PSS_Params().
|
inline |
|
inline |
|
overridevirtual |
Decode whatever this object is from from
| from | the BER_Decoder that will be read from |
Implements Botan::ASN1_Object.
Definition at line 214 of file ocsp.cpp.
References cert_status(), Botan::Constructed, Botan::ContextSpecific, Botan::Extensions::critical_extensions(), Botan::BER_Decoder::decode(), Botan::Extensions::decode_from(), Botan::BER_Decoder::decode_optional(), Botan::BER_Decoder::Limits::DER(), Botan::BER_Decoder::end_cons(), Botan::Enumerated, Botan::fmt(), Botan::BER_Decoder::get_next(), Botan::BER_Object::is_a(), Botan::OCSP_Response, Botan::BER_Decoder::peek_next_object(), revocation_time(), Botan::BER_Decoder::start_context_specific(), Botan::BER_Decoder::start_sequence(), Botan::Universal, and Botan::BER_Decoder::verify_end().
|
overridevirtual |
Encode whatever this object is into to
| to | the DER_Encoder that will be written to |
Implements Botan::ASN1_Object.
Definition at line 187 of file ocsp.cpp.
References Botan::DER_Encoder::add_object(), Botan::ContextSpecific, Botan::DER_Encoder::encode(), Botan::DER_Encoder::end_cons(), Botan::DER_Encoder::end_explicit(), Botan::Enumerated, Botan::DER_Encoder::start_cons(), Botan::DER_Encoder::start_explicit(), Botan::DER_Encoder::start_sequence(), Botan::Universal, and Botan::Unspecified.
|
static |
Create a SingleResponse asserting a good status, as emitted by an OCSP responder. All times must be tagged as GeneralizedTime; an unset next_update omits the optional nextUpdate field.
Definition at line 136 of file ocsp.cpp.
References certid(), next_update(), SingleResponse(), and this_update().
Referenced by SingleResponse().
|
inline |
|
inline |
|
inline |
The revocationReason, when cert_status() is 1 and one was provided.
Definition at line 84 of file ocsp.h.
|
inline |
The revocationTime; set only when cert_status() is 1 (revoked).
Definition at line 81 of file ocsp.h.
Referenced by decode_from(), revoked(), and SingleResponse().
|
static |
As good(), but asserting a revoked status with the given RevokedInfo.
Definition at line 148 of file ocsp.cpp.
References certid(), next_update(), revocation_time(), SingleResponse(), and this_update().
Referenced by SingleResponse().
|
inline |
|
static |
As good(), but asserting an unknown status.
Definition at line 142 of file ocsp.cpp.
References certid(), next_update(), SingleResponse(), and this_update().
Referenced by SingleResponse().