TlsClientConnection.serverIdentity

gio.socket_connectable.SocketConnectable serverIdentity() @property

Get serverIdentity property.

Returns

A #GSocketConnectable describing the identity of the server that

is expected on the other end of the connection.

If the [gio.types.TlsCertificateFlags.BadIdentity] flag is set in #GTlsClientConnection:validation-flags, this object will be used to determine the expected identify of the remote end of the connection; if #GTlsClientConnection:server-identity is not set, or does not match the identity presented by the server, then the [gio.types.TlsCertificateFlags.BadIdentity] validation will fail.

In addition to its use in verifying the server certificate, this is also used to give a hint to the server about what certificate we expect, which is useful for servers that serve virtual hosts.

void serverIdentity(gio.socket_connectable.SocketConnectable propval) @property

Set serverIdentity property.

Parameters

propvalA #GSocketConnectable describing the identity of the server that is expected on the other end of the connection. If the [gio.types.TlsCertificateFlags.BadIdentity] flag is set in #GTlsClientConnection:validation-flags, this object will be used to determine the expected identify of the remote end of the connection; if #GTlsClientConnection:server-identity is not set, or does not match the identity presented by the server, then the [gio.types.TlsCertificateFlags.BadIdentity] validation will fail. In addition to its use in verifying the server certificate, this is also used to give a hint to the server about what certificate we expect, which is useful for servers that serve virtual hosts.