TLS: Using CA and Credentials files #646
EtienneLaneville
started this conversation in
General
Replies: 2 comments 2 replies
-
Can you have a look at the integration tests for examples: https://github.com/nats-io/nats.net/blob/master/src/Tests/IntegrationTests/TestTLS.cs |
Beta Was this translation helpful? Give feedback.
2 replies
-
Got this to work and all 4 files are used:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to set up a TLS Authentication using 4 files provided by the administrators of a NATS server:
NATS USER JWT
string and aUSER NKEY SEED
string.cert
file: contains aCERTIFICATE
string.key
file: contains aRSA PRIVATE KEY
string.ca
file: contains aCERTIFICATE
string.The code samples in the README.md file mention converting the
key
andcert
files into apfx
which I have done using OpenSSL. This doesn't include theca
and credentials files though:I have an equivalent Python sample (using nats-py) that uses all 4 files. When creating the TLS context, it uses
load_verify_locations
to add theca
file to the context and uses theuser_credentials
parameter in theconnect
method to supply the remaining files:To match what this Python script does, I am thinking I need to use:
Is this the correct corresponding code in C#? I there an equivalent to
load_cert_chain
to bypass thepfx
(just trying to eliminate that in my troubleshooting)?Beta Was this translation helpful? Give feedback.
All reactions