/usr/share/doc/racket/openssl/index.html is in racket-doc 6.3-1.
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 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>OpenSSL: Secure Communication</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">►</a></td><td></td><td><a href="" class="tocviewselflink" data-pltdoc="x">Open<span class="mywbr"> </span>SSL:<span class="mywbr"> </span> Secure Communication</a></td></tr></table></div><div class="tocviewsublistonly" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="#%28part._.T.C.P-like_.Client_.Procedures%29" class="tocviewlink" data-pltdoc="x">TCP-<wbr></wbr>like Client Procedures</a></td></tr><tr><td align="right">2 </td><td><a href="#%28part._.T.C.P-like_.Server_.Procedures%29" class="tocviewlink" data-pltdoc="x">TCP-<wbr></wbr>like Server Procedures</a></td></tr><tr><td align="right">3 </td><td><a href="#%28part._.S.S.L-wrapper_.Interface%29" class="tocviewlink" data-pltdoc="x">SSL-<wbr></wbr>wrapper Interface</a></td></tr><tr><td align="right">4 </td><td><a href="#%28part._cert-procs%29" class="tocviewlink" data-pltdoc="x">Context Procedures</a></td></tr><tr><td align="right">5 </td><td><a href="#%28part._peer-verif%29" class="tocviewlink" data-pltdoc="x">Peer Verification</a></td></tr><tr><td align="right">6 </td><td><a href="#%28part._.S.H.A-1_.Hashing%29" class="tocviewlink" data-pltdoc="x">SHA-<wbr></wbr>1 Hashing</a></td></tr><tr><td align="right">7 </td><td><a href="#%28part._.M.D5_.Hashing%29" class="tocviewlink" data-pltdoc="x">MD5 Hashing</a></td></tr><tr><td align="right">8 </td><td><a href="#%28part._libcrypto%29" class="tocviewlink" data-pltdoc="x">The <span class="stt">"libcrypto"</span> Shared Library</a></td></tr><tr><td align="right">9 </td><td><a href="#%28part._libssl%29" class="tocviewlink" data-pltdoc="x">The <span class="stt">"libssl"</span> Shared Library</a></td></tr></table></div></div></div><div class="tocsub"><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber"></span><a href="#%28part._top%29" class="tocsubseclink" data-pltdoc="x">Open<span class="mywbr"> </span>SSL:<span class="mywbr"> </span> Secure Communication</a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-available~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>available?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-fail-reason%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>load-<wbr></wbr>fail-<wbr></wbr>reason</span></span></a></td></tr><tr><td><span class="tocsublinknumber">1<tt> </tt></span><a href="#%28part._.T.C.P-like_.Client_.Procedures%29" class="tocsubseclink" data-pltdoc="x">TCP-<wbr></wbr>like Client Procedures</a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>connect</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%2Fenable-break%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>connect/<span class="mywbr"> </span>enable-<wbr></wbr>break</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-secure-client-context%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>secure-<wbr></wbr>client-<wbr></wbr>context</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-client-context%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>make-<wbr></wbr>client-<wbr></wbr>context</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._supported-client-protocols%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">supported-<wbr></wbr>client-<wbr></wbr>protocols</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>client-<wbr></wbr>context?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-max-client-protocol%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>max-<wbr></wbr>client-<wbr></wbr>protocol</span></span></a></td></tr><tr><td><span class="tocsublinknumber">2<tt> </tt></span><a href="#%28part._.T.C.P-like_.Server_.Procedures%29" class="tocsubseclink" data-pltdoc="x">TCP-<wbr></wbr>like Server Procedures</a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listen%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>listen</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-close%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>close</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listener~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>listener?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-accept%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>accept</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-accept%2Fenable-break%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>accept/<span class="mywbr"> </span>enable-<wbr></wbr>break</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-abandon-port%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>abandon-<wbr></wbr>port</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-addresses%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>addresses</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-port~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>port?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-server-context%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>make-<wbr></wbr>server-<wbr></wbr>context</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>server-<wbr></wbr>context?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._supported-server-protocols%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">supported-<wbr></wbr>server-<wbr></wbr>protocols</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-max-server-protocol%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>max-<wbr></wbr>server-<wbr></wbr>protocol</span></span></a></td></tr><tr><td><span class="tocsublinknumber">3<tt> </tt></span><a href="#%28part._.S.S.L-wrapper_.Interface%29" class="tocsubseclink" data-pltdoc="x">SSL-<wbr></wbr>wrapper Interface</a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ports-~3essl-ports%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ports-<wbr></wbr>>ssl-<wbr></wbr>ports</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4<tt> </tt></span><a href="#%28part._cert-procs%29" class="tocsubseclink" data-pltdoc="x">Context Procedures</a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-verify-source%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>load-<wbr></wbr>verify-<wbr></wbr>source!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-default-verify-sources%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>default-<wbr></wbr>verify-<wbr></wbr>sources</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-default-verify-sources%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>load-<wbr></wbr>default-<wbr></wbr>verify-<wbr></wbr>sources!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-verify-root-certificates%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>load-<wbr></wbr>verify-<wbr></wbr>root-<wbr></wbr>certificates!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-ciphers%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>set-<wbr></wbr>ciphers!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-seal-context%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>seal-<wbr></wbr>context!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-certificate-chain%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>load-<wbr></wbr>certificate-<wbr></wbr>chain!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-private-key%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>load-<wbr></wbr>private-<wbr></wbr>key!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-suggested-certificate-authorities%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>load-<wbr></wbr>suggested-<wbr></wbr>certificate-<wbr></wbr>authorities!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context-enable-dhe%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>server-<wbr></wbr>context-<wbr></wbr>enable-<wbr></wbr>dhe!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context-enable-ecdhe%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>server-<wbr></wbr>context-<wbr></wbr>enable-<wbr></wbr>ecdhe!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-dh4096-param-path%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>dh4096-<wbr></wbr>param-<wbr></wbr>path</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-server-name-identification-callback%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>set-<wbr></wbr>server-<wbr></wbr>name-<wbr></wbr>identification-<wbr></wbr>callback!</span></span></a></td></tr><tr><td><span class="tocsublinknumber">5<tt> </tt></span><a href="#%28part._peer-verif%29" class="tocsubseclink" data-pltdoc="x">Peer Verification</a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-verify%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>set-<wbr></wbr>verify!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-try-verify%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>try-<wbr></wbr>verify!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-peer-verified~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>peer-<wbr></wbr>verified?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-verify-hostname%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>set-<wbr></wbr>verify-<wbr></wbr>hostname!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-peer-certificate-hostnames%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>peer-<wbr></wbr>certificate-<wbr></wbr>hostnames</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-peer-check-hostname%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>peer-<wbr></wbr>check-<wbr></wbr>hostname</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-peer-subject-name%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>peer-<wbr></wbr>subject-<wbr></wbr>name</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-peer-issuer-name%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ssl-<wbr></wbr>peer-<wbr></wbr>issuer-<wbr></wbr>name</span></span></a></td></tr><tr><td><span class="tocsublinknumber">6<tt> </tt></span><a href="#%28part._.S.H.A-1_.Hashing%29" class="tocsubseclink" data-pltdoc="x">SHA-<wbr></wbr>1 Hashing</a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fsha1..rkt%29._sha1%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">sha1</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fsha1..rkt%29._sha1-bytes%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">sha1-<wbr></wbr>bytes</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fsha1..rkt%29._bytes-~3ehex-string%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>>hex-<wbr></wbr>string</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fsha1..rkt%29._hex-string-~3ebytes%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hex-<wbr></wbr>string-<wbr></wbr>>bytes</span></span></a></td></tr><tr><td><span class="tocsublinknumber">7<tt> </tt></span><a href="#%28part._.M.D5_.Hashing%29" class="tocsubseclink" data-pltdoc="x">MD5 Hashing</a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmd5..rkt%29._md5%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">md5</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Fmd5..rkt%29._md5-bytes%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">md5-<wbr></wbr>bytes</span></span></a></td></tr><tr><td><span class="tocsublinknumber">8<tt> </tt></span><a href="#%28part._libcrypto%29" class="tocsubseclink" data-pltdoc="x">The <span class="stt">"libcrypto"</span> Shared Library</a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Flibcrypto..rkt%29._libcrypto%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">libcrypto</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Flibcrypto..rkt%29._libcrypto-load-fail-reason%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">libcrypto-<wbr></wbr>load-<wbr></wbr>fail-<wbr></wbr>reason</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Flibcrypto..rkt%29._openssl-lib-versions%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">openssl-<wbr></wbr>lib-<wbr></wbr>versions</span></span></a></td></tr><tr><td><span class="tocsublinknumber">9<tt> </tt></span><a href="#%28part._libssl%29" class="tocsubseclink" data-pltdoc="x">The <span class="stt">"libssl"</span> Shared Library</a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Flibssl..rkt%29._libssl%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">libssl</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._openssl%2Flibssl..rkt%29._libssl-load-fail-reason%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">libssl-<wbr></wbr>load-<wbr></wbr>fail-<wbr></wbr>reason</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">6.3</span></div><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.3", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.3");">top</a></span><span class="navright"> <span class="nonavigation">← prev</span> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.3");">up</a> <span class="nonavigation">next →</span></span> </div><h2 x-source-module="(lib "openssl/openssl.scrbl")" x-source-pkg="racket-doc" x-part-tag=""top""><a name="(part._top)"></a><a name="(part._.Open.S.S.L__.Secure_.Communication)"></a><a name="(mod-path._openssl)"></a>OpenSSL: Secure Communication</h2><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">openssl</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></p><p>The <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">openssl</span></a> library provides glue for the OpenSSL
library with the Racket port system. It provides functions nearly
identically to the standard TCP subsystem in Racket, plus a
generic <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ports-~3essl-ports%29%29" class="RktValLink" data-pltdoc="x">ports->ssl-ports</a></span> interface.</p><p>To use this library, you will need OpenSSL installed on your machine,
but on many platforms the necessary libraries are included with the OS
or with the Racket distribution. In particular:</p><ul><li><p>For Windows, <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">openssl</span></a> depends on
<span class="stt">"libeay32.dll"</span> and <span class="stt">"ssleay32.dll"</span>, which are
included in the Racket distribution for Windows.</p></li><li><p>For Mac OS X, <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">openssl</span></a> depends on
<span class="stt">"libssl.dylib"</span> and <span class="stt">"libcrypto.dylib"</span>, which are
provided by Mac OS X 10.2 and later.</p></li><li><p>For Unix, <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">openssl</span></a> depends on
<span class="stt">"libssl.so"</span> and <span class="stt">"libcrypto.so"</span>, which must be
installed in a standard library location or in a directory listed by
<span class="stt">LD_LIBRARY_PATH</span>. These libraries are included in many OS
distributions.</p></li></ul><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._openssl/main..rkt)._ssl-available~3f))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-available~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-available?</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">A boolean value that reports whether the system OpenSSL library was
successfully loaded. Calling <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%29%29" class="RktValLink" data-pltdoc="x">ssl-connect</a></span>, etc<span class="Sendabbrev">.</span> when this
value is <span class="RktVal">#f</span> (library not loaded) will raise an exception.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._openssl/main..rkt)._ssl-load-fail-reason))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-fail-reason%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-load-fail-reason</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Either <span class="RktVal">#f</span> (when <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-available~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-available?</a></span> is <span class="RktVal">#t</span>) or an
error string (when <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-available~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-available?</a></span> is <span class="RktVal">#f</span>).</div></p><h3 x-source-module="(lib "openssl/openssl.scrbl")" x-source-pkg="racket-doc" x-part-tag=""TCP-like_Client_Procedures"">1<tt> </tt><a name="(part._.T.C.P-like_.Client_.Procedures)"></a>TCP-like Client Procedures</h3><p>Use <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%29%29" class="RktValLink" data-pltdoc="x">ssl-connect</a></span> or <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%2Fenable-break%29%29" class="RktValLink" data-pltdoc="x">ssl-connect/enable-break</a></span> to
create an SSL connection over TCP. To create a secure connection,
supply the result of <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-secure-client-context%29%29" class="RktValLink" data-pltdoc="x">ssl-secure-client-context</a></span> or create a
client context with <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-client-context%29%29" class="RktValLink" data-pltdoc="x">ssl-make-client-context</a></span> and configure it
using the functions described in <a href="#%28part._cert-procs%29" data-pltdoc="x">Context Procedures</a>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-connect))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-connect</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">hostname</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">port-no</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span>[</td><td valign="top"><span class="RktVar">client-protocol</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0"><tr><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td><td><span class="hspace"> </span></td><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._output-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">output-port?</a></span></td></tr></table></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">hostname</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">port-no</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._integer-in%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">65535</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">client-protocol</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-client-context?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">auto</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2-or-v3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls11</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls12</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">=</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVal">'</span><span class="RktVal">auto</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Connect to the host given by <span class="RktVar">hostname</span>, on the port given by
<span class="RktVar">port-no</span>. This connection will be encrypted using SSL. The
return values are as for <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=tcp.html%23%2528def._%2528%2528lib._racket%252Ftcp..rkt%2529._tcp-connect%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">tcp-connect</a></span>: an input port and an
output port.</div></p><p>The optional <span class="RktVar">client-protocol</span> argument determines which
encryption protocol is used, whether the server’s certificate is
checked, etc. The argument can be either a client context created by
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-client-context%29%29" class="RktValLink" data-pltdoc="x">ssl-make-client-context</a></span> a symbol specifying the protocol to
use; see <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-client-context%29%29" class="RktValLink" data-pltdoc="x">ssl-make-client-context</a></span> for further details,
including the meanings of the protocol symbols.</p><p>Closing the resulting output port does not send a shutdown message to
the server. See also <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ports-~3essl-ports%29%29" class="RktValLink" data-pltdoc="x">ports->ssl-ports</a></span>.</p><p>If hostname verification is enabled (see
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-verify-hostname%21%29%29" class="RktValLink" data-pltdoc="x">ssl-set-verify-hostname!</a></span>), the peer’s certificate is checked
against <span class="RktVar">hostname</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-connect/enable-break))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%2Fenable-break%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-connect/enable-break</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">hostname</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">port-no</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span>[</td><td valign="top"><span class="RktVar">client-protocol</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0"><tr><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td><td><span class="hspace"> </span></td><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._output-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">output-port?</a></span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">hostname</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">port-no</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._integer-in%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">65535</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">client-protocol</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-client-context?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">auto</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2-or-v3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls11</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls12</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">=</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVal">'</span><span class="RktVal">auto</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%29%29" class="RktValLink" data-pltdoc="x">ssl-connect</a></span>, but breaking is enabled while trying to
connect.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-secure-client-context))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-secure-client-context%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-secure-client-context</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-client-context?</a></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Returns a client context that verifies certificates using the default
verification sources from <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-default-verify-sources%29%29" class="RktValLink" data-pltdoc="x">ssl-default-verify-sources</a></span><span class="RktPn">)</span>,
verifies hostnames, and avoids using weak ciphers. The result is
essentially equivalent to the following:</div></p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">let</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">ctx</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-client-context%29%29" class="RktValLink" data-pltdoc="x">ssl-make-client-context</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">auto</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktCmt">;</span><span class="RktCmt"> </span><span class="RktCmt">Load default verification sources (root certificates)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-default-verify-sources%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-default-verify-sources!</a></span><span class="hspace"> </span><span class="RktSym">ctx</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktCmt">;</span><span class="RktCmt"> </span><span class="RktCmt">Require certificate verification</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-verify%21%29%29" class="RktValLink" data-pltdoc="x">ssl-set-verify!</a></span><span class="hspace"> </span><span class="RktSym">ctx</span><span class="hspace"> </span><span class="RktVal">#t</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktCmt">;</span><span class="RktCmt"> </span><span class="RktCmt">Require hostname verification</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-verify-hostname%21%29%29" class="RktValLink" data-pltdoc="x">ssl-set-verify-hostname!</a></span><span class="hspace"> </span><span class="RktSym">ctx</span><span class="hspace"> </span><span class="RktVal">#t</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktCmt">;</span><span class="RktCmt"> </span><span class="RktCmt">No weak cipher suites</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-ciphers%21%29%29" class="RktValLink" data-pltdoc="x">ssl-set-ciphers!</a></span><span class="hspace"> </span><span class="RktSym">ctx</span><span class="hspace"> </span><span class="RktVal">"DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2"</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktCmt">;</span><span class="RktCmt"> </span><span class="RktCmt">Seal context so further changes cannot weaken it</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-seal-context%21%29%29" class="RktValLink" data-pltdoc="x">ssl-seal-context!</a></span><span class="hspace"> </span><span class="RktSym">ctx</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">ctx</span><span class="RktPn">)</span></td></tr></table></blockquote><p>The context is cached, so different calls to
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-secure-client-context%29%29" class="RktValLink" data-pltdoc="x">ssl-secure-client-context</a></span> return the same context unless
<span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-default-verify-sources%29%29" class="RktValLink" data-pltdoc="x">ssl-default-verify-sources</a></span><span class="RktPn">)</span> has changed.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-make-client-context))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-client-context%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-make-client-context</a></span></span><span class="hspace"> </span>[<span class="RktVar">protocol</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-client-context?</a></span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">protocol</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">auto</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2-or-v3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls11</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls12</span><span class="RktPn">)</span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">=</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVal">'</span><span class="RktVal">auto</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Creates a context to be supplied to <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%29%29" class="RktValLink" data-pltdoc="x">ssl-connect</a></span>. The context
is <span style="font-weight: bold">insecure</span> unless additional steps are taken; see
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-secure-client-context%29%29" class="RktValLink" data-pltdoc="x">ssl-secure-client-context</a></span> for details.</div></p><p>The client context identifies a communication protocol (as selected by
<span class="RktVar">protocol</span>), and also holds certificate information (i.e., the
client’s identity, its trusted certificate authorities, etc.). See the
section <a href="#%28part._cert-procs%29" data-pltdoc="x">Context Procedures</a> below for more information on
certificates.</p><p><div class="SIntrapara">The <span class="RktVar">protocol</span> should be one of the following:
</div><div class="SIntrapara"><ul><li><p><span class="RktVal">'</span><span class="RktVal">auto</span> : Automatically negotiates the protocol version
from those that this library considers sufficiently secure—<wbr></wbr>currently
TLS versions 1.0 and higher, but subject to change.</p></li><li><p><span class="RktVal">'</span><span class="RktVal">tls</span> : Only TLS protocol version 1.0.</p></li><li><p><span class="RktVal">'</span><span class="RktVal">tls11</span> : Only TLS protocol version 1.1.</p></li><li><p><span class="RktVal">'</span><span class="RktVal">tls12</span> : Only TLS protocol version 1.2.</p></li></ul></div><div class="SIntrapara">The following <span class="RktVar">protocol</span> symbols are deprecated but still supported:
</div><div class="SIntrapara"><ul><li><p><span class="RktVal">'</span><span class="RktVal">sslv2-or-v3</span> : Alias for <span class="RktVal">'</span><span class="RktVal">auto</span>. Note that
despite the name, neither SSL 2.0 nor 3.0 are considered sufficiently
secure, so this <span class="RktVar">protocol</span> no longer allows either of them.</p></li><li><p><span class="RktVal">'</span><span class="RktVal">sslv2</span> : SSL protocol version 2.0. <span style="font-weight: bold">Insecure.</span>
Note that SSL 2.0 support has been removed from many platforms.</p></li><li><p><span class="RktVal">'</span><span class="RktVal">sslv3</span> : SSL protocol version 3.0. <span style="font-weight: bold">Insecure.</span></p></li></ul></div></p><p>Not all protocol versions are supported by all servers. The
<span class="RktVal">'</span><span class="RktVal">auto</span> option offers broad compatibility at a reasonable level
of security. Note that the security of connections depends on more
than the protocol version; see <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-secure-client-context%29%29" class="RktValLink" data-pltdoc="x">ssl-secure-client-context</a></span> for
details.</p><p>Not all protocol versions are available on all platforms. See also
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._supported-client-protocols%29%29" class="RktValLink" data-pltdoc="x">supported-client-protocols</a></span> and
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._supported-server-protocols%29%29" class="RktValLink" data-pltdoc="x">supported-server-protocols</a></span>.</p><p class="SHistory">Changed in version 6.1 of package <span class="stt">base</span>: Added <span class="RktVal">'</span><span class="RktVal">tls11</span> and <span class="RktVal">'</span><span class="RktVal">tls12</span>. Changed in version 6.1.1.3: Default to new <span class="RktVal">'</span><span class="RktVal">auto</span> and disabled SSL
2.0 and 3.0 by default.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._supported-client-protocols))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._supported-client-protocols%29%29" class="RktValDef RktValLink" data-pltdoc="x">supported-client-protocols</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">auto</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2-or-v3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls11</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls12</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a list of symbols representing protocols that are supported
for clients on the current platform.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-client-context~3f))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-client-context?</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a value produced by
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-client-context%29%29" class="RktValLink" data-pltdoc="x">ssl-make-client-context</a></span>, <span class="RktVal">#f</span> otherwise.</div></p><p class="SHistory">Added in version 6.0.1.3 of package <span class="stt">base</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-max-client-protocol))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-max-client-protocol%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-max-client-protocol</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2</span><span class="hspace"> </span><span class="RktSym">sslv3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls11</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls12</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the most recent SSL/TLS protocol version supported by the
current platform for client connections.</div></p><p class="SHistory">Added in version 6.1.1.3 of package <span class="stt">base</span>.</p><h3 x-source-module="(lib "openssl/openssl.scrbl")" x-source-pkg="racket-doc" x-part-tag=""TCP-like_Server_Procedures"">2<tt> </tt><a name="(part._.T.C.P-like_.Server_.Procedures)"></a>TCP-like Server Procedures</h3><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-listen))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listen%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-listen</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">port-no</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span>[</td><td valign="top"><span class="RktVar">queue-k</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">reuse?</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">hostname-or-#f</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">server-protocol</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listener~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-listener?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">port-no</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._integer-in%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">65535</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">queue-k</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">5</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">reuse?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">hostname-or-#f</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">server-protocol</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">auto</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2-or-v3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls11</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls12</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">=</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVal">'</span><span class="RktVal">auto</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=tcp.html%23%2528def._%2528%2528lib._racket%252Ftcp..rkt%2529._tcp-listen%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">tcp-listen</a></span>, but the result is an SSL listener. The extra optional
<span class="RktVar">server-protocol</span> is as for <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%29%29" class="RktValLink" data-pltdoc="x">ssl-connect</a></span>, except that a
context must be a server context instead of a client context.</div></p><p>Call <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-certificate-chain%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-certificate-chain!</a></span> and
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-private-key%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-private-key!</a></span> to avoid a <span style="font-style: italic">no shared cipher</span>
error on accepting connections. The file <span class="stt">"test.pem"</span> in the
<span class="stt">"openssl"</span> collection is a suitable argument for both calls
when testing. Since <span class="stt">"test.pem"</span> is public, however, such a
test configuration obviously provides no security.</p><p>An SSL listener is a synchronizable value (see <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=sync.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._sync%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">sync</a></span>). It is
ready—<wbr></wbr>with itself as its value—<wbr></wbr>when the underlying TCP listener is
ready. At that point, however, accepting a connection with
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-accept%29%29" class="RktValLink" data-pltdoc="x">ssl-accept</a></span> may not complete immediately, because
further communication is needed to establish the connection.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-close))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-close%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-close</a></span></span><span class="hspace"> </span><span class="RktVar">listener</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">listener</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listener~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-listener?</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-listener~3f))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listener~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-listener?</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Analogous to <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=tcp.html%23%2528def._%2528%2528lib._racket%252Ftcp..rkt%2529._tcp-close%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">tcp-close</a></span> and <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=tcp.html%23%2528def._%2528%2528lib._racket%252Ftcp..rkt%2529._tcp-listener%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">tcp-listener?</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-accept))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-accept%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-accept</a></span></span><span class="hspace"> </span><span class="RktVar">listener</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0"><tr><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td><td><span class="hspace"> </span></td><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._output-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">output-port?</a></span></td></tr></table></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">listener</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listener~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-listener?</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-accept/enable-break))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-accept%2Fenable-break%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-accept/enable-break</a></span></span><span class="hspace"> </span><span class="RktVar">listener</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0"><tr><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td><td><span class="hspace"> </span></td><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._output-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">output-port?</a></span></td></tr></table></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">listener</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listener~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-listener?</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Analogous to <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=tcp.html%23%2528def._%2528%2528lib._racket%252Ftcp..rkt%2529._tcp-accept%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">tcp-accept</a></span>.</div></p><p>Closing the resulting output port does not send a shutdown message to
the client. See also <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ports-~3essl-ports%29%29" class="RktValLink" data-pltdoc="x">ports->ssl-ports</a></span>.</p><p>See also <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%29%29" class="RktValLink" data-pltdoc="x">ssl-connect</a></span> about the limitations of reading and
writing to an SSL connection (i.e., one direction at a time).</p><p>The <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-accept%2Fenable-break%29%29" class="RktValLink" data-pltdoc="x">ssl-accept/enable-break</a></span> procedure is analogous to
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=tcp.html%23%2528def._%2528%2528lib._racket%252Ftcp..rkt%2529._tcp-accept%252Fenable-break%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">tcp-accept/enable-break</a></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-abandon-port))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-abandon-port%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-abandon-port</a></span></span><span class="hspace"> </span><span class="RktVar">p</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">p</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-port~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-port?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Analogous to <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=tcp.html%23%2528def._%2528%2528lib._racket%252Ftcp..rkt%2529._tcp-abandon-port%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">tcp-abandon-port</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-addresses))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-addresses%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-addresses</a></span></span><span class="hspace"> </span><span class="RktVar">p</span><span class="hspace"> </span>[<span class="RktVar">port-numbers?</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">p</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-port~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-port?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listener~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-listener?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">port-numbers?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Analogous to <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=tcp.html%23%2528def._%2528%2528lib._racket%252Ftcp..rkt%2529._tcp-addresses%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">tcp-addresses</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-port~3f))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-port~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-port?</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> of <span class="RktVar">v</span> is an SSL port produced by
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%29%29" class="RktValLink" data-pltdoc="x">ssl-connect</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%2Fenable-break%29%29" class="RktValLink" data-pltdoc="x">ssl-connect/enable-break</a></span>,
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-accept%29%29" class="RktValLink" data-pltdoc="x">ssl-accept</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-accept%2Fenable-break%29%29" class="RktValLink" data-pltdoc="x">ssl-accept/enable-break</a></span>, or
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ports-~3essl-ports%29%29" class="RktValLink" data-pltdoc="x">ports->ssl-ports</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-make-server-context))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-server-context%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-make-server-context</a></span></span><span class="hspace"> </span>[<span class="RktVar">protocol</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">protocol</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">auto</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2-or-v3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls11</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls12</span><span class="RktPn">)</span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">=</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVal">'</span><span class="RktVal">auto</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-client-context%29%29" class="RktValLink" data-pltdoc="x">ssl-make-client-context</a></span>, but creates a server context.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-server-context~3f))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-server-context?</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a value produced by
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-server-context%29%29" class="RktValLink" data-pltdoc="x">ssl-make-server-context</a></span>, <span class="RktVal">#f</span> otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._supported-server-protocols))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._supported-server-protocols%29%29" class="RktValDef RktValLink" data-pltdoc="x">supported-server-protocols</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">auto</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2-or-v3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls11</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls12</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a list of symbols representing protocols that are supported
for servers on the current platform.</div></p><p class="SHistory">Added in version 6.0.1.3 of package <span class="stt">base</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-max-server-protocol))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-max-server-protocol%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-max-server-protocol</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2</span><span class="hspace"> </span><span class="RktSym">sslv3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls11</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls12</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the most recent SSL/TLS protocol version supported by the
current platform for server connections.</div></p><p class="SHistory">Added in version 6.1.1.3 of package <span class="stt">base</span>.</p><h3 x-source-module="(lib "openssl/openssl.scrbl")" x-source-pkg="racket-doc" x-part-tag=""SSL-wrapper_Interface"">3<tt> </tt><a name="(part._.S.S.L-wrapper_.Interface)"></a>SSL-wrapper Interface</h3><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ports-~3essl-ports))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ports-~3essl-ports%29%29" class="RktValDef RktValLink" data-pltdoc="x">ports->ssl-ports</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">input-port</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">output-port</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span>[</td><td valign="top"><span class="RktPn">#:mode</span><span class="hspace"> </span><span class="RktVar">mode</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">#:context</span><span class="hspace"> </span><span class="RktVar">context</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">#:encrypt</span><span class="hspace"> </span><span class="RktVar">protocol</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">#:close-original?</span><span class="hspace"> </span><span class="RktVar">close-original?</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">#:shutdown-on-close?</span><span class="hspace"> </span><span class="RktVar">shutdown-on-close?</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">#:error/ssl</span><span class="hspace"> </span><span class="RktVar">error</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">#:hostname</span><span class="hspace"> </span><span class="RktVar">hostname</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0"><tr><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td><td><span class="hspace"> </span></td><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._output-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">output-port?</a></span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">input-port</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">output-port</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._output-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">output-port?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">mode</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">accept</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">context</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-client-context?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span><span class="RktPn">)</span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">=</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._eq%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">eq?</a></span><span class="hspace"> </span><span class="RktVar">mode</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">accept</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-server-context%29%29" class="RktValLink" data-pltdoc="x">ssl-make-server-context</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-client-context%29%29" class="RktValLink" data-pltdoc="x">ssl-make-client-context</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">protocol</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">protocol</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">auto</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2-or-v3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv2</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sslv3</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls11</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls12</span><span class="RktPn">)</span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">=</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVal">'</span><span class="RktVal">auto</span></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">close-original?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">shutdown-on-close?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">error</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=procedures.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._procedure%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">procedure?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVar">error</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">hostname</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns two values—<wbr></wbr>an input port and an output port—<wbr></wbr>that
implement the SSL protocol over the given input and output port. (The
given ports should be connected to another process that runs the SSL
protocol.)</div></p><p>The <span class="RktVar">mode</span> argument can be <span class="RktVal">'</span><span class="RktVal">connect</span> or
<span class="RktVal">'</span><span class="RktVal">accept</span>. The mode determines how the SSL protocol is
initialized over the ports, either as a client or as a server. As with
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listen%29%29" class="RktValLink" data-pltdoc="x">ssl-listen</a></span>, in <span class="RktVal">'</span><span class="RktVal">accept</span> mode, supply a
<span class="RktVar">context</span> that has been initialized with
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-certificate-chain%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-certificate-chain!</a></span> and
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-private-key%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-private-key!</a></span> to avoid a <span style="font-style: italic">no shared cipher</span>
error.</p><p>The <span class="RktVar">context</span> argument should be a client context for
<span class="RktVal">'</span><span class="RktVal">connect</span> mode or a server context for <span class="RktVal">'</span><span class="RktVal">accept</span>
mode. If it is not supplied, a context is created using the protocol
specified by a <span class="RktVar">protocol</span> argument.</p><p>If the <span class="RktVar">protocol</span> argument is not supplied, it defaults to
<span class="RktVal">'</span><span class="RktVal">auto</span>. See <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-client-context%29%29" class="RktValLink" data-pltdoc="x">ssl-make-client-context</a></span> for
further details (including all options and the meanings of the
protocol symbols). This argument is ignored if a <span class="RktVar">context</span>
argument is supplied.</p><p>If <span class="RktVar">close-original?</span> is true, then when both SSL ports are
closed, the given input and output ports are automatically closed.</p><p>If <span class="RktVar">shutdown-on-close?</span> is true, then when the output SSL port
is closed, it sends a shutdown message to the other end of the SSL
connection. When shutdown is enabled, closing the
output port can fail if the given output port becomes unwritable
(e.g., because the other end of the given port has been closed by
another process).</p><p>The <span class="RktVar">error</span> argument is an error procedure to use for raising
communication errors. The default is <span class="RktVar">error</span>, which raises
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=exns.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._exn%7E3afail%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">exn:fail</a></span>; in contrast, <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-accept%29%29" class="RktValLink" data-pltdoc="x">ssl-accept</a></span> and
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%29%29" class="RktValLink" data-pltdoc="x">ssl-connect</a></span> use an error function that raises
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=exns.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._exn%7E3afail%7E3anetwork%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">exn:fail:network</a></span>.</p><p>See also <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%29%29" class="RktValLink" data-pltdoc="x">ssl-connect</a></span> about the limitations of reading and
writing to an SSL connection (i.e., one direction at a time).</p><p>If hostname verification is enabled (see
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-verify-hostname%21%29%29" class="RktValLink" data-pltdoc="x">ssl-set-verify-hostname!</a></span>), the peer’s certificate is checked
against <span class="RktVar">hostname</span>.</p><h3 x-source-module="(lib "openssl/openssl.scrbl")" x-source-pkg="racket-doc" x-part-tag=""cert-procs"">4<tt> </tt><a name="(part._cert-procs)"></a>Context Procedures</h3><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-load-verify-source!))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-verify-source%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-load-verify-source!</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">context</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">src</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span>[</td><td valign="top"><span class="RktPn">#:try?</span><span class="hspace"> </span><span class="RktVar">try?</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">context</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-client-context?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">src</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">directory</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">win32-store</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">macosx-keychain</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">try?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Loads verification sources from <span class="RktVar">src</span> into
<span class="RktVar">context</span>. Currently, only certificates are loaded; the
certificates are used to verify the certificates of a connection
peer. Call this procedure multiple times to load multiple sets of
trusted certificates.</div></p><p>The following kinds of verification sources are supported:</p><ul><li><p>If <span class="RktVar">src</span> is a path or string, it is treated as a PEM file
containing root certificates. The file is loaded immediately.</p></li><li><p>If <span class="RktVar">src</span> is <span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">directory</span><span class="stt"> </span><span class="RktVar">dir</span><span class="RktPn">)</span>, then
<span class="RktVar">dir</span> should contain PEM files with hashed symbolic links (see
the <span class="stt">openssl c_rehash</span> utility). The directory contents are not
loaded immediately; rather, they are searched only when a certificate
needs verification.</p></li><li><p>If <span class="RktVar">src</span> is <span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">win32-store</span><span class="stt"> </span><span class="RktVar">store</span><span class="RktPn">)</span>, then the
certificates from the store named <span class="RktVar">store</span> are loaded
immediately. Only supported on Windows.</p></li><li><p>If <span class="RktVar">src</span> is <span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">macosx-keychain</span><span class="stt"> </span><span class="RktVar">path</span><span class="RktPn">)</span>, then
the certificates from the keychain stored at <span class="RktVar">path</span> are loaded
immediately. Only supported on Mac OS X.</p></li></ul><p>If <span class="RktVar">try?</span> is <span class="RktVal">#f</span> and loading <span class="RktVar">src</span> fails (for
example, because the file or directory does not exist), then an
exception is raised. If <span class="RktVar">try?</span> is a true value, then a load
failure is ignored.</p><p>You can use the file <span class="stt">"test.pem"</span> of the <span class="stt">"openssl"</span>
collection for testing purposes. Since <span class="stt">"test.pem"</span> is public,
such a test configuration obviously provides no security.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-default-verify-sources))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-default-verify-sources%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-default-verify-sources</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">let</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">source/c</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">directory</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">win32-store</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">macosx-keychain</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym">source/c</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-default-verify-sources%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-default-verify-sources</a></span></span><span class="hspace"> </span><span class="RktVar">srcs</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">srcs</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">let</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">source/c</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">directory</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">win32-store</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">macosx-keychain</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym">source/c</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Holds a list of verification sources, used by
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-default-verify-sources%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-default-verify-sources!</a></span>. The default sources depend
on the platform:</div></p><ul><li><p>On Linux, the default sources are determined by the
<span class="stt">SSL_CERT_FILE</span> and <span class="stt">SSL_CERT_DIR</span> environment variables, if the
variables are set, or the system-wide default locations otherwise.</p></li><li><p>On Mac OS X, the default sources consist of the system keychain
for root certificates: <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">macosx-keychain</span><span class="stt"> </span><span class="RktVal">"/System/Library/Keychains/SystemRootCertificates.keychain"</span><span class="RktVal">)</span>.</p></li><li><p>On Windows, the default sources consist of the system
certificate store for root certificates: <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">win32-store</span><span class="stt"> </span><span class="RktVal">"ROOT"</span><span class="RktVal">)</span>.</p></li></ul><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-load-default-verify-sources!))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-default-verify-sources%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-load-default-verify-sources!</a></span></span><span class="hspace"> </span><span class="RktVar">context</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">context</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-client-context?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Loads the default verification sources, as determined by
<span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-default-verify-sources%29%29" class="RktValLink" data-pltdoc="x">ssl-default-verify-sources</a></span><span class="RktPn">)</span>, into <span class="RktVar">context</span>. Load
failures are ignored, since some default sources may refer to
nonexistent paths.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-load-verify-root-certificates!))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-verify-root-certificates%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-load-verify-root-certificates!</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">context-or-listener</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">pathname</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">context-or-listener</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym">ssl-client-conntext?</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listener~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-listener?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pathname</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Deprecated; like <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-verify-source%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-verify-source!</a></span>, but only supports
loading certificate files in PEM format.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-set-ciphers!))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-ciphers%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-set-ciphers!</a></span></span><span class="hspace"> </span><span class="RktVar">context</span><span class="hspace"> </span><span class="RktVar">cipher-spec</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">context</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-client-context?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">cipher-spec</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Specifies the cipher suites that can be used in connections created
with <span class="RktVar">context</span>. The meaning of <span class="RktVar">cipher-spec</span> is the same
as for the
<a href="http://www.openssl.org/docs/apps/ciphers.html"><span class="stt">openssl
ciphers</span> command</a>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-seal-context!))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-seal-context%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-seal-context!</a></span></span><span class="hspace"> </span><span class="RktVar">context</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">context</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-client-context?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Seals <span class="RktVar">context</span>, preventing further modifications. After a
context is sealed, passing it to functions such as
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-verify%21%29%29" class="RktValLink" data-pltdoc="x">ssl-set-verify!</a></span> and
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-verify-root-certificates%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-verify-root-certificates!</a></span> results in an error.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-load-certificate-chain!))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-certificate-chain%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-load-certificate-chain!</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">context-or-listener</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">pathname</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">context-or-listener</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-client-context?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listener~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-listener?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pathname</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Loads a PEM-format certification chain file for connections to made
with the given server context (created by
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-server-context%29%29" class="RktValLink" data-pltdoc="x">ssl-make-server-context</a></span>) or listener (created by
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listen%29%29" class="RktValLink" data-pltdoc="x">ssl-listen</a></span>). A certificate chain can also be loaded into a
client context (created by <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-client-context%29%29" class="RktValLink" data-pltdoc="x">ssl-make-client-context</a></span>) when
connecting to a server requiring client credentials, but that
situation is uncommon.</div></p><p>This chain is used to identify the client or server when it connects
or accepts connections. Loading a chain overwrites the old chain. Also
call <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-private-key%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-private-key!</a></span> to load the certificate’s
corresponding key.</p><p>You can use the file <span class="stt">"test.pem"</span> of the <span class="stt">"openssl"</span>
collection for testing purposes. Since <span class="stt">"test.pem"</span> is public,
such a test configuration obviously provides no security.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-load-private-key!))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-private-key%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-load-private-key!</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">context-or-listener</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">pathname</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span>[</td><td valign="top"><span class="RktVar">rsa?</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">asn1?</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">context-or-listener</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-client-context?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listener~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-listener?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pathname</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">rsa?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">asn1?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Loads the first private key from <span class="RktVar">pathname</span> for the given
context or listener. The key goes with the certificate that identifies
the client or server. Like <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-certificate-chain%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-certificate-chain!</a></span>, this
procedure is usually used with server contexts or listeners, seldom
with client contexts.</div></p><p>If <span class="RktVar">rsa?</span> is <span class="RktVal">#t</span> (the default), the first RSA key is
read (i.e., non-RSA keys are skipped). If <span class="RktVar">asn1?</span> is
<span class="RktVal">#t</span>, the file is parsed as ASN1 format instead of PEM.</p><p>You can use the file <span class="stt">"test.pem"</span> of the <span class="stt">"openssl"</span>
collection for testing purposes. Since <span class="stt">"test.pem"</span> is public,
such a test configuration obviously provides no security.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top" colspan="3"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-load-suggested-certificate-authorities!))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-suggested-certificate-authorities%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-load-suggested-certificate-authorities!</a></span></span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">context-or-listener</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">pathname</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">context-or-listener</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-client-context?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listener~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-listener?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pathname</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Loads a PEM-format file containing certificates that are used by a
server. The certificate list is sent to a client when the server
requests a certificate as an indication of which certificates the
server trusts.</div></p><p>Loading the suggested certificates does not imply trust, however; any
certificate presented by the client will be checked using the trusted
roots loaded by <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-verify-root-certificates%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-verify-root-certificates!</a></span>.</p><p>You can use the file <span class="stt">"test.pem"</span> of the <span class="stt">"openssl"</span>
collection for testing purposes where the peer identifies itself using
<span class="stt">"test.pem"</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-server-context-enable-dhe!))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context-enable-dhe%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-server-context-enable-dhe!</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">context</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span>[</td><td valign="top"><span class="RktVar">dh-param-path</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">context</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">dh-param-path</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-dh4096-param-path%29%29" class="RktValLink" data-pltdoc="x">ssl-dh4096-param-path</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-server-context-enable-ecdhe!))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context-enable-ecdhe%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-server-context-enable-ecdhe!</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">context</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span>[</td><td valign="top"><span class="RktVar">curve-name</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">context</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">curve-name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">secp521r1</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Enables cipher suites that provide
<a href="http://en.wikipedia.org/wiki/Forward_secrecy">perfect
forward secrecy</a> via ephemeral Diffie-Hellman (DHE) or ephemeral
elliptic-curve Diffie-Hellman (ECDHE) key exchange, respectively.</div></p><p>For DHE, the <span class="RktVar">dh-param-path</span> must be a path to a PEM file
containing DH parameters.</p><p>For ECDHE, the <span class="RktVar">curve-name</span> must be one of the following
symbols naming a standard elliptic curve:
<span class="RktVal">'</span><span class="RktVal">sect163k1</span>, <span class="RktVal">'</span><span class="RktVal">sect163r1</span>, <span class="RktVal">'</span><span class="RktVal">sect163r2</span>, <span class="RktVal">'</span><span class="RktVal">sect193r1</span>, <span class="RktVal">'</span><span class="RktVal">sect193r2</span>, <span class="RktVal">'</span><span class="RktVal">sect233k1</span>, <span class="RktVal">'</span><span class="RktVal">sect233r1</span>, <span class="RktVal">'</span><span class="RktVal">sect239k1</span>, <span class="RktVal">'</span><span class="RktVal">sect283k1</span>, <span class="RktVal">'</span><span class="RktVal">sect283r1</span>, <span class="RktVal">'</span><span class="RktVal">sect409k1</span>, <span class="RktVal">'</span><span class="RktVal">sect409r1</span>, <span class="RktVal">'</span><span class="RktVal">sect571k1</span>, <span class="RktVal">'</span><span class="RktVal">sect571r1</span>, <span class="RktVal">'</span><span class="RktVal">secp160k1</span>, <span class="RktVal">'</span><span class="RktVal">secp160r1</span>, <span class="RktVal">'</span><span class="RktVal">secp160r2</span>, <span class="RktVal">'</span><span class="RktVal">secp192k1</span>, <span class="RktVal">'</span><span class="RktVal">secp224k1</span>, <span class="RktVal">'</span><span class="RktVal">secp224r1</span>, <span class="RktVal">'</span><span class="RktVal">secp256k1</span>, <span class="RktVal">'</span><span class="RktVal">secp384r1</span>, <span class="RktVal">'</span><span class="RktVal">secp521r1</span>, <span class="RktVal">'</span><span class="RktVal">prime192v</span>, <span class="RktVal">'</span><span class="RktVal">prime256v</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._openssl/main..rkt)._ssl-dh4096-param-path))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-dh4096-param-path%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-dh4096-param-path</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">path?</a></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Path for 4096-bit Diffie-Hellman parameters.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-set-server-name-identification-callback!))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-server-name-identification-callback%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-set-server-name-identification-callback!</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">context</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">callback</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">context</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">callback</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Provides an SSL server context with a procedure it can use for switching
to alternative contexts on a per-connection basis. The procedure is given
the hostname the client was attempting to connect to, to use as the basis
for its decision.</div></p><p>The client sends this information via the TLS
<a href="http://en.wikipedia.org/wiki/Server_Name_Indication">Server Name Identification</a>
extension, which was created to allow <a href="http://en.wikipedia.org/wiki/Virtual_hosting">virtual hosting</a>
for secure servers.</p><p>The suggested use it to prepare the appropriate server contexts,
define a single callback which can dispatch between them, and then
apply it to all the contexts before sealing them. A minimal example:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">ctx-a</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-server-context%29%29" class="RktValLink" data-pltdoc="x">ssl-make-server-context</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">ctx-b</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-make-server-context%29%29" class="RktValLink" data-pltdoc="x">ssl-make-server-context</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">tls</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">...</a></span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-certificate-chain%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-certificate-chain!</a></span><span class="hspace"> </span><span class="RktSym">ctx-a</span><span class="hspace"> </span><span class="RktVal">"cert-a.pem"</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-certificate-chain%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-certificate-chain!</a></span><span class="hspace"> </span><span class="RktSym">ctx-b</span><span class="hspace"> </span><span class="RktVal">"cert-b.pem"</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">...</a></span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-private-key%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-private-key!</a></span><span class="hspace"> </span><span class="RktSym">ctx-a</span><span class="hspace"> </span><span class="RktVal">"key-a.pem"</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-private-key%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-private-key!</a></span><span class="hspace"> </span><span class="RktSym">ctx-b</span><span class="hspace"> </span><span class="RktVal">"key-b.pem"</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">...</a></span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">callback</span><span class="hspace"> </span><span class="RktSym">hostname</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=if.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._cond%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">cond</a></span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._equal%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">equal?</a></span><span class="hspace"> </span><span class="RktSym">hostname</span><span class="hspace"> </span><span class="RktVal">"a"</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">ctx-a</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._equal%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">equal?</a></span><span class="hspace"> </span><span class="RktSym">hostname</span><span class="hspace"> </span><span class="RktVal">"b"</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">ctx-b</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">...</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=if.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._else%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">else</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-server-name-identification-callback%21%29%29" class="RktValLink" data-pltdoc="x">ssl-set-server-name-identification-callback!</a></span><span class="hspace"> </span><span class="RktSym">ctx-a</span><span class="hspace"> </span><span class="RktVar">callback</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-server-name-identification-callback%21%29%29" class="RktValLink" data-pltdoc="x">ssl-set-server-name-identification-callback!</a></span><span class="hspace"> </span><span class="RktSym">ctx-b</span><span class="hspace"> </span><span class="RktVar">callback</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">...</a></span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-seal-context%21%29%29" class="RktValLink" data-pltdoc="x">ssl-seal-context!</a></span><span class="hspace"> </span><span class="RktSym">ctx-a</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-seal-context%21%29%29" class="RktValLink" data-pltdoc="x">ssl-seal-context!</a></span><span class="hspace"> </span><span class="RktSym">ctx-b</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">...</a></span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listen%29%29" class="RktValLink" data-pltdoc="x">ssl-listen</a></span><span class="hspace"> </span><span class="RktVal">443</span><span class="hspace"> </span><span class="RktVal">5</span><span class="hspace"> </span><span class="RktVal">#t</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym">ctx-a</span><span class="RktPn">)</span></td></tr></table></blockquote><p>If the callback returns <span class="RktVal">#f</span>, the connection attempt will continue,
using the original server context.</p><h3 x-source-module="(lib "openssl/openssl.scrbl")" x-source-pkg="racket-doc" x-part-tag=""peer-verif"">5<tt> </tt><a name="(part._peer-verif)"></a>Peer Verification</h3><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-set-verify!))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-verify%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-set-verify!</a></span></span><span class="hspace"> </span><span class="RktVar">clp</span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">clp</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-client-context?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listener~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-listener?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-port~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-port?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Requires certificate verification on the peer SSL connection when
<span class="RktVar">on?</span> is <span class="RktVal">#t</span>. If <span class="RktVar">clp</span> is an SSL port, then the
connection is immediately renegotiated, and an exception is raised
immediately if certificate verification fails. If <span class="RktVar">clp</span> is a
context or listener, certification verification happens on each
subsequent connection using the context or listener.</div></p><p>Enabling verification also requires, at a minimum, designating trusted
certificate authorities with <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-load-verify-source%21%29%29" class="RktValLink" data-pltdoc="x">ssl-load-verify-source!</a></span>.</p><p>Verifying the certificate is not sufficient to prevent attacks by
active adversaries, such as
<a href="http://en.wikipedia.org/wiki/Man-in-the-middle_attack">man-in-the-middle
attacks</a>. See also <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-verify-hostname%21%29%29" class="RktValLink" data-pltdoc="x">ssl-set-verify-hostname!</a></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-try-verify!))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-try-verify%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-try-verify!</a></span></span><span class="hspace"> </span><span class="RktVar">clp</span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">clp</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-client-context?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-listener~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-listener?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-port~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-port?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-verify%21%29%29" class="RktValLink" data-pltdoc="x">ssl-set-verify!</a></span>, but when peer certificate verification fails,
then connection continues to work. Use <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-peer-verified~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-peer-verified?</a></span> to determine
whether verification succeeded.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-peer-verified~3f))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-peer-verified~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-peer-verified?</a></span></span><span class="hspace"> </span><span class="RktVar">p</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">p</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-port~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-port?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if the peer of SSL port <span class="RktVar">p</span> has presented a
valid and verified certificate, <span class="RktVal">#f</span> otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-set-verify-hostname!))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-verify-hostname%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-set-verify-hostname!</a></span></span><span class="hspace"> </span><span class="RktVar">ctx</span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ctx</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-client-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-client-context?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-server-context~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-server-context?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Requires hostname verification of SSL peers of connections made using
<span class="RktVar">ctx</span> when <span class="RktVar">on?</span> is <span class="RktVal">#t</span>. When hostname
verification is enabled, the hostname associated with a connection
(see <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-connect%29%29" class="RktValLink" data-pltdoc="x">ssl-connect</a></span> or <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ports-~3essl-ports%29%29" class="RktValLink" data-pltdoc="x">ports->ssl-ports</a></span>) is checked
against the hostnames listed in the peer’s certificate. If the peer
certificate does not contain an entry matching the hostname, or if the
peer does not present a certificate, the connection is rejected and an
exception is raised.</div></p><p>Hostname verification does not imply certificate verification. To
verify the certificate itself, also call <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-set-verify%21%29%29" class="RktValLink" data-pltdoc="x">ssl-set-verify!</a></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-peer-certificate-hostnames))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-peer-certificate-hostnames%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-peer-certificate-hostnames</a></span></span><span class="hspace"> </span><span class="RktVar">p</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">p</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-port~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-port?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the list of hostnames for which the certificate of
<span class="RktVar">p</span>’s peer is valid according to
<a href="http://www.ietf.org/rfc/rfc2818.txt">RFC 2818</a>. If the
peer has not presented a certificate, <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">)</span> is returned.</div></p><p>The result list may contain both hostnames such as
<span class="RktVal">"www.racket-lang.org"</span> and hostname patterns such as
<span class="RktVal">"*.racket-lang.org"</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-peer-check-hostname))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-peer-check-hostname%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-peer-check-hostname</a></span></span><span class="hspace"> </span><span class="RktVar">p</span><span class="hspace"> </span><span class="RktVar">hostname</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">p</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-port~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-port?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">hostname</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if the peer certificate of <span class="RktVar">p</span> is valid for
<span class="RktVar">hostname</span> according to
<a href="http://www.ietf.org/rfc/rfc2818.txt">RFC 2818</a>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-peer-subject-name))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-peer-subject-name%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-peer-subject-name</a></span></span><span class="hspace"> </span><span class="RktVar">p</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">p</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-port~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-port?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">If <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-peer-verified~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-peer-verified?</a></span> would return <span class="RktVal">#t</span> for
<span class="RktVar">p</span>, the result is a byte string for the subject field of
the certificate presented by the SSL port’s peer, otherwise the result
is <span class="RktVal">#f</span>.</div></p><p>Use <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-peer-check-hostname%29%29" class="RktValLink" data-pltdoc="x">ssl-peer-check-hostname</a></span> or
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-peer-certificate-hostnames%29%29" class="RktValLink" data-pltdoc="x">ssl-peer-certificate-hostnames</a></span> instead to check the validity
of an SSL connection.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/main..rkt)._ssl-peer-issuer-name))"></a><span title="Provided from: openssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-peer-issuer-name%29%29" class="RktValDef RktValLink" data-pltdoc="x">ssl-peer-issuer-name</a></span></span><span class="hspace"> </span><span class="RktVar">p</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">p</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-port~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-port?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">If <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmain..rkt%29._ssl-peer-verified~3f%29%29" class="RktValLink" data-pltdoc="x">ssl-peer-verified?</a></span> would return <span class="RktVal">#t</span> for
<span class="RktVar">p</span>, the result is a byte string for the issuer field of
the certificate presented by the SSL port’s peer, otherwise the result
is <span class="RktVal">#f</span>.</div></p><h3 x-source-module="(lib "openssl/openssl.scrbl")" x-source-pkg="racket-doc" x-part-tag=""SHA-1_Hashing"">6<tt> </tt><a name="(part._.S.H.A-1_.Hashing)"></a><a name="(mod-path._openssl/sha1)"></a>SHA-1 Hashing</h3><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._openssl%2Fsha1%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">openssl/sha1</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The <a href="#%28mod-path._openssl%2Fsha1%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">openssl/sha1</span></a> library
provides a Racket wrapper for the OpenSSL library’s SHA-1 hashing
functions. If the OpenSSL library cannot be opened, this library logs
a warning and falls back to the implementation in
<a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=file&rel=sha1b.html&version=6.3" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">file/sha1</span></a>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/sha1..rkt)._sha1))"></a><span title="Provided from: openssl/sha1 | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fsha1..rkt%29._sha1%29%29" class="RktValDef RktValLink" data-pltdoc="x">sha1</a></span></span><span class="hspace"> </span><span class="RktVar">in</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">in</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a 40-character string that represents the SHA-1 hash (in
hexadecimal notation) of the content from <span class="RktVar">in</span>, consuming all
of the input from <span class="RktVar">in</span> until an end-of-file.</div></p><p>The <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fsha1..rkt%29._sha1%29%29" class="RktValLink" data-pltdoc="x">sha1</a></span> function composes <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fsha1..rkt%29._bytes-~3ehex-string%29%29" class="RktValLink" data-pltdoc="x">bytes->hex-string</a></span> with
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fsha1..rkt%29._sha1-bytes%29%29" class="RktValLink" data-pltdoc="x">sha1-bytes</a></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/sha1..rkt)._sha1-bytes))"></a><span title="Provided from: openssl/sha1 | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fsha1..rkt%29._sha1-bytes%29%29" class="RktValDef RktValLink" data-pltdoc="x">sha1-bytes</a></span></span><span class="hspace"> </span><span class="RktVar">in</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">in</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a 20-byte byte string that represents the SHA-1 hash of the
content from <span class="RktVar">in</span>, consuming all of the input from <span class="RktVar">in</span>
until an end-of-file.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/sha1..rkt)._bytes-~3ehex-string))"></a><span title="Provided from: openssl/sha1 | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fsha1..rkt%29._bytes-~3ehex-string%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes->hex-string</a></span></span><span class="hspace"> </span><span class="RktVar">bstr</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">bstr</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Converts the given byte string to a string representation, where each
byte in <span class="RktVar">bstr</span> is converted to its two-digit hexadecimal
representation in the resulting string.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/sha1..rkt)._hex-string-~3ebytes))"></a><span title="Provided from: openssl/sha1 | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fsha1..rkt%29._hex-string-~3ebytes%29%29" class="RktValDef RktValLink" data-pltdoc="x">hex-string->bytes</a></span></span><span class="hspace"> </span><span class="RktVar">str</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">str</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">The inverse of <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fsha1..rkt%29._bytes-~3ehex-string%29%29" class="RktValLink" data-pltdoc="x">bytes->hex-string</a></span>.</div></p><h3 x-source-module="(lib "openssl/openssl.scrbl")" x-source-pkg="racket-doc" x-part-tag=""MD5_Hashing"">7<tt> </tt><a name="(part._.M.D5_.Hashing)"></a><a name="(mod-path._openssl/md5)"></a>MD5 Hashing</h3><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._openssl%2Fmd5%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">openssl/md5</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The <a href="#%28mod-path._openssl%2Fmd5%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">openssl/md5</span></a> library
provides a Racket wrapper for the OpenSSL library’s MD5 hashing
functions. If the OpenSSL library cannot be opened, this library logs
a warning and falls back to the implementation in
<a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=file&rel=md5.html&version=6.3" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">file/md5</span></a>.</div></p><p class="SHistory">Added in version 6.0.0.3 of package <span class="stt">base</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/md5..rkt)._md5))"></a><span title="Provided from: openssl/md5 | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmd5..rkt%29._md5%29%29" class="RktValDef RktValLink" data-pltdoc="x">md5</a></span></span><span class="hspace"> </span><span class="RktVar">in</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">in</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a 32-character string that represents the MD5 hash (in
hexadecimal notation) of the content from <span class="RktVar">in</span>, consuming all
of the input from <span class="RktVar">in</span> until an end-of-file.</div></p><p>The <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmd5..rkt%29._md5%29%29" class="RktValLink" data-pltdoc="x">md5</a></span> function composes <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fsha1..rkt%29._bytes-~3ehex-string%29%29" class="RktValLink" data-pltdoc="x">bytes->hex-string</a></span> with
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmd5..rkt%29._md5-bytes%29%29" class="RktValLink" data-pltdoc="x">md5-bytes</a></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._openssl/md5..rkt)._md5-bytes))"></a><span title="Provided from: openssl/md5 | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Fmd5..rkt%29._md5-bytes%29%29" class="RktValDef RktValLink" data-pltdoc="x">md5-bytes</a></span></span><span class="hspace"> </span><span class="RktVar">in</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">in</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a 16-byte byte string that represents the MD5 hash of the
content from <span class="RktVar">in</span>, consuming all of the input from <span class="RktVar">in</span>
until an end-of-file.</div></p><h3 x-source-module="(lib "openssl/openssl.scrbl")" x-source-pkg="racket-doc" x-part-tag=""libcrypto"">8<tt> </tt><a name="(part._libcrypto)"></a><a name="(mod-path._openssl/libcrypto)"></a>The <span class="stt">"libcrypto"</span> Shared Library</h3><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._openssl%2Flibcrypto%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">openssl/libcrypto</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The <a href="#%28mod-path._openssl%2Flibcrypto%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">openssl/libcrypto</span></a>
library provides a <a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=foreign&rel=Loading_Foreign_Libraries.html%23%2528tech._foreign._library._value%2529&version=6.3" class="techoutside Sq" data-pltdoc="x"><span class="techinside">foreign-library value</span></a> for
the <span class="stt">"libcrypto"</span> shared library.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._openssl/libcrypto..rkt)._libcrypto))"></a><span title="Provided from: openssl/libcrypto | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Flibcrypto..rkt%29._libcrypto%29%29" class="RktValDef RktValLink" data-pltdoc="x">libcrypto</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=foreign&rel=Loading_Foreign_Libraries.html%23%2528def._%2528%2528quote._%7E23%7E25foreign%2529._ffi-lib%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">ffi-lib?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Returns a <a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=foreign&rel=Loading_Foreign_Libraries.html%23%2528tech._foreign._library._value%2529&version=6.3" class="techoutside Sq" data-pltdoc="x"><span class="techinside">foreign-library value</span></a> for
<span class="stt">"libcrypto"</span>, or <span class="RktVal">#f</span> if the library could not be found
or loaded. The load attempt uses the versions specified by
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Flibcrypto..rkt%29._openssl-lib-versions%29%29" class="RktValLink" data-pltdoc="x">openssl-lib-versions</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._openssl/libcrypto..rkt)._libcrypto-load-fail-reason))"></a><span title="Provided from: openssl/libcrypto | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Flibcrypto..rkt%29._libcrypto-load-fail-reason%29%29" class="RktValDef RktValLink" data-pltdoc="x">libcrypto-load-fail-reason</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Either <span class="RktVal">#f</span> when <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Flibcrypto..rkt%29._libcrypto%29%29" class="RktValLink" data-pltdoc="x">libcrypto</a></span> is non-<span class="RktVal">#f</span>, or a
string when <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Flibcrypto..rkt%29._libcrypto%29%29" class="RktValLink" data-pltdoc="x">libcrypto</a></span> is <span class="RktVal">#f</span>. In the latter case, the
string provides an error message for the attempt to load
<span class="stt">"libcrypto"</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._openssl/libcrypto..rkt)._openssl-lib-versions))"></a><span title="Provided from: openssl/libcrypto | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Flibcrypto..rkt%29._openssl-lib-versions%29%29" class="RktValDef RktValLink" data-pltdoc="x">openssl-lib-versions</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">A list of versions that are tried for loading <span class="stt">"libcrypto"</span>.
The list of version strings is suitable as a second argument to
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=foreign&rel=Loading_Foreign_Libraries.html%23%2528def._%2528%2528lib._ffi%252Funsafe..rkt%2529._ffi-lib%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">ffi-lib</a></span>.</div></p><h3 x-source-module="(lib "openssl/openssl.scrbl")" x-source-pkg="racket-doc" x-part-tag=""libssl"">9<tt> </tt><a name="(part._libssl)"></a><a name="(mod-path._openssl/libssl)"></a>The <span class="stt">"libssl"</span> Shared Library</h3><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._openssl%2Flibssl%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">openssl/libssl</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The <a href="#%28mod-path._openssl%2Flibssl%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">openssl/libssl</span></a>
library provides a <a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=foreign&rel=Loading_Foreign_Libraries.html%23%2528tech._foreign._library._value%2529&version=6.3" class="techoutside Sq" data-pltdoc="x"><span class="techinside">foreign-library value</span></a> for
the <span class="stt">"libssl"</span> shared library.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._openssl/libssl..rkt)._libssl))"></a><span title="Provided from: openssl/libssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Flibssl..rkt%29._libssl%29%29" class="RktValDef RktValLink" data-pltdoc="x">libssl</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=foreign&rel=Loading_Foreign_Libraries.html%23%2528def._%2528%2528quote._%7E23%7E25foreign%2529._ffi-lib%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">ffi-lib?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Returns a <a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=foreign&rel=Loading_Foreign_Libraries.html%23%2528tech._foreign._library._value%2529&version=6.3" class="techoutside Sq" data-pltdoc="x"><span class="techinside">foreign-library value</span></a> for
<span class="stt">"libssl"</span>, or <span class="RktVal">#f</span> if the library could not be found
or loaded. The load attempt uses the versions specified by
<span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Flibcrypto..rkt%29._openssl-lib-versions%29%29" class="RktValLink" data-pltdoc="x">openssl-lib-versions</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._openssl/libssl..rkt)._libssl-load-fail-reason))"></a><span title="Provided from: openssl/libssl | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Flibssl..rkt%29._libssl-load-fail-reason%29%29" class="RktValDef RktValLink" data-pltdoc="x">libssl-load-fail-reason</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Either <span class="RktVal">#f</span> when <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Flibssl..rkt%29._libssl%29%29" class="RktValLink" data-pltdoc="x">libssl</a></span> is non-<span class="RktVal">#f</span>, or a
string when <span class="RktSym"><a href="#%28def._%28%28lib._openssl%2Flibssl..rkt%29._libssl%29%29" class="RktValLink" data-pltdoc="x">libssl</a></span> is <span class="RktVal">#f</span>. In the latter case, the
string provides an error message for the attempt to load
<span class="stt">"libssl"</span>.</div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.3", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.3");">top</a></span><span class="navright"> <span class="nonavigation">← prev</span> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.3");">up</a> <span class="nonavigation">next →</span></span> </div></div></div><div id="contextindicator"> </div></body></html>
|