allow access to TLSSettings for the connection, e.g. for use with client side certificates
This commit is contained in:
parent
7a2cf37141
commit
889c66a046
@ -162,6 +162,7 @@ with host port f = do
|
||||
case host of
|
||||
Plain h -> h
|
||||
Secure h -> h
|
||||
SecureWithTLSSettings h _ -> h
|
||||
Insecure h -> h
|
||||
, Conn.connectionPort = port
|
||||
, Conn.connectionUseSecure =
|
||||
@ -172,6 +173,7 @@ with host port f = do
|
||||
, Conn.settingDisableSession = False
|
||||
, Conn.settingUseServerName = False
|
||||
}
|
||||
SecureWithTLSSettings _ t -> Just t
|
||||
Insecure _ -> Just Conn.TLSSettingsSimple
|
||||
{ Conn.settingDisableCertificateValidation = True
|
||||
, Conn.settingDisableSession = False
|
||||
|
||||
@ -36,6 +36,7 @@ import Data.List.NonEmpty (NonEmpty)
|
||||
import Data.Text (Text)
|
||||
import Data.Typeable (Typeable)
|
||||
import Network (PortNumber)
|
||||
import Network.Connection (TLSSettings)
|
||||
|
||||
import qualified Ldap.Asn1.Type as Type
|
||||
|
||||
@ -46,7 +47,8 @@ data Host =
|
||||
| Insecure String -- ^ LDAP over TLS without the certificate validity check.
|
||||
-- Only use for testing!
|
||||
| Secure String -- ^ LDAP over TLS. Use!
|
||||
deriving (Show, Eq, Ord)
|
||||
| SecureWithTLSSettings String TLSSettings -- ^ LDAP over TLS with the ability to specify detailed TLS settings
|
||||
deriving (Show)
|
||||
|
||||
-- | A token. All functions that interact with the Directory require one.
|
||||
data Ldap = Ldap
|
||||
|
||||
Loading…
Reference in New Issue
Block a user