TlsCertificate
A certificate used for TLS authentication and encryption. This can represent either a certificate only (eg, the certificate received by a client from a server), or the combination of a certificate and a private key (which is needed when acting as a iface@Gio.TlsServerConnection).
Skipped during bindings generation
method
get_dns_names
: GLib.PtrArray parameter of type GLib.Bytes is not supportedmethod
get_ip_addresses
: GLib.PtrArray parameter of type InetAddress is not supportedmethod
certificate
: Property has no getter nor settermethod
certificate-pem
: Property has no getter nor settermethod
dns-names
: Property has no getter nor settermethod
ip-addresses
: Property has no getter nor settermethod
password
: Property has no getter nor settermethod
pkcs11-uri
: Property has no getter nor settermethod
pkcs12-data
: Property has no getter nor settermethod
private-key
: Property has no getter nor settermethod
private-key-pem
: Property has no getter nor settermethod
private-key-pkcs11-uri
: Property has no getter nor setterparameter
data
: Array parameter of type guint8 is not supported
Since
2.28
Constructors
Creates a #GTlsCertificate from the data in @file.
Creates a #GTlsCertificate from the PEM-encoded data in @cert_file and @key_file. The returned certificate will be the first certificate found in @cert_file. As of GLib 2.44, if @cert_file contains more certificates it will try to load a certificate chain. All certificates will be verified in the order found (top-level certificate should be the last one in the file) and the #GTlsCertificate:issuer property of each certificate will be set accordingly if the verification succeeds. If any certificate in the chain cannot be verified, the first certificate in the file will still be returned.
Creates a #GTlsCertificate from the PEM-encoded data in @data. If
Creates a #GTlsCertificate from a PKCS \#11 URI.
Properties
A #GTlsCertificate representing the entity that issued this certificate. If null, this means that the certificate is either self-signed, or else the certificate of the issuer is not available.
The issuer from the certificate, null if unavailable.
The time at which this cert is no longer valid, null if unavailable.
The time at which this cert is considered to be valid, null if unavailable.
The subject from the cert, null if unavailable.
Functions
Check if two #GTlsCertificate 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 #GTlsCertificate:issuer, #GTlsCertificate:private-key, or #GTlsCertificate:private-key-pem properties differ.
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.