[−][src]Trait gio::TlsCertificateExt
Required methods
fn get_issuer(&self) -> Option<TlsCertificate>
Gets the TlsCertificate representing self's issuer, if known
Returns
The certificate of self's issuer,
or None if self is self-signed or signed with an unknown
certificate.
fn is_same<P: IsA<TlsCertificate>>(&self, cert_two: &P) -> bool
Check if two TlsCertificate objects represent the same certificate.
The raw DER byte data of the two certificates are checked for equality.
This has the effect that two certificates may compare equal even if
their TlsCertificate:issuer, TlsCertificate:private-key, or
TlsCertificate:private-key-pem properties differ.
cert_two
second certificate to compare
Returns
whether the same or not
fn verify<P: IsA<SocketConnectable>, Q: IsA<TlsCertificate>>(
&self,
identity: Option<&P>,
trusted_ca: Option<&Q>
) -> TlsCertificateFlags
&self,
identity: Option<&P>,
trusted_ca: Option<&Q>
) -> TlsCertificateFlags
This verifies self and returns a set of 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 None, self's name(s) will be compared against
it, and TlsCertificateFlags::BadIdentity will be set in the return
value if it does not match. If identity is None, that bit will
never be set in the return value.
If trusted_ca is not None, then self (or one of the certificates
in its chain) must be signed by it, or else
TlsCertificateFlags::UnknownCa will be set in the return value. If
trusted_ca is None, that bit will never be set in the return
value.
(All other TlsCertificateFlags values will always be set or unset
as appropriate.)
identity
the expected peer identity
trusted_ca
the certificate of a trusted authority
Returns
the appropriate TlsCertificateFlags
fn get_property_certificate_pem(&self) -> Option<GString>
The PEM (ASCII) encoded representation of the certificate.
This property and the TlsCertificate:certificate
property represent the same data, just in different forms.
Implementors
impl<O: IsA<TlsCertificate>> TlsCertificateExt for O[src]
fn get_issuer(&self) -> Option<TlsCertificate>[src]
fn is_same<P: IsA<TlsCertificate>>(&self, cert_two: &P) -> bool[src]
fn verify<P: IsA<SocketConnectable>, Q: IsA<TlsCertificate>>(
&self,
identity: Option<&P>,
trusted_ca: Option<&Q>
) -> TlsCertificateFlags[src]
&self,
identity: Option<&P>,
trusted_ca: Option<&Q>
) -> TlsCertificateFlags