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:
parent
146f415322
commit
9c674a2296
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user