|
PACS System 0.1.0
PACS DICOM system library
|
Represents a certificate chain for validation. More...
#include <certificate.h>

Public Member Functions | |
| certificate_chain ()=default | |
| Default constructor - creates an empty chain. | |
| void | add (certificate cert) |
| Add a certificate to the chain. | |
| auto | end_entity () const -> const certificate * |
| Get the end-entity (leaf) certificate. | |
| auto | certificates () const -> const std::vector< certificate > & |
| Get all certificates in the chain. | |
| auto | empty () const noexcept -> bool |
| Check if chain is empty. | |
| auto | size () const noexcept -> size_t |
| Get number of certificates in chain. | |
Static Public Member Functions | |
| static auto | load_from_pem (std::string_view path) -> kcenon::common::Result< certificate_chain > |
| Load certificate chain from PEM file. | |
Private Attributes | |
| std::vector< certificate > | certs_ |
Represents a certificate chain for validation.
A certificate chain consists of the end-entity certificate, intermediate certificates, and optionally the root certificate.
Definition at line 339 of file certificate.h.
|
default |
Default constructor - creates an empty chain.
| void kcenon::pacs::security::certificate_chain::add | ( | certificate | cert | ) |
Add a certificate to the chain.
| cert | Certificate to add |
Definition at line 615 of file certificate.cpp.
References certs_.
Referenced by load_from_pem().

|
nodiscard |
Get all certificates in the chain.
Definition at line 626 of file certificate.cpp.
References certs_.
|
nodiscardnoexcept |
Check if chain is empty.
Definition at line 630 of file certificate.cpp.
References certs_.
Referenced by load_from_pem().

|
nodiscard |
Get the end-entity (leaf) certificate.
Definition at line 619 of file certificate.cpp.
References certs_.
|
staticnodiscard |
Load certificate chain from PEM file.
PEM file may contain multiple certificates. The first certificate is treated as the end-entity certificate.
| path | Path to PEM file containing certificate chain |
Definition at line 638 of file certificate.cpp.
References add(), empty(), and kcenon::pacs::security::certificate::impl_.

|
nodiscardnoexcept |
Get number of certificates in chain.
Definition at line 634 of file certificate.cpp.
References certs_.
|
private |
Definition at line 389 of file certificate.h.
Referenced by add(), certificates(), empty(), end_entity(), and size().