/usr/share/doc/python-certbot-nginx-doc/html/_modules/certbot_nginx/tls_sni_01.html is in python-certbot-nginx-doc 0.28.0-1~deb9u1.
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 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | <!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>certbot_nginx.tls_sni_01 — certbot-nginx 0 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="certbot-nginx 0 documentation" href="../../index.html"/>
<link rel="up" title="Module code" href="../index.html"/>
<script src="../../_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="../../index.html" class="icon icon-home"> certbot-nginx
</a>
<div class="version">
0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../api.html">API Documentation</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">certbot-nginx</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html">Docs</a> »</li>
<li><a href="../index.html">Module code</a> »</li>
<li>certbot_nginx.tls_sni_01</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for certbot_nginx.tls_sni_01</h1><div class="highlight"><pre>
<span></span><span class="sd">"""A class that performs TLS-SNI-01 challenges for Nginx"""</span>
<span class="kn">import</span> <span class="nn">logging</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">six</span>
<span class="kn">from</span> <span class="nn">certbot</span> <span class="k">import</span> <span class="n">errors</span>
<span class="kn">from</span> <span class="nn">certbot.plugins</span> <span class="k">import</span> <span class="n">common</span>
<span class="kn">from</span> <span class="nn">certbot_nginx</span> <span class="k">import</span> <span class="n">obj</span>
<span class="kn">from</span> <span class="nn">certbot_nginx</span> <span class="k">import</span> <span class="n">nginxparser</span>
<span class="n">logger</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="vm">__name__</span><span class="p">)</span>
<div class="viewcode-block" id="NginxTlsSni01"><a class="viewcode-back" href="../../api/tls_sni_01.html#certbot_nginx.tls_sni_01.NginxTlsSni01">[docs]</a><span class="k">class</span> <span class="nc">NginxTlsSni01</span><span class="p">(</span><span class="n">common</span><span class="o">.</span><span class="n">TLSSNI01</span><span class="p">):</span>
<span class="sd">"""TLS-SNI-01 authenticator for Nginx</span>
<span class="sd"> :ivar configurator: NginxConfigurator object</span>
<span class="sd"> :type configurator: :class:`~nginx.configurator.NginxConfigurator`</span>
<span class="sd"> :ivar list achalls: Annotated</span>
<span class="sd"> class:`~certbot.achallenges.KeyAuthorizationAnnotatedChallenge`</span>
<span class="sd"> challenges</span>
<span class="sd"> :param list indices: Meant to hold indices of challenges in a</span>
<span class="sd"> larger array. NginxTlsSni01 is capable of solving many challenges</span>
<span class="sd"> at once which causes an indexing issue within NginxConfigurator</span>
<span class="sd"> who must return all responses in order. Imagine NginxConfigurator</span>
<span class="sd"> maintaining state about where all of the http-01 Challenges,</span>
<span class="sd"> TLS-SNI-01 Challenges belong in the response array. This is an</span>
<span class="sd"> optional utility.</span>
<span class="sd"> :param str challenge_conf: location of the challenge config file</span>
<span class="sd"> """</span>
<div class="viewcode-block" id="NginxTlsSni01.perform"><a class="viewcode-back" href="../../api/tls_sni_01.html#certbot_nginx.tls_sni_01.NginxTlsSni01.perform">[docs]</a> <span class="k">def</span> <span class="nf">perform</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">"""Perform a challenge on Nginx.</span>
<span class="sd"> :returns: list of :class:`certbot.acme.challenges.TLSSNI01Response`</span>
<span class="sd"> :rtype: list</span>
<span class="sd"> """</span>
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">achalls</span><span class="p">:</span>
<span class="k">return</span> <span class="p">[]</span>
<span class="n">addresses</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">default_addr</span> <span class="o">=</span> <span class="s2">"</span><span class="si">{0}</span><span class="s2"> ssl"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">configurator</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">tls_sni_01_port</span><span class="p">)</span>
<span class="k">for</span> <span class="n">achall</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">achalls</span><span class="p">:</span>
<span class="n">vhosts</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">configurator</span><span class="o">.</span><span class="n">choose_vhosts</span><span class="p">(</span><span class="n">achall</span><span class="o">.</span><span class="n">domain</span><span class="p">,</span> <span class="n">create_if_no_match</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="c1"># len is max 1 because Nginx doesn't authenticate wildcards</span>
<span class="k">if</span> <span class="n">vhosts</span> <span class="ow">and</span> <span class="n">vhosts</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">addrs</span><span class="p">:</span>
<span class="n">addresses</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">vhosts</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">addrs</span><span class="p">))</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># choose_vhosts might have modified vhosts, so put this after</span>
<span class="n">ipv6</span><span class="p">,</span> <span class="n">ipv6only</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">configurator</span><span class="o">.</span><span class="n">ipv6_info</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">configurator</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">tls_sni_01_port</span><span class="p">)</span>
<span class="k">if</span> <span class="n">ipv6</span><span class="p">:</span>
<span class="c1"># If IPv6 is active in Nginx configuration</span>
<span class="n">ipv6_addr</span> <span class="o">=</span> <span class="s2">"[::]:</span><span class="si">{0}</span><span class="s2"> ssl"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">configurator</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">tls_sni_01_port</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">ipv6only</span><span class="p">:</span>
<span class="c1"># If ipv6only=on is not already present in the config</span>
<span class="n">ipv6_addr</span> <span class="o">=</span> <span class="n">ipv6_addr</span> <span class="o">+</span> <span class="s2">" ipv6only=on"</span>
<span class="n">addresses</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="n">obj</span><span class="o">.</span><span class="n">Addr</span><span class="o">.</span><span class="n">fromstring</span><span class="p">(</span><span class="n">default_addr</span><span class="p">),</span>
<span class="n">obj</span><span class="o">.</span><span class="n">Addr</span><span class="o">.</span><span class="n">fromstring</span><span class="p">(</span><span class="n">ipv6_addr</span><span class="p">)])</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">((</span><span class="s2">"Using default addresses </span><span class="si">%s</span><span class="s2"> and </span><span class="si">%s</span><span class="s2"> for "</span> <span class="o">+</span>
<span class="s2">"TLSSNI01 authentication."</span><span class="p">),</span>
<span class="n">default_addr</span><span class="p">,</span>
<span class="n">ipv6_addr</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">addresses</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="n">obj</span><span class="o">.</span><span class="n">Addr</span><span class="o">.</span><span class="n">fromstring</span><span class="p">(</span><span class="n">default_addr</span><span class="p">)])</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"Using default address </span><span class="si">%s</span><span class="s2"> for TLSSNI01 authentication."</span><span class="p">,</span>
<span class="n">default_addr</span><span class="p">)</span>
<span class="c1"># Create challenge certs</span>
<span class="n">responses</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_setup_challenge_cert</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">achalls</span><span class="p">]</span>
<span class="c1"># Set up the configuration</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_mod_config</span><span class="p">(</span><span class="n">addresses</span><span class="p">)</span>
<span class="c1"># Save reversible changes</span>
<span class="bp">self</span><span class="o">.</span><span class="n">configurator</span><span class="o">.</span><span class="n">save</span><span class="p">(</span><span class="s2">"SNI Challenge"</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
<span class="k">return</span> <span class="n">responses</span></div>
<div class="viewcode-block" id="NginxTlsSni01._mod_config"><a class="viewcode-back" href="../../api/tls_sni_01.html#certbot_nginx.tls_sni_01.NginxTlsSni01._mod_config">[docs]</a> <span class="k">def</span> <span class="nf">_mod_config</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">ll_addrs</span><span class="p">):</span>
<span class="sd">"""Modifies Nginx config to include challenge server blocks.</span>
<span class="sd"> :param list ll_addrs: list of lists of</span>
<span class="sd"> :class:`certbot_nginx.obj.Addr` to apply</span>
<span class="sd"> :raises .MisconfigurationError:</span>
<span class="sd"> Unable to find a suitable HTTP block in which to include</span>
<span class="sd"> authenticator hosts.</span>
<span class="sd"> """</span>
<span class="c1"># Add the 'include' statement for the challenges if it doesn't exist</span>
<span class="c1"># already in the main config</span>
<span class="n">included</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">include_directive</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'</span><span class="se">\n</span><span class="s1">'</span><span class="p">,</span> <span class="s1">'include'</span><span class="p">,</span> <span class="s1">' '</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">challenge_conf</span><span class="p">]</span>
<span class="n">root</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">configurator</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">config_root</span>
<span class="n">bucket_directive</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'</span><span class="se">\n</span><span class="s1">'</span><span class="p">,</span> <span class="s1">'server_names_hash_bucket_size'</span><span class="p">,</span> <span class="s1">' '</span><span class="p">,</span> <span class="s1">'128'</span><span class="p">]</span>
<span class="n">main</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">configurator</span><span class="o">.</span><span class="n">parser</span><span class="o">.</span><span class="n">parsed</span><span class="p">[</span><span class="n">root</span><span class="p">]</span>
<span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="n">main</span><span class="p">:</span>
<span class="k">if</span> <span class="n">line</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="p">[</span><span class="s1">'http'</span><span class="p">]:</span>
<span class="n">body</span> <span class="o">=</span> <span class="n">line</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
<span class="n">found_bucket</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">posn</span> <span class="o">=</span> <span class="mi">0</span>
<span class="k">for</span> <span class="n">inner_line</span> <span class="ow">in</span> <span class="n">body</span><span class="p">:</span>
<span class="k">if</span> <span class="n">inner_line</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="n">bucket_directive</span><span class="p">[</span><span class="mi">1</span><span class="p">]:</span>
<span class="k">if</span> <span class="nb">int</span><span class="p">(</span><span class="n">inner_line</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> <span class="o"><</span> <span class="nb">int</span><span class="p">(</span><span class="n">bucket_directive</span><span class="p">[</span><span class="mi">3</span><span class="p">]):</span>
<span class="n">body</span><span class="p">[</span><span class="n">posn</span><span class="p">]</span> <span class="o">=</span> <span class="n">bucket_directive</span>
<span class="n">found_bucket</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">posn</span> <span class="o">+=</span> <span class="mi">1</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">found_bucket</span><span class="p">:</span>
<span class="n">body</span><span class="o">.</span><span class="n">insert</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">bucket_directive</span><span class="p">)</span>
<span class="k">if</span> <span class="n">include_directive</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">body</span><span class="p">:</span>
<span class="n">body</span><span class="o">.</span><span class="n">insert</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">include_directive</span><span class="p">)</span>
<span class="n">included</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">break</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">included</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">errors</span><span class="o">.</span><span class="n">MisconfigurationError</span><span class="p">(</span>
<span class="s1">'Certbot could not find an HTTP block to include '</span>
<span class="s1">'TLS-SNI-01 challenges in </span><span class="si">%s</span><span class="s1">.'</span> <span class="o">%</span> <span class="n">root</span><span class="p">)</span>
<span class="n">config</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_make_server_block</span><span class="p">(</span><span class="n">pair</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">pair</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
<span class="k">for</span> <span class="n">pair</span> <span class="ow">in</span> <span class="n">six</span><span class="o">.</span><span class="n">moves</span><span class="o">.</span><span class="n">zip</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">achalls</span><span class="p">,</span> <span class="n">ll_addrs</span><span class="p">)]</span>
<span class="n">config</span> <span class="o">=</span> <span class="n">nginxparser</span><span class="o">.</span><span class="n">UnspacedList</span><span class="p">(</span><span class="n">config</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">configurator</span><span class="o">.</span><span class="n">reverter</span><span class="o">.</span><span class="n">register_file_creation</span><span class="p">(</span>
<span class="kc">True</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">challenge_conf</span><span class="p">)</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">challenge_conf</span><span class="p">,</span> <span class="s2">"w"</span><span class="p">)</span> <span class="k">as</span> <span class="n">new_conf</span><span class="p">:</span>
<span class="n">nginxparser</span><span class="o">.</span><span class="n">dump</span><span class="p">(</span><span class="n">config</span><span class="p">,</span> <span class="n">new_conf</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">"Generated server block:</span><span class="se">\n</span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">config</span><span class="p">))</span></div>
<div class="viewcode-block" id="NginxTlsSni01._make_server_block"><a class="viewcode-back" href="../../api/tls_sni_01.html#certbot_nginx.tls_sni_01.NginxTlsSni01._make_server_block">[docs]</a> <span class="k">def</span> <span class="nf">_make_server_block</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">achall</span><span class="p">,</span> <span class="n">addrs</span><span class="p">):</span>
<span class="sd">"""Creates a server block for a challenge.</span>
<span class="sd"> :param achall: Annotated TLS-SNI-01 challenge</span>
<span class="sd"> :type achall:</span>
<span class="sd"> :class:`certbot.achallenges.KeyAuthorizationAnnotatedChallenge`</span>
<span class="sd"> :param list addrs: addresses of challenged domain</span>
<span class="sd"> :class:`list` of type :class:`~nginx.obj.Addr`</span>
<span class="sd"> :returns: server block for the challenge host</span>
<span class="sd"> :rtype: list</span>
<span class="sd"> """</span>
<span class="n">document_root</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">configurator</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">work_dir</span><span class="p">,</span> <span class="s2">"tls_sni_01_page"</span><span class="p">)</span>
<span class="n">block</span> <span class="o">=</span> <span class="p">[[</span><span class="s1">'listen'</span><span class="p">,</span> <span class="s1">' '</span><span class="p">,</span> <span class="n">addr</span><span class="o">.</span><span class="n">to_string</span><span class="p">(</span><span class="n">include_default</span><span class="o">=</span><span class="kc">False</span><span class="p">)]</span> <span class="k">for</span> <span class="n">addr</span> <span class="ow">in</span> <span class="n">addrs</span><span class="p">]</span>
<span class="n">block</span><span class="o">.</span><span class="n">extend</span><span class="p">([[</span><span class="s1">'server_name'</span><span class="p">,</span> <span class="s1">' '</span><span class="p">,</span>
<span class="n">achall</span><span class="o">.</span><span class="n">response</span><span class="p">(</span><span class="n">achall</span><span class="o">.</span><span class="n">account_key</span><span class="p">)</span><span class="o">.</span><span class="n">z_domain</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">'ascii'</span><span class="p">)],</span>
<span class="c1"># access and error logs necessary for</span>
<span class="c1"># integration testing (non-root)</span>
<span class="p">[</span><span class="s1">'access_log'</span><span class="p">,</span> <span class="s1">' '</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">configurator</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">work_dir</span><span class="p">,</span> <span class="s1">'access.log'</span><span class="p">)],</span>
<span class="p">[</span><span class="s1">'error_log'</span><span class="p">,</span> <span class="s1">' '</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">configurator</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">work_dir</span><span class="p">,</span> <span class="s1">'error.log'</span><span class="p">)],</span>
<span class="p">[</span><span class="s1">'ssl_certificate'</span><span class="p">,</span> <span class="s1">' '</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_cert_path</span><span class="p">(</span><span class="n">achall</span><span class="p">)],</span>
<span class="p">[</span><span class="s1">'ssl_certificate_key'</span><span class="p">,</span> <span class="s1">' '</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_key_path</span><span class="p">(</span><span class="n">achall</span><span class="p">)],</span>
<span class="p">[</span><span class="s1">'include'</span><span class="p">,</span> <span class="s1">' '</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">configurator</span><span class="o">.</span><span class="n">mod_ssl_conf</span><span class="p">],</span>
<span class="p">[[</span><span class="s1">'location'</span><span class="p">,</span> <span class="s1">' '</span><span class="p">,</span> <span class="s1">'/'</span><span class="p">],</span> <span class="p">[[</span><span class="s1">'root'</span><span class="p">,</span> <span class="s1">' '</span><span class="p">,</span> <span class="n">document_root</span><span class="p">]]]])</span>
<span class="k">return</span> <span class="p">[[</span><span class="s1">'server'</span><span class="p">],</span> <span class="n">block</span><span class="p">]</span></div></div>
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2014-2018, Let's Encrypt Project.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
|