diff options
author | René Korthaus <[email protected]> | 2016-10-09 11:54:17 +0200 |
---|---|---|
committer | René Korthaus <[email protected]> | 2016-10-11 11:38:47 +0200 |
commit | f76136deec7eb25db534df3d9e1d784b078f001c (patch) | |
tree | 97071f42a398edc8d5317cb44a6ad6b6ad78599a /src/lib/cert/x509/certstor_sql | |
parent | e402cbacbb08784753772dba9ee5e48f9d64d71e (diff) |
Improve cert doxygen [ci skip]
Diffstat (limited to 'src/lib/cert/x509/certstor_sql')
-rw-r--r-- | src/lib/cert/x509/certstor_sql/certstor_sql.h | 52 |
1 files changed, 30 insertions, 22 deletions
diff --git a/src/lib/cert/x509/certstor_sql/certstor_sql.h b/src/lib/cert/x509/certstor_sql/certstor_sql.h index 096426b7a..5b6a376c7 100644 --- a/src/lib/cert/x509/certstor_sql/certstor_sql.h +++ b/src/lib/cert/x509/certstor_sql/certstor_sql.h @@ -16,36 +16,42 @@ namespace Botan { /** - * Certificate and private key store backed an SQL database. + * Certificate and private key store backed by an SQL database. */ class BOTAN_DLL Certificate_Store_In_SQL : public Certificate_Store { public: /** - * Create/open a certificate store backed by "db". - * Inserted private keys are encrypted using "passwd". - */ + * Create/open a certificate store. + * @param db underlying database storage + * @param passwd password to encrypt private keys in the database + * @param table_prefix optional prefix for db table names + */ explicit Certificate_Store_In_SQL(const std::shared_ptr<SQL_Database> db, - const std::string& passwd, - const std::string& table_prefix = ""); + const std::string& passwd, + const std::string& table_prefix = ""); - /// Returns the first certificate with matching subject DN and optional key ID. + /** + * Returns the first certificate with matching subject DN and optional key ID. + */ virtual std::shared_ptr<const X509_Certificate> find_cert(const X509_DN& subject_dn, const std::vector<byte>& key_id) const override; - /// Returns all subject DNs known to the store instance, + /** + * Returns all subject DNs known to the store instance. + */ virtual std::vector<X509_DN> all_subjects() const override; /** - * Inserts "cert" into the store, returns false if the certificate is - * already known and true if insertion was successful. - */ + * Inserts "cert" into the store, returns false if the certificate is + * already known and true if insertion was successful. + */ bool insert_cert(const X509_Certificate& cert); /** - * Removes "cert" from the store. Returns false if the certificate could not - * be found and true if removal was successful. - */ + * Removes "cert" from the store. Returns false if the certificate could not + * be found and true if removal was successful. + */ bool remove_cert(const X509_Certificate& cert); /// Returns the private key for "cert" or an empty shared_ptr if none was found. @@ -56,27 +62,29 @@ class BOTAN_DLL Certificate_Store_In_SQL : public Certificate_Store find_certs_for_key(const Private_Key& key) const; /** - * Inserts "key" for "cert" into the store, returns false if the key is - * already known and true if insertion was successful. - */ + * Inserts "key" for "cert" into the store, returns false if the key is + * already known and true if insertion was successful. + */ bool insert_key(const X509_Certificate& cert, const Private_Key& key); /// Removes "key" from the store. void remove_key(const Private_Key& key); /// Marks "cert" as revoked starting from "time". - void revoke_cert(const X509_Certificate&,CRL_Code,const X509_Time& time = X509_Time()); + void revoke_cert(const X509_Certificate&, CRL_Code, const X509_Time& time = X509_Time()); /// Reverses the revokation for "cert". void affirm_cert(const X509_Certificate&); /** - * Generates Certificate Revocation Lists for all certificates marked as revoked. - * A CRL is returned for each unique issuer DN. - */ + * Generates Certificate Revocation Lists for all certificates marked as revoked. + * A CRL is returned for each unique issuer DN. + */ std::vector<X509_CRL> generate_crls() const; - /// Generates a CRL for all certificates issued by the given issuer. + /** + * Generates a CRL for all certificates issued by the given issuer. + */ virtual std::shared_ptr<const X509_CRL> find_crl_for(const X509_Certificate& issuer) const override; |