Botan 1.10.17

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

## ◆ Basic_Constraints()

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

## ◆ copy()

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

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

## ◆ get_is_ca()

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

Definition at line 104 of file x509_ext.h.

104 { return is_ca; }

## ◆ get_path_limit()

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

Definition at line 171 of file x509_ext.cpp.

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

## ◆ oid_of()

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(), and Botan::Certificate_Extension::oid_name().

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

## ◆ should_encode()

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

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