Skip to content

Commit

Permalink
Update TLS example in Docs (#1013)
Browse files Browse the repository at this point in the history
The enable TLS example didn't work for me locally. I eventually figured
out that `NIOSSLPrivateKeySource` was required.
  • Loading branch information
btc100k authored Dec 17, 2024
1 parent 5121385 commit 399b55f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/advanced/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ The `tlsConfiguration` parameter controls whether TLS (SSL) is enabled on the se
// Enable TLS.
app.http.server.configuration.tlsConfiguration = .makeServerConfiguration(
certificateChain: try NIOSSLCertificate.fromPEMFile("/path/to/cert.pem").map { .certificate($0) },
privateKey: .file("/path/to/key.pem")
privateKey: try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem))
)
```

Expand Down

0 comments on commit 399b55f

Please sign in to comment.