gi-gio-2.0.12: Gio bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Interfaces.TlsClientConnection

Contents

Description

TlsClientConnection is the client-side subclass of TlsConnection, representing a client-side TLS connection.

Synopsis

Exported types

Methods

copySessionState

tlsClientConnectionCopySessionState Source #

Copies session state from one connection to another. This is not normally needed, but may be used when the same session needs to be used between different endpoints as is required by some protocols such as FTP over TLS. source should have already completed a handshake, and conn should not have completed a handshake.

Since: 2.46

getAcceptedCas

tlsClientConnectionGetAcceptedCas Source #

Arguments

:: (HasCallStack, MonadIO m, IsTlsClientConnection a) 
=> a

conn: the TlsClientConnection

-> m [ByteString]

Returns: the list of CA DNs. You should unref each element with byteArrayUnref and then the free the list with g_list_free().

Gets the list of distinguished names of the Certificate Authorities that the server will accept certificates from. This will be set during the TLS handshake if the server requests a certificate. Otherwise, it will be Nothing.

Each item in the list is a ByteArray which contains the complete subject DN of the certificate authority.

Since: 2.28

getServerIdentity

tlsClientConnectionGetServerIdentity Source #

Arguments

:: (HasCallStack, MonadIO m, IsTlsClientConnection a) 
=> a

conn: the TlsClientConnection

-> m SocketConnectable

Returns: a SocketConnectable describing the expected server identity, or Nothing if the expected identity is not known.

Gets conn's expected server identity

Since: 2.28

getUseSsl3

tlsClientConnectionGetUseSsl3 Source #

Arguments

:: (HasCallStack, MonadIO m, IsTlsClientConnection a) 
=> a

conn: the TlsClientConnection

-> m Bool

Returns: whether conn will use SSL 3.0

Gets whether conn will use SSL 3.0 rather than the highest-supported version of TLS; see tlsClientConnectionSetUseSsl3.

Since: 2.28

getValidationFlags

tlsClientConnectionGetValidationFlags Source #

Arguments

:: (HasCallStack, MonadIO m, IsTlsClientConnection a) 
=> a

conn: the TlsClientConnection

-> m [TlsCertificateFlags]

Returns: the validation flags

Gets conn's validation flags

Since: 2.28

new

tlsClientConnectionNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsIOStream a, IsSocketConnectable b) 
=> a

baseIoStream: the IOStream to wrap

-> Maybe b

serverIdentity: the expected identity of the server

-> m TlsClientConnection

Returns: the new TlsClientConnection, or Nothing on error (Can throw GError)

Creates a new TlsClientConnection wrapping baseIoStream (which must have pollable input and output streams) which is assumed to communicate with the server identified by serverIdentity.

See the documentation for TlsConnection:base-io-stream for restrictions on when application code can run operations on the baseIoStream after this function has returned.

Since: 2.28

setServerIdentity

tlsClientConnectionSetServerIdentity Source #

Arguments

:: (HasCallStack, MonadIO m, IsTlsClientConnection a, IsSocketConnectable b) 
=> a

conn: the TlsClientConnection

-> b

identity: a SocketConnectable describing the expected server identity

-> m () 

Sets conn's expected server identity, which is used both to tell servers on virtual hosts which certificate to present, and also to let conn know what name to look for in the certificate when performing TlsCertificateFlagsBadIdentity validation, if enabled.

Since: 2.28

setUseSsl3

tlsClientConnectionSetUseSsl3 Source #

Arguments

:: (HasCallStack, MonadIO m, IsTlsClientConnection a) 
=> a

conn: the TlsClientConnection

-> Bool

useSsl3: whether to use SSL 3.0

-> m () 

If useSsl3 is True, this forces conn to use SSL 3.0 rather than trying to properly negotiate the right version of TLS or SSL to use. This can be used when talking to servers that do not implement the fallbacks correctly and which will therefore fail to handshake with a "modern" TLS handshake attempt.

Since: 2.28

setValidationFlags

tlsClientConnectionSetValidationFlags Source #

Arguments

:: (HasCallStack, MonadIO m, IsTlsClientConnection a) 
=> a

conn: the TlsClientConnection

-> [TlsCertificateFlags]

flags: the TlsCertificateFlags to use

-> m () 

Sets conn's validation flags, to override the default set of checks performed when validating a server certificate. By default, TlsCertificateFlagsValidateAll is used.

Since: 2.28

Properties

acceptedCas

data TlsClientConnectionAcceptedCasPropertyInfo Source #

Instances

AttrInfo TlsClientConnectionAcceptedCasPropertyInfo Source # 
type AttrOrigin TlsClientConnectionAcceptedCasPropertyInfo Source # 
type AttrLabel TlsClientConnectionAcceptedCasPropertyInfo Source # 
type AttrGetType TlsClientConnectionAcceptedCasPropertyInfo Source # 
type AttrBaseTypeConstraint TlsClientConnectionAcceptedCasPropertyInfo Source # 
type AttrSetTypeConstraint TlsClientConnectionAcceptedCasPropertyInfo Source # 
type AttrAllowedOps TlsClientConnectionAcceptedCasPropertyInfo Source # 

serverIdentity

data TlsClientConnectionServerIdentityPropertyInfo Source #

Instances

AttrInfo TlsClientConnectionServerIdentityPropertyInfo Source # 
type AttrOrigin TlsClientConnectionServerIdentityPropertyInfo Source # 
type AttrLabel TlsClientConnectionServerIdentityPropertyInfo Source # 
type AttrGetType TlsClientConnectionServerIdentityPropertyInfo Source # 
type AttrBaseTypeConstraint TlsClientConnectionServerIdentityPropertyInfo Source # 
type AttrSetTypeConstraint TlsClientConnectionServerIdentityPropertyInfo Source # 
type AttrAllowedOps TlsClientConnectionServerIdentityPropertyInfo Source # 

useSsl3

data TlsClientConnectionUseSsl3PropertyInfo Source #

Instances

AttrInfo TlsClientConnectionUseSsl3PropertyInfo Source # 
type AttrOrigin TlsClientConnectionUseSsl3PropertyInfo Source # 
type AttrLabel TlsClientConnectionUseSsl3PropertyInfo Source # 
type AttrGetType TlsClientConnectionUseSsl3PropertyInfo Source # 
type AttrBaseTypeConstraint TlsClientConnectionUseSsl3PropertyInfo Source # 
type AttrSetTypeConstraint TlsClientConnectionUseSsl3PropertyInfo Source # 
type AttrAllowedOps TlsClientConnectionUseSsl3PropertyInfo Source # 

validationFlags

data TlsClientConnectionValidationFlagsPropertyInfo Source #

Instances

AttrInfo TlsClientConnectionValidationFlagsPropertyInfo Source # 
type AttrOrigin TlsClientConnectionValidationFlagsPropertyInfo Source # 
type AttrLabel TlsClientConnectionValidationFlagsPropertyInfo Source # 
type AttrGetType TlsClientConnectionValidationFlagsPropertyInfo Source # 
type AttrBaseTypeConstraint TlsClientConnectionValidationFlagsPropertyInfo Source # 
type AttrSetTypeConstraint TlsClientConnectionValidationFlagsPropertyInfo Source # 
type AttrAllowedOps TlsClientConnectionValidationFlagsPropertyInfo Source #