|
PACS System 0.1.0
PACS DICOM system library
|
#include <certificate.h>

Public Member Functions | |
| certificate () | |
| Default constructor - creates an empty certificate. | |
| certificate (const certificate &other) | |
| Copy constructor. | |
| certificate (certificate &&other) noexcept | |
| Move constructor. | |
| auto | operator= (const certificate &other) -> certificate & |
| Copy assignment. | |
| auto | operator= (certificate &&other) noexcept -> certificate & |
| Move assignment. | |
| ~certificate () | |
| Destructor. | |
| auto | subject_name () const -> std::string |
| Get the subject distinguished name. | |
| auto | subject_common_name () const -> std::string |
| Get the common name from the subject. | |
| auto | subject_organization () const -> std::string |
| Get the organization from the subject. | |
| auto | issuer_name () const -> std::string |
| Get the issuer distinguished name. | |
| auto | serial_number () const -> std::string |
| Get the certificate serial number. | |
| auto | thumbprint () const -> std::string |
| Get the certificate thumbprint (SHA-256) | |
| auto | not_before () const -> std::chrono::system_clock::time_point |
| Get the not-before date. | |
| auto | not_after () const -> std::chrono::system_clock::time_point |
| Get the not-after date. | |
| auto | is_valid () const -> bool |
| Check if the certificate is currently valid. | |
| auto | is_expired () const -> bool |
| Check if the certificate has expired. | |
| auto | to_pem () const -> std::string |
| Export certificate as PEM string. | |
| auto | to_der () const -> std::vector< std::uint8_t > |
| Export certificate as DER bytes. | |
| auto | is_loaded () const noexcept -> bool |
| Check if certificate is loaded. | |
| auto | impl () const noexcept -> const certificate_impl * |
| Get internal implementation (for internal use only) | |
| auto | impl () noexcept -> certificate_impl * |
Static Public Member Functions | |
| static auto | load_from_pem (std::string_view path) -> kcenon::common::Result< certificate > |
| Load certificate from PEM file. | |
| static auto | load_from_pem_string (std::string_view pem_data) -> kcenon::common::Result< certificate > |
| Load certificate from PEM string. | |
| static auto | load_from_der (std::span< const std::uint8_t > der_data) -> kcenon::common::Result< certificate > |
| Load certificate from DER-encoded bytes. | |
Private Attributes | |
| std::unique_ptr< certificate_impl > | impl_ |
Friends | |
| class | certificate_chain |
Definition at line 56 of file certificate.h.
| kcenon::pacs::security::certificate::certificate | ( | ) |
Default constructor - creates an empty certificate.
Definition at line 214 of file certificate.cpp.
| kcenon::pacs::security::certificate::certificate | ( | const certificate & | other | ) |
|
defaultnoexcept |
Move constructor.
|
default |
Destructor.
|
nodiscardnoexcept |
Get internal implementation (for internal use only)
Definition at line 508 of file certificate.cpp.
References impl_.
Referenced by kcenon::pacs::security::get_x509_from_certificate().

|
nodiscardnoexcept |
Definition at line 512 of file certificate.cpp.
References impl_.
|
nodiscard |
Check if the certificate has expired.
Definition at line 464 of file certificate.cpp.
References impl_, and not_after().

|
nodiscardnoexcept |
Check if certificate is loaded.
Definition at line 504 of file certificate.cpp.
References impl_.
|
nodiscard |
Check if the certificate is currently valid.
Definition at line 455 of file certificate.cpp.
References impl_, not_after(), and not_before().

|
nodiscard |
Get the issuer distinguished name.
Definition at line 368 of file certificate.cpp.
|
staticnodiscard |
Load certificate from DER-encoded bytes.
| der_data | DER-encoded certificate bytes |
Definition at line 264 of file certificate.cpp.
References impl_.
Referenced by kcenon::pacs::security::digital_signature::get_signature_info(), kcenon::pacs::security::digital_signature::verify(), and kcenon::pacs::security::digital_signature::verify_with_trust().

|
staticnodiscard |
Load certificate from PEM file.
| path | Path to PEM-encoded certificate file |
Definition at line 232 of file certificate.cpp.
|
staticnodiscard |
Load certificate from PEM string.
| pem_data | PEM-encoded certificate data |
Definition at line 245 of file certificate.cpp.
References impl_.
|
nodiscard |
Get the not-after date.
Definition at line 446 of file certificate.cpp.
References impl_.
Referenced by is_expired(), and is_valid().

|
nodiscard |
Get the not-before date.
Definition at line 437 of file certificate.cpp.
References impl_.
Referenced by is_valid().

|
defaultnoexcept |
Move assignment.
| auto kcenon::pacs::security::certificate::operator= | ( | const certificate & | other | ) | -> certificate& |
Copy assignment.
Definition at line 221 of file certificate.cpp.
References kcenon::pacs::security::other.
|
nodiscard |
Get the certificate serial number.
Definition at line 386 of file certificate.cpp.
References impl_.
|
nodiscard |
Get the common name from the subject.
Definition at line 296 of file certificate.cpp.
|
nodiscard |
Get the subject distinguished name.
Definition at line 278 of file certificate.cpp.
|
nodiscard |
Get the organization from the subject.
Definition at line 332 of file certificate.cpp.
|
nodiscard |
Get the certificate thumbprint (SHA-256)
Definition at line 413 of file certificate.cpp.
References kcenon::pacs::security::hash, and impl_.
|
nodiscard |
Export certificate as DER bytes.
Definition at line 488 of file certificate.cpp.
References impl_.
|
nodiscard |
Export certificate as PEM string.
Definition at line 473 of file certificate.cpp.
References impl_.
|
friend |
Definition at line 217 of file certificate.h.
|
private |
Definition at line 218 of file certificate.h.
Referenced by impl(), impl(), is_expired(), is_loaded(), is_valid(), issuer_name(), load_from_der(), kcenon::pacs::security::certificate_chain::load_from_pem(), load_from_pem_string(), not_after(), not_before(), serial_number(), subject_common_name(), subject_name(), subject_organization(), thumbprint(), to_der(), and to_pem().