diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-01-08 17:47:34 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-01-08 19:23:36 +0100 |
| commit | ff6474302e1481d98d8cd10bee11eceb4df050f1 (patch) | |
| tree | a50888062def3b1c8788587abf05f309605add74 | |
| parent | ccad08b4c95e55c6693a187cd5e7f0a26a67e84c (diff) | |
Add Certificate::subject_dn_qualifier().
| -rw-r--r-- | src/certificate.cc | 9 | ||||
| -rw-r--r-- | src/certificate.h | 2 |
2 files changed, 11 insertions, 0 deletions
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; |
