aboutsummaryrefslogtreecommitdiffstats
path: root/src/cert
diff options
context:
space:
mode:
Diffstat (limited to 'src/cert')
-rw-r--r--src/cert/cvc/eac_obj.h2
-rw-r--r--src/cert/cvc/ecdsa_sig.h3
-rw-r--r--src/cert/x509/certstor.h2
-rw-r--r--src/cert/x509/x509_ext.h50
-rw-r--r--src/cert/x509/x509find.h6
-rw-r--r--src/cert/x509/x509stor.h31
6 files changed, 59 insertions, 35 deletions
diff --git a/src/cert/cvc/eac_obj.h b/src/cert/cvc/eac_obj.h
index 66752b10c..eb6db3369 100644
--- a/src/cert/cvc/eac_obj.h
+++ b/src/cert/cvc/eac_obj.h
@@ -13,7 +13,7 @@
namespace Botan {
-/*
+/**
* TR03110 v1.1 EAC CV Certificate
*/
template<typename Derived> // CRTP is used enable the call sequence:
diff --git a/src/cert/cvc/ecdsa_sig.h b/src/cert/cvc/ecdsa_sig.h
index 1397a92b1..a92052470 100644
--- a/src/cert/cvc/ecdsa_sig.h
+++ b/src/cert/cvc/ecdsa_sig.h
@@ -15,6 +15,9 @@
namespace Botan {
+/**
+* Class representing an ECDSA signature
+*/
class BOTAN_DLL ECDSA_Signature
{
public:
diff --git a/src/cert/x509/certstor.h b/src/cert/x509/certstor.h
index d5004e366..2e39a7178 100644
--- a/src/cert/x509/certstor.h
+++ b/src/cert/x509/certstor.h
@@ -13,7 +13,7 @@
namespace Botan {
-/*
+/**
* Certificate Store Interface
*/
class BOTAN_DLL Certificate_Store
diff --git a/src/cert/x509/x509_ext.h b/src/cert/x509/x509_ext.h
index a5bfd357f..213a077a2 100644
--- a/src/cert/x509/x509_ext.h
+++ b/src/cert/x509/x509_ext.h
@@ -16,18 +16,40 @@
namespace Botan {
-/*
+/**
* X.509 Certificate Extension
*/
class BOTAN_DLL Certificate_Extension
{
public:
+ /**
+ * @return OID representing this extension
+ */
OID oid_of() const;
+ /**
+ * Make a copy of this extension
+ * @return copy of this
+ */
virtual Certificate_Extension* copy() const = 0;
- virtual void contents_to(Data_Store&, Data_Store&) const = 0;
+ /*
+ * Add the contents of this extension into the information
+ * for the subject and/or issuer, as necessary.
+ * @param subject the subject info
+ * @param issuer the issuer info
+ */
+ virtual void contents_to(Data_Store& subject,
+ Data_Store& issuer) const = 0;
+
+ /*
+ * @return short readable name
+ */
virtual std::string config_id() const = 0;
+
+ /*
+ * @return specific OID name
+ */
virtual std::string oid_name() const = 0;
virtual ~Certificate_Extension() {}
@@ -38,7 +60,7 @@ class BOTAN_DLL Certificate_Extension
virtual void decode_inner(const MemoryRegion<byte>&) = 0;
};
-/*
+/**
* X.509 Certificate Extension List
*/
class BOTAN_DLL Extensions : public ASN1_Object
@@ -65,7 +87,7 @@ class BOTAN_DLL Extensions : public ASN1_Object
namespace Cert_Extension {
-/*
+/**
* Basic Constraints Extension
*/
class BOTAN_DLL Basic_Constraints : public Certificate_Extension
@@ -91,7 +113,7 @@ class BOTAN_DLL Basic_Constraints : public Certificate_Extension
u32bit path_limit;
};
-/*
+/**
* Key Usage Constraints Extension
*/
class BOTAN_DLL Key_Usage : public Certificate_Extension
@@ -114,7 +136,7 @@ class BOTAN_DLL Key_Usage : public Certificate_Extension
Key_Constraints constraints;
};
-/*
+/**
* Subject Key Identifier Extension
*/
class BOTAN_DLL Subject_Key_ID : public Certificate_Extension
@@ -138,7 +160,7 @@ class BOTAN_DLL Subject_Key_ID : public Certificate_Extension
MemoryVector<byte> key_id;
};
-/*
+/**
* Authority Key Identifier Extension
*/
class BOTAN_DLL Authority_Key_ID : public Certificate_Extension
@@ -162,7 +184,7 @@ class BOTAN_DLL Authority_Key_ID : public Certificate_Extension
MemoryVector<byte> key_id;
};
-/*
+/**
* Alternative Name Extension Base Class
*/
class BOTAN_DLL Alternative_Name : public Certificate_Extension
@@ -188,7 +210,7 @@ class BOTAN_DLL Alternative_Name : public Certificate_Extension
AlternativeName alt_name;
};
-/*
+/**
* Subject Alternative Name Extension
*/
class BOTAN_DLL Subject_Alternative_Name : public Alternative_Name
@@ -200,7 +222,7 @@ class BOTAN_DLL Subject_Alternative_Name : public Alternative_Name
Subject_Alternative_Name(const AlternativeName& = AlternativeName());
};
-/*
+/**
* Issuer Alternative Name Extension
*/
class BOTAN_DLL Issuer_Alternative_Name : public Alternative_Name
@@ -212,7 +234,7 @@ class BOTAN_DLL Issuer_Alternative_Name : public Alternative_Name
Issuer_Alternative_Name(const AlternativeName& = AlternativeName());
};
-/*
+/**
* Extended Key Usage Extension
*/
class BOTAN_DLL Extended_Key_Usage : public Certificate_Extension
@@ -236,7 +258,7 @@ class BOTAN_DLL Extended_Key_Usage : public Certificate_Extension
std::vector<OID> oids;
};
-/*
+/**
* Certificate Policies Extension
*/
class BOTAN_DLL Certificate_Policies : public Certificate_Extension
@@ -261,7 +283,7 @@ class BOTAN_DLL Certificate_Policies : public Certificate_Extension
std::vector<OID> oids;
};
-/*
+/**
* CRL Number Extension
*/
class BOTAN_DLL CRL_Number : public Certificate_Extension
@@ -286,7 +308,7 @@ class BOTAN_DLL CRL_Number : public Certificate_Extension
u32bit crl_number;
};
-/*
+/**
* CRL Entry Reason Code Extension
*/
class BOTAN_DLL CRL_ReasonCode : public Certificate_Extension
diff --git a/src/cert/x509/x509find.h b/src/cert/x509/x509find.h
index a7a84c7a5..5624b717b 100644
--- a/src/cert/x509/x509find.h
+++ b/src/cert/x509/x509find.h
@@ -12,7 +12,7 @@
namespace Botan {
-/*
+/**
* Search based on the contents of a DN entry
*/
class BOTAN_DLL DN_Check : public X509_Store::Search_Func
@@ -30,7 +30,7 @@ class BOTAN_DLL DN_Check : public X509_Store::Search_Func
compare_fn compare;
};
-/*
+/**
* Search for a certificate by issuer/serial
*/
class BOTAN_DLL IandS_Match : public X509_Store::Search_Func
@@ -43,7 +43,7 @@ class BOTAN_DLL IandS_Match : public X509_Store::Search_Func
MemoryVector<byte> serial;
};
-/*
+/**
* Search for a certificate by subject keyid
*/
class BOTAN_DLL SKID_Match : public X509_Store::Search_Func
diff --git a/src/cert/x509/x509stor.h b/src/cert/x509/x509stor.h
index 4e6037883..7c3895635 100644
--- a/src/cert/x509/x509stor.h
+++ b/src/cert/x509/x509stor.h
@@ -14,7 +14,7 @@
namespace Botan {
-/*
+/**
* X.509 Certificate Validation Result
*/
enum X509_Code {
@@ -42,12 +42,15 @@ enum X509_Code {
CA_CERT_NOT_FOR_CRL_ISSUER
};
-/*
+/**
* X.509 Certificate Store
*/
class BOTAN_DLL X509_Store
{
public:
+ /**
+ * A callback for searching the store
+ */
class BOTAN_DLL Search_Func
{
public:
@@ -71,20 +74,6 @@ class BOTAN_DLL X509_Store
std::vector<X509_Certificate> get_cert_chain(const X509_Certificate&);
std::string PEM_encode() const;
- /*
- * Made CRL_Data public for XLC for Cell 0.9, otherwise cannot
- * instantiate member variable std::vector<CRL_Data> revoked
- */
- class BOTAN_DLL CRL_Data
- {
- public:
- X509_DN issuer;
- MemoryVector<byte> serial, auth_key_id;
- bool operator==(const CRL_Data&) const;
- bool operator!=(const CRL_Data&) const;
- bool operator<(const CRL_Data&) const;
- };
-
X509_Code add_crl(const X509_CRL&);
void add_cert(const X509_Certificate&, bool = false);
void add_certs(DataSource&);
@@ -102,6 +91,16 @@ class BOTAN_DLL X509_Store
private:
X509_Store& operator=(const X509_Store&) { return (*this); }
+ class BOTAN_DLL CRL_Data
+ {
+ public:
+ X509_DN issuer;
+ MemoryVector<byte> serial, auth_key_id;
+ bool operator==(const CRL_Data&) const;
+ bool operator!=(const CRL_Data&) const;
+ bool operator<(const CRL_Data&) const;
+ };
+
class BOTAN_DLL Cert_Info
{
public: