From: Carl Hetherington Date: Mon, 8 Jan 2024 16:47:34 +0000 (+0100) Subject: Add Certificate::subject_dn_qualifier(). X-Git-Tag: v1.8.93~1 X-Git-Url: https://git.carlh.net/gitweb/?p=libdcp.git;a=commitdiff_plain;h=ff6474302e1481d98d8cd10bee11eceb4df050f1 Add Certificate::subject_dn_qualifier(). --- diff --git a/src/certificate.cc b/src/certificate.cc index c447be76..a11e85bd 100644 --- a/src/certificate.cc +++ b/src/certificate.cc @@ -355,6 +355,15 @@ Certificate::subject_organizational_unit_name () const } +string +Certificate::subject_dn_qualifier() const +{ + DCP_ASSERT (_certificate); + + return get_name_part(X509_get_subject_name(_certificate), NID_dnQualifier); +} + + static LocalTime convert_time (ASN1_TIME const * time) diff --git a/src/certificate.h b/src/certificate.h index e1bdecf5..bf11a965 100644 --- a/src/certificate.h +++ b/src/certificate.h @@ -107,6 +107,7 @@ public: std::string subject_common_name () const; std::string subject_organization_name () const; std::string subject_organizational_unit_name () const; + std::string subject_dn_qualifier() const; LocalTime not_before () const; LocalTime not_after () const; @@ -117,6 +118,7 @@ public: /** @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;