Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | List of all members
Botan::TLS::Certificate_Status_Request Class Referencefinal

`#include <tls_extensions.h>`

Inheritance diagram for Botan::TLS::Certificate_Status_Request:

## Public Member Functions
| Certificate_Status_Request ()
| Certificate_Status_Request (const std::vector< X509_DN > &ocsp_responder_ids, const std::vector< std::vector< uint8_t >> &ocsp_key_ids)
| Certificate_Status_Request (TLS_Data_Reader &reader, uint16_t extension_size)
bool | empty () const override
std::vector< uint8_t > | serialize () const override
Handshake_Extension_Type | type () const override

## Static Public Member Functions
static Handshake_Extension_Type | static_type ()

## Detailed Description

Certificate Status Request (RFC 6066)

Definition at line 400 of file tls_extensions.h.

## Constructor & Destructor Documentation

Botan::TLS::Certificate_Status_Request::Certificate_Status_Request | ( |  | ) |

Definition at line 672 of file tls_extensions.cpp.

672 : m_server_side(true)
673 {
674
675 }

Botan::TLS::Certificate_Status_Request::Certificate_Status_Request | ( | const std::vector< X509_DN > & | ocsp_responder_ids,
|  | const std::vector< std::vector< uint8_t >> & | ocsp_key_ids
| ) |  |

Definition at line 663 of file tls_extensions.cpp.

664 :
665 m_ocsp_names(ocsp_responder_ids),
666 m_ocsp_keys(ocsp_key_ids),
667 m_server_side(false)
668 {
669
670 }

Botan::TLS::Certificate_Status_Request::Certificate_Status_Request | ( | TLS_Data_Reader & | reader,
|  | uint16_t | extension_size
| ) |  |

Definition at line 646 of file tls_extensions.cpp.

References Botan::TLS::TLS_Data_Reader::discard_next(), Botan::TLS::TLS_Data_Reader::get_byte(), and type().

648 {
649 if(extension_size > 0)
650 {
651 const uint8_t type = reader.get_byte();
652 if(type == 1)
653 {
654 reader.discard_next(extension_size - 1); // fixme
655 }
656 else
657 {
658 reader.discard_next(extension_size - 1);
659 }
660 }
661 }
Botan::TLS::Certificate_Status_Request::type
Handshake_Extension_Type type() const override
Definition: tls_extensions.h:406

## Member Function Documentation

bool Botan::TLS::Certificate_Status_Request::empty | ( |  | ) | const
| inline override virtual

Returns
  if we should encode this extension or not

Implements Botan::TLS::Extension.

Definition at line 410 of file tls_extensions.h.

410 { return false; }

std::vector< uint8_t > Botan::TLS::Certificate_Status_Request::serialize | ( |  | ) | const
| override virtual

Returns
  serialized binary for the extension

Implements Botan::TLS::Extension.

Definition at line 620 of file tls_extensions.cpp.

621 {
622 std::vector<uint8_t> buf;
623
624 if(m_server_side)
625 return buf; // server reply is empty
626
627 /*
628 opaque ResponderID<1..2^16-1>;
629 opaque Extensions<0..2^16-1>;
630
631 CertificateStatusType status_type = ocsp(1)
632 ResponderID responder_id_list<0..2^16-1>
633 Extensions request_extensions;
634 */
635
636 buf.push_back(1); // CertificateStatusType ocsp
637
638 buf.push_back(0);
639 buf.push_back(0);
640 buf.push_back(0);
641 buf.push_back(0);
642
643 return buf;
644 }

static Handshake_Extension_Type Botan::TLS::Certificate_Status_Request::static_type | ( |  | ) |
| inline static

Definition at line 403 of file tls_extensions.h.

References Botan::TLS::TLSEXT_CERT_STATUS_REQUEST.

Referenced by type().

404 { return TLSEXT_CERT_STATUS_REQUEST; }
Botan::TLS::TLSEXT_CERT_STATUS_REQUEST
Definition: tls_extensions.h:29

Handshake_Extension_Type Botan::TLS::Certificate_Status_Request::type | ( |  | ) | const
| inline override virtual

Returns
  code number of the extension

Implements Botan::TLS::Extension.

Definition at line 406 of file tls_extensions.h.

References static_type().

Referenced by Certificate_Status_Request().

406 { return static_type(); }
Botan::TLS::Certificate_Status_Request::static_type
static Handshake_Extension_Type static_type()
Definition: tls_extensions.h:403

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

- src/lib/tls/tls_extensions.h
- src/lib/tls/tls_extensions.cpp