TlsCertificate.verify

This verifies cert and returns a set of GTlsCertificateFlags 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 G_TLS_CERTIFICATE_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 G_TLS_CERTIFICATE_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 GTlsCertificateFlags values will always be set or unset as appropriate.)

Parameters

identity SocketConnectableIF

the expected peer identity

trustedCa TlsCertificate

the certificate of a trusted authority

Return Value

the appropriate GTlsCertificateFlags

Meta

Since

2.28