Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
- version: 14

pair:
- elixir: 1.12
otp: 24.3
- elixir: 1.13
otp: 25.3
include:
- pg:
version: 14
Expand Down
13 changes: 7 additions & 6 deletions lib/postgrex/protocol.ex
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ defmodule Postgrex.Protocol do
{nil, opts}

{true, opts} ->
Logger.warning(
"setting ssl: true on your database connection offers only limited protection, " <>
"as the server's certificate is not verified. Set \"ssl: [cacertfile: path/to/file]\" instead"
)
case Keyword.pop(opts, :ssl_opts) do
{nil, _opts} ->
[cacerts: :public_key.cacerts_get()] ++ default_ssl_opts()
Copy link
Contributor

Choose a reason for hiding this comment

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

@josevalim Was this supposed to be {[cacerts: :public_key.cacerts_get()] ++ default_ssl_opts(), opts} in order to be matched with {ssl_opts, opts} = on line 90?

I'm getting ** (EXIT from #PID<0.92.0>) shutdown error without any logs on heroku when running mix ecto.migrate and I'm pretty sure it's due to this line.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, you are right. Could you please send a PR? Then I will merge it and ship a new version.


# Read ssl_opts for backwards compatibility
Keyword.pop(opts, :ssl_opts, [])
{ssl_opts, opts} ->
Logger.warning(":ssl_opts is deprecated, pass opts to :ssl instead")
{ssl_opts, opts}
end

{ssl_opts, opts} when is_list(ssl_opts) ->
{Keyword.merge(default_ssl_opts(), ssl_opts), opts}
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ defmodule Postgrex.Mixfile do
use Mix.Project

@source_url "https://github.com/elixir-ecto/postgrex"
@version "0.20.0"
@version "0.21.0-dev"

def project do
[
app: :postgrex,
version: @version,
elixir: "~> 1.11",
elixir: "~> 1.13",
deps: deps(),
name: "Postgrex",
description: "PostgreSQL driver for Elixir",
Expand Down