Mercurial > hg > orthanc
comparison OrthancFramework/Sources/DicomNetworking/DicomAssociationParameters.h @ 4438:4a4e33c9082d
configuration options for DICOM TLS in Orthanc SCU
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 07 Jan 2021 16:53:35 +0100 |
parents | d9473bd5ed43 |
children | f4dbdb2dcba6 |
comparison
equal
deleted
inserted
replaced
4437:d9473bd5ed43 | 4438:4a4e33c9082d |
---|---|
34 { | 34 { |
35 private: | 35 private: |
36 std::string localAet_; | 36 std::string localAet_; |
37 RemoteModalityParameters remote_; | 37 RemoteModalityParameters remote_; |
38 uint32_t timeout_; | 38 uint32_t timeout_; |
39 std::string ownPrivateKeyPath_; | |
40 std::string ownCertificatePath_; | |
41 std::string trustedCertificatesPath_; | |
39 | 42 |
40 static void CheckHost(const std::string& host); | 43 static void CheckHost(const std::string& host); |
44 | |
45 void SetDefaultParameters(); | |
46 | |
47 void CheckDicomTlsConfiguration() const; | |
41 | 48 |
42 public: | 49 public: |
43 DicomAssociationParameters(); | 50 DicomAssociationParameters(); |
44 | 51 |
45 DicomAssociationParameters(const std::string& localAet, | 52 DicomAssociationParameters(const std::string& localAet, |
68 | 75 |
69 uint32_t GetTimeout() const; | 76 uint32_t GetTimeout() const; |
70 | 77 |
71 bool HasTimeout() const; | 78 bool HasTimeout() const; |
72 | 79 |
80 // This corresponds to the "--enable-tls" or "+tls" argument of | |
81 // the command-line tools of DCMTK. Both files must be in the PEM format. | |
82 // The private key file must not be password-protected. | |
83 void SetOwnCertificatePath(const std::string& privateKeyPath, | |
84 const std::string& certificatePath); | |
85 | |
86 // This corresponds to the "--add-cert-file" or "+cf" argument of | |
87 // the command-line tools of DCMTK. The file must contain a list | |
88 // of PEM certificates. | |
89 void SetTrustedCertificatesPath(const std::string& path); | |
90 | |
91 const std::string& GetOwnPrivateKeyPath() const; | |
92 | |
93 const std::string& GetOwnCertificatePath() const; | |
94 | |
95 const std::string& GetTrustedCertificatesPath() const; | |
96 | |
73 void SerializeJob(Json::Value& target) const; | 97 void SerializeJob(Json::Value& target) const; |
74 | 98 |
75 static DicomAssociationParameters UnserializeJob(const Json::Value& serialized); | 99 static DicomAssociationParameters UnserializeJob(const Json::Value& serialized); |
76 | 100 |
77 static void SetDefaultTimeout(uint32_t seconds); | 101 static void SetDefaultTimeout(uint32_t seconds); |
78 | 102 |
79 static uint32_t GetDefaultTimeout(); | 103 static uint32_t GetDefaultTimeout(); |
104 | |
105 static void SetDefaultOwnCertificatePath(const std::string& privateKeyPath, | |
106 const std::string& certificatePath); | |
107 | |
108 static void SetDefaultTrustedCertificatesPath(const std::string& path); | |
80 }; | 109 }; |
81 } | 110 } |