i am new on FHIR and i am implementing a small .Net-Client to access our FHIR restful server.
I could successfully access the FHIR Test Server and get data of Patient resource.
But trying to connect to our local Server i am getting an error “… no protected SSL/TLS canal could be established …”
My questions are following:
Is it possible to bind a certificate on my Client?
Can i have any example code?
The fhir client has two events available OnBeforeRequest and OnAfterResponse that you can subscribe to. In these events you can manipulate the outgoing request so you can bind a certificate there!
thank you so much for your Feedback.
i will try to use These Events now to do my implementation.
Using the Events ‘OnBeforeRequest’ i was able to now connect to the Server implementing the following 2 things:
- pushed my certificate into my request
- set the SecurityProtocolType to Tls12, because my Server ist only supporting this protocol type
X509Certificate2 clientCert2 = getCertificate();
if (clientCert2 != null)
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
Thanks Ewut for the hint