Skip to content

Commit

Permalink
Adding info on how to test TLS connections
Browse files Browse the repository at this point in the history
  • Loading branch information
qligier committed Dec 22, 2023
1 parent 9614c01 commit 6c3be43
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,36 @@ an add-on during development, testing and **CANNOT BE** used with a production e
Use only test data and no real patient data! EPRIK is completely open
and every request / response to the integration system made is retrievable.

## Testing the TLS connection with CARA INT

There are two different TLS connections with CARA INT you can test: the Syslog connection (to send ATNA messages)
and the webservices connection (to send IHE requests).

### Syslog connection

You can test the Syslog connection with `openssl`:
```bash
openssl s_client -connect syslog-int.post-ehealth.ch:7003 -cert cert.pem -key private_key.pem
```

In case of success, you will see "_read R BLOCK_" as last line of the output, and you should be able to send data in
the connection (the command should not have returned).

If the command returns, and/or the last output line is "_closed_", then the connection failed.
In case of error, you can increase the log levels with the parameters `-state -debug -msg -prexit`.

### Webservices connection

You can test the webservices connection with `curl`:
```bash
curl --cert cert.pem --key private_key.pem https://ws.epr.cara.int.post-ehealth.ch:443
```

In case of success, you will see the content of the "HTTP 404 - Not Found" page of the Post.
In case of error, you may see an error like "_curl: (56) OpenSSL SSL_read: error:14094410:SSL
routines:ssl3_read_bytes:sslv3 alert handshake failure, errno 0_".

!!! warning

We had errors testing the Webservices connection with `openssl`, although it is working fine for the Syslog
connection at the same time.

0 comments on commit 6c3be43

Please sign in to comment.