#include <CA.hpp>
Public Member Functions | |
| CA (const String &caName, const String &caPasswd, const String &repos=REPOSITORY) | |
| ~CA () | |
| String | createSubCA (const String &newCaName, const String &keyPasswd, const RequestGenerationData &caRequestData, const CertificateIssueData &caIssueData) |
| String | createRequest (const String &keyPasswd, const RequestGenerationData &requestData, Type requestType) |
| String | issueCertificate (const String &requestName, const CertificateIssueData &issueData, Type certType) |
| String | createCertificate (const String &keyPasswd, const RequestGenerationData &requestData, const CertificateIssueData &certificateData, Type type) |
| void | revokeCertificate (const String &certificateName, const CRLReason &crlReason=CRLReason()) |
| void | createCRL (const CRLGenerationData &crlData) |
| String | importRequestData (const limal::ByteBuffer &request, FormatType formatType=E_PEM) |
| String | importRequest (const String &requestFile, FormatType formatType=E_PEM) |
| CertificateIssueData | getIssueDefaults (Type type) |
| RequestGenerationData | getRequestDefaults (Type type) |
| CRLGenerationData | getCRLDefaults () |
| void | setIssueDefaults (Type type, const CertificateIssueData &defaults) |
| void | setRequestDefaults (Type type, const RequestGenerationData &defaults) |
| void | setCRLDefaults (const CRLGenerationData &defaults) |
| BLOCXX_NAMESPACE::Array< BLOCXX_NAMESPACE::Map< BLOCXX_NAMESPACE::String, BLOCXX_NAMESPACE::String > > | getCertificateList () |
| BLOCXX_NAMESPACE::Array< BLOCXX_NAMESPACE::Map< BLOCXX_NAMESPACE::String, BLOCXX_NAMESPACE::String > > | getRequestList () |
| CertificateData | getCA () |
| RequestData | getRequest (const String &requestName) |
| CertificateData | getCertificate (const String &certificateName) |
| CRLData | getCRL () |
| limal::ByteBuffer | exportCACert (FormatType exportType) |
| limal::ByteBuffer | exportCAKeyAsPEM (const String &newPassword) |
| limal::ByteBuffer | exportCAKeyAsDER () |
| limal::ByteBuffer | exportCAasPKCS12 (const String &p12Password, bool withChain=false) |
| limal::ByteBuffer | exportCertificate (const String &certificateName, FormatType exportType) |
| limal::ByteBuffer | exportCertificateKeyAsPEM (const String &certificateName, const String &keyPassword, const String &newPassword) |
| limal::ByteBuffer | exportCertificateKeyAsDER (const String &certificateName, const String &keyPassword) |
| limal::ByteBuffer | exportCertificateAsPKCS12 (const String &certificateName, const String &keyPassword, const String &p12Password, bool withChain=false) |
| limal::ByteBuffer | exportCRL (FormatType exportType) |
| void | deleteRequest (const String &requestName) |
| void | deleteCertificate (const String &certificateName, bool requestToo=true) |
| void | updateDB () |
| bool | verifyCertificate (const String &certificateName, bool crlCheck=true, const String &purpose=String("any")) |
| CAConfig * | getConfig () |
Static Public Member Functions | |
| static void | createRootCA (const String &caName, const String &caPasswd, const RequestGenerationData &caRequestData, const CertificateIssueData &caIssueData, const String &repos=REPOSITORY) |
| static void | importCA (const String &caName, const limal::ByteBuffer &caCertificate, const limal::ByteBuffer &caKey, const String &caPasswd=String(), const String &repos=REPOSITORY) |
| static BLOCXX_NAMESPACE::Array< BLOCXX_NAMESPACE::String > | getCAList (const String &repos=REPOSITORY) |
| static BLOCXX_NAMESPACE::List< BLOCXX_NAMESPACE::Array< BLOCXX_NAMESPACE::String > > | getCATree (const String &repos=REPOSITORY) |
| static CertificateIssueData | getRootCAIssueDefaults (const String &repos=REPOSITORY) |
| static RequestGenerationData | getRootCARequestDefaults (const String &repos=REPOSITORY) |
| static void | deleteCA (const String &caName, const String &caPasswd, bool force=false, const String &repos=REPOSITORY) |
Private Member Functions | |
| CA () | |
| CA (const CA &) | |
| CA & | operator= (const CA &) |
| void | checkDNPolicy (const DNObject &dn, Type type) |
| String | initConfigFile () |
| void | commitConfig2Template () |
| void | removeDefaultsFromConfig () |
Private Attributes | |
| BLOCXX_NAMESPACE::COWIntrusiveReference< CAImpl > | m_impl |
This class provides methods for managing a CA repository. If you want to know how to use these methods and functions have a look at the example page
CreateCertificate.cpp, Export.cpp, and RevokeCertificateAndCreateCRL.cpp.
|
||||||||||||||||
|
Construct a CA object.
|
|
|
Destructor of CA. |
|
|
|
|
|
|
|
||||||||||||
|
Check if the given dn matches the policy defined in the configuration file On error this method throws exceptions.
|
|
|
Copy Config file to template On error this method throws exceptions. |
|
||||||||||||||||||||
|
Create a certificate in the specified CA On error this method throws exceptions.
|
|
|
Create a new CRL with the specified data. On error this method throws exceptions.
|
|
||||||||||||||||
|
Create a certificate request in the specified CA On error this method throws exceptions.
|
|
||||||||||||||||||||||||
|
Create a new selfsigned root CA plus the whole needed infrastructure. On error this function throws exceptions.
|
|
||||||||||||||||||||
|
Create a new Sub CA and with the whole needed infrastructure. On error this method throws exceptions.
|
|
||||||||||||||||||||
|
Delete a Certificate Authority infrastructure Normaly you can only delete a CA if the CA certificate is expired or you have never signed a certificate with this CA. In all other cases you have to set the force parameter to "true" if you realy want to delete the CA and you know what you do. On error this function throws exceptions.
|
|
||||||||||||
|
Delete the specified certificate together with the corresponding request and private key if requestToo is set to true. This function works only for revoked or expired certificates. On error this method throws exceptions.
|
|
|
Delete a Request. This function removes also the private key if one is available. On error this method throws exceptions.
|
|
||||||||||||
|
Return the CA certificate in PKCS12 format. If withChain is true, all issuer certificates will be included. On error this method throws exceptions.
|
|
|
Return the CA certificate in PEM or DER format. On error this method throws exceptions.
|
|
|
Return the CA private key in DER format. The private Key is decrypted. On error this method throws exceptions.
|
|
|
Return the CA private key in PEM format. If a new Password is given, the key will be encrypted using the newPassword. If newPassword is empty the returned key is decrypted. On error this method throws exceptions.
|
|
||||||||||||
|
Return the specified certificate in PEM or DER format On error this method throws exceptions.
|
|
||||||||||||||||||||
|
Return the certificate in PKCS12 format. If withChain is true, all issuer certificates will be included. On error this method throws exceptions.
|
|
||||||||||||
|
Return the certificate private key in DER format. The private Key is decrypted. On error this method throws exceptions.
|
|
||||||||||||||||
|
Return the certificate private key in PEM format. If a new Password is given, the key will be encrypted using the newPassword. If newPassword is empty the returned key is decrypted. On error this method throws exceptions.
|
|
|
Export the CRL of this CA in the requested format type. On error this method throws exceptions.
|
|
|
Parse this CA and return the data. On error this method throws exceptions.
|
|
|
Get a list of available CAs On error this function throws exceptions.
|
|
|
Return a table of the available CAs and its issuer. If the CA is self-signed the issuer field is empty.
On error this function throws exceptions.
|
|
|
Parse a certificate and return the data. On error this method throws exceptions.
|
|
|
Get an Array of maps with all certificates of the defined CA. On error this method throws exceptions.
|
|
|
Return the current config object
|
|
|
Parse the current CRL of this CA and return the data. On error this method throws exceptions.
|
|
|
Get a CRLGenerationData object with current default settings for this CA. On error this method throws exceptions.
|
|
|
Get a CertificateIssueData object with current signing default settings for this CA and the specific type. On error this method throws exceptions.
|
|
|
Parse a request and return the data. On error this method throws exceptions.
|
|
|
Get a RequestGenerationData object with current request default settings for this CA and the specific type. On error this method throws exceptions.
|
|
|
Get an Array of maps with all requests of the defined CA. On error this method throws exceptions.
|
|
|
Get a CertificateIssueData object with current signing default settings for a Root CA. On error this function throws exceptions.
|
|
|
Get a RequestGenerationData object with current request default settings for a Root CA. On error this function throws exceptions.
|
|
||||||||||||||||||||||||
|
Import a CA certificate and private key and creates a infrastructure. On error this function throws exceptions.
|
|
||||||||||||
|
Import a request in a CA repository. On error this method throws exceptions.
|
|
||||||||||||
|
Import a request in a CA repository. On error this method throws exceptions.
|
|
|
Initialize the config file On error this method throws exceptions. Copy the template to a configfile and create the config object
|
|
||||||||||||||||
|
Issue a certificate in the specified CA On error this method throws exceptions.
|
|
|
|
|
|
remove _default values from configfile |
|
||||||||||||
|
Revoke a certificate. On error this method throws exceptions.
|
|
|
Set CRL defaults for this CA On error this method throws exceptions.
|
|
||||||||||||
|
Set the signing defaults for this CA and the specific certType On error this method throws exceptions.
|
|
||||||||||||
|
Set the request defaults for this CA and the specific certType On error this method throws exceptions.
|
|
|
Update the internal openssl database. On error this method throws exceptions. |
|
||||||||||||||||
|
Verify a certificate. On error this method throws exceptions.
|
|
|
|
1.4.6