Botan  2.7.0
Crypto and TLS for C++11
Public Member Functions | List of all members
Botan::OCSP::SingleResponse Class Referencefinal

#include <ocsp_types.h>

Inheritance diagram for Botan::OCSP::SingleResponse:
Botan::ASN1_Object

Public Member Functions

std::vector< uint8_t > BER_encode () const
 
size_t cert_status () const
 
const CertIDcertid () 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 43 of file ocsp_types.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.

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().

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

◆ cert_status()

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

Definition at line 48 of file ocsp_types.h.

Referenced by decode_from().

48 { return m_cert_status; }

◆ certid()

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

Definition at line 46 of file ocsp_types.h.

46 { return m_certid; }

◆ decode_from()

void Botan::OCSP::SingleResponse::decode_from ( class BER_Decoder from)
overridevirtual

Decode whatever this object is from from

Parameters
fromthe BER_Decoder that will be read from

Implements Botan::ASN1_Object.

Definition at line 84 of file ocsp_types.cpp.

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().

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),
95  .decode_optional(extensions,
96  ASN1_Tag(1),
98  .end_cons();
99 
100  m_cert_status = cert_status.type();
101  }
ASN1_Tag
Definition: asn1_obj.h:22
size_t cert_status() const
Definition: ocsp_types.h:48

◆ encode_into()

void Botan::OCSP::SingleResponse::encode_into ( class DER_Encoder to) const
overridevirtual

Encode whatever this object is into to

Parameters
tothe 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 52 of file ocsp_types.h.

52 { return m_nextupdate; }

◆ this_update()

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

Definition at line 50 of file ocsp_types.h.

50 { return m_thisupdate; }

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