Certificate access (for certificate pinning / customverification) using Synapse? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- CCRDude ยท 2023-12-12 15:59 As the subject describes, I want to verify a https host has a specific certificate. I need to use Sock.SSL.VerifyCert := true, and a custom handler in Sock.SSL.OnVerifyCert to access the certication properties. I can easily access Sock.SSL.GetPeerSubject &c, but Sock.SSL.GetPeerSerialNo returns an integer, and it's -1 (for dns.google as the host name). Googling a bit tells me I should use ASN1_INTEGER_to_BN to convert that into a byte array, but it being -1 looks like there's something wrong here. Has anyone had success accessing cert serials using Synapse? I could grep the serial from Sock.SSL.GetCertInfo, but would prefer the direct access.