mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-05 08:13:06 +08:00
A server with requestCert read a runtime rejectUnauthorized through JavaScript truthiness, so null, 0 or "" let clients without a valid certificate through, and tls.connect read it the same way. Both now treat only false as off, as Node's options.rejectUnauthorized !== false does; a standalone TLSSocket keeps Node's truthiness test. An X509Certificate's methods read the record's raw Buffer, so writing into the Buffer that certificate.raw answers changed later checks, the PEM and the public key. The record now keeps a hidden copy of the DER that the methods read, and raw stays the same Buffer at every read, as in Node.