This file is indexed.

/usr/share/doc/libghc-hsopenssl-doc/html/OpenSSL-Session.html is in libghc-hsopenssl-doc 0.11.4.11-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>OpenSSL.Session</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_OpenSSL-Session.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/OpenSSL-Session.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">HsOpenSSL-0.11.4.11: Partial OpenSSL binding for Haskell</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">OpenSSL.Session</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Contexts</a></li><li><a href="#g:2">SSL connections</a></li><li><a href="#g:3">Protocol Options</a></li><li><a href="#g:4">SSL Exceptions</a></li><li><a href="#g:5">Direct access to OpenSSL objects</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Functions for handling SSL connections. These functions use GHC specific
   calls to cooperative the with the scheduler so that <code>blocking</code> functions
   only actually block the Haskell thread, not a whole OS thread.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:SSLContext">SSLContext</a></li><li class="src short"><a href="#v:context">context</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a></li><li class="src short"><a href="#v:contextAddOption">contextAddOption</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:contextRemoveOption">contextRemoveOption</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:contextSetPrivateKey">contextSetPrivateKey</a> :: <a href="OpenSSL-EVP-PKey.html#t:KeyPair">KeyPair</a> k =&gt; <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:contextSetCertificate">contextSetCertificate</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="OpenSSL-X509.html#t:X509">X509</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:contextSetPrivateKeyFile">contextSetPrivateKeyFile</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:contextSetCertificateFile">contextSetCertificateFile</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:contextSetCertificateChainFile">contextSetCertificateChainFile</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:contextSetCiphers">contextSetCiphers</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:contextSetDefaultCiphers">contextSetDefaultCiphers</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:contextCheckPrivateKey">contextCheckPrivateKey</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:VerificationMode">VerificationMode</a><ul class="subs"><li>= <a href="#v:VerifyNone">VerifyNone</a></li><li>| <a href="#v:VerifyPeer">VerifyPeer</a> { <ul class="subs"><li><a href="#v:vpFailIfNoPeerCert">vpFailIfNoPeerCert</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:vpClientOnce">vpClientOnce</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:vpCallback">vpCallback</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="OpenSSL-X509-Store.html#t:X509StoreCtx">X509StoreCtx</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>)</li></ul> }</li></ul></li><li class="src short"><a href="#v:contextSetVerificationMode">contextSetVerificationMode</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="OpenSSL-Session.html#t:VerificationMode">VerificationMode</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:contextSetCAFile">contextSetCAFile</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:contextSetCADirectory">contextSetCADirectory</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:contextGetCAStore">contextGetCAStore</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="OpenSSL-X509-Store.html#t:X509Store">X509Store</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:SSL">SSL</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:SSLResult">SSLResult</a> a<ul class="subs"><li>= <a href="#v:SSLDone">SSLDone</a> a</li><li>| <a href="#v:WantRead">WantRead</a></li><li>| <a href="#v:WantWrite">WantWrite</a></li></ul></li><li class="src short"><a href="#v:connection">connection</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/libghc-network-doc/html/Network-Socket.html#t:Socket">Socket</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="OpenSSL-Session.html#t:SSL">SSL</a></li><li class="src short"><a href="#v:fdConnection">fdConnection</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-Posix-Types.html#t:Fd">Fd</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="OpenSSL-Session.html#t:SSL">SSL</a></li><li class="src short"><a href="#v:addOption">addOption</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:removeOption">removeOption</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:setTlsextHostName">setTlsextHostName</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:accept">accept</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:tryAccept">tryAccept</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> ())</li><li class="src short"><a href="#v:connect">connect</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:tryConnect">tryConnect</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> ())</li><li class="src short"><a href="#v:read">read</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:tryRead">tryRead</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a>)</li><li class="src short"><a href="#v:readPtr">readPtr</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Foreign-Ptr.html#t:Ptr">Ptr</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:tryReadPtr">tryReadPtr</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Foreign-Ptr.html#t:Ptr">Ptr</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>)</li><li class="src short"><a href="#v:write">write</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:tryWrite">tryWrite</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> ())</li><li class="src short"><a href="#v:writePtr">writePtr</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Foreign-Ptr.html#t:Ptr">Ptr</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:tryWritePtr">tryWritePtr</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Foreign-Ptr.html#t:Ptr">Ptr</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> ())</li><li class="src short"><a href="#v:lazyRead">lazyRead</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:lazyWrite">lazyWrite</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:shutdown">shutdown</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="OpenSSL-Session.html#t:ShutdownType">ShutdownType</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:tryShutdown">tryShutdown</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="OpenSSL-Session.html#t:ShutdownType">ShutdownType</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> ())</li><li class="src short"><span class="keyword">data</span> <a href="#t:ShutdownType">ShutdownType</a><ul class="subs"><li>= <a href="#v:Bidirectional">Bidirectional</a></li><li>| <a href="#v:Unidirectional">Unidirectional</a></li></ul></li><li class="src short"><a href="#v:getPeerCertificate">getPeerCertificate</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="OpenSSL-X509.html#t:X509">X509</a>)</li><li class="src short"><a href="#v:getVerifyResult">getVerifyResult</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:sslSocket">sslSocket</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/libghc-network-doc/html/Network-Socket.html#t:Socket">Socket</a></li><li class="src short"><a href="#v:sslFd">sslFd</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-Posix-Types.html#t:Fd">Fd</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:SSLOption">SSLOption</a><ul class="subs"><li>= <a href="#v:SSL_OP_MICROSOFT_SESS_ID_BUG">SSL_OP_MICROSOFT_SESS_ID_BUG</a></li><li>| <a href="#v:SSL_OP_NETSCAPE_CHALLENGE_BUG">SSL_OP_NETSCAPE_CHALLENGE_BUG</a></li><li>| <a href="#v:SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG">SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG</a></li><li>| <a href="#v:SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG">SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG</a></li><li>| <a href="#v:SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER">SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER</a></li><li>| <a href="#v:SSL_OP_SAFARI_ECDHE_ECDSA_BUG">SSL_OP_SAFARI_ECDHE_ECDSA_BUG</a></li><li>| <a href="#v:SSL_OP_SSLEAY_080_CLIENT_DH_BUG">SSL_OP_SSLEAY_080_CLIENT_DH_BUG</a></li><li>| <a href="#v:SSL_OP_TLS_D5_BUG">SSL_OP_TLS_D5_BUG</a></li><li>| <a href="#v:SSL_OP_TLS_BLOCK_PADDING_BUG">SSL_OP_TLS_BLOCK_PADDING_BUG</a></li><li>| <a href="#v:SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS">SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS</a></li><li>| <a href="#v:SSL_OP_TLSEXT_PADDING">SSL_OP_TLSEXT_PADDING</a></li><li>| <a href="#v:SSL_OP_ALL">SSL_OP_ALL</a></li><li>| <a href="#v:SSL_OP_TLS_ROLLBACK_BUG">SSL_OP_TLS_ROLLBACK_BUG</a></li><li>| <a href="#v:SSL_OP_SINGLE_DH_USE">SSL_OP_SINGLE_DH_USE</a></li><li>| <a href="#v:SSL_OP_EPHEMERAL_RSA">SSL_OP_EPHEMERAL_RSA</a></li><li>| <a href="#v:SSL_OP_CIPHER_SERVER_PREFERENCE">SSL_OP_CIPHER_SERVER_PREFERENCE</a></li><li>| <a href="#v:SSL_OP_PKCS1_CHECK_1">SSL_OP_PKCS1_CHECK_1</a></li><li>| <a href="#v:SSL_OP_PKCS1_CHECK_2">SSL_OP_PKCS1_CHECK_2</a></li><li>| <a href="#v:SSL_OP_NETSCAPE_CA_DN_BUG">SSL_OP_NETSCAPE_CA_DN_BUG</a></li><li>| <a href="#v:SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG">SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG</a></li><li>| <a href="#v:SSL_OP_NO_SSLv2">SSL_OP_NO_SSLv2</a></li><li>| <a href="#v:SSL_OP_NO_SSLv3">SSL_OP_NO_SSLv3</a></li><li>| <a href="#v:SSL_OP_NO_TLSv1">SSL_OP_NO_TLSv1</a></li><li>| <a href="#v:SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION">SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION</a></li><li>| <a href="#v:SSL_OP_NO_TICKET">SSL_OP_NO_TICKET</a></li><li>| <a href="#v:SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION">SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION</a></li><li>| <a href="#v:SSL_OP_LEGACY_SERVER_CONNECT">SSL_OP_LEGACY_SERVER_CONNECT</a></li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:SomeSSLException">SomeSSLException</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:ConnectionAbruptlyTerminated">ConnectionAbruptlyTerminated</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:ProtocolError">ProtocolError</a> = <a href="#v:ProtocolError">ProtocolError</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:SSLContext_">SSLContext_</a></li><li class="src short"><a href="#v:withContext">withContext</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Foreign-Ptr.html#t:Ptr">Ptr</a> <a href="OpenSSL-Session.html#t:SSLContext_">SSLContext_</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><span class="keyword">data</span> <a href="#t:SSL_">SSL_</a></li><li class="src short"><a href="#v:withSSL">withSSL</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Foreign-Ptr.html#t:Ptr">Ptr</a> <a href="OpenSSL-Session.html#t:SSL_">SSL_</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a</li></ul></div><div id="interface"><h1 id="g:1">Contexts</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:SSLContext" class="def">SSLContext</a> <a href="src/OpenSSL-Session.html#SSLContext" class="link">Source</a> <a href="#t:SSLContext" class="selflink">#</a></p><div class="doc"><p>An SSL context. Contexts carry configuration such as a server's private
   key, root CA certiifcates etc. Contexts are stateful IO objects; they
   start empty and various options are set on them by the functions in this
   module. Note that an empty context will pretty much cause any operation to
   fail since it doesn't even have any ciphers enabled.</p></div></div><div class="top"><p class="src"><a id="v:context" class="def">context</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> <a href="src/OpenSSL-Session.html#context" class="link">Source</a> <a href="#v:context" class="selflink">#</a></p><div class="doc"><p>Create a new SSL context.</p></div></div><div class="top"><p class="src"><a id="v:contextAddOption" class="def">contextAddOption</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#contextAddOption" class="link">Source</a> <a href="#v:contextAddOption" class="selflink">#</a></p><div class="doc"><p>Add a protocol option to the context.</p></div></div><div class="top"><p class="src"><a id="v:contextRemoveOption" class="def">contextRemoveOption</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#contextRemoveOption" class="link">Source</a> <a href="#v:contextRemoveOption" class="selflink">#</a></p><div class="doc"><p>Remove a protocol option from the context.</p></div></div><div class="top"><p class="src"><a id="v:contextSetPrivateKey" class="def">contextSetPrivateKey</a> :: <a href="OpenSSL-EVP-PKey.html#t:KeyPair">KeyPair</a> k =&gt; <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; k -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#contextSetPrivateKey" class="link">Source</a> <a href="#v:contextSetPrivateKey" class="selflink">#</a></p><div class="doc"><p>Install a private key into a context.</p></div></div><div class="top"><p class="src"><a id="v:contextSetCertificate" class="def">contextSetCertificate</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="OpenSSL-X509.html#t:X509">X509</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#contextSetCertificate" class="link">Source</a> <a href="#v:contextSetCertificate" class="selflink">#</a></p><div class="doc"><p>Install a certificate (public key) into a context.</p></div></div><div class="top"><p class="src"><a id="v:contextSetPrivateKeyFile" class="def">contextSetPrivateKeyFile</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#contextSetPrivateKeyFile" class="link">Source</a> <a href="#v:contextSetPrivateKeyFile" class="selflink">#</a></p><div class="doc"><p>Install a private key file in a context. The key is given as a path to the
   file which contains the key. The file is parsed first as PEM and, if that
   fails, as ASN1. If both fail, an exception is raised.</p></div></div><div class="top"><p class="src"><a id="v:contextSetCertificateFile" class="def">contextSetCertificateFile</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#contextSetCertificateFile" class="link">Source</a> <a href="#v:contextSetCertificateFile" class="selflink">#</a></p><div class="doc"><p>Install a certificate (public key) file in a context. The key is given as
   a path to the file which contains the key. The file is parsed first as PEM
   and, if that fails, as ASN1. If both fail, an exception is raised.</p></div></div><div class="top"><p class="src"><a id="v:contextSetCertificateChainFile" class="def">contextSetCertificateChainFile</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#contextSetCertificateChainFile" class="link">Source</a> <a href="#v:contextSetCertificateChainFile" class="selflink">#</a></p><div class="doc"><p>Install a certificate chain in a context. The certificates must be in PEM
 format and must be sorted starting with the subject's certificate (actual
 client or server certificate), followed by intermediate CA certificates if
 applicable, and ending at the highest level (root) CA.</p></div></div><div class="top"><p class="src"><a id="v:contextSetCiphers" class="def">contextSetCiphers</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#contextSetCiphers" class="link">Source</a> <a href="#v:contextSetCiphers" class="selflink">#</a></p><div class="doc"><p>Set the ciphers to be used by the given context. The string argument is a
   list of ciphers, comma separated, as given at
   <a href="http://www.openssl.org/docs/apps/ciphers.html">http://www.openssl.org/docs/apps/ciphers.html</a></p><p>Unrecognised ciphers are ignored. If no ciphers from the list are
   recognised, an exception is raised.</p></div></div><div class="top"><p class="src"><a id="v:contextSetDefaultCiphers" class="def">contextSetDefaultCiphers</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#contextSetDefaultCiphers" class="link">Source</a> <a href="#v:contextSetDefaultCiphers" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:contextCheckPrivateKey" class="def">contextCheckPrivateKey</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/OpenSSL-Session.html#contextCheckPrivateKey" class="link">Source</a> <a href="#v:contextCheckPrivateKey" class="selflink">#</a></p><div class="doc"><p>Return true iff the private key installed in the given context matches the
   certificate also installed.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:VerificationMode" class="def">VerificationMode</a> <a href="src/OpenSSL-Session.html#VerificationMode" class="link">Source</a> <a href="#t:VerificationMode" class="selflink">#</a></p><div class="doc"><p>See <a href="http://www.openssl.org/docs/ssl/SSL_CTX_set_verify.html">http://www.openssl.org/docs/ssl/SSL_CTX_set_verify.html</a></p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:VerifyNone" class="def">VerifyNone</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:VerifyPeer" class="def">VerifyPeer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:vpFailIfNoPeerCert" class="def">vpFailIfNoPeerCert</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc"><p>is a certificate required</p></div></li><li><dfn class="src"><a id="v:vpClientOnce" class="def">vpClientOnce</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc"><p>only request once per connection</p></div></li><li><dfn class="src"><a id="v:vpCallback" class="def">vpCallback</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="OpenSSL-X509-Store.html#t:X509StoreCtx">X509StoreCtx</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>)</dfn><div class="doc"><p>optional callback</p></div></li></ul></div></td></tr></table></div></div><div class="top"><p class="src"><a id="v:contextSetVerificationMode" class="def">contextSetVerificationMode</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="OpenSSL-Session.html#t:VerificationMode">VerificationMode</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#contextSetVerificationMode" class="link">Source</a> <a href="#v:contextSetVerificationMode" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:contextSetCAFile" class="def">contextSetCAFile</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#contextSetCAFile" class="link">Source</a> <a href="#v:contextSetCAFile" class="selflink">#</a></p><div class="doc"><p>Set the location of a PEM encoded list of CA certificates to be used when
   verifying a server's certificate</p></div></div><div class="top"><p class="src"><a id="v:contextSetCADirectory" class="def">contextSetCADirectory</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#contextSetCADirectory" class="link">Source</a> <a href="#v:contextSetCADirectory" class="selflink">#</a></p><div class="doc"><p>Set the path to a directory which contains the PEM encoded CA root
   certificates. This is an alternative to <code><a href="OpenSSL-Session.html#v:contextSetCAFile">contextSetCAFile</a></code>. See
   <a href="http://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html">http://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html</a> for
   details of the file naming scheme</p></div></div><div class="top"><p class="src"><a id="v:contextGetCAStore" class="def">contextGetCAStore</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="OpenSSL-X509-Store.html#t:X509Store">X509Store</a> <a href="src/OpenSSL-Session.html#contextGetCAStore" class="link">Source</a> <a href="#v:contextGetCAStore" class="selflink">#</a></p><div class="doc"><p>Get a reference to, not a copy of, the X.509 certificate storage
   in the SSL context.</p></div></div><h1 id="g:2">SSL connections</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:SSL" class="def">SSL</a> <a href="src/OpenSSL-Session.html#SSL" class="link">Source</a> <a href="#t:SSL" class="selflink">#</a></p><div class="doc"><p>This is the type of an SSL connection</p><p>IO with SSL objects is non-blocking and many SSL functions return a error
   code which signifies that it needs to read or write more data. We handle
   these calls and call threadWaitRead and threadWaitWrite at the correct
   times. Thus multiple OS threads can be <code>blocked</code> inside IO in the same SSL
   object at a time, because they aren't really in the SSL object, they are
   waiting for the RTS to wake the Haskell thread.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:SSLResult" class="def">SSLResult</a> a <a href="src/OpenSSL-Session.html#SSLResult" class="link">Source</a> <a href="#t:SSLResult" class="selflink">#</a></p><div class="doc"><p>This is the type of an SSL IO operation. Errors are handled by
 exceptions while everything else is one of these. Note that reading
 from an SSL socket can result in WantWrite and vice versa.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:SSLDone" class="def">SSLDone</a> a</td><td class="doc"><p>operation finished successfully</p></td></tr><tr><td class="src"><a id="v:WantRead" class="def">WantRead</a></td><td class="doc"><p>needs more data from the network</p></td></tr><tr><td class="src"><a id="v:WantWrite" class="def">WantWrite</a></td><td class="doc"><p>needs more outgoing buffer space</p></td></tr></table></div><div class="subs instances"><p id="control.i:SSLResult" class="caption collapser" onclick="toggleSection('i:SSLResult')">Instances</p><div id="section.i:SSLResult" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SSLResult:Functor:1" class="instance expander" onclick="toggleSection('i:id:SSLResult:Functor:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a></span> <a href="src/OpenSSL-Session.html#line-442" class="link">Source</a> <a href="#t:SSLResult" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:SSLResult:Functor:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fmap">fmap</a> :: (a -&gt; b) -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(&lt;$)</a> :: a -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> b -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a <a href="#v:-60--36-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SSLResult:Foldable:2" class="instance expander" onclick="toggleSection('i:id:SSLResult:Foldable:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Foldable.html#t:Foldable">Foldable</a> <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a></span> <a href="src/OpenSSL-Session.html#line-442" class="link">Source</a> <a href="#t:SSLResult" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:SSLResult:Foldable:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fold">fold</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> m =&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> m -&gt; m <a href="#v:fold" class="selflink">#</a></p><p class="src"><a href="#v:foldMap">foldMap</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> m =&gt; (a -&gt; m) -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; m <a href="#v:foldMap" class="selflink">#</a></p><p class="src"><a href="#v:foldr">foldr</a> :: (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; b <a href="#v:foldr" class="selflink">#</a></p><p class="src"><a href="#v:foldr-39-">foldr'</a> :: (a -&gt; b -&gt; b) -&gt; b -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; b <a href="#v:foldr-39-" class="selflink">#</a></p><p class="src"><a href="#v:foldl">foldl</a> :: (b -&gt; a -&gt; b) -&gt; b -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; b <a href="#v:foldl" class="selflink">#</a></p><p class="src"><a href="#v:foldl-39-">foldl'</a> :: (b -&gt; a -&gt; b) -&gt; b -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; b <a href="#v:foldl-39-" class="selflink">#</a></p><p class="src"><a href="#v:foldr1">foldr1</a> :: (a -&gt; a -&gt; a) -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; a <a href="#v:foldr1" class="selflink">#</a></p><p class="src"><a href="#v:foldl1">foldl1</a> :: (a -&gt; a -&gt; a) -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; a <a href="#v:foldl1" class="selflink">#</a></p><p class="src"><a href="#v:toList">toList</a> :: <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; [a] <a href="#v:toList" class="selflink">#</a></p><p class="src"><a href="#v:null">null</a> :: <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:null" class="selflink">#</a></p><p class="src"><a href="#v:length">length</a> :: <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="#v:length" class="selflink">#</a></p><p class="src"><a href="#v:elem">elem</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; a -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:elem" class="selflink">#</a></p><p class="src"><a href="#v:maximum">maximum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; a <a href="#v:maximum" class="selflink">#</a></p><p class="src"><a href="#v:minimum">minimum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; a <a href="#v:minimum" class="selflink">#</a></p><p class="src"><a href="#v:sum">sum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; a <a href="#v:sum" class="selflink">#</a></p><p class="src"><a href="#v:product">product</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; a <a href="#v:product" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SSLResult:Traversable:3" class="instance expander" onclick="toggleSection('i:id:SSLResult:Traversable:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Traversable.html#t:Traversable">Traversable</a> <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a></span> <a href="src/OpenSSL-Session.html#line-442" class="link">Source</a> <a href="#t:SSLResult" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:SSLResult:Traversable:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:traverse">traverse</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; (a -&gt; f b) -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; f (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> b) <a href="#v:traverse" class="selflink">#</a></p><p class="src"><a href="#v:sequenceA">sequenceA</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a> f =&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> (f a) -&gt; f (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a) <a href="#v:sequenceA" class="selflink">#</a></p><p class="src"><a href="#v:mapM">mapM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m b) -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; m (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> b) <a href="#v:mapM" class="selflink">#</a></p><p class="src"><a href="#v:sequence">sequence</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> (m a) -&gt; m (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a) <a href="#v:sequence" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SSLResult:Eq:4" class="instance expander" onclick="toggleSection('i:id:SSLResult:Eq:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a)</span> <a href="src/OpenSSL-Session.html#line-442" class="link">Source</a> <a href="#t:SSLResult" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:SSLResult:Eq:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SSLResult:Show:5" class="instance expander" onclick="toggleSection('i:id:SSLResult:Show:5')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a)</span> <a href="src/OpenSSL-Session.html#line-442" class="link">Source</a> <a href="#t:SSLResult" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:SSLResult:Show:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:connection" class="def">connection</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/libghc-network-doc/html/Network-Socket.html#t:Socket">Socket</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="OpenSSL-Session.html#t:SSL">SSL</a> <a href="src/OpenSSL-Session.html#connection" class="link">Source</a> <a href="#v:connection" class="selflink">#</a></p><div class="doc"><p>Wrap a Socket in an SSL connection. Reading and writing to the Socket
   after this will cause weird errors in the SSL code. The SSL object
   carries a handle to the Socket so you need not worry about the garbage
   collector closing the file descriptor out from under you.</p></div></div><div class="top"><p class="src"><a id="v:fdConnection" class="def">fdConnection</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-Posix-Types.html#t:Fd">Fd</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="OpenSSL-Session.html#t:SSL">SSL</a> <a href="src/OpenSSL-Session.html#fdConnection" class="link">Source</a> <a href="#v:fdConnection" class="selflink">#</a></p><div class="doc"><p>Wrap a socket Fd in an SSL connection.</p></div></div><div class="top"><p class="src"><a id="v:addOption" class="def">addOption</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#addOption" class="link">Source</a> <a href="#v:addOption" class="selflink">#</a></p><div class="doc"><p>Add a protocol option to the SSL connection.</p></div></div><div class="top"><p class="src"><a id="v:removeOption" class="def">removeOption</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#removeOption" class="link">Source</a> <a href="#v:removeOption" class="selflink">#</a></p><div class="doc"><p>Remove a protocol option from the SSL connection.</p></div></div><div class="top"><p class="src"><a id="v:setTlsextHostName" class="def">setTlsextHostName</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#setTlsextHostName" class="link">Source</a> <a href="#v:setTlsextHostName" class="selflink">#</a></p><div class="doc"><p>Set host name for Server Name Indication (SNI)</p></div></div><div class="top"><p class="src"><a id="v:accept" class="def">accept</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#accept" class="link">Source</a> <a href="#v:accept" class="selflink">#</a></p><div class="doc"><p>Perform an SSL server handshake</p></div></div><div class="top"><p class="src"><a id="v:tryAccept" class="def">tryAccept</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> ()) <a href="src/OpenSSL-Session.html#tryAccept" class="link">Source</a> <a href="#v:tryAccept" class="selflink">#</a></p><div class="doc"><p>Try to perform an SSL server handshake without blocking</p></div></div><div class="top"><p class="src"><a id="v:connect" class="def">connect</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#connect" class="link">Source</a> <a href="#v:connect" class="selflink">#</a></p><div class="doc"><p>Perform an SSL client handshake</p></div></div><div class="top"><p class="src"><a id="v:tryConnect" class="def">tryConnect</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> ()) <a href="src/OpenSSL-Session.html#tryConnect" class="link">Source</a> <a href="#v:tryConnect" class="selflink">#</a></p><div class="doc"><p>Try to perform an SSL client handshake without blocking</p></div></div><div class="top"><p class="src"><a id="v:read" class="def">read</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/OpenSSL-Session.html#read" class="link">Source</a> <a href="#v:read" class="selflink">#</a></p><div class="doc"><p>Try to read the given number of bytes from an SSL connection. On EOF an
   empty ByteString is returned. If the connection dies without a graceful
   SSL shutdown, an exception is raised.</p></div></div><div class="top"><p class="src"><a id="v:tryRead" class="def">tryRead</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a>) <a href="src/OpenSSL-Session.html#tryRead" class="link">Source</a> <a href="#v:tryRead" class="selflink">#</a></p><div class="doc"><p>Try to read the given number of bytes from an SSL connection
   without blocking.</p></div></div><div class="top"><p class="src"><a id="v:readPtr" class="def">readPtr</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Foreign-Ptr.html#t:Ptr">Ptr</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="src/OpenSSL-Session.html#readPtr" class="link">Source</a> <a href="#v:readPtr" class="selflink">#</a></p><div class="doc"><p>Read some data into a raw pointer buffer.
 Retrns the number of bytes read.</p></div></div><div class="top"><p class="src"><a id="v:tryReadPtr" class="def">tryReadPtr</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Foreign-Ptr.html#t:Ptr">Ptr</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>) <a href="src/OpenSSL-Session.html#tryReadPtr" class="link">Source</a> <a href="#v:tryReadPtr" class="selflink">#</a></p><div class="doc"><p>Try to read some data into a raw pointer buffer, without blocking.</p></div></div><div class="top"><p class="src"><a id="v:write" class="def">write</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#write" class="link">Source</a> <a href="#v:write" class="selflink">#</a></p><div class="doc"><p>Write a given ByteString to the SSL connection. Either all the data is
   written or an exception is raised because of an error.</p></div></div><div class="top"><p class="src"><a id="v:tryWrite" class="def">tryWrite</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> ()) <a href="src/OpenSSL-Session.html#tryWrite" class="link">Source</a> <a href="#v:tryWrite" class="selflink">#</a></p><div class="doc"><p>Try to write a given ByteString to the SSL connection without blocking.</p></div></div><div class="top"><p class="src"><a id="v:writePtr" class="def">writePtr</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Foreign-Ptr.html#t:Ptr">Ptr</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#writePtr" class="link">Source</a> <a href="#v:writePtr" class="selflink">#</a></p><div class="doc"><p>Send some data from a raw pointer buffer.</p></div></div><div class="top"><p class="src"><a id="v:tryWritePtr" class="def">tryWritePtr</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Foreign-Ptr.html#t:Ptr">Ptr</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> ()) <a href="src/OpenSSL-Session.html#tryWritePtr" class="link">Source</a> <a href="#v:tryWritePtr" class="selflink">#</a></p><div class="doc"><p>Send some data from a raw pointer buffer, without blocking.</p></div></div><div class="top"><p class="src"><a id="v:lazyRead" class="def">lazyRead</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> <a href="src/OpenSSL-Session.html#lazyRead" class="link">Source</a> <a href="#v:lazyRead" class="selflink">#</a></p><div class="doc"><p>Lazily read all data until reaching EOF. If the connection dies
   without a graceful SSL shutdown, an exception is raised.</p></div></div><div class="top"><p class="src"><a id="v:lazyWrite" class="def">lazyWrite</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#lazyWrite" class="link">Source</a> <a href="#v:lazyWrite" class="selflink">#</a></p><div class="doc"><p>Write a lazy ByteString to the SSL connection. In contrast to
   <code><a href="OpenSSL-Session.html#v:write">write</a></code>, there is a chance that the string is written partway and
   then an exception is raised for an error. The string doesn't
   necessarily have to be finite.</p></div></div><div class="top"><p class="src"><a id="v:shutdown" class="def">shutdown</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="OpenSSL-Session.html#t:ShutdownType">ShutdownType</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/OpenSSL-Session.html#shutdown" class="link">Source</a> <a href="#v:shutdown" class="selflink">#</a></p><div class="doc"><p>Cleanly shutdown an SSL connection. Note that SSL has a concept of a
   secure shutdown, which is distinct from just closing the TCP connection.
   This performs the former and should always be preferred.</p><p>This can either just send a shutdown, or can send and wait for the peer's
   shutdown message.</p></div></div><div class="top"><p class="src"><a id="v:tryShutdown" class="def">tryShutdown</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="OpenSSL-Session.html#t:ShutdownType">ShutdownType</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="OpenSSL-Session.html#t:SSLResult">SSLResult</a> ()) <a href="src/OpenSSL-Session.html#tryShutdown" class="link">Source</a> <a href="#v:tryShutdown" class="selflink">#</a></p><div class="doc"><p>Try to cleanly shutdown an SSL connection without blocking.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:ShutdownType" class="def">ShutdownType</a> <a href="src/OpenSSL-Session.html#ShutdownType" class="link">Source</a> <a href="#t:ShutdownType" class="selflink">#</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Bidirectional" class="def">Bidirectional</a></td><td class="doc"><p>wait for the peer to also shutdown</p></td></tr><tr><td class="src"><a id="v:Unidirectional" class="def">Unidirectional</a></td><td class="doc"><p>only send our shutdown</p></td></tr></table></div><div class="subs instances"><p id="control.i:ShutdownType" class="caption collapser" onclick="toggleSection('i:ShutdownType')">Instances</p><div id="section.i:ShutdownType" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ShutdownType:Eq:1" class="instance expander" onclick="toggleSection('i:id:ShutdownType:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="OpenSSL-Session.html#t:ShutdownType">ShutdownType</a></span> <a href="src/OpenSSL-Session.html#line-612" class="link">Source</a> <a href="#t:ShutdownType" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ShutdownType:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="OpenSSL-Session.html#t:ShutdownType">ShutdownType</a> -&gt; <a href="OpenSSL-Session.html#t:ShutdownType">ShutdownType</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="OpenSSL-Session.html#t:ShutdownType">ShutdownType</a> -&gt; <a href="OpenSSL-Session.html#t:ShutdownType">ShutdownType</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ShutdownType:Show:2" class="instance expander" onclick="toggleSection('i:id:ShutdownType:Show:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="OpenSSL-Session.html#t:ShutdownType">ShutdownType</a></span> <a href="src/OpenSSL-Session.html#line-612" class="link">Source</a> <a href="#t:ShutdownType" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ShutdownType:Show:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="OpenSSL-Session.html#t:ShutdownType">ShutdownType</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="OpenSSL-Session.html#t:ShutdownType">ShutdownType</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="OpenSSL-Session.html#t:ShutdownType">ShutdownType</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:getPeerCertificate" class="def">getPeerCertificate</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="OpenSSL-X509.html#t:X509">X509</a>) <a href="src/OpenSSL-Session.html#getPeerCertificate" class="link">Source</a> <a href="#v:getPeerCertificate" class="selflink">#</a></p><div class="doc"><p>After a successful connection, get the certificate of the other party. If
   this is a server connection, you probably won't get a certificate unless
   you asked for it with contextSetVerificationMode</p></div></div><div class="top"><p class="src"><a id="v:getVerifyResult" class="def">getVerifyResult</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/OpenSSL-Session.html#getVerifyResult" class="link">Source</a> <a href="#v:getVerifyResult" class="selflink">#</a></p><div class="doc"><p>Get the result of verifing the peer's certificate. This is mostly for
   clients to verify the certificate of the server that they have connected
   it. You must set a list of root CA certificates with contextSetCA... for
   this to make sense.</p><p>Note that this returns True iff the peer's certificate has a valid chain
   to a root CA. You also need to check that the certificate is correct (i.e.
   has the correct hostname in it) with getPeerCertificate.</p></div></div><div class="top"><p class="src"><a id="v:sslSocket" class="def">sslSocket</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/libghc-network-doc/html/Network-Socket.html#t:Socket">Socket</a> <a href="src/OpenSSL-Session.html#sslSocket" class="link">Source</a> <a href="#v:sslSocket" class="selflink">#</a></p><div class="doc"><p>Get the socket underlying an SSL connection</p></div></div><div class="top"><p class="src"><a id="v:sslFd" class="def">sslFd</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-Posix-Types.html#t:Fd">Fd</a> <a href="src/OpenSSL-Session.html#sslFd" class="link">Source</a> <a href="#v:sslFd" class="selflink">#</a></p><div class="doc"><p>Get the underlying socket Fd</p></div></div><h1 id="g:3">Protocol Options</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:SSLOption" class="def">SSLOption</a> <a href="src/OpenSSL-SSL-Option.html#SSLOption" class="link">Source</a> <a href="#t:SSLOption" class="selflink">#</a></p><div class="doc"><p>The behaviour of the SSL library can be changed by setting
 several options. During a handshake, the option settings of the
 <code><a href="OpenSSL-Session.html#v:SSL">SSL</a></code> object are used. When a new
 <code><a href="OpenSSL-Session.html#v:SSL">SSL</a></code> object is created from a
 <code><a href="OpenSSL-Session.html#v:SSLContext">SSLContext</a></code>, the current option setting is
 copied. Changes to <code><a href="OpenSSL-Session.html#v:SSLContext">SSLContext</a></code> do not affect
 already created <code><a href="OpenSSL-Session.html#v:SSL">SSL</a></code> objects.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:SSL_OP_MICROSOFT_SESS_ID_BUG" class="def">SSL_OP_MICROSOFT_SESS_ID_BUG</a></td><td class="doc"><p>As of OpenSSL 1.0.0 this option has no effect.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_NETSCAPE_CHALLENGE_BUG" class="def">SSL_OP_NETSCAPE_CHALLENGE_BUG</a></td><td class="doc"><p>As of OpenSSL 1.0.0 this option has no effect.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG" class="def">SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG</a></td><td class="doc"><p>As of OpenSSL 0.9.8q and 1.0.0c, this option has no effect.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG" class="def">SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER" class="def">SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:SSL_OP_SAFARI_ECDHE_ECDSA_BUG" class="def">SSL_OP_SAFARI_ECDHE_ECDSA_BUG</a></td><td class="doc"><p>Don't prefer ECDHE-ECDSA ciphers when the client appears to
 be Safari on OS X. OS X 10.8..10.8.3 has broken support for
 ECDHE-ECDSA ciphers.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_SSLEAY_080_CLIENT_DH_BUG" class="def">SSL_OP_SSLEAY_080_CLIENT_DH_BUG</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:SSL_OP_TLS_D5_BUG" class="def">SSL_OP_TLS_D5_BUG</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:SSL_OP_TLS_BLOCK_PADDING_BUG" class="def">SSL_OP_TLS_BLOCK_PADDING_BUG</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS" class="def">SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS</a></td><td class="doc"><p>Disables a countermeasure against a SSL 3.0/TLS 1.0
 protocol vulnerability affecting CBC ciphers, which cannot be
 handled by some broken SSL implementations. This option has
 no effect for connections using other ciphers.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_TLSEXT_PADDING" class="def">SSL_OP_TLSEXT_PADDING</a></td><td class="doc"><p>Adds a padding extension to ensure the ClientHello size is
 never between 256 and 511 bytes in length. This is needed as
 a workaround for some implementations.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_ALL" class="def">SSL_OP_ALL</a></td><td class="doc"><p>All of the above bug workarounds.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_TLS_ROLLBACK_BUG" class="def">SSL_OP_TLS_ROLLBACK_BUG</a></td><td class="doc"><p>Disable version rollback attack detection.</p><p>During the client key exchange, the client must send the same
 information about acceptable SSL/TLS protocol levels as
 during the first hello. Some clients violate this rule by
 adapting to the server's answer. (Example: the client sends a
 SSLv2 hello and accepts up to SSLv3.1=TLSv1, the server only
 understands up to SSLv3. In this case the client must still
 use the same SSLv3.1=TLSv1 announcement. Some clients step
 down to SSLv3 with respect to the server's answer and violate
 the version rollback protection.)</p></td></tr><tr><td class="src"><a id="v:SSL_OP_SINGLE_DH_USE" class="def">SSL_OP_SINGLE_DH_USE</a></td><td class="doc"><p>Always create a new key when using temporary/ephemeral DH
 parameters. This option must be used to prevent small
 subgroup attacks, when the DH parameters were not generated
 using &quot;strong&quot; primes (e.g. when using DSA-parameters). If
 &quot;strong&quot; primes were used, it is not strictly necessary to
 generate a new DH key during each handshake but it is also
 recommended. <code><a href="OpenSSL-Session.html#v:SSL_OP_SINGLE_DH_USE">SSL_OP_SINGLE_DH_USE</a></code> should therefore be enabled
 whenever temporary/ephemeral DH parameters are used.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_EPHEMERAL_RSA" class="def">SSL_OP_EPHEMERAL_RSA</a></td><td class="doc"><p>Always use ephemeral (temporary) RSA key when doing RSA
 operations. According to the specifications this is only
 done, when a RSA key can only be used for signature
 operations (namely under export ciphers with restricted RSA
 keylength). By setting this option, ephemeral RSA keys are
 always used. This option breaks compatibility with the
 SSL/TLS specifications and may lead to interoperability
 problems with clients and should therefore never be
 used. Ciphers with DHE (ephemeral Diffie-Hellman) key
 exchange should be used instead.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_CIPHER_SERVER_PREFERENCE" class="def">SSL_OP_CIPHER_SERVER_PREFERENCE</a></td><td class="doc"><p>When choosing a cipher, use the server's preferences
 instead of the client preferences. When not set, the SSL
 server will always follow the clients preferences. When set,
 the SSLv3/TLSv1 server will choose following its own
 preferences. Because of the different protocol, for SSLv2 the
 server will send its list of preferences to the client and
 the client chooses.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_PKCS1_CHECK_1" class="def">SSL_OP_PKCS1_CHECK_1</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:SSL_OP_PKCS1_CHECK_2" class="def">SSL_OP_PKCS1_CHECK_2</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:SSL_OP_NETSCAPE_CA_DN_BUG" class="def">SSL_OP_NETSCAPE_CA_DN_BUG</a></td><td class="doc"><p>If we accept a netscape connection, demand a client cert,
 have a non-self-signed CA which does not have its CA in
 netscape, and the browser has a cert, it will
 crash/hang. Works for 3.x and 4.xbeta</p></td></tr><tr><td class="src"><a id="v:SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG" class="def">SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:SSL_OP_NO_SSLv2" class="def">SSL_OP_NO_SSLv2</a></td><td class="doc"><p>Do not use the SSLv2 protocol.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_NO_SSLv3" class="def">SSL_OP_NO_SSLv3</a></td><td class="doc"><p>Do not use the SSLv3 protocol.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_NO_TLSv1" class="def">SSL_OP_NO_TLSv1</a></td><td class="doc"><p>Do not use the TLSv1 protocol.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION" class="def">SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION</a></td><td class="doc"><p>When performing renegotiation as a server, always start a
 new session (i.e., session resumption requests are only
 accepted in the initial handshake). This option is not needed
 for clients.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_NO_TICKET" class="def">SSL_OP_NO_TICKET</a></td><td class="doc"><p>Normally clients and servers will, where possible,
 transparently make use of
 <a href="http://tools.ietf.org/html/rfc4507">RFC 4507</a> tickets for
 stateless session resumption.</p><p>If this option is set this functionality is disabled and
 tickets will not be used by clients or servers.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION" class="def">SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION</a></td><td class="doc"><p>Allow legacy insecure renegotiation between OpenSSL and
 unpatched clients or servers. See
 <a href="https://www.openssl.org/docs/ssl/SSL_CTX_set_options.html#secure_renegotiation">SECURE RENEGOTIATION</a>
 for more details.</p></td></tr><tr><td class="src"><a id="v:SSL_OP_LEGACY_SERVER_CONNECT" class="def">SSL_OP_LEGACY_SERVER_CONNECT</a></td><td class="doc"><p>Allow legacy insecure renegotiation between OpenSSL and
 unpatched servers _only_. See
 <a href="https://www.openssl.org/docs/ssl/SSL_CTX_set_options.html#secure_renegotiation">SECURE RENEGOTIATION</a>
 for more details.</p></td></tr></table></div><div class="subs instances"><p id="control.i:SSLOption" class="caption collapser" onclick="toggleSection('i:SSLOption')">Instances</p><div id="section.i:SSLOption" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SSLOption:Eq:1" class="instance expander" onclick="toggleSection('i:id:SSLOption:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a></span> <a href="src/OpenSSL-SSL-Option.html#line-139" class="link">Source</a> <a href="#t:SSLOption" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:SSLOption:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SSLOption:Ord:2" class="instance expander" onclick="toggleSection('i:id:SSLOption:Ord:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a></span> <a href="src/OpenSSL-SSL-Option.html#line-139" class="link">Source</a> <a href="#t:SSLOption" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:SSLOption:Ord:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> <a href="#v:min" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SSLOption:Show:3" class="instance expander" onclick="toggleSection('i:id:SSLOption:Show:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a></span> <a href="src/OpenSSL-SSL-Option.html#line-139" class="link">Source</a> <a href="#t:SSLOption" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:SSLOption:Show:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="OpenSSL-Session.html#t:SSLOption">SSLOption</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><h1 id="g:4">SSL Exceptions</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:SomeSSLException" class="def">SomeSSLException</a> <a href="src/OpenSSL-Session.html#SomeSSLException" class="link">Source</a> <a href="#t:SomeSSLException" class="selflink">#</a></p><div class="doc"><p>The root exception type for all SSL exceptions.</p></div><div class="subs instances"><p id="control.i:SomeSSLException" class="caption collapser" onclick="toggleSection('i:SomeSSLException')">Instances</p><div id="section.i:SomeSSLException" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SomeSSLException:Show:1" class="instance expander" onclick="toggleSection('i:id:SomeSSLException:Show:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="OpenSSL-Session.html#t:SomeSSLException">SomeSSLException</a></span> <a href="src/OpenSSL-Session.html#line-702" class="link">Source</a> <a href="#t:SomeSSLException" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:SomeSSLException:Show:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="OpenSSL-Session.html#t:SomeSSLException">SomeSSLException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="OpenSSL-Session.html#t:SomeSSLException">SomeSSLException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="OpenSSL-Session.html#t:SomeSSLException">SomeSSLException</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SomeSSLException:Exception:2" class="instance expander" onclick="toggleSection('i:id:SomeSSLException:Exception:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:Exception">Exception</a> <a href="OpenSSL-Session.html#t:SomeSSLException">SomeSSLException</a></span> <a href="src/OpenSSL-Session.html#line-705" class="link">Source</a> <a href="#t:SomeSSLException" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:SomeSSLException:Exception:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toException">toException</a> :: <a href="OpenSSL-Session.html#t:SomeSSLException">SomeSSLException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a> <a href="#v:toException" class="selflink">#</a></p><p class="src"><a href="#v:fromException">fromException</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="OpenSSL-Session.html#t:SomeSSLException">SomeSSLException</a> <a href="#v:fromException" class="selflink">#</a></p><p class="src"><a href="#v:displayException">displayException</a> :: <a href="OpenSSL-Session.html#t:SomeSSLException">SomeSSLException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:displayException" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:ConnectionAbruptlyTerminated" class="def">ConnectionAbruptlyTerminated</a> <a href="src/OpenSSL-Session.html#ConnectionAbruptlyTerminated" class="link">Source</a> <a href="#t:ConnectionAbruptlyTerminated" class="selflink">#</a></p><div class="doc"><p>The peer uncleanly terminated the connection without sending the
 &quot;close notify&quot; alert.</p></div><div class="subs instances"><p id="control.i:ConnectionAbruptlyTerminated" class="caption collapser" onclick="toggleSection('i:ConnectionAbruptlyTerminated')">Instances</p><div id="section.i:ConnectionAbruptlyTerminated" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ConnectionAbruptlyTerminated:Eq:1" class="instance expander" onclick="toggleSection('i:id:ConnectionAbruptlyTerminated:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="OpenSSL-Session.html#t:ConnectionAbruptlyTerminated">ConnectionAbruptlyTerminated</a></span> <a href="src/OpenSSL-Session.html#line-719" class="link">Source</a> <a href="#t:ConnectionAbruptlyTerminated" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ConnectionAbruptlyTerminated:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="OpenSSL-Session.html#t:ConnectionAbruptlyTerminated">ConnectionAbruptlyTerminated</a> -&gt; <a href="OpenSSL-Session.html#t:ConnectionAbruptlyTerminated">ConnectionAbruptlyTerminated</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="OpenSSL-Session.html#t:ConnectionAbruptlyTerminated">ConnectionAbruptlyTerminated</a> -&gt; <a href="OpenSSL-Session.html#t:ConnectionAbruptlyTerminated">ConnectionAbruptlyTerminated</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ConnectionAbruptlyTerminated:Show:2" class="instance expander" onclick="toggleSection('i:id:ConnectionAbruptlyTerminated:Show:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="OpenSSL-Session.html#t:ConnectionAbruptlyTerminated">ConnectionAbruptlyTerminated</a></span> <a href="src/OpenSSL-Session.html#line-719" class="link">Source</a> <a href="#t:ConnectionAbruptlyTerminated" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ConnectionAbruptlyTerminated:Show:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="OpenSSL-Session.html#t:ConnectionAbruptlyTerminated">ConnectionAbruptlyTerminated</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="OpenSSL-Session.html#t:ConnectionAbruptlyTerminated">ConnectionAbruptlyTerminated</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="OpenSSL-Session.html#t:ConnectionAbruptlyTerminated">ConnectionAbruptlyTerminated</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ConnectionAbruptlyTerminated:Exception:3" class="instance expander" onclick="toggleSection('i:id:ConnectionAbruptlyTerminated:Exception:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:Exception">Exception</a> <a href="OpenSSL-Session.html#t:ConnectionAbruptlyTerminated">ConnectionAbruptlyTerminated</a></span> <a href="src/OpenSSL-Session.html#line-721" class="link">Source</a> <a href="#t:ConnectionAbruptlyTerminated" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ConnectionAbruptlyTerminated:Exception:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toException">toException</a> :: <a href="OpenSSL-Session.html#t:ConnectionAbruptlyTerminated">ConnectionAbruptlyTerminated</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a> <a href="#v:toException" class="selflink">#</a></p><p class="src"><a href="#v:fromException">fromException</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="OpenSSL-Session.html#t:ConnectionAbruptlyTerminated">ConnectionAbruptlyTerminated</a> <a href="#v:fromException" class="selflink">#</a></p><p class="src"><a href="#v:displayException">displayException</a> :: <a href="OpenSSL-Session.html#t:ConnectionAbruptlyTerminated">ConnectionAbruptlyTerminated</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:displayException" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:ProtocolError" class="def">ProtocolError</a> <a href="src/OpenSSL-Session.html#ProtocolError" class="link">Source</a> <a href="#t:ProtocolError" class="selflink">#</a></p><div class="doc"><p>A failure in the SSL library occurred, usually a protocol
 error.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:ProtocolError" class="def">ProtocolError</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:ProtocolError" class="caption collapser" onclick="toggleSection('i:ProtocolError')">Instances</p><div id="section.i:ProtocolError" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ProtocolError:Eq:1" class="instance expander" onclick="toggleSection('i:id:ProtocolError:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="OpenSSL-Session.html#t:ProtocolError">ProtocolError</a></span> <a href="src/OpenSSL-Session.html#line-729" class="link">Source</a> <a href="#t:ProtocolError" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ProtocolError:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="OpenSSL-Session.html#t:ProtocolError">ProtocolError</a> -&gt; <a href="OpenSSL-Session.html#t:ProtocolError">ProtocolError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="OpenSSL-Session.html#t:ProtocolError">ProtocolError</a> -&gt; <a href="OpenSSL-Session.html#t:ProtocolError">ProtocolError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ProtocolError:Show:2" class="instance expander" onclick="toggleSection('i:id:ProtocolError:Show:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="OpenSSL-Session.html#t:ProtocolError">ProtocolError</a></span> <a href="src/OpenSSL-Session.html#line-729" class="link">Source</a> <a href="#t:ProtocolError" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ProtocolError:Show:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="OpenSSL-Session.html#t:ProtocolError">ProtocolError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="OpenSSL-Session.html#t:ProtocolError">ProtocolError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="OpenSSL-Session.html#t:ProtocolError">ProtocolError</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ProtocolError:Exception:3" class="instance expander" onclick="toggleSection('i:id:ProtocolError:Exception:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:Exception">Exception</a> <a href="OpenSSL-Session.html#t:ProtocolError">ProtocolError</a></span> <a href="src/OpenSSL-Session.html#line-731" class="link">Source</a> <a href="#t:ProtocolError" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ProtocolError:Exception:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toException">toException</a> :: <a href="OpenSSL-Session.html#t:ProtocolError">ProtocolError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a> <a href="#v:toException" class="selflink">#</a></p><p class="src"><a href="#v:fromException">fromException</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="OpenSSL-Session.html#t:ProtocolError">ProtocolError</a> <a href="#v:fromException" class="selflink">#</a></p><p class="src"><a href="#v:displayException">displayException</a> :: <a href="OpenSSL-Session.html#t:ProtocolError">ProtocolError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:displayException" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><h1 id="g:5">Direct access to OpenSSL objects</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:SSLContext_" class="def">SSLContext_</a> <a href="src/OpenSSL-Session.html#SSLContext_" class="link">Source</a> <a href="#t:SSLContext_" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:withContext" class="def">withContext</a> :: <a href="OpenSSL-Session.html#t:SSLContext">SSLContext</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Foreign-Ptr.html#t:Ptr">Ptr</a> <a href="OpenSSL-Session.html#t:SSLContext_">SSLContext_</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a <a href="src/OpenSSL-Session.html#withContext" class="link">Source</a> <a href="#v:withContext" class="selflink">#</a></p><div class="doc"><p>Run the given action with the raw context pointer and obtain the lock
   while doing so.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:SSL_" class="def">SSL_</a> <a href="src/OpenSSL-Session.html#SSL_" class="link">Source</a> <a href="#t:SSL_" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:withSSL" class="def">withSSL</a> :: <a href="OpenSSL-Session.html#t:SSL">SSL</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Foreign-Ptr.html#t:Ptr">Ptr</a> <a href="OpenSSL-Session.html#t:SSL_">SSL_</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a <a href="src/OpenSSL-Session.html#withSSL" class="link">Source</a> <a href="#v:withSSL" class="selflink">#</a></p><div class="doc"><p>Run continuation with exclusive access to the underlying SSL object.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>