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 |
TlsClientConnection
is the client-side subclass of
TlsConnection
, representing a client-side TLS connection.
- newtype TlsClientConnection = TlsClientConnection (ManagedPtr TlsClientConnection)
- noTlsClientConnection :: Maybe TlsClientConnection
- class GObject o => IsTlsClientConnection o
- toTlsClientConnection :: IsTlsClientConnection o => o -> IO TlsClientConnection
- data TlsClientConnectionCopySessionStateMethodInfo
- tlsClientConnectionCopySessionState :: (HasCallStack, MonadIO m, IsTlsClientConnection a, IsTlsClientConnection b) => a -> b -> m ()
- data TlsClientConnectionGetAcceptedCasMethodInfo
- tlsClientConnectionGetAcceptedCas :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m [ByteString]
- data TlsClientConnectionGetServerIdentityMethodInfo
- tlsClientConnectionGetServerIdentity :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m SocketConnectable
- data TlsClientConnectionGetUseSsl3MethodInfo
- tlsClientConnectionGetUseSsl3 :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m Bool
- data TlsClientConnectionGetValidationFlagsMethodInfo
- tlsClientConnectionGetValidationFlags :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m [TlsCertificateFlags]
- tlsClientConnectionNew :: (HasCallStack, MonadIO m, IsIOStream a, IsSocketConnectable b) => a -> Maybe b -> m TlsClientConnection
- data TlsClientConnectionSetServerIdentityMethodInfo
- tlsClientConnectionSetServerIdentity :: (HasCallStack, MonadIO m, IsTlsClientConnection a, IsSocketConnectable b) => a -> b -> m ()
- data TlsClientConnectionSetUseSsl3MethodInfo
- tlsClientConnectionSetUseSsl3 :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> Bool -> m ()
- data TlsClientConnectionSetValidationFlagsMethodInfo
- tlsClientConnectionSetValidationFlags :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> [TlsCertificateFlags] -> m ()
- data TlsClientConnectionAcceptedCasPropertyInfo
- getTlsClientConnectionAcceptedCas :: (MonadIO m, IsTlsClientConnection o) => o -> m [Ptr ()]
- tlsClientConnectionAcceptedCas :: AttrLabelProxy "acceptedCas"
- data TlsClientConnectionServerIdentityPropertyInfo
- constructTlsClientConnectionServerIdentity :: (IsTlsClientConnection o, IsSocketConnectable a) => a -> IO (GValueConstruct o)
- getTlsClientConnectionServerIdentity :: (MonadIO m, IsTlsClientConnection o) => o -> m SocketConnectable
- setTlsClientConnectionServerIdentity :: (MonadIO m, IsTlsClientConnection o, IsSocketConnectable a) => o -> a -> m ()
- tlsClientConnectionServerIdentity :: AttrLabelProxy "serverIdentity"
- data TlsClientConnectionUseSsl3PropertyInfo
- constructTlsClientConnectionUseSsl3 :: IsTlsClientConnection o => Bool -> IO (GValueConstruct o)
- getTlsClientConnectionUseSsl3 :: (MonadIO m, IsTlsClientConnection o) => o -> m Bool
- setTlsClientConnectionUseSsl3 :: (MonadIO m, IsTlsClientConnection o) => o -> Bool -> m ()
- tlsClientConnectionUseSsl3 :: AttrLabelProxy "useSsl3"
- data TlsClientConnectionValidationFlagsPropertyInfo
- constructTlsClientConnectionValidationFlags :: IsTlsClientConnection o => [TlsCertificateFlags] -> IO (GValueConstruct o)
- getTlsClientConnectionValidationFlags :: (MonadIO m, IsTlsClientConnection o) => o -> m [TlsCertificateFlags]
- setTlsClientConnectionValidationFlags :: (MonadIO m, IsTlsClientConnection o) => o -> [TlsCertificateFlags] -> m ()
- tlsClientConnectionValidationFlags :: AttrLabelProxy "validationFlags"
Exported types
newtype TlsClientConnection Source #
GObject TlsClientConnection Source # | |
IsObject TlsClientConnection Source # | |
IsTlsConnection TlsClientConnection Source # | |
IsIOStream TlsClientConnection Source # | |
IsTlsClientConnection TlsClientConnection Source # | |
((~) * info (ResolveTlsClientConnectionMethod t TlsClientConnection), MethodInfo * info TlsClientConnection p) => IsLabel t (TlsClientConnection -> p) Source # | |
((~) * info (ResolveTlsClientConnectionMethod t TlsClientConnection), MethodInfo * info TlsClientConnection p) => IsLabelProxy t (TlsClientConnection -> p) Source # | |
HasAttributeList * TlsClientConnection Source # | |
type AttributeList TlsClientConnection Source # | |
type SignalList TlsClientConnection Source # | |
class GObject o => IsTlsClientConnection o Source #
toTlsClientConnection :: IsTlsClientConnection o => o -> IO TlsClientConnection Source #
Methods
copySessionState
data TlsClientConnectionCopySessionStateMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsTlsClientConnection a, IsTlsClientConnection b) => MethodInfo * TlsClientConnectionCopySessionStateMethodInfo a signature Source # | |
tlsClientConnectionCopySessionState Source #
:: (HasCallStack, MonadIO m, IsTlsClientConnection a, IsTlsClientConnection b) | |
=> a |
|
-> b |
|
-> m () |
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
data TlsClientConnectionGetAcceptedCasMethodInfo Source #
((~) * signature (m [ByteString]), MonadIO m, IsTlsClientConnection a) => MethodInfo * TlsClientConnectionGetAcceptedCasMethodInfo a signature Source # | |
tlsClientConnectionGetAcceptedCas Source #
:: (HasCallStack, MonadIO m, IsTlsClientConnection 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.28
getServerIdentity
data TlsClientConnectionGetServerIdentityMethodInfo Source #
((~) * signature (m SocketConnectable), MonadIO m, IsTlsClientConnection a) => MethodInfo * TlsClientConnectionGetServerIdentityMethodInfo a signature Source # | |
tlsClientConnectionGetServerIdentity Source #
:: (HasCallStack, MonadIO m, IsTlsClientConnection a) | |
=> a |
|
-> m SocketConnectable | Returns: a |
Gets conn
's expected server identity
Since: 2.28
getUseSsl3
data TlsClientConnectionGetUseSsl3MethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsTlsClientConnection a) => MethodInfo * TlsClientConnectionGetUseSsl3MethodInfo a signature Source # | |
tlsClientConnectionGetUseSsl3 Source #
:: (HasCallStack, MonadIO m, IsTlsClientConnection a) | |
=> a |
|
-> m Bool | Returns: whether |
Gets whether conn
will use SSL 3.0 rather than the
highest-supported version of TLS; see
tlsClientConnectionSetUseSsl3
.
Since: 2.28
getValidationFlags
data TlsClientConnectionGetValidationFlagsMethodInfo Source #
((~) * signature (m [TlsCertificateFlags]), MonadIO m, IsTlsClientConnection a) => MethodInfo * TlsClientConnectionGetValidationFlagsMethodInfo a signature Source # | |
tlsClientConnectionGetValidationFlags Source #
:: (HasCallStack, MonadIO m, IsTlsClientConnection a) | |
=> a |
|
-> m [TlsCertificateFlags] | Returns: the validation flags |
Gets conn
's validation flags
Since: 2.28
new
tlsClientConnectionNew Source #
:: (HasCallStack, MonadIO m, IsIOStream a, IsSocketConnectable b) | |
=> a |
|
-> Maybe b |
|
-> m TlsClientConnection | Returns: the new
|
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
data TlsClientConnectionSetServerIdentityMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsTlsClientConnection a, IsSocketConnectable b) => MethodInfo * TlsClientConnectionSetServerIdentityMethodInfo a signature Source # | |
tlsClientConnectionSetServerIdentity Source #
:: (HasCallStack, MonadIO m, IsTlsClientConnection 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.28
setUseSsl3
data TlsClientConnectionSetUseSsl3MethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsTlsClientConnection a) => MethodInfo * TlsClientConnectionSetUseSsl3MethodInfo a signature Source # | |
tlsClientConnectionSetUseSsl3 Source #
:: (HasCallStack, MonadIO m, IsTlsClientConnection a) | |
=> a |
|
-> Bool |
|
-> 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
data TlsClientConnectionSetValidationFlagsMethodInfo Source #
((~) * signature ([TlsCertificateFlags] -> m ()), MonadIO m, IsTlsClientConnection a) => MethodInfo * TlsClientConnectionSetValidationFlagsMethodInfo a signature Source # | |
tlsClientConnectionSetValidationFlags Source #
:: (HasCallStack, MonadIO m, IsTlsClientConnection 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.28
Properties
acceptedCas
data TlsClientConnectionAcceptedCasPropertyInfo Source #
getTlsClientConnectionAcceptedCas :: (MonadIO m, IsTlsClientConnection o) => o -> m [Ptr ()] Source #
tlsClientConnectionAcceptedCas :: AttrLabelProxy "acceptedCas" Source #
serverIdentity
data TlsClientConnectionServerIdentityPropertyInfo Source #
constructTlsClientConnectionServerIdentity :: (IsTlsClientConnection o, IsSocketConnectable a) => a -> IO (GValueConstruct o) Source #
getTlsClientConnectionServerIdentity :: (MonadIO m, IsTlsClientConnection o) => o -> m SocketConnectable Source #
setTlsClientConnectionServerIdentity :: (MonadIO m, IsTlsClientConnection o, IsSocketConnectable a) => o -> a -> m () Source #
tlsClientConnectionServerIdentity :: AttrLabelProxy "serverIdentity" Source #
useSsl3
data TlsClientConnectionUseSsl3PropertyInfo Source #
constructTlsClientConnectionUseSsl3 :: IsTlsClientConnection o => Bool -> IO (GValueConstruct o) Source #
getTlsClientConnectionUseSsl3 :: (MonadIO m, IsTlsClientConnection o) => o -> m Bool Source #
setTlsClientConnectionUseSsl3 :: (MonadIO m, IsTlsClientConnection o) => o -> Bool -> m () Source #
tlsClientConnectionUseSsl3 :: AttrLabelProxy "useSsl3" Source #
validationFlags
data TlsClientConnectionValidationFlagsPropertyInfo Source #
constructTlsClientConnectionValidationFlags :: IsTlsClientConnection o => [TlsCertificateFlags] -> IO (GValueConstruct o) Source #
getTlsClientConnectionValidationFlags :: (MonadIO m, IsTlsClientConnection o) => o -> m [TlsCertificateFlags] Source #
setTlsClientConnectionValidationFlags :: (MonadIO m, IsTlsClientConnection o) => o -> [TlsCertificateFlags] -> m () Source #
tlsClientConnectionValidationFlags :: AttrLabelProxy "validationFlags" Source #