gi-gio-2.0.14: 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.DtlsClientConnection

Contents

Description

DtlsClientConnection is the client-side subclass of DtlsConnection, representing a client-side DTLS connection.

Synopsis

Exported types

Methods

getAcceptedCas

dtlsClientConnectionGetAcceptedCas Source #

Arguments

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

conn: the DtlsClientConnection

-> 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.48

getServerIdentity

dtlsClientConnectionGetServerIdentity Source #

Arguments

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

conn: the DtlsClientConnection

-> 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.48

getValidationFlags

dtlsClientConnectionGetValidationFlags Source #

Arguments

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

conn: the DtlsClientConnection

-> m [TlsCertificateFlags]

Returns: the validation flags

Gets conn's validation flags

Since: 2.48

new

dtlsClientConnectionNew Source #

Arguments

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

baseSocket: the DatagramBased to wrap

-> Maybe b

serverIdentity: the expected identity of the server

-> m DtlsClientConnection

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

Creates a new DtlsClientConnection wrapping baseSocket which is assumed to communicate with the server identified by serverIdentity.

Since: 2.48

setServerIdentity

dtlsClientConnectionSetServerIdentity Source #

Arguments

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

conn: the DtlsClientConnection

-> 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.48

setValidationFlags

dtlsClientConnectionSetValidationFlags Source #

Arguments

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

conn: the DtlsClientConnection

-> [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.48

Properties

acceptedCas

serverIdentity

validationFlags