Skip to content

&sslcert=server-ca.pem in PostgreSQL connection url throw Error opening a TLS connection: One or more parameters passed to a function were not valid. #1651

@Jolg42

Description

@Jolg42

I created a PostgreSQL instance on Google Cloud

I followed https://github.com/prisma/prisma2/blob/master/docs/core/connectors/postgresql.md#configuring-an-ssl-connection created the .p12 with a password from the certificates downloaded from the Google project
openssl pkcs12 -export -out client-identity.p12 -inkey client-key.pem -in client-cert.pem

my prisma/.env

DATABASE_URL="postgresql://postgres:[email protected]:5432/mydb?schema=public&sslmode=require&sslidentity=client-identity.p12&sslpassword=mysecurepass3728508&sslcert=server-ca.pem"

When doing prisma2 introspect

Error: P1011
Error opening a TLS connection: One or more parameters passed to a function were not valid.

When removing &sslcert=server-ca.pem it works without sslcert even with sslmode=require

Metadata

Metadata

Labels

bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.kind/bugA reported bug.tech/enginesIssue for tech Engines.tech/typescriptIssue for tech TypeScript.topic: connection-url

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions