Gio.TlsCertificate::verify

function vfunc_verify(identity: Gio.SocketConnectable, trusted_ca: Gio.TlsCertificate): Gio.TlsCertificateFlags {
}
  

This verifies cert and returns a set of Gio.TlsCertificateFlags indicating any problems found with it. This can be used to verify a certificate outside the context of making a connection, or to check a certificate against a CA that is not part of the system CA database.

If identity is not null, cert's name(s) will be compared against it, and Gio.TlsCertificateFlags.bad_identity will be set in the return value if it does not match. If identity is null, that bit will never be set in the return value.

If trusted_ca is not null, then cert (or one of the certificates in its chain) must be signed by it, or else Gio.TlsCertificateFlags.unknown_ca will be set in the return value. If trusted_ca is null, that bit will never be set in the return value.

(All other Gio.TlsCertificateFlags values will always be set or unset as appropriate.)

Since 2.28

identity

the expected peer identity

trusted_ca

the certificate of a trusted authority

Returns

the appropriate Gio.TlsCertificateFlags