Interface TlsClientConnection.Builder<B extends Builder<B>>
-
Method Summary
Modifier and TypeMethodDescriptiondefault BsetServerIdentity(SocketConnectable serverIdentity) AGSocketConnectabledescribing the identity of the server that is expected on the other end of the connection.default BsetUseSsl3(boolean useSsl3) Deprecated.SSL 3.0 is insecure.default BsetValidationFlags(Set<TlsCertificateFlags> validationFlags) Deprecated.Do not attempt to ignore validation errors.default BsetValidationFlags(TlsCertificateFlags... validationFlags) Deprecated.Do not attempt to ignore validation errors.Methods inherited from interface org.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
-
Method Details
-
setServerIdentity
AGSocketConnectabledescribing the identity of the server that is expected on the other end of the connection.If the
TlsCertificateFlags.BAD_IDENTITYflag is set inGTlsClientConnection:validation-flags, this object will be used to determine the expected identify of the remote end of the connection; ifGTlsClientConnection:server-identity is not set, or does not match the identity presented by the server, then theTlsCertificateFlags.BAD_IDENTITYvalidation 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.
- Parameters:
serverIdentity- the value for theserver-identityproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.28
-
setUseSsl3
Deprecated.SSL 3.0 is insecure.SSL 3.0 is no longer supported. See g_tls_client_connection_set_use_ssl3() for details.- Parameters:
useSsl3- the value for theuse-ssl3property- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.28
-
setValidationFlags
Deprecated.Do not attempt to ignore validation errors.What steps to perform when validating a certificate received from a server. Server certificates that fail to validate in any of the ways indicated here will be rejected unless the application overrides the default viaGTlsConnection::accept-certificate.GLib guarantees that if certificate verification fails, at least one flag will be set, but it does not guarantee that all possible flags will be set. Accordingly, you may not safely decide to ignore any particular type of error. For example, it would be incorrect to mask
TlsCertificateFlags.EXPIREDif you want to allow expired certificates, because this could potentially be the only error flag set even if other problems exist with the certificate. Therefore, there is no safe way to use this property. This is not a horrible problem, though, because you should not be attempting to ignore validation errors anyway. If you really must ignore TLS certificate errors, connect toGTlsConnection::accept-certificate.- Parameters:
validationFlags- the value for thevalidation-flagsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.28
-
setValidationFlags
Deprecated.Do not attempt to ignore validation errors.What steps to perform when validating a certificate received from a server. Server certificates that fail to validate in any of the ways indicated here will be rejected unless the application overrides the default viaGTlsConnection::accept-certificate.GLib guarantees that if certificate verification fails, at least one flag will be set, but it does not guarantee that all possible flags will be set. Accordingly, you may not safely decide to ignore any particular type of error. For example, it would be incorrect to mask
TlsCertificateFlags.EXPIREDif you want to allow expired certificates, because this could potentially be the only error flag set even if other problems exist with the certificate. Therefore, there is no safe way to use this property. This is not a horrible problem, though, because you should not be attempting to ignore validation errors anyway. If you really must ignore TLS certificate errors, connect toGTlsConnection::accept-certificate.- Parameters:
validationFlags- the value for thevalidation-flagsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.28
-