PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
kcenon::pacs::integration::tls_config Struct Reference

Configuration for TLS/SSL secure transport. More...

#include <network_adapter.h>

Collaboration diagram for kcenon::pacs::integration::tls_config:
Collaboration graph

Public Types

enum class  tls_version { v1_2 , v1_3 }
 Minimum TLS version (1.2 recommended for DICOM) More...
 

Public Member Functions

bool is_valid () const noexcept
 Check if TLS configuration is valid.
 

Public Attributes

bool enabled = false
 Enable TLS for connections.
 
std::filesystem::path cert_path
 Path to certificate file (PEM format)
 
std::filesystem::path key_path
 Path to private key file (PEM format)
 
std::filesystem::path ca_path
 Path to CA certificate file for verification (optional)
 
bool verify_peer = true
 Verify peer certificate.
 
enum kcenon::pacs::integration::tls_config::tls_version min_version = tls_version::v1_2
 

Detailed Description

Configuration for TLS/SSL secure transport.

DICOM supports TLS 1.2/1.3 for secure communication as defined in DICOM PS3.15 (Security and System Management Profiles).

Definition at line 126 of file network_adapter.h.

Member Enumeration Documentation

◆ tls_version

Member Function Documentation

◆ is_valid()

bool kcenon::pacs::integration::tls_config::is_valid ( ) const
inlinenodiscardnoexcept

Check if TLS configuration is valid.

Returns
true if all required paths are set when enabled
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/integration/network_adapter.h.

Definition at line 149 of file network_adapter.h.

149 {
150 if (!enabled) return true;
151 return !cert_path.empty() && !key_path.empty();
152 }
bool enabled
Enable TLS for connections.
std::filesystem::path cert_path
Path to certificate file (PEM format)
std::filesystem::path key_path
Path to private key file (PEM format)

References cert_path, enabled, and key_path.

Referenced by kcenon::pacs::integration::network_adapter::connect(), kcenon::pacs::integration::network_adapter::create_server(), and TEST_CASE().

Here is the caller graph for this function:

Member Data Documentation

◆ ca_path

std::filesystem::path kcenon::pacs::integration::tls_config::ca_path

◆ cert_path

std::filesystem::path kcenon::pacs::integration::tls_config::cert_path

◆ enabled

◆ key_path

std::filesystem::path kcenon::pacs::integration::tls_config::key_path

◆ min_version

◆ verify_peer

bool kcenon::pacs::integration::tls_config::verify_peer = true

The documentation for this struct was generated from the following file: