1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00

Update tls.md

corrected sample C code snippet re. how to load TLS certificates
This commit is contained in:
Vinay Balamuru 2021-01-21 08:01:35 -06:00 committed by GitHub
parent 146f415322
commit 9c674a2296
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,9 +212,9 @@ natsStatus s = NATS_OK;
s = natsOptions_Create(&opts);
if (s == NATS_OK)
s = natsOptions_SetCertificatesChain(opts, "client-cert.pem", "client-key.pem");
s = natsOptions_LoadCertificatesChain(opts, "client-cert.pem", "client-key.pem");
if (s == NATS_OK)
s = natsOptions_SetCATrustedCertificates(opts, "rootCA.pem");
s = natsOptions_LoadCATrustedCertificates(opts, "rootCA.pem");
if (s == NATS_OK)
s = natsConnection_Connect(&conn, opts);