|
PACS System 0.1.0
PACS DICOM system library
|
TLS security policy configuration. More...
#include <tls_policy.h>

Public Member Functions | |
Policy Properties | |
| tls_profile | profile () const noexcept |
| std::string_view | profile_name () const noexcept |
| uint16_t | min_protocol_version () const noexcept |
| uint16_t | max_protocol_version () const noexcept |
| bool | non_downgrading () const noexcept |
| const cipher_suite_spec & | cipher_suites () const noexcept |
| const certificate_constraints & | cert_constraints () const noexcept |
Validation | |
| bool | is_version_allowed (uint16_t version) const noexcept |
| Check if a TLS version is allowed by this policy. | |
| bool | is_rsa_key_acceptable (uint16_t bits) const noexcept |
| Check if an RSA key size meets minimum requirements. | |
| bool | is_ecdsa_key_acceptable (uint16_t bits) const noexcept |
| Check if an ECDSA curve size meets minimum requirements. | |
| std::string_view | tls13_ciphersuites () const noexcept |
| Get the TLS 1.3 cipher suites string for OpenSSL. | |
| std::string_view | tls12_ciphersuites () const noexcept |
| Get the TLS 1.2 cipher suites string for OpenSSL. | |
Static Public Member Functions | |
| static tls_policy | bcp195_basic_profile () |
| Create a BCP 195 basic profile policy. | |
| static tls_policy | bcp195_non_downgrading_profile () |
| Create a BCP 195 non-downgrading profile policy. | |
| static tls_policy | bcp195_extended_profile () |
| Create an extended profile (TLS 1.3 only) | |
| static tls_policy | from_profile (tls_profile profile) |
| Create a policy from a named profile. | |
Static Public Attributes | |
Predefined Cipher Suite Strings | |
| static constexpr std::string_view | kTls13Required |
| TLS 1.3 required cipher suites (BCP 195) | |
| static constexpr std::string_view | kTls13Strict |
| TLS 1.3 strict cipher suites (extended profile) | |
| static constexpr std::string_view | kTls12Recommended |
| TLS 1.2 BCP 195 recommended cipher suites. | |
Protocol Version Constants | |
| static constexpr uint16_t | kTls10Version = 0x0301 |
| OpenSSL TLS version constants for reference. | |
| static constexpr uint16_t | kTls11Version = 0x0302 |
| static constexpr uint16_t | kTls12Version = 0x0303 |
| static constexpr uint16_t | kTls13Version = 0x0304 |
Private Member Functions | |
| tls_policy (tls_profile prof, uint16_t min_ver, uint16_t max_ver, bool non_downgrade, cipher_suite_spec ciphers, certificate_constraints certs) | |
Private Attributes | |
| tls_profile | profile_ |
| uint16_t | min_version_ |
| uint16_t | max_version_ |
| bool | non_downgrading_ |
| cipher_suite_spec | ciphers_ |
| certificate_constraints | cert_constraints_ |
TLS security policy configuration.
Encapsulates all TLS settings for a given security profile. Use the factory methods to create standard profiles.
Definition at line 93 of file tls_policy.h.
|
private |
Definition at line 39 of file tls_policy.cpp.
|
staticnodiscard |
Create a BCP 195 basic profile policy.
Definition at line 53 of file tls_policy.cpp.
References kcenon::pacs::security::bcp195_basic, kTls12Recommended, kTls12Version, kTls13Required, and kTls13Version.
Referenced by from_profile().

|
staticnodiscard |
Create an extended profile (TLS 1.3 only)
Definition at line 71 of file tls_policy.cpp.
References kcenon::pacs::security::bcp195_extended, kTls13Strict, and kTls13Version.
Referenced by from_profile().

|
staticnodiscard |
Create a BCP 195 non-downgrading profile policy.
This is the recommended DICOM PS3.15 profile.
Definition at line 62 of file tls_policy.cpp.
References kcenon::pacs::security::bcp195_non_downgrading, kTls12Recommended, kTls12Version, kTls13Required, and kTls13Version.
Referenced by from_profile().

|
nodiscardnoexcept |
Definition at line 120 of file tls_policy.cpp.
References cert_constraints_.
|
nodiscardnoexcept |
|
staticnodiscard |
Create a policy from a named profile.
Definition at line 80 of file tls_policy.cpp.
References kcenon::pacs::security::bcp195_basic, bcp195_basic_profile(), kcenon::pacs::security::bcp195_extended, bcp195_extended_profile(), kcenon::pacs::security::bcp195_non_downgrading, bcp195_non_downgrading_profile(), and profile().

|
nodiscardnoexcept |
Check if an ECDSA curve size meets minimum requirements.
| bits | ECDSA curve size in bits |
Definition at line 136 of file tls_policy.cpp.
|
nodiscardnoexcept |
Check if an RSA key size meets minimum requirements.
| bits | RSA key size in bits |
Definition at line 132 of file tls_policy.cpp.
|
nodiscardnoexcept |
Check if a TLS version is allowed by this policy.
| version | OpenSSL version constant (e.g., TLS1_2_VERSION) |
Definition at line 128 of file tls_policy.cpp.
|
nodiscardnoexcept |
Definition at line 108 of file tls_policy.cpp.
References max_version_.
|
nodiscardnoexcept |
Definition at line 104 of file tls_policy.cpp.
References min_version_.
|
nodiscardnoexcept |
Definition at line 112 of file tls_policy.cpp.
References non_downgrading_.
|
nodiscardnoexcept |
Definition at line 96 of file tls_policy.cpp.
References profile_.
Referenced by from_profile().

|
nodiscardnoexcept |
Definition at line 100 of file tls_policy.cpp.
References profile_, and kcenon::pacs::security::to_string().

|
nodiscardnoexcept |
Get the TLS 1.2 cipher suites string for OpenSSL.
Definition at line 144 of file tls_policy.cpp.
References ciphers_, and kcenon::pacs::security::cipher_suite_spec::tls12_ciphers.
|
nodiscardnoexcept |
Get the TLS 1.3 cipher suites string for OpenSSL.
Definition at line 140 of file tls_policy.cpp.
References ciphers_, and kcenon::pacs::security::cipher_suite_spec::tls13_ciphers.
|
private |
Definition at line 225 of file tls_policy.h.
Referenced by cert_constraints().
|
private |
Definition at line 224 of file tls_policy.h.
Referenced by cipher_suites(), tls12_ciphersuites(), and tls13_ciphersuites().
|
staticconstexpr |
OpenSSL TLS version constants for reference.
Definition at line 208 of file tls_policy.h.
|
staticconstexpr |
Definition at line 209 of file tls_policy.h.
|
staticconstexpr |
TLS 1.2 BCP 195 recommended cipher suites.
Definition at line 194 of file tls_policy.h.
Referenced by bcp195_basic_profile(), and bcp195_non_downgrading_profile().
|
staticconstexpr |
Definition at line 210 of file tls_policy.h.
Referenced by bcp195_basic_profile(), and bcp195_non_downgrading_profile().
|
staticconstexpr |
TLS 1.3 required cipher suites (BCP 195)
Definition at line 183 of file tls_policy.h.
Referenced by bcp195_basic_profile(), and bcp195_non_downgrading_profile().
|
staticconstexpr |
TLS 1.3 strict cipher suites (extended profile)
Definition at line 189 of file tls_policy.h.
Referenced by bcp195_extended_profile().
|
staticconstexpr |
Definition at line 211 of file tls_policy.h.
Referenced by bcp195_basic_profile(), bcp195_extended_profile(), and bcp195_non_downgrading_profile().
|
private |
Definition at line 222 of file tls_policy.h.
Referenced by max_protocol_version().
|
private |
Definition at line 221 of file tls_policy.h.
Referenced by min_protocol_version().
|
private |
Definition at line 223 of file tls_policy.h.
Referenced by non_downgrading().
|
private |
Definition at line 220 of file tls_policy.h.
Referenced by profile(), and profile_name().