Skip to content

SSL connections fail with since 2.7.0 #518

@rraval

Description

@rraval

We use client certificates to authenticate and encrypt our connections.

With version 2.6.2, the certificate works and connections go through without issue.

Since 2.7.0, connections fail with the following error:

(psycopg2.OperationalError) could not read certificate file "/home/encircle/.postgresql/postgresql.crt": unknown public key type

openssl has no issues reading or verifying the cert so I'm not sure what might have changed:

$ openssl verify -verbose -x509_strict -CApath nosuchdir -CAfile ~/.postgresql/root.crt ~/.postgresql/postgresql.crt 
/home/encircle/.postgresql/postgresql.crt: OK

$ cat ~/.postgresql/postgresql.crt | openssl x509 -text
Certificate:
    Data:
        Version: 1 (0x0)
        Serial Number: 0 (0x0)
    Signature Algorithm: ecdsa-with-SHA256
        Issuer: CN=encircle_ca
        Validity
            Not Before: Sep  5 03:46:47 2016 GMT
            Not After : Sep  5 03:46:47 2017 GMT
        Subject: CN=encircle
        Subject Public Key Info:
            Public Key Algorithm: id-ecPublicKey
                Public-Key: (384 bit)
                pub: 
                    ...
                ASN1 OID: secp384r1
                NIST CURVE: P-384
    Signature Algorithm: ecdsa-with-SHA256

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions