Botan 2.19.5 Crypto and TLS for C&

Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Botan::Cert_Extension::Basic_Constraints Class Referencefinal

`#include <x509_ext.h>`

Inheritance diagram for Botan::Cert_Extension::Basic_Constraints:

## Public Member Functions
| Basic_Constraints (bool ca=false, size_t limit=0)
Basic_Constraints * | copy () const override
bool | get_is_ca () const
size_t | get_path_limit () const
OID | oid_of () const override
virtual void | validate (const X509_Certificate &subject, const X509_Certificate &issuer, const std::vector< std::shared_ptr< const X509_Certificate > > &cert_path, std::vector< std::set< Certificate_Status_Code > > &cert_status, size_t pos)

## Static Public Member Functions
static OID | static_oid ()

## Protected Member Functions
virtual bool | should_encode () const

## Detailed Description

Basic Constraints Extension

Definition at line 26 of file x509_ext.h.

## Constructor & Destructor Documentation

## ◆ Basic_Constraints()

Botan::Cert_Extension::Basic_Constraints::Basic_Constraints | ( | bool | ca = `false`,
|  | size_t | limit = `0`
| ) |  |
| inline

Definition at line 32 of file x509_ext.h.

32 :
33 m_is_ca(ca), m_path_limit(limit) {}

## Member Function Documentation

## ◆ copy()

Basic_Constraints * Botan::Cert_Extension::Basic_Constraints::copy | ( |  | ) | const
| inline override virtual

Make a copy of this extension

Returns
  copy of this

Implements Botan::Certificate_Extension.

Definition at line 29 of file x509_ext.h.

30 { return new Basic_Constraints(m_is_ca, m_path_limit); }
Botan::Cert_Extension::Basic_Constraints::Basic_Constraints
Basic_Constraints(bool ca=false, size_t limit=0)
Definition: x509_ext.h:32

## ◆ get_is_ca()

bool Botan::Cert_Extension::Basic_Constraints::get_is_ca | ( |  | ) | const
| inline

Definition at line 35 of file x509_ext.h.

35{ return m_is_ca; }

Referenced by Botan::PKCS10_Request::is_CA(), and Botan::PKCS10_Request::path_limit().

## ◆ get_path_limit()

size_t Botan::Cert_Extension::Basic_Constraints::get_path_limit | ( |  | ) | const

Definition at line 318 of file x509_ext.cpp.

319 {
320 if(!m_is_ca)
321 throw Invalid_State("Basic_Constraints::get_path_limit: Not a CA");
322 return m_path_limit;
323 }

Referenced by Botan::PKCS10_Request::path_limit().

## ◆ oid_of()

OID Botan::Cert_Extension::Basic_Constraints::oid_of | ( |  | ) | const
| inline override virtual

Returns
  OID representing this extension

Implements Botan::Certificate_Extension.

Definition at line 39 of file x509_ext.h.

39{ return static_oid(); }
Botan::Cert_Extension::Basic_Constraints::static_oid
static OID static_oid()
Definition: x509_ext.h:38

## ◆ should_encode()

virtual bool Botan::Certificate_Extension::should_encode | ( |  | ) | const
| inline protected virtual inherited

Definition at line 427 of file pkix_types.h.

427{ return true; }

## ◆ static_oid()

static OID Botan::Cert_Extension::Basic_Constraints::static_oid | ( |  | ) |
| inline static

Definition at line 38 of file x509_ext.h.

38{ return OID("2.5.29.19"); }

## ◆ validate()

void Botan::Certificate_Extension::validate | ( | const X509_Certificate & | subject,
|  | const X509_Certificate & | issuer,
|  | const std::vector< std::shared_ptr< const X509_Certificate > > & | cert_path,
|  | std::vector< std::set< Certificate_Status_Code > > & | cert_status,
|  | size_t | pos
| ) |  |
| virtual inherited

Reimplemented in Botan::Cert_Extension::Unknown_Extension, Botan::Cert_Extension::Name_Constraints, and Botan::Cert_Extension::Certificate_Policies.

Definition at line 113 of file x509_ext.cpp.

117 {
118 }

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

- src/lib/x509/x509_ext.h
- src/lib/x509/x509_ext.cpp