Botan  2.8.0
Crypto and TLS for C++11
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/types.h>
13 #include <string>
14 
15 namespace Botan {
16 
17 /**
18 * X.509v3 Key Constraints.
19 * If updating update copy in ffi.h
20 */
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_PUBLIC_API(2,0) void verify_cert_constraints_valid_for_key_type(const Public_Key& pub_key,
43  Key_Constraints constraints);
44 
46 
47 }
48 
49 #endif
#define BOTAN_PUBLIC_API(maj, min)
Definition: compiler.h:27
Definition: bigint.h:891
Definition: alg_id.cpp:13
void verify_cert_constraints_valid_for_key_type(const Public_Key &pub_key, Key_Constraints constraints)
std::string key_constraints_to_string(Key_Constraints constraints)