-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Bug description
Using prisma client worked fine connecting to a dev db with self signed certs, but now i get DEPTH_ZERO_SELF_SIGNED_CERT error in 6.12 with new generator. No settings seem to to allow me to get past this. This is a significant change in functionality from older rust prisma client setup.
Severity
Reproduction
Use self signed certificate with a postgres db docker instance, requires TLS 1.3 for connection.
import { PrismaPg } from '@prisma/adapter-pg'
import { PrismaClient } from '@prisma/generated/prisma/client'
type GlobalWithPrisma = typeof globalThis & {
prismaGlobal: PrismaClient;
};
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
const prismaClientSingleton = (): PrismaClient => {
return new PrismaClient({ adapter });
};
const prisma = (globalThis as GlobalWithPrisma).prismaGlobal ?? prismaClientSingleton();
if (process.env.NODE_ENV !== 'production') {
(globalThis as GlobalWithPrisma).prismaGlobal = prisma;
}
export { prisma };
DATABASE_URL : postgres......?sslmode=require&ssl_min_protocol_version=TLSv1.3"
Expected vs. Actual Behavior
Expected : Connect to the db.
Actual: DEPTH_ZERO_SELF_SIGNED_CERT Error
Frequency
Consistently reproducible
Does this occur in development or production?
Both development and production
Is this a regression?
Yes, last worked in Prisma 6.10, broke in 6.12 with new no rust generator
Workaround
Must set NODE_TLS_REJECT_UNAUTHORIZED=0 in order to connect in root env. This is not a good env to have.
Prisma Schema & Queries
Not relevant
Prisma Config
None
Logs & Debug Info
No response
Environment & Setup
Node 22.14
Postgres 17
Nextjs 15.4 Turbopack
Prisma Version
6.12