Skip to content

Fixed syntax error on TLS section on Advanced -> Server#1063

Merged
0xTim merged 5 commits intovapor:mainfrom
LeonardoLarranaga:patch-1
Feb 25, 2025
Merged

Fixed syntax error on TLS section on Advanced -> Server#1063
0xTim merged 5 commits intovapor:mainfrom
LeonardoLarranaga:patch-1

Conversation

@LeonardoLarranaga
Copy link
Copy Markdown
Contributor

@LeonardoLarranaga LeonardoLarranaga commented Feb 25, 2025

There was a syntax error in the TLS Section:

Before:

// Enable TLS.
app.http.server.configuration.tlsConfiguration = .makeServerConfiguration(
    certificateChain: try NIOSSLCertificate.fromPEMFile("/path/to/cert.pem").map { .certificate($0) },
    privateKey: try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem))
)

Error:
Screenshot 2025-02-25 at 13 35 30

After:

app.http.server.configuration.tlsConfiguration = .makeServerConfiguration(
        certificateChain: try NIOSSLCertificate.fromPEMFile("/path/to/cert.pem").map { .certificate($0) },
        privateKey: .privateKey(try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem))
    )
Screenshot 2025-02-25 at 13 36 04

@LeonardoLarranaga LeonardoLarranaga requested a review from a team as a code owner February 25, 2025 21:45
@LeonardoLarranaga LeonardoLarranaga changed the title Update TLS section on Advanced -> Server Fixed syntax error on TLS section on Advanced -> Server Feb 25, 2025
Copy link
Copy Markdown
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@0xTim 0xTim added the no-translation-needed This PR does not require the translations to be updated (e.g. fixing a typo or infrastructure work) label Feb 25, 2025
@0xTim 0xTim merged commit 207ddd0 into vapor:main Feb 25, 2025
1 check passed
@LeonardoLarranaga LeonardoLarranaga deleted the patch-1 branch March 7, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-translation-needed This PR does not require the translations to be updated (e.g. fixing a typo or infrastructure work)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants