8 #ifndef BOTAN_NAME_CONSTRAINT_H__
9 #define BOTAN_NAME_CONSTRAINT_H__
11 #include <botan/asn1_obj.h>
16 class X509_Certificate;
48 void encode_into(
class DER_Encoder&)
const override;
55 const std::string&
type()
const {
return m_type; }
73 bool matches_dns(
const std::string&)
const;
74 bool matches_dn(
const std::string&)
const;
75 bool matches_ip(
const std::string&)
const;
78 std::ostream&
operator<<(std::ostream& os,
const GeneralName& gn);
103 : m_base(base), m_minimum(min), m_maximum(max)
112 void encode_into(
class DER_Encoder&)
const override;
137 std::ostream&
operator<<(std::ostream& os,
const GeneralSubtree& gs);
158 std::vector<GeneralSubtree>&& excluded_subtrees)
159 : m_permitted_subtrees(permitted_subtrees), m_excluded_subtrees(excluded_subtrees)
165 const std::vector<GeneralSubtree>&
permitted()
const {
return m_permitted_subtrees; }
170 const std::vector<GeneralSubtree>&
excluded()
const {
return m_excluded_subtrees; }
173 std::vector<GeneralSubtree> m_permitted_subtrees;
174 std::vector<GeneralSubtree> m_excluded_subtrees;
GeneralSubtree(GeneralName base, size_t min, size_t max)
std::ostream & operator<<(std::ostream &out, const X509_DN &dn)
const std::vector< GeneralSubtree > & permitted() const
const std::vector< GeneralSubtree > & excluded() const
NameConstraints(std::vector< GeneralSubtree > &&permitted_subtrees, std::vector< GeneralSubtree > &&excluded_subtrees)
bool matches(DataSource &source, const std::string &extra, size_t search_range)
A single Name Constraint.
const std::string & name() const
const std::string & type() const