I'm trying to add SSL/TLS layer to dcmqrscp. I have read the code on how storescp uses SSL, actually by creating an DcmTLsTransportLayer.
I have actually copy/pasted this procedure in dcmqrscp but I have some problems.
First of all i test using storescu tool.
Code: Select all
storescu localhost 5678 -d -aec COMMON +tls certs/scu/key certs/scu/cert --add-cert-file certs/cacert.pem tests/IM004242.dcm
Code: Select all
dcmqrscp -d +tls /certs/scp/key /certs/scp/cert --add-cert-file /certs/cacert.pem 5678
dcmqrscp looks to receive the dataset (file) correctly in memory (receiveDatasetInMemory() function) but when it tries to send back the response I encounter an error
Code: Select all
T: DIMSE receiveDataSetInMemory: 21990 bytes read (last: YES)
T: DcmItem::searchSubFromHere() Element (0008,0016) found
T: DcmItem::searchSubFromHere() Element (0008,0018) found
I: Sending:
I: ===================== OUTGOING DIMSE MESSAGE ====================
I: Message Type : C-STORE RSP
I: Message ID Being Responded To : 1
I: Affected SOP Class UID : MRImageStorage
I: Affected SOP Instance UID : 1.3.46.670589.11.38127.5.0.5900.2014070914471173602
I: Data Set : none
I: DIMSE Status : 0x0000: Success
I: ======================= END DIMSE MESSAGE =======================
T: DcmItem::insert() Element (0000,0000) VR="UL" inserted at beginning
T: DcmItem::insert() Element (0000,0100) VR="US" inserted
T: DcmItem::insert() Element (0000,0120) VR="US" inserted
T: DcmItem::insert() Element (0000,0800) VR="US" inserted
T: DcmItem::insert() Element (0000,0900) VR="US" inserted
T: DcmItem::insert() Element (0000,0002) VR="UI" inserted
T: DcmItem::insert() Element (0000,1000) VR="UI" inserted
T: DIMSE Command to be sent on Presentation Context ID: 113
T: DIMSE Command to send:
T:
T: # Dicom-Data-Set
T: # Used TransferSyntax: Little Endian Explicit
T: (0000,0000) UL 0 # 4, 1 CommandGroupLength
T: (0000,0002) UI =MRImageStorage # 26, 1 AffectedSOPClassUID
T: (0000,0100) US 32769 # 2, 1 CommandField
T: (0000,0120) US 1 # 2, 1 MessageIDBeingRespondedTo
T: (0000,0800) US 257 # 2, 1 CommandDataSetType
T: (0000,0900) US 0 # 2, 1 Status
T: (0000,1000) UI [1.3.46.670589.11.38127.5.0.5900.2014070914471173602] # 52, 1 AffectedSOPInstanceUID
T:
T: DIMSE sendDcmDataset: sending 146 bytes
T: DUL FSM Table: State: 6 Event: 8
T: DUL Event: P-DATA request primitive
T: DUL Action: DT 1 Send P DATA PDU
E: Store SCP Failed: 0006:020e DIMSE Failed to send message
E: 0006:031d TCP I/O Error (Broken pipe) occurred in routine: writeDataPDU
I: Store SCP: Deleting Image File: %sÐh
E: DIMSE Failure (aborting association): 0006:020e DIMSE Failed to send message
E: 0006:031d TCP I/O Error (Broken pipe) occurred in routine: writeDataPDU
Has anyone encountered the same problem? Any solutions or even workarounds?
Thank you very much
~yiorgos