TlsServerEndPoint

internal object TlsServerEndPoint

Computes the tls-server-end-point channel binding data of RFC 5929 - the hash of the server's certificate that a SCRAM-SHA-256-PLUS exchange is bound to.

PostgreSQL implements no other binding type, so this is the whole of the subject.

Functions

Link copied to clipboard
fun hash(certificate: X509Certificate): ByteArray

Hashes the DER encoding of certificate with the digest named by the certificate's own signature algorithm, which is the rule the server follows to arrive at the same bytes.