diff options
author | Kai Michaelis <[email protected]> | 2016-01-07 13:50:16 +0100 |
---|---|---|
committer | Kai Michaelis <[email protected]> | 2016-03-10 11:29:29 +0100 |
commit | 205317fbc4b4cedcb5c1a0413d62ecdb64220570 (patch) | |
tree | b88b1e0c51be7b1aceb67b80a7dec08534c78c35 /src/lib/cert/x509/x509_ext.h | |
parent | 0a9505a067313e0e1b9099873642e07ad9fee52f (diff) |
X.509 Name Constraints
Diffstat (limited to 'src/lib/cert/x509/x509_ext.h')
-rw-r--r-- | src/lib/cert/x509/x509_ext.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/lib/cert/x509/x509_ext.h b/src/lib/cert/x509/x509_ext.h index e9e718014..64d290fc2 100644 --- a/src/lib/cert/x509/x509_ext.h +++ b/src/lib/cert/x509/x509_ext.h @@ -256,6 +256,29 @@ class BOTAN_DLL Extended_Key_Usage final : public Certificate_Extension }; /** +* Name Constraints +*/ +class BOTAN_DLL Name_Constraints : public Certificate_Extension + { + public: + Name_Constraints* copy() const override + { return new Name_Constraints(m_name_constraints); } + + Name_Constraints() {} + Name_Constraints(const NameConstraints &nc) : m_name_constraints(nc) {} + private: + std::string oid_name() const override + { return "X509v3.NameConstraints"; } + + bool should_encode() const override { return true; } + std::vector<byte> encode_inner() const override; + void decode_inner(const std::vector<byte>&) override; + void contents_to(Data_Store&, Data_Store&) const override; + + NameConstraints m_name_constraints; + }; + +/** * Certificate Policies Extension */ class BOTAN_DLL Certificate_Policies final : public Certificate_Extension |