[Haskell-beginners] HTTPS Get Request with unverifiable certificate

Friedrich Wiemer friedrichwiemer at gmail.com
Tue Jun 11 16:00:50 CEST 2013


Hey,

I'm trying to send a HTTPS-Get Request to a private server, which has
a self-signed ssl-certificate. Currently I use Network.HTTP.Conduit
and this code-snipped:

> myGetRequest url = do
>  req <- parseUrl url
>  return $ req {secure = True}
>
> *Main Network.HTTP.Conduit> myGetRequest "https://my.private.server" >>= (\x -> withManager (httpLbs x))
which results in
> *** Exception: TlsException (HandshakeFailed (Error_Protocol ("certificate rejected: FQDN do not match this certificate",True,CertificateUnknown)))

I guess that's due to the unverifiable, self-signed certificate? Can I
disable the test or accept my certificate?

Thanks in advance!
Friedrich



More information about the Beginners mailing list