comparison OrthancFramework/Sources/DicomNetworking/Internals/DicomTls.cpp @ 5631:76e6df2ac08c tls-ignore-unexpected-tls

disable SSL_OP_IGNORE_UNEXPECTED_EOF
author Alain Mazy <am@orthanc.team>
date Tue, 21 May 2024 12:15:02 +0200
parents d9824edad40a
children
comparison
equal deleted inserted replaced
5625:d9824edad40a 5631:76e6df2ac08c
164 if (IsFailure(tls->activateCipherSuites())) 164 if (IsFailure(tls->activateCipherSuites()))
165 { 165 {
166 throw OrthancException(ErrorCode_InternalError, "Cannot activate the cipher suites for DICOM TLS"); 166 throw OrthancException(ErrorCode_InternalError, "Cannot activate the cipher suites for DICOM TLS");
167 } 167 }
168 168
169 // TODO: add parameters to enable/disable IGNORE_UNEXPECTED_EOF ? 169 // Note: It is possible to fine tune the SSL context configuration by calling these 2 methods.
170 DcmTLSTransportLayer::native_handle_type sslNativeHandle = tls->getNativeHandle(); 170 // However, it has not been required so far. Keeping this code as "documentation"
171 SSL_CTX_set_options(sslNativeHandle, SSL_OP_IGNORE_UNEXPECTED_EOF); 171 // DcmTLSTransportLayer::native_handle_type sslNativeHandle = tls->getNativeHandle();
172 // SSL_CTX_set_options(sslNativeHandle, SSL_OP_IGNORE_UNEXPECTED_EOF);
172 173
173 #else 174 #else
174 CLOG(INFO, DICOM) << "Using the following cipher suites for DICOM TLS: " << opt_ciphersuites; 175 CLOG(INFO, DICOM) << "Using the following cipher suites for DICOM TLS: " << opt_ciphersuites;
175 if (IsFailure(tls->setCipherSuites(opt_ciphersuites.c_str()))) 176 if (IsFailure(tls->setCipherSuites(opt_ciphersuites.c_str())))
176 { 177 {