Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed how tls for postgres is configured. #5

Merged
merged 3 commits into from
Dec 30, 2023

Conversation

ladiesman218
Copy link
Contributor

New implementation silences xCode warnings by replacing the deprecated function.
According to documentation, TLS.prefer(_ sslContext: NIOSSLContext) will Try to create a TLS connection to the server. If the server supports TLS, create a TLS connection. If the server does not support TLS, create an insecure connection.

This fix makes sure app is able to build and run if TLS is not configured properly.

@ladiesman218 ladiesman218 mentioned this pull request Dec 29, 2023
@petrpavlik
Copy link
Owner

I'll take a look at why the CI failed. Does not seem to be related to changes in this PR.

@ladiesman218
Copy link
Contributor Author

ladiesman218 commented Dec 29, 2023 via email

Now only production environment will force the use of an TLS
configuration, testing and development envs disable TLS by default.
@petrpavlik
Copy link
Owner

Thanks! I’ll fix the CI and merge it in tomorrow.

@petrpavlik
Copy link
Owner

I've tried to update an app I'm running on Digital Ocean (managed postgres) with this new code and it wound not connect, so I've updated this PR back to using tlsConfig.certificateVerification = .none by default. Looks good to me otherwise.

@petrpavlik petrpavlik merged commit 13e73c1 into petrpavlik:main Dec 30, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants