Botan 3.6.1
Crypto and TLS for C&
Botan::TLS::Signature_Algorithms_Cert Class Referencefinal

#include <tls_extensions.h>

Inheritance diagram for Botan::TLS::Signature_Algorithms_Cert:
Botan::TLS::Extension

Public Member Functions

bool empty () const override
 
virtual bool is_implemented () const
 
std::vector< uint8_t > serialize (Connection_Side whoami) const override
 
 Signature_Algorithms_Cert (std::vector< Signature_Scheme > schemes)
 
 Signature_Algorithms_Cert (TLS_Data_Reader &reader, uint16_t extension_size)
 
const std::vector< Signature_Scheme > & supported_schemes () const
 
Extension_Code type () const override
 

Static Public Member Functions

static Extension_Code static_type ()
 

Detailed Description

Signature_Algorithms_Cert for TLS 1.3 (RFC 8446)

RFC 8446 4.2.3 TLS 1.3 provides two extensions for indicating which signature algorithms may be used in digital signatures. The "signature_algorithms_cert" extension applies to signatures in certificates, and the "signature_algorithms" extension, which originally appeared in TLS 1.2, applies to signatures in CertificateVerify messages.

RFC 8446 4.2.3 TLS 1.2 implementations SHOULD also process this extension.

Definition at line 412 of file tls_extensions.h.

Constructor & Destructor Documentation

◆ Signature_Algorithms_Cert() [1/2]

Botan::TLS::Signature_Algorithms_Cert::Signature_Algorithms_Cert ( std::vector< Signature_Scheme > schemes)
inlineexplicit

Definition at line 424 of file tls_extensions.h.

424: m_schemes(std::move(schemes)) {}

◆ Signature_Algorithms_Cert() [2/2]

Botan::TLS::Signature_Algorithms_Cert::Signature_Algorithms_Cert ( TLS_Data_Reader & reader,
uint16_t extension_size )

Definition at line 651 of file tls_extensions.cpp.

651 :
652 m_schemes(parse_signature_algorithms(reader, extension_size)) {}

Member Function Documentation

◆ empty()

bool Botan::TLS::Signature_Algorithms_Cert::empty ( ) const
inlineoverridevirtual
Returns
if we should encode this extension or not

Implements Botan::TLS::Extension.

Definition at line 422 of file tls_extensions.h.

422{ return m_schemes.empty(); }

◆ is_implemented()

virtual bool Botan::TLS::Extension::is_implemented ( ) const
inlinevirtualinherited
Returns
true if this extension is known and implemented by Botan

Reimplemented in Botan::TLS::Unknown_Extension.

Definition at line 116 of file tls_extensions.h.

116{ return true; }

◆ serialize()

std::vector< uint8_t > Botan::TLS::Signature_Algorithms_Cert::serialize ( Connection_Side whoami) const
overridevirtual
Returns
serialized binary for the extension

Implements Botan::TLS::Extension.

Definition at line 647 of file tls_extensions.cpp.

647 {
648 return serialize_signature_algorithms(m_schemes);
649}

◆ static_type()

static Extension_Code Botan::TLS::Signature_Algorithms_Cert::static_type ( )
inlinestatic

Definition at line 414 of file tls_extensions.h.

◆ supported_schemes()

const std::vector< Signature_Scheme > & Botan::TLS::Signature_Algorithms_Cert::supported_schemes ( ) const
inline

Definition at line 418 of file tls_extensions.h.

418{ return m_schemes; }

◆ type()

Extension_Code Botan::TLS::Signature_Algorithms_Cert::type ( ) const
inlineoverridevirtual
Returns
code number of the extension

Implements Botan::TLS::Extension.

Definition at line 416 of file tls_extensions.h.

416{ return static_type(); }

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