Botan: Botan::Cert_Extension::Basic_Constraints Class Reference

Botan 1.10.12

- Main Page
- Related Pages
- 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 Reference

`#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
bool | get_is_ca () const
size_t | get_path_limit () const
OID | oid_of () const

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

## Detailed Description

Basic Constraints Extension

Definition at line 95 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 101 of file x509_ext.h.

101 :
102 is_ca(ca), path_limit(limit) {}

## Member Function Documentation

Basic_Constraints* Botan::Cert_Extension::Basic_Constraints::copy | ( |  | ) | const
| inlinevirtual

Make a copy of this extension

Returns
  copy of this

Implements Botan::Certificate_Extension.

Definition at line 98 of file x509_ext.h.

99 { return new Basic_Constraints(is_ca, path_limit); }
Botan::Cert_Extension::Basic_Constraints::Basic_Constraints
Basic_Constraints(bool ca=false, size_t limit=0)
Definition: x509_ext.h:101

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

Definition at line 104 of file x509_ext.h.

104 { return is_ca; }

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

Definition at line 171 of file x509_ext.cpp.

References Botan::Data_Store::add(), Botan::BIT_STRING, Botan::BOOLEAN, Botan::BER_Object::class_tag, Botan::BER_Decoder::decode(), Botan::BER_Decoder::decode_optional(), Botan::PEM_Code::encode(), Botan::DER_Encoder::encode(), Botan::DER_Encoder::encode_if(), Botan::DER_Encoder::end_cons(), Botan::BER_Decoder::end_cons(), Botan::DER_Encoder::get_contents(), Botan::BER_Decoder::get_next_object(), Botan::INTEGER, Botan::low_bit(), Botan::NO_CONSTRAINTS, Botan::OCTET_STRING, Botan::MemoryRegion< T >::push_back(), Botan::SEQUENCE, Botan::MemoryRegion< T >::size(), Botan::DER_Encoder::start_cons(), Botan::BER_Decoder::start_cons(), Botan::BER_Object::type_tag, Botan::UNIVERSAL, Botan::BER_Object::value, and Botan::BER_Decoder::verify_end().

172 {
173 if(!is_ca)
174 throw Invalid_State("Basic_Constraints::get_path_limit: Not a CA");
175 return path_limit;
176 }

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

Returns
  OID representing this extension

Definition at line 72 of file x509_ext.cpp.

References Botan::OIDS::lookup().

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

73 {
74 return OIDS::lookup(oid_name());
75 }
Botan::Certificate_Extension::oid_name
virtual std::string oid_name() const =0
Botan::OIDS::lookup
std::string lookup(const OID &oid)
Definition: oids.cpp:31

virtual bool Botan::Certificate_Extension::should_encode | ( |  | ) | const
| inlineprotectedvirtualinherited

Definition at line 58 of file x509_ext.h.

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

58 { return true; }

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

- src/cert/x509cert/x509_ext.h
- src/cert/x509cert/x509_ext.cpp