Skip to content

Commit e10d9ab

Browse files
author
Marco Eichelberg
committed
Implemented support for DICOM CP 2311.
DICOM CP 2311 has made optional the support of the TLS 1.2 CAMELLIA ciphersuites in GCM mode, which are not supported by OpenSSL, in the Modified BCP 195 RFC 8996 TLS Profile. Accordingly, this TLS profile is now enabled in DCMTK and support for Camellia is included if available in OpenSSL, which is checked by a feature test.
1 parent afe4fa6 commit e10d9ab

File tree

6 files changed

+11
-41
lines changed

6 files changed

+11
-41
lines changed

config/docs/macros.txt

-18
Original file line numberDiff line numberDiff line change
@@ -106,24 +106,6 @@ DCMTK_GUI
106106
them to the user or store them in a log file. See comments in
107107
ofstd/include/dcmtk/ofstd/ofconsol.h.
108108

109-
DCMTK_IGNORE_BCP195M_CAMELLIA_GCM_REQUIREMENT
110-
Affected: dcmtls
111-
Type of modification: Enables experimental feature
112-
Explanation: Starting with release 3.6.8, DCMTK contains a feature-complete
113-
implementation of the "Modified BCP 195 RFC 8996 TLS Secure Transport
114-
Connection Profile". Unfortunately, this profile cannot be implemented
115-
with any current version of OpenSSL or LibreSSL because the DICOM committee
116-
has declared support for the TLS 1.2 Camellia ciphersuites in GCM mode
117-
mandatory, and these are not supported in either OpenSSL or LibreSSL.
118-
This macro will enable the support for this profile on library and
119-
command line tool level, but in a manner that is not fully DICOM compliant
120-
(i.e. without the Camellia GCM ciphersuites).
121-
Should OpenSSL/LibreSSL add support for these ciphersuites in the
122-
future, support for the TLS profile will automatically be enabled
123-
when compiling DCMTK against such a future release, because there is
124-
a configure test that checks the availability of this feature.
125-
This macro is primarily intended for testing purposes.
126-
127109
DCMTK_LOG4CPLUS_AVOID_WIN32_FLS
128110
Affected: oflog
129111
Type of modification: Disables feature

dcmtls/docs/certstor.dox

-7
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,6 @@ choice while providing backward compatibility with the earlier BCP 195 profiles.
100100
It does not support backward compatibility with the older profiles.
101101
It uses either TLS version 1.2 or 1.3 and will default to TLS 1.3 when possible.
102102

103-
The Modified BCP 195 RFC 8996 TLS Profile, which adds further constraints
104-
compared to the BCP 195 RFC 8996 TLS Profile, cannot be implemented with
105-
OpenSSL 1.0.2 to 3.0.x because it requires support for the TLS 1.2 Camellia
106-
ciphersuites in GCM mode, which is not available in OpenSSL. Should future
107-
OpenSSL releases add support for these ciphersuites, then this option will
108-
automatically be enabled when compiling DCMTK.
109-
110103
The Non-downgrading BCP 195 TLS Profile, which was the default in DCMTK 3.6.7,
111104
also disables older protocol versions and cipher suites. It does, however,
112105
support DHE ciphersuites, whereas RFC 9325 recommends that these should not

dcmtls/docs/ciphers.txt

+7-4
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ follow the secure profiles define in DICOM Part 15:
5252
- Modified BCP 195 RFC 8996 TLS Profile
5353
This profile proposes the following set of ciphersuites:
5454

55-
- TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 (only TLS 1.2)
56-
- TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 (only TLS 1.2)
55+
- TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 (only TLS 1.2)*
56+
- TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 (only TLS 1.2)*
5757
- TLS_ECDHE_ECDSA_WITH_AES_128_CCM (only TLS 1.2)
5858
- TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 (only TLS 1.2)
5959
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (only TLS 1.2)
6060
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (only TLS 1.2)
61-
- TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 (only TLS 1.2)
62-
- TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 (only TLS 1.2)
61+
- TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 (only TLS 1.2)*
62+
- TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 (only TLS 1.2)*
6363
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (only TLS 1.2)
6464
- TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 (only TLS 1.2)
6565
- TLS_ECDHE_ECDSA_WITH_AES_256_CCM (only TLS 1.2)
@@ -73,6 +73,9 @@ follow the secure profiles define in DICOM Part 15:
7373
- TLS_AES_128_CCM_SHA256 (only TLS 1.3)
7474
- TLS_AES_128_CCM_8_SHA256 (only TLS 1.3)
7575

76+
* only if available in OpenSSL, which is not the case in any OpenSSL
77+
version up to OpenSSL 3.3.x
78+
7679
- BCP 195 TLS Profile (retired)
7780
This profile proposes the following set of ciphersuites:
7881
- TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (only TLS 1.2)

dcmtls/libsrc/tlsciphr.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ OFCondition DcmTLSCiphersuiteHandler::setTLSProfile(DcmTLSSecurityProfile profil
375375
tls13_enabled = OFTrue;
376376
ciphersuiteList.clear();
377377
tls13ciphersuiteList.clear();
378-
// required TLS 1.0-1.2 ciphersuites as defined in the DICOM profile
378+
// required and optional TLS 1.0-1.2 ciphersuites as defined in the DICOM profile
379379
#ifdef HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
380380
result = addRequiredCipherSuite("TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256");
381381
if (result.bad()) return result;

dcmtls/libsrc/tlsfmacr.h

+2-10
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,12 @@ BEGIN_EXTERN_C
3333
END_EXTERN_C
3434

3535
/* check if we fulfil all requirements for implementing the
36-
* Modified BCP 195 RFC 8996 TLS Profile
36+
* Modified BCP 195 RFC 8996 TLS Profile. With DICOM CP 2311
37+
* making support for Camellia in GCM mode optional, this is now rather simple.
3738
*/
3839
#ifdef HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8
39-
40-
/* all feature tests except Camellia in GCM mode are successful
41-
* We now check if we either have Camellia in GCM more or have been
42-
* instructed to ignore this requirement
43-
*/
44-
#if defined(HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384) \
45-
|| defined(DCMTK_IGNORE_BCP195M_CAMELLIA_GCM_REQUIREMENT)
46-
4740
#define DCMTK_Modified_BCP195_RFC8996_TLS_Profile_Supported
4841
#endif
49-
#endif
5042

5143
#endif /* WITH_OPENSSL */
5244
#endif /* TLSFMAC_H */

dcmtls/libsrc/tlsopt.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2017-2023, OFFIS e.V.
3+
* Copyright (C) 2017-2024, OFFIS e.V.
44
* All rights reserved. See COPYRIGHT file for details.
55
*
66
* This software and supporting documentation were developed by

0 commit comments

Comments
 (0)