Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

key_constraint.h
Go to the documentation of this file.
1 /*
2 * Enumerations
3 * (C) 1999-2007 Jack Lloyd
4 * (C) 2016 René Korthaus, Rohde & Schwarz Cybersecurity
5 *
6 * Botan is released under the Simplified BSD License (see license.txt)
7 */
8
9 #ifndef BOTAN_ENUMS_H__
10 #define BOTAN_ENUMS_H__
11
12 #include <botan/build.h>
13 #include <string>
14
15 namespace Botan {
16
17 /**
18 * X.509v3 Key Constraints.
19 * If updating update copy in ffi.h
20 */
21 enum Key_Constraints {
22 NO_CONSTRAINTS = 0,
23 DIGITAL_SIGNATURE = 1 << 15,
24 NON_REPUDIATION = 1 << 14,
25 KEY_ENCIPHERMENT = 1 << 13,
26 DATA_ENCIPHERMENT = 1 << 12,
27 KEY_AGREEMENT = 1 << 11,
28 KEY_CERT_SIGN = 1 << 10,
29 CRL_SIGN = 1 << 9,
30 ENCIPHER_ONLY = 1 << 8,
31 DECIPHER_ONLY = 1 << 7
32 };
33
34 class Public_Key;
35
36 /**
37 * Check that key constraints are permitted for a specific public key.
38 * @param pub_key the public key on which the constraints shall be enforced on
39 * @param constraints the constraints that shall be enforced on the key
40 * @throw Exception if the given constraints are not permitted for this key
41 */
42 BOTAN_DLL void verify_cert_constraints_valid_for_key_type(const Public_Key& pub_key,
43 Key_Constraints constraints);
44
45 std::string BOTAN_DLL key_constraints_to_string(Key_Constraints);
46
47 }
48
49 #endif
Botan::DATA_ENCIPHERMENT
Definition: key_constraint.h:26
Botan::ENCIPHER_ONLY
Definition: key_constraint.h:30
Botan::NON_REPUDIATION
Definition: key_constraint.h:24
Botan::KEY_ENCIPHERMENT
Definition: key_constraint.h:25
Botan::KEY_AGREEMENT
Definition: key_constraint.h:27
Botan::verify_cert_constraints_valid_for_key_type
void verify_cert_constraints_valid_for_key_type(const Public_Key &pub_key, Key_Constraints constraints)
Definition: key_constraint.cpp:69
Botan::NO_CONSTRAINTS
Definition: key_constraint.h:22
Botan::DIGITAL_SIGNATURE
Definition: key_constraint.h:23
Botan::CRL_SIGN
Definition: key_constraint.h:29
Botan
Definition: alg_id.cpp:13
Botan::DECIPHER_ONLY
Definition: key_constraint.h:31
Botan::Key_Constraints
Key_Constraints
Definition: key_constraint.h:21
Botan::key_constraints_to_string
std::string key_constraints_to_string(Key_Constraints constraints)
Definition: key_constraint.cpp:14
Botan::KEY_CERT_SIGN
Definition: key_constraint.h:28