PG.connect works with a bad cert after a good one has been used..

Issue #207 closed
Brett Herford-Fell created an issue

So was working on some cert stuff and was expecting a bad cert to fail but it didn't.

If I reference a bad cert on it's own it fails:

PG.connect("user=postgres password=1234 port=5432 host=localhost dbname=my_db sslmode=verify-ca sslrootcert=ca-bad.crt")

If I reference a good cert, then call the bad cert the bad cert works when it shouldn't

PG.connect("user=postgres password=1234 port=5432 host=localhost dbname=my_db sslmode=verify-ca sslrootcert=ca-good.crt")

PG.connect("user=postgres password=1234 port=5432 host=localhost dbname=my_db sslmode=verify-ca sslrootcert=ca-bad.crt")

Comments (3)

  1. Michael Granger repo owner

    I suspect this is an upstream problem, as we don't do much with the connect arguments in pg, but I'll make sure.

    Thanks for the report!

  2. Brett Herford-Fell reporter

    Cool, it certainly doesn't prevent me from doing what I need to do, it just made testing wacky..

    Thanks for the prompt response :)

  3. Log in to comment