From ff6474302e1481d98d8cd10bee11eceb4df050f1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 8 Jan 2024 17:47:34 +0100 Subject: [PATCH] Add Certificate::subject_dn_qualifier(). --- src/certificate.cc | 9 +++++++++ src/certificate.h | 2 ++ 2 files changed, 11 insertions(+) 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; -- 2.30.2