refactored adjustServerParams

This commit is contained in:
Jonathan Lamothe 2021-11-12 19:52:09 -05:00
parent 7814705dd9
commit 6247595145

View File

@ -197,8 +197,9 @@ adjustServerParams certRef params = let
hooks = serverHooks params hooks = serverHooks params
certHook = onClientCertificate hooks certHook = onClientCertificate hooks
certHook' chain = case chain of certHook' chain = do
CertificateChain [] -> certHook chain case chain of
CertificateChain [] -> return ()
CertificateChain (se:_) -> do CertificateChain (se:_) -> do
let cert = signedObject $ getSigned se let cert = signedObject $ getSigned se
writeIORef certRef (Just cert) writeIORef certRef (Just cert)