Skip to content

Commit

Permalink
Update TLS example in other languages (#1033)
Browse files Browse the repository at this point in the history
Added TLS example in other languages, following #1013
  • Loading branch information
alemohamad authored Dec 14, 2024
1 parent b974f36 commit f99ed9b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/advanced/server.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Der Parameter _tlsConfiguration_ legt fest, ob TLS (SSL) verwendet werden soll.
// 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
2 changes: 1 addition & 1 deletion docs/advanced/server.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ El parámetro `tlsConfiguration` controla si TLS (SSL) está habilitado en el se
// Habilitar 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
2 changes: 1 addition & 1 deletion docs/advanced/server.nl.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ De `tlsConfiguration` parameter regelt of TLS (SSL) is ingeschakeld op de server
// Schakel TLS in.
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
2 changes: 1 addition & 1 deletion docs/advanced/server.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ app.http.server.configuration.supportVersions = [.two]
// 启用 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 f99ed9b

Please sign in to comment.