Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
DtlsClientConnection
is the client-side subclass of
DtlsConnection
, representing a client-side DTLS connection.
- newtype DtlsClientConnection = DtlsClientConnection (ManagedPtr DtlsClientConnection)
- noDtlsClientConnection :: Maybe DtlsClientConnection
- class GObject o => IsDtlsClientConnection o
- toDtlsClientConnection :: (MonadIO m, IsDtlsClientConnection o) => o -> m DtlsClientConnection
- dtlsClientConnectionGetAcceptedCas :: (HasCallStack, MonadIO m, IsDtlsClientConnection a) => a -> m [ByteString]
- dtlsClientConnectionGetServerIdentity :: (HasCallStack, MonadIO m, IsDtlsClientConnection a) => a -> m SocketConnectable
- dtlsClientConnectionGetValidationFlags :: (HasCallStack, MonadIO m, IsDtlsClientConnection a) => a -> m [TlsCertificateFlags]
- dtlsClientConnectionNew :: (HasCallStack, MonadIO m, IsDatagramBased a, IsSocketConnectable b) => a -> Maybe b -> m DtlsClientConnection
- dtlsClientConnectionSetServerIdentity :: (HasCallStack, MonadIO m, IsDtlsClientConnection a, IsSocketConnectable b) => a -> b -> m ()
- dtlsClientConnectionSetValidationFlags :: (HasCallStack, MonadIO m, IsDtlsClientConnection a) => a -> [TlsCertificateFlags] -> m ()
- getDtlsClientConnectionAcceptedCas :: (MonadIO m, IsDtlsClientConnection o) => o -> m [Ptr ()]
- constructDtlsClientConnectionServerIdentity :: (IsDtlsClientConnection o, IsSocketConnectable a) => a -> IO (GValueConstruct o)
- getDtlsClientConnectionServerIdentity :: (MonadIO m, IsDtlsClientConnection o) => o -> m SocketConnectable
- setDtlsClientConnectionServerIdentity :: (MonadIO m, IsDtlsClientConnection o, IsSocketConnectable a) => o -> a -> m ()
- constructDtlsClientConnectionValidationFlags :: IsDtlsClientConnection o => [TlsCertificateFlags] -> IO (GValueConstruct o)
- getDtlsClientConnectionValidationFlags :: (MonadIO m, IsDtlsClientConnection o) => o -> m [TlsCertificateFlags]
- setDtlsClientConnectionValidationFlags :: (MonadIO m, IsDtlsClientConnection o) => o -> [TlsCertificateFlags] -> m ()
Exported types
newtype DtlsClientConnection Source #
class GObject o => IsDtlsClientConnection o Source #
toDtlsClientConnection :: (MonadIO m, IsDtlsClientConnection o) => o -> m DtlsClientConnection Source #
Methods
getAcceptedCas
dtlsClientConnectionGetAcceptedCas Source #
:: (HasCallStack, MonadIO m, IsDtlsClientConnection a) | |
=> a |
|
-> m [ByteString] | Returns: the list of
CA DNs. You should unref each element with |
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 #
:: (HasCallStack, MonadIO m, IsDtlsClientConnection a) | |
=> a |
|
-> m SocketConnectable | Returns: a |
Gets conn
's expected server identity
Since: 2.48
getValidationFlags
dtlsClientConnectionGetValidationFlags Source #
:: (HasCallStack, MonadIO m, IsDtlsClientConnection a) | |
=> a |
|
-> m [TlsCertificateFlags] | Returns: the validation flags |
Gets conn
's validation flags
Since: 2.48
new
dtlsClientConnectionNew Source #
:: (HasCallStack, MonadIO m, IsDatagramBased a, IsSocketConnectable b) | |
=> a |
|
-> Maybe b |
|
-> m DtlsClientConnection | Returns: the new
|
Creates a new DtlsClientConnection
wrapping baseSocket
which is
assumed to communicate with the server identified by serverIdentity
.
Since: 2.48
setServerIdentity
dtlsClientConnectionSetServerIdentity Source #
:: (HasCallStack, MonadIO m, IsDtlsClientConnection a, IsSocketConnectable b) | |
=> a |
|
-> b |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsDtlsClientConnection a) | |
=> a |
|
-> [TlsCertificateFlags] |
|
-> 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
getDtlsClientConnectionAcceptedCas :: (MonadIO m, IsDtlsClientConnection o) => o -> m [Ptr ()] Source #
serverIdentity
constructDtlsClientConnectionServerIdentity :: (IsDtlsClientConnection o, IsSocketConnectable a) => a -> IO (GValueConstruct o) Source #
getDtlsClientConnectionServerIdentity :: (MonadIO m, IsDtlsClientConnection o) => o -> m SocketConnectable Source #
setDtlsClientConnectionServerIdentity :: (MonadIO m, IsDtlsClientConnection o, IsSocketConnectable a) => o -> a -> m () Source #
validationFlags
constructDtlsClientConnectionValidationFlags :: IsDtlsClientConnection o => [TlsCertificateFlags] -> IO (GValueConstruct o) Source #
getDtlsClientConnectionValidationFlags :: (MonadIO m, IsDtlsClientConnection o) => o -> m [TlsCertificateFlags] Source #
setDtlsClientConnectionValidationFlags :: (MonadIO m, IsDtlsClientConnection o) => o -> [TlsCertificateFlags] -> m () Source #