22 #ifndef SECURITYCERTIFICATEMANAGER_H_
23 #define SECURITYCERTIFICATEMANAGER_H_
29 #include <ibrcommon/data/File.h>
30 #include <ibrcommon/thread/Mutex.h>
34 #include <openssl/ssl.h>
55 static const std::string TAG;
102 virtual const std::string
getName()
const;
105 ibrcommon::Mutex _initialization_lock;
109 EVP_PKEY *_privateKey;
110 ibrcommon::File _trustedCAPath;
virtual void componentUp()
This class is a manager to handle certificates.
virtual ~SecurityCertificateManager()
const X509 * getCert() const
retrieve the saved certificate
virtual void componentDown()
SecurityCertificateException(std::string what="verification failed")
virtual void onConfigurationChanged(const dtn::daemon::Configuration &conf)
const EVP_PKEY * getPrivateKey() const
retrieve the saved private key
SecurityCertificateManager()
virtual ~SecurityCertificateException()
const ibrcommon::File & getTrustedCAPath() const
retrieve the saved directory holding trusted certificates
bool isInitialized()
checks if this class has already been initialized with a certificate and private key ...
static void validateSubject(X509 *certificate, const std::string &cn)
Validates if the CommonName in the given X509 certificate corresponds to the given EID...
virtual const std::string getName() const