Botan 2.19.5 Crypto and TLS for C&

Public Member Functions | List of all members
Botan::OCSP::SingleResponse Class Referencefinal

`#include <ocsp.h>`

Inheritance diagram for Botan::OCSP::SingleResponse:

## Public Member Functions
std::vector< uint8_t > | BER_encode () const
size_t | cert_status () const
const CertID & | certid () const
void | decode_from (class BER_Decoder &from) override
void | encode_into (class DER_Encoder &to) const override
X509_Time | next_update () const
X509_Time | this_update () const

## Detailed Description

Definition at line 47 of file ocsp.h.

## Member Function Documentation

## ◆ BER_encode()

std::vector< uint8_t > Botan::ASN1_Object::BER_encode | ( |  | ) | const
| 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 16 of file asn1_obj.cpp.

17 {
18 std::vector<uint8_t> output;
19 DER_Encoder der(output);
20 this->encode_into(der);
21 return output;
22 }
Botan::ASN1_Object::encode_into
virtual void encode_into(DER_Encoder &to) const =0

References Botan::ASN1_Object::encode_into().

Referenced by Botan::PSSR::config_for_x509(), 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::Certificate_Store_In_SQL::revoke_cert().

## ◆ cert_status()

size_t Botan::OCSP::SingleResponse::cert_status | ( |  | ) | const
| inline

Definition at line 52 of file ocsp.h.

52{ return m_cert_status; }

Referenced by decode_from().

## ◆ certid()

const CertID & Botan::OCSP::SingleResponse::certid | ( |  | ) | const
| inline

Definition at line 50 of file ocsp.h.

50{ return m_certid; }

## ◆ decode_from()

void Botan::OCSP::SingleResponse::decode_from | ( | class BER_Decoder & | from | ) |
| override virtual

Decode whatever this object is from from

Parameters

  from | the BER_Decoder that will be read from

Implements Botan::ASN1_Object.

Definition at line 84 of file ocsp_types.cpp.

85 {
86 BER_Object cert_status;
87 Extensions extensions;
88
89 from.start_cons(SEQUENCE)
90 .decode(m_certid)
91 .get_next(cert_status)
92 .decode(m_thisupdate)
93 .decode_optional(m_nextupdate, ASN1_Tag(0),
94 ASN1_Tag(CONTEXT_SPECIFIC | CONSTRUCTED))
95 .decode_optional(extensions,
96 ASN1_Tag(1),
97 ASN1_Tag(CONTEXT_SPECIFIC | CONSTRUCTED))
98 .end_cons();
99
100 m_cert_status = cert_status.type();
101 }
Botan::OCSP::SingleResponse::cert_status
size_t cert_status() const
Definition: ocsp.h:52
Botan::ASN1_Tag
ASN1_Tag
Definition: asn1_obj.h:25
Botan::CONSTRUCTED
@ CONSTRUCTED
Definition: asn1_obj.h:30
Botan::SEQUENCE
@ SEQUENCE
Definition: asn1_obj.h:42
Botan::CONTEXT_SPECIFIC
@ CONTEXT_SPECIFIC
Definition: asn1_obj.h:28

References cert_status(), Botan::CONSTRUCTED, Botan::CONTEXT_SPECIFIC, Botan::BER_Decoder::decode(), Botan::BER_Decoder::decode_optional(), Botan::BER_Decoder::end_cons(), Botan::BER_Decoder::get_next(), Botan::SEQUENCE, and Botan::BER_Decoder::start_cons().

## ◆ encode_into()

void Botan::OCSP::SingleResponse::encode_into | ( | class DER_Encoder & | to | ) | const
| override virtual

Encode whatever this object is into to

Parameters

  to | the DER_Encoder that will be written to

Implements Botan::ASN1_Object.

Definition at line 79 of file ocsp_types.cpp.

80 {
81 throw Not_Implemented("SingleResponse::encode_into");
82 }

## ◆ next_update()

X509_Time Botan::OCSP::SingleResponse::next_update | ( |  | ) | const
| inline

Definition at line 56 of file ocsp.h.

56{ return m_nextupdate; }

## ◆ this_update()

X509_Time Botan::OCSP::SingleResponse::this_update | ( |  | ) | const
| inline

Definition at line 54 of file ocsp.h.

54{ return m_thisupdate; }

The documentation for this class was generated from the following files:

- src/lib/x509/ocsp.h
- src/lib/x509/ocsp_types.cpp