Add Certificate::subject_dn_qualifier().
authorCarl Hetherington <cth@carlh.net>
Mon, 8 Jan 2024 16:47:34 +0000 (17:47 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 8 Jan 2024 18:23:36 +0000 (19:23 +0100)
src/certificate.cc
src/certificate.h

index c447be76fe83b366b6bd6fff795585c25154a634..a11e85bd4ce51a47f6e872701683e4793b7824f1 100644 (file)
@@ -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)
index e1bdecf52cd4ba98aa47a2806f8d267fe1edc4f6..bf11a965fc9783771a7cfef8035fd18cb459e131 100644 (file)
@@ -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;