diff options
Diffstat (limited to 'src/lib/cert/x509/x509cert.h')
-rw-r--r-- | src/lib/cert/x509/x509cert.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/cert/x509/x509cert.h b/src/lib/cert/x509/x509cert.h index 1a46d290f..578360a80 100644 --- a/src/lib/cert/x509/x509cert.h +++ b/src/lib/cert/x509/x509cert.h @@ -1,6 +1,6 @@ /* * X.509 Certificates -* (C) 1999-2007 Jack Lloyd +* (C) 1999-2007,2015 Jack Lloyd * * Botan is released under the Simplified BSD License (see license.txt) */ @@ -18,6 +18,15 @@ namespace Botan { +enum class Usage_Type + { + UNSPECIFIED, // no restrictions + TLS_SERVER_AUTH, + TLS_CLIENT_AUTH, + CERTIFICATE_AUTHORITY, + OCSP_RESPONDER + }; + /** * This class represents X.509 Certificate */ @@ -137,6 +146,8 @@ class BOTAN_DLL X509_Certificate : public X509_Object */ bool allowed_usage(const std::string& usage) const; + bool allowed_usage(Usage_Type usage) const; + /** * Get the path limit as defined in the BasicConstraints extension of * this certificate. |