/** @file src/certificate.h
- * @brief Certificate class.
+ * @brief Certificate class
*/
#define LIBDCP_CERTIFICATE_H
+#include "local_time.h"
#undef X509_NAME
#include <openssl/x509.h>
#include <boost/filesystem.hpp>
class Certificate
{
public:
- Certificate ()
- : _certificate (0)
- , _public_key (0)
- {}
+ Certificate() {}
/** Load an X509 certificate from a string
* @param cert String to read from
* and with + signs escaped to \+
*/
std::string issuer () const;
+ std::string issuer_common_name() const;
+ std::string issuer_organization_name() const;
+ std::string issuer_organizational_unit_name() const;
std::string subject () const;
std::string subject_common_name () const;
std::string subject_organization_name () const;
std::string subject_organizational_unit_name () const;
- struct tm not_before () const;
- struct tm not_after () const;
+ std::string subject_dn_qualifier() const;
+
+ LocalTime not_before () const;
+ LocalTime not_after () const;
X509* x509 () const {
return _certificate;
/** @return RSA public key from this Certificate. Caller must not free the returned value. */
RSA* public_key () const;
+ std::string public_key_digest() const;
/** @return thumbprint of the to-be-signed portion of this certificate */
std::string thumbprint () const;
}
+
#endif