Skip to content

Commit 399b55f

Browse files
authored
Update TLS example in Docs (#1013)
The enable TLS example didn't work for me locally. I eventually figured out that `NIOSSLPrivateKeySource` was required.
1 parent 5121385 commit 399b55f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/advanced/server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ The `tlsConfiguration` parameter controls whether TLS (SSL) is enabled on the se
141141
// Enable TLS.
142142
app.http.server.configuration.tlsConfiguration = .makeServerConfiguration(
143143
certificateChain: try NIOSSLCertificate.fromPEMFile("/path/to/cert.pem").map { .certificate($0) },
144-
privateKey: .file("/path/to/key.pem")
144+
privateKey: try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem))
145145
)
146146
```
147147

0 commit comments

Comments
 (0)