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 | 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
virtual OID | oid_of () const
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)

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

## Detailed Description

Basic Constraints Extension

Definition at line 182 of file x509_ext.h.

## Constructor & Destructor Documentation

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

Definition at line 188 of file x509_ext.h.

188 :
189 m_is_ca(ca), m_path_limit(limit) {}

## Member Function Documentation

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 185 of file x509_ext.h.

186 { 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:188

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

Definition at line 191 of file x509_ext.h.

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

191 { return m_is_ca; }

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

Definition at line 270 of file x509_ext.cpp.

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

271 {
272 if(!m_is_ca)
273 throw Invalid_State("Basic_Constraints::get_path_limit: Not a CA");
274 return m_path_limit;
275 }

OID Botan::Certificate_Extension::oid_of | ( |  | ) | const
| virtual inherited

Returns
  OID representing this extension

Reimplemented in Botan::Cert_Extension::Unknown_Critical_Extension.

Definition at line 76 of file x509_ext.cpp.

References Botan::OIDS::lookup(), and Botan::Certificate_Extension::oid_name().

Referenced by Botan::Extensions::add(), Botan::Extensions::encode_into(), and Botan::Extensions::replace().

77 {
78 return OIDS::lookup(oid_name());
79 }
Botan::Certificate_Extension::oid_name
virtual std::string oid_name() const =0
Botan::OIDS::lookup
std::string lookup(const OID &oid)
Definition: oids.cpp:18

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

Definition at line 78 of file x509_ext.h.

Referenced by Botan::Extensions::encode_into().

78 { return true; }

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_Critical_Extension, and Botan::Cert_Extension::Name_Constraints.

Definition at line 84 of file x509_ext.cpp.

88 {
89 }

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

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