CINXE.COM

gevent.ssl – Secure Sockets Layer (SSL/TLS) module - gevent 24.11.2.dev0 documentation

<!doctype html> <html class="no-js" lang="en" data-content_root="../"> <head><meta charset="utf-8"/> <meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="gevent.select – Waiting for I/O completion" href="gevent.select.html" /><link rel="prev" title="gevent._socket3 – Python 3 socket module" href="gevent._socket3.html" /> <!-- Generated with Sphinx 8.1.3 and Furo 2024.08.06 --> <title>gevent.ssl – Secure Sockets Layer (SSL/TLS) module - gevent 24.11.2.dev0 documentation</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a3258c64" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=354aac6f" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=302659d7" /> <link rel="stylesheet" type="text/css" href="../_static/custom.css?v=e405f49d" /> <style> body { --color-code-background: #eeeedd; --color-code-foreground: black; --color-brand-primary: #7c9a5e; --color-brand-content: #7c9a5e; --color-foreground-border: #b7d897; --font-stack: "SF Pro",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; --font-stack--monospace: "JetBrainsMono", "JetBrains Mono", "JetBrains Mono Regular", "JetBrainsMono-Regular", ui-monospace, profont, monospace; } @media not print { body[data-theme="dark"] { --color-code-background: #202020; --color-code-foreground: #d0d0d0; } @media (prefers-color-scheme: dark) { body:not([data-theme="light"]) { --color-code-background: #202020; --color-code-foreground: #d0d0d0; } } } </style><script async type="text/javascript" src="/_/static/javascript/readthedocs-addons.js"></script><meta name="readthedocs-project-slug" content="python-gevent" /><meta name="readthedocs-version-slug" content="latest" /><meta name="readthedocs-resolver-filename" content="/api/gevent.ssl.html" /><meta name="readthedocs-http-status" content="200" /></head> <body> <script> document.body.dataset.theme = localStorage.getItem("theme") || "auto"; </script> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <symbol id="svg-toc" viewBox="0 0 24 24"> <title>Contents</title> <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024"> <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/> </svg> </symbol> <symbol id="svg-menu" viewBox="0 0 24 24"> <title>Menu</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu"> <line x1="3" y1="12" x2="21" y2="12"></line> <line x1="3" y1="6" x2="21" y2="6"></line> <line x1="3" y1="18" x2="21" y2="18"></line> </svg> </symbol> <symbol id="svg-arrow-right" viewBox="0 0 24 24"> <title>Expand</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right"> <polyline points="9 18 15 12 9 6"></polyline> </svg> </symbol> <symbol id="svg-sun" viewBox="0 0 24 24"> <title>Light mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> <circle cx="12" cy="12" r="5"></circle> <line x1="12" y1="1" x2="12" y2="3"></line> <line x1="12" y1="21" x2="12" y2="23"></line> <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line> <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line> <line x1="1" y1="12" x2="3" y2="12"></line> <line x1="21" y1="12" x2="23" y2="12"></line> <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line> <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line> </svg> </symbol> <symbol id="svg-moon" viewBox="0 0 24 24"> <title>Dark mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" /> </svg> </symbol> <symbol id="svg-sun-with-moon" viewBox="0 0 24 24"> <title>Auto light/dark, in light mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-custom-derived-from-feather-sun-and-tabler-moon"> <path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/> <line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/> <line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/> <line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/> <line x1="19" y1="14.05" x2="20.414" y2="15.464"/> <line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/> <line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/> <line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/> <line x1="19" y1="5.05" x2="20.414" y2="3.636"/> <circle cx="14.5" cy="9.55" r="3.6"/> </svg> </symbol> <symbol id="svg-moon-with-sun" viewBox="0 0 24 24"> <title>Auto light/dark, in dark mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-custom-derived-from-feather-sun-and-tabler-moon"> <path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/> <line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/> <line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/> <line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/> <line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/> <line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/> <line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/> <line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/> <line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/> <circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/> </svg> </symbol> <symbol id="svg-pencil" viewBox="0 0 24 24"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code"> <path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" /> <path d="M13.5 6.5l4 4" /> <path d="M20 21l2 -2l-2 -2" /> <path d="M17 17l-2 2l2 2" /> </svg> </symbol> <symbol id="svg-eye" viewBox="0 0 24 24"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /> <path d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" /> <path d="M20 21l2 -2l-2 -2" /> <path d="M17 17l-2 2l2 2" /> </svg> </symbol> </svg> <input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation"> <input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc"> <label class="overlay sidebar-overlay" for="__navigation"> <div class="visually-hidden">Hide navigation sidebar</div> </label> <label class="overlay toc-overlay" for="__toc"> <div class="visually-hidden">Hide table of contents sidebar</div> </label> <a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a> <div class="page"> <header class="mobile-header"> <div class="header-left"> <label class="nav-overlay-icon" for="__navigation"> <div class="visually-hidden">Toggle site navigation sidebar</div> <i class="icon"><svg><use href="#svg-menu"></use></svg></i> </label> </div> <div class="header-center"> <a href="../contents.html"><div class="brand">gevent 24.11.2.dev0 documentation</div></a> </div> <div class="header-right"> <div class="theme-toggle-container theme-toggle-header"> <button class="theme-toggle"> <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div> <svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg> <svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg> <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg> <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg> </button> </div> <label class="toc-overlay-icon toc-header-icon" for="__toc"> <div class="visually-hidden">Toggle table of contents sidebar</div> <i class="icon"><svg><use href="#svg-toc"></use></svg></i> </label> </div> </header> <aside class="sidebar-drawer"> <div class="sidebar-container"> <div class="sidebar-sticky"><a class="sidebar-brand" href="../contents.html"> <div class="sidebar-logo-container"> <img class="sidebar-logo" src="../_static/5564530.png" alt="Logo"/> </div> </a><form class="sidebar-search-container" method="get" action="../search.html" role="search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input type="hidden" name="check_keywords" value="yes"> <input type="hidden" name="area" value="default"> </form> <div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree"> <ul> <li class="toctree-l1"><a class="reference internal" href="../install.html">Installation and Requirements</a></li> <li class="toctree-l1 has-children"><a class="reference internal" href="../changelog.html">Changelog</a><input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of Changelog</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../changelog_1_5.html">Changes for 1.5</a></li> <li class="toctree-l2"><a class="reference internal" href="../changelog_1_4.html">Changes for 1.4</a></li> <li class="toctree-l2"><a class="reference internal" href="../changelog_1_3.html">Changes for 1.3</a></li> <li class="toctree-l2"><a class="reference internal" href="../changelog_1_2.html">Changes for 1.2</a></li> <li class="toctree-l2"><a class="reference internal" href="../changelog_1_1.html">Changes for 1.1</a></li> <li class="toctree-l2"><a class="reference internal" href="../changelog_1_0.html">Changes for 1.0</a></li> <li class="toctree-l2"><a class="reference internal" href="../changelog_pre.html">Changes before gevent 1.0</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../intro.html">Introduction</a></li> <li class="toctree-l1"><a class="reference internal" href="gevent.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent</span></code> – common functions</a></li> <li class="toctree-l1"><a class="reference internal" href="gevent.greenlet.html">Greenlet Objects</a></li> <li class="toctree-l1"><a class="reference internal" href="../servers.html">Implementing servers</a></li> <li class="toctree-l1 has-children"><a class="reference internal" href="../dns.html">Name Resolution (DNS)</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Name Resolution (DNS)</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="gevent.resolver.thread.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.thread</span></code> – thread based hostname resolver</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.resolver.ares.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.ares</span></code> – c-ares based hostname resolver</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.resolver.dnspython.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.dnspython</span></code> – Pure Python hostname resolver</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.resolver.blocking.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.blocking</span></code> – Non-cooperative resolver</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../monitoring.html">Monitoring and Debugging gevent Applications</a></li> <li class="toctree-l1"><a class="reference internal" href="../loop_impls.html">Event Loop Implementations: libuv and libev</a></li> <li class="toctree-l1"><a class="reference internal" href="../configuration.html">Configuring gevent</a></li> </ul> <ul class="current"> <li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">API reference</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><div class="visually-hidden">Toggle navigation of API reference</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current"> <li class="toctree-l2"><a class="reference internal" href="gevent.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent</span></code> – common functions</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.timeout.html">Cooperative Timeouts Using <code class="docutils literal notranslate"><span class="pre">gevent.Timeout</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.greenlet.html">Greenlet Objects</a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="gevent.socket.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.socket</span></code> – Cooperative low-level networking interface</a><input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><div class="visually-hidden">Toggle navigation of gevent.socket – Cooperative low-level networking interface</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="gevent._socket3.html">Python 3 interface</a></li> </ul> </li> <li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.ssl</span></code> – Secure Sockets Layer (SSL/TLS) module</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.select.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.select</span></code> – Waiting for I/O completion</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.selectors.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.selectors</span></code> – High-level IO Multiplexing</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.event.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.event</span></code> – Notifications of multiple listeners</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.queue.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.queue</span></code> – Synchronized queues</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.local.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.local</span></code> – Greenlet-local objects</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.lock.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.lock</span></code> – Locking primitives</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.hub.html"><code class="docutils literal notranslate"><span class="pre">gevent.hub</span></code> - The Event Loop and the Hub</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.core.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.core</span></code> - (deprecated) event loop abstraction</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent</span></code> – common functions</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.backdoor.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.backdoor</span></code> – Interactive greenlet-based network console that can be used in any process</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.baseserver.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.baseserver</span></code> – Base class for implementing servers</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.builtins.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.builtins</span></code> – gevent friendly implementations of builtin functions</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.contextvars.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.contextvars</span></code> – Cooperative <code class="docutils literal notranslate"><span class="pre">contextvars</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.core.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.core</span></code> - (deprecated) event loop abstraction</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.event.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.event</span></code> – Notifications of multiple listeners</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.events.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.events</span></code> – Publish/subscribe event infrastructure</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.exceptions.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.exceptions</span></code> – Exceptions</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.fileobject.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.fileobject</span></code> – Wrappers to make file-like objects cooperative</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.hub.html"><code class="docutils literal notranslate"><span class="pre">gevent.hub</span></code> - The Event Loop and the Hub</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.local.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.local</span></code> – Greenlet-local objects</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.lock.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.lock</span></code> – Locking primitives</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.monkey.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.monkey</span></code> – Make the standard library cooperative</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.os.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.os</span></code> – Low-level operating system functions from <code class="xref py py-mod docutils literal notranslate"><span class="pre">os</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.pool.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.pool</span></code> – Managing greenlets in a group</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.pywsgi.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.pywsgi</span></code> – A pure-Python, gevent-friendly WSGI server</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.queue.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.queue</span></code> – Synchronized queues</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.resolver.ares.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.ares</span></code> – c-ares based hostname resolver</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.resolver.blocking.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.blocking</span></code> – Non-cooperative resolver</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.resolver.dnspython.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.dnspython</span></code> – Pure Python hostname resolver</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.resolver.thread.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.thread</span></code> – thread based hostname resolver</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.select.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.select</span></code> – Waiting for I/O completion</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.selectors.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.selectors</span></code> – High-level IO Multiplexing</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.server.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.server</span></code> – TCP/SSL server</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.signal.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.signal</span></code> – Cooperative implementation of special cases of <code class="xref py py-func docutils literal notranslate"><span class="pre">signal.signal()</span></code></a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="gevent.socket.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.socket</span></code> – Cooperative low-level networking interface</a><input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><div class="visually-hidden">Toggle navigation of gevent.socket – Cooperative low-level networking interface</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="gevent._socket3.html">Python 3 interface</a></li> </ul> </li> <li class="toctree-l2 current current-page"><a class="current reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.ssl</span></code> – Secure Sockets Layer (SSL/TLS) module</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.subprocess.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.subprocess</span></code> – Cooperative <code class="docutils literal notranslate"><span class="pre">subprocess</span></code> module</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.thread.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.thread</span></code> – Implementation of the standard <code class="xref py py-mod docutils literal notranslate"><span class="pre">thread</span></code> module that spawns greenlets</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.threading.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.threading</span></code> – Implementation of the standard <code class="xref py py-mod docutils literal notranslate"><span class="pre">threading</span></code> using greenlets</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.threadpool.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.threadpool</span></code> - A pool of native threads</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.time.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.time</span></code> – Makes <em>sleep</em> gevent aware</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.util.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.util</span></code> – Low-level utilities</a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.ares.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.ares</span></code> – Backwards compatibility alias for <code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.cares</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="gevent.wsgi.html"><code class="docutils literal notranslate"><span class="pre">gevent.wsgi</span></code> – Historical note only; does not exist</a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="../examples/index.html">Examples</a><input class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><div class="visually-hidden">Toggle navigation of Examples</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../examples/concurrent_download.html">Example concurrent_download.py</a></li> <li class="toctree-l3"><a class="reference internal" href="../examples/dns_mass_resolve.html">Example dns_mass_resolve.py</a></li> <li class="toctree-l3"><a class="reference internal" href="../examples/echoserver.html">Example echoserver.py</a></li> <li class="toctree-l3"><a class="reference internal" href="../examples/geventsendfile.html">Example geventsendfile.py</a></li> <li class="toctree-l3"><a class="reference internal" href="../examples/portforwarder.html">Example portforwarder.py</a></li> <li class="toctree-l3"><a class="reference internal" href="../examples/processes.html">Example processes.py</a></li> <li class="toctree-l3"><a class="reference internal" href="../examples/psycopg2_pool.html">Example psycopg2_pool.py</a></li> <li class="toctree-l3"><a class="reference internal" href="../examples/threadpool.html">Example threadpool.py</a></li> <li class="toctree-l3"><a class="reference internal" href="../examples/udp_client.html">Example udp_client.py</a></li> <li class="toctree-l3"><a class="reference internal" href="../examples/udp_server.html">Example udp_server.py</a></li> <li class="toctree-l3"><a class="reference internal" href="../examples/unixsocket_client.html">Example unixsocket_client.py</a></li> <li class="toctree-l3"><a class="reference internal" href="../examples/unixsocket_server.html">Example unixsocket_server.py</a></li> <li class="toctree-l3"><a class="reference internal" href="../examples/webproxy.html">Example webproxy.py</a></li> <li class="toctree-l3"><a class="reference internal" href="../examples/webpy.html">Example webpy.py</a></li> <li class="toctree-l3"><a class="reference internal" href="../examples/wsgiserver.html">Example wsgiserver.py</a></li> <li class="toctree-l3"><a class="reference internal" href="../examples/wsgiserver_ssl.html">Example wsgiserver_ssl.py</a></li> </ul> </li> </ul> </li> </ul> <ul> <li class="toctree-l1 has-children"><a class="reference internal" href="../development/index.html">Development</a><input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><div class="visually-hidden">Toggle navigation of Development</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../development/getting_started.html">Getting Started</a></li> <li class="toctree-l2"><a class="reference internal" href="../development/installing_from_source.html">Installing From Source</a></li> <li class="toctree-l2"><a class="reference internal" href="../development/running_tests.html">Running Tests</a></li> <li class="toctree-l2"><a class="reference internal" href="../development/ci.html">Continuous integration</a></li> <li class="toctree-l2"><a class="reference internal" href="../development/release_process.html">Release Process</a></li> </ul> </li> </ul> <ul> <li class="toctree-l1"><a class="reference internal" href="../success.html">Success stories</a></li> <li class="toctree-l1"><a class="reference internal" href="../community.html">Community</a></li> <li class="toctree-l1 has-children"><a class="reference internal" href="../older_releases.html">Information About Older Releases</a><input class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><div class="visually-hidden">Toggle navigation of Information About Older Releases</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2 has-children"><a class="reference internal" href="../whatsnew_1_5.html">What’s new in gevent 1.5</a><input class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><div class="visually-hidden">Toggle navigation of What’s new in gevent 1.5</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../changelog_1_5.html">Changes for 1.5</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../whatsnew_1_4.html">What’s new in gevent 1.4</a><input class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><div class="visually-hidden">Toggle navigation of What’s new in gevent 1.4</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../changelog_1_4.html">Changes for 1.4</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../whatsnew_1_3.html">What’s new in gevent 1.3</a><input class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><div class="visually-hidden">Toggle navigation of What’s new in gevent 1.3</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../changelog_1_3.html">Changes for 1.3</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../whatsnew_1_2.html">What’s new in gevent 1.2</a><input class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><div class="visually-hidden">Toggle navigation of What’s new in gevent 1.2</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../changelog_1_2.html">Changes for 1.2</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../whatsnew_1_1.html">What’s new in gevent 1.1</a><input class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><div class="visually-hidden">Toggle navigation of What’s new in gevent 1.1</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../changelog_1_1.html">Changes for 1.1</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../whatsnew_1_0.html">What’s new in gevent 1.0</a><input class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><div class="visually-hidden">Toggle navigation of What’s new in gevent 1.0</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../changelog_1_0.html">Changes for 1.0</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../changelog_1_5.html">Changes for 1.5</a></li> <li class="toctree-l2"><a class="reference internal" href="../changelog_1_4.html">Changes for 1.4</a></li> <li class="toctree-l2"><a class="reference internal" href="../changelog_1_3.html">Changes for 1.3</a></li> <li class="toctree-l2"><a class="reference internal" href="../changelog_1_2.html">Changes for 1.2</a></li> <li class="toctree-l2"><a class="reference internal" href="../changelog_1_1.html">Changes for 1.1</a></li> <li class="toctree-l2"><a class="reference internal" href="../changelog_1_0.html">Changes for 1.0</a></li> <li class="toctree-l2"><a class="reference internal" href="../changelog_pre.html">Changes before gevent 1.0</a></li> </ul> </li> </ul> </div> </div> </div> </div> </aside> <div class="main"> <div class="content"> <div class="article-container"> <a href="#" class="back-to-top muted-link"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path> </svg> <span>Back to top</span> </a> <div class="content-icon-container"> <div class="theme-toggle-container theme-toggle-content"> <button class="theme-toggle"> <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div> <svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg> <svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg> <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg> <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg> </button> </div> <label class="toc-overlay-icon toc-content-icon" for="__toc"> <div class="visually-hidden">Toggle table of contents sidebar</div> <i class="icon"><svg><use href="#svg-toc"></use></svg></i> </label> </div> <article role="main" id="furo-main-content"> <section id="module-gevent.ssl"> <span id="gevent-ssl-secure-sockets-layer-ssl-tls-module"></span><h1><a class="reference internal" href="#module-0" title="gevent.ssl"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.ssl</span></code></a> – Secure Sockets Layer (SSL/TLS) module<a class="headerlink" href="#module-gevent.ssl" title="Link to this heading">¶</a></h1> <p>This module provides SSL/TLS operations and some related functions. The API of the functions and classes matches the API of the corresponding items in the standard <a class="reference external" href="https://docs.python.org/3/library/ssl.html#module-ssl" title="(in Python v3.13)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ssl</span></code></a> module exactly, but the synchronous functions in this module only block the current greenlet and let the others run.</p> <p>The exact API exposed by this module varies depending on what version of Python you are using. The documents below describe the API for Python 3.</p> <div class="admonition tip"> <p class="admonition-title">Tip</p> <p>As an implementation note, gevent’s exact behaviour will differ somewhat depending on the underlying TLS version in use. For example, the number of data exchanges involved in the handshake process, and exactly when that process occurs, will vary. This can be indirectly observed by the number and timing of greenlet switches or trips around the event loop gevent makes.</p> <p>Most applications should not notice this, but some applications (and especially tests, where it is common for a process to be both a server and its own client), may find that they have coded in assumptions about the order in which multiple greenlets run. As TLS 1.3 gets deployed, those assumptions are likely to break.</p> </div> <div class="admonition warning"> <p class="admonition-title">Warning</p> <p>All the described APIs should be imported from <code class="docutils literal notranslate"><span class="pre">gevent.ssl</span></code>, and <em>not</em> from their implementation modules. Their organization is an implementation detail that may change at any time.</p> </div> <p id="module-0">SSL wrapper for socket objects on Python 3.</p> <p>For the documentation, refer to <a class="reference external" href="https://docs.python.org/3/library/ssl.html#module-ssl" title="(in Python v3.13)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ssl</span></code></a> module manual.</p> <p>This module implements cooperative SSL socket wrappers.</p> <dl class="py attribute"> <dt class="sig sig-object py" id="gevent.ssl.CertificateError"> <span class="sig-name descname"><span class="pre">CertificateError</span></span><a class="headerlink" href="#gevent.ssl.CertificateError" title="Link to this definition">¶</a></dt> <dd><p>alias of <a class="reference internal" href="#gevent.ssl.SSLCertVerificationError" title="ssl.SSLCertVerificationError"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSLCertVerificationError</span></code></a></p> </dd></dl> <dl class="py exception"> <dt class="sig sig-object py" id="gevent.ssl.SSLCertVerificationError"> <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SSLCertVerificationError</span></span><a class="headerlink" href="#gevent.ssl.SSLCertVerificationError" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="#gevent.ssl.SSLError" title="ssl.SSLError"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSLError</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#ValueError" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">ValueError</span></code></a></p> <p>A certificate could not be verified.</p> </dd></dl> <dl class="py exception"> <dt class="sig sig-object py" id="gevent.ssl.SSLEOFError"> <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SSLEOFError</span></span><a class="headerlink" href="#gevent.ssl.SSLEOFError" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="#gevent.ssl.SSLError" title="ssl.SSLError"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSLError</span></code></a></p> <p>SSL/TLS connection terminated abruptly.</p> </dd></dl> <dl class="py exception"> <dt class="sig sig-object py" id="gevent.ssl.SSLError"> <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SSLError</span></span><a class="headerlink" href="#gevent.ssl.SSLError" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#OSError" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">OSError</span></code></a></p> <p>An error occurred in the SSL implementation.</p> </dd></dl> <dl class="py exception"> <dt class="sig sig-object py" id="gevent.ssl.SSLSyscallError"> <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SSLSyscallError</span></span><a class="headerlink" href="#gevent.ssl.SSLSyscallError" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="#gevent.ssl.SSLError" title="ssl.SSLError"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSLError</span></code></a></p> <p>System error when attempting SSL operation.</p> </dd></dl> <dl class="py exception"> <dt class="sig sig-object py" id="gevent.ssl.SSLWantReadError"> <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SSLWantReadError</span></span><a class="headerlink" href="#gevent.ssl.SSLWantReadError" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="#gevent.ssl.SSLError" title="ssl.SSLError"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSLError</span></code></a></p> <p>Non-blocking SSL socket needs to read more data before the requested operation can be completed.</p> </dd></dl> <dl class="py exception"> <dt class="sig sig-object py" id="gevent.ssl.SSLWantWriteError"> <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SSLWantWriteError</span></span><a class="headerlink" href="#gevent.ssl.SSLWantWriteError" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="#gevent.ssl.SSLError" title="ssl.SSLError"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSLError</span></code></a></p> <p>Non-blocking SSL socket needs to write more data before the requested operation can be completed.</p> </dd></dl> <dl class="py exception"> <dt class="sig sig-object py" id="gevent.ssl.SSLZeroReturnError"> <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SSLZeroReturnError</span></span><a class="headerlink" href="#gevent.ssl.SSLZeroReturnError" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="#gevent.ssl.SSLError" title="ssl.SSLError"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSLError</span></code></a></p> <p>SSL/TLS session closed cleanly.</p> </dd></dl> <dl class="py attribute"> <dt class="sig sig-object py" id="gevent.ssl.socket_error"> <span class="sig-name descname"><span class="pre">socket_error</span></span><a class="headerlink" href="#gevent.ssl.socket_error" title="Link to this definition">¶</a></dt> <dd><p>alias of <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#OSError" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">OSError</span></code></a></p> </dd></dl> <dl class="py class"> <dt class="sig sig-object py" id="gevent.ssl.AlertDescription"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">AlertDescription</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">module</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">qualname</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">start</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">boundary</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#gevent.ssl.AlertDescription" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/enum.html#enum.IntEnum" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">IntEnum</span></code></a></p> <p>An enumeration.</p> </dd></dl> <dl class="py class"> <dt class="sig sig-object py" id="gevent.ssl.DefaultVerifyPaths"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">DefaultVerifyPaths</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cafile</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">capath</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">openssl_cafile_env</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">openssl_cafile</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">openssl_capath_env</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">openssl_capath</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#gevent.ssl.DefaultVerifyPaths" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a></p> <p>Create new instance of DefaultVerifyPaths(cafile, capath, openssl_cafile_env, openssl_cafile, openssl_capath_env, openssl_capath)</p> <dl class="py attribute"> <dt class="sig sig-object py" id="gevent.ssl.DefaultVerifyPaths.cafile"> <span class="sig-name descname"><span class="pre">cafile</span></span><a class="headerlink" href="#gevent.ssl.DefaultVerifyPaths.cafile" title="Link to this definition">¶</a></dt> <dd><p>Alias for field number 0</p> </dd></dl> <dl class="py attribute"> <dt class="sig sig-object py" id="gevent.ssl.DefaultVerifyPaths.capath"> <span class="sig-name descname"><span class="pre">capath</span></span><a class="headerlink" href="#gevent.ssl.DefaultVerifyPaths.capath" title="Link to this definition">¶</a></dt> <dd><p>Alias for field number 1</p> </dd></dl> <dl class="py attribute"> <dt class="sig sig-object py" id="gevent.ssl.DefaultVerifyPaths.openssl_cafile"> <span class="sig-name descname"><span class="pre">openssl_cafile</span></span><a class="headerlink" href="#gevent.ssl.DefaultVerifyPaths.openssl_cafile" title="Link to this definition">¶</a></dt> <dd><p>Alias for field number 3</p> </dd></dl> <dl class="py attribute"> <dt class="sig sig-object py" id="gevent.ssl.DefaultVerifyPaths.openssl_cafile_env"> <span class="sig-name descname"><span class="pre">openssl_cafile_env</span></span><a class="headerlink" href="#gevent.ssl.DefaultVerifyPaths.openssl_cafile_env" title="Link to this definition">¶</a></dt> <dd><p>Alias for field number 2</p> </dd></dl> <dl class="py attribute"> <dt class="sig sig-object py" id="gevent.ssl.DefaultVerifyPaths.openssl_capath"> <span class="sig-name descname"><span class="pre">openssl_capath</span></span><a class="headerlink" href="#gevent.ssl.DefaultVerifyPaths.openssl_capath" title="Link to this definition">¶</a></dt> <dd><p>Alias for field number 5</p> </dd></dl> <dl class="py attribute"> <dt class="sig sig-object py" id="gevent.ssl.DefaultVerifyPaths.openssl_capath_env"> <span class="sig-name descname"><span class="pre">openssl_capath_env</span></span><a class="headerlink" href="#gevent.ssl.DefaultVerifyPaths.openssl_capath_env" title="Link to this definition">¶</a></dt> <dd><p>Alias for field number 4</p> </dd></dl> </dd></dl> <dl class="py class"> <dt class="sig sig-object py" id="gevent.ssl.Options"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">Options</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">module</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">qualname</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">start</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">boundary</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#gevent.ssl.Options" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/enum.html#enum.IntFlag" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">IntFlag</span></code></a></p> <p>An enumeration.</p> </dd></dl> <dl class="py class"> <dt class="sig sig-object py" id="gevent.ssl.Purpose"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">Purpose</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">module</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">qualname</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">start</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">boundary</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#Purpose"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.Purpose" title="Link to this definition">¶</a></dt> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">_ASN1Object</span></code>, <a class="reference external" href="https://docs.python.org/3/library/enum.html#enum.Enum" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Enum</span></code></a></p> <p>SSLContext purpose flags with X509v3 Extended Key Usage objects</p> <p>Create new instance of _ASN1Object(nid, shortname, longname, oid)</p> </dd></dl> <dl class="py class"> <dt class="sig sig-object py" id="gevent.ssl.SSLContext"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SSLContext</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">protocol</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLContext"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLContext" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/ssl.html#ssl.SSLContext" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSLContext</span></code></a></p> <dl class="py attribute"> <dt class="sig sig-object py" id="gevent.ssl.SSLContext.sslsocket_class"> <span class="sig-name descname"><span class="pre">sslsocket_class</span></span><a class="headerlink" href="#gevent.ssl.SSLContext.sslsocket_class" title="Link to this definition">¶</a></dt> <dd><p>alias of <a class="reference internal" href="#gevent.ssl.SSLSocket" title="gevent.ssl.SSLSocket"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSLSocket</span></code></a></p> </dd></dl> <dl class="py property"> <dt class="sig sig-object py" id="gevent.ssl.SSLContext.sni_callback"> <em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">sni_callback</span></span><a class="headerlink" href="#gevent.ssl.SSLContext.sni_callback" title="Link to this definition">¶</a></dt> <dd><p>Set a callback that will be called when a server name is provided by the SSL/TLS client in the SNI extension.</p> <p>If the argument is None then the callback is disabled. The method is called with the SSLSocket, the server name as a string, and the SSLContext object. See RFC 6066 for details of the SNI extension.</p> </dd></dl> </dd></dl> <dl class="py class"> <dt class="sig sig-object py" id="gevent.ssl.SSLErrorNumber"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SSLErrorNumber</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">module</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">qualname</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">start</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">boundary</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#gevent.ssl.SSLErrorNumber" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/enum.html#enum.IntEnum" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">IntEnum</span></code></a></p> <p>An enumeration.</p> </dd></dl> <dl class="py class"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SSLObject</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#SSLObject"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLObject" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <p>This class implements an interface on top of a low-level SSL object as implemented by OpenSSL. This object captures the state of an SSL connection but does not provide any network IO itself. IO needs to be performed through separate “BIO” objects which are OpenSSL’s IO abstraction layer.</p> <p>This class does not have a public constructor. Instances are returned by <code class="docutils literal notranslate"><span class="pre">SSLContext.wrap_bio</span></code>. This class is typically used by framework authors that want to implement asynchronous IO for SSL through memory buffers.</p> <p>When compared to <code class="docutils literal notranslate"><span class="pre">SSLSocket</span></code>, this object lacks the following features:</p> <blockquote> <div><ul class="simple"> <li><p>Any form of network IO, including methods such as <code class="docutils literal notranslate"><span class="pre">recv</span></code> and <code class="docutils literal notranslate"><span class="pre">send</span></code>.</p></li> <li><p>The <code class="docutils literal notranslate"><span class="pre">do_handshake_on_connect</span></code> and <code class="docutils literal notranslate"><span class="pre">suppress_ragged_eofs</span></code> machinery.</p></li> </ul> </div></blockquote> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.cipher"> <span class="sig-name descname"><span class="pre">cipher</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#SSLObject.cipher"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLObject.cipher" title="Link to this definition">¶</a></dt> <dd><p>Return the currently selected cipher as a 3-tuple <code class="docutils literal notranslate"><span class="pre">(name,</span> <span class="pre">ssl_version,</span> <span class="pre">secret_bits)</span></code>.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.compression"> <span class="sig-name descname"><span class="pre">compression</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#SSLObject.compression"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLObject.compression" title="Link to this definition">¶</a></dt> <dd><p>Return the current compression algorithm in use, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if compression was not negotiated or not supported by one of the peers.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.do_handshake"> <span class="sig-name descname"><span class="pre">do_handshake</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#SSLObject.do_handshake"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLObject.do_handshake" title="Link to this definition">¶</a></dt> <dd><p>Start the SSL/TLS handshake.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.get_channel_binding"> <span class="sig-name descname"><span class="pre">get_channel_binding</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cb_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'tls-unique'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#SSLObject.get_channel_binding"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLObject.get_channel_binding" title="Link to this definition">¶</a></dt> <dd><p>Get channel binding data for current connection. Raise ValueError if the requested <code class="xref py py-obj docutils literal notranslate"><span class="pre">cb_type</span></code> is not supported. Return bytes of the data or None if the data is not available (e.g. before the handshake).</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.getpeercert"> <span class="sig-name descname"><span class="pre">getpeercert</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">binary_form</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#SSLObject.getpeercert"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLObject.getpeercert" title="Link to this definition">¶</a></dt> <dd><p>Returns a formatted version of the data in the certificate provided by the other end of the SSL channel.</p> <p>Return None if no certificate was provided, {} if a certificate was provided, but not validated.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.pending"> <span class="sig-name descname"><span class="pre">pending</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#SSLObject.pending"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLObject.pending" title="Link to this definition">¶</a></dt> <dd><p>Return the number of bytes that can be read immediately.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.read"> <span class="sig-name descname"><span class="pre">read</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">len</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1024</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">buffer</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#SSLObject.read"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLObject.read" title="Link to this definition">¶</a></dt> <dd><p>Read up to ‘len’ bytes from the SSL object and return them.</p> <p>If ‘buffer’ is provided, read into this buffer and return the number of bytes read.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.selected_alpn_protocol"> <span class="sig-name descname"><span class="pre">selected_alpn_protocol</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#SSLObject.selected_alpn_protocol"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLObject.selected_alpn_protocol" title="Link to this definition">¶</a></dt> <dd><p>Return the currently selected ALPN protocol as a string, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if a next protocol was not negotiated or if ALPN is not supported by one of the peers.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.selected_npn_protocol"> <span class="sig-name descname"><span class="pre">selected_npn_protocol</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#SSLObject.selected_npn_protocol"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLObject.selected_npn_protocol" title="Link to this definition">¶</a></dt> <dd><p>Return the currently selected NPN protocol as a string, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if a next protocol was not negotiated or if NPN is not supported by one of the peers.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.shared_ciphers"> <span class="sig-name descname"><span class="pre">shared_ciphers</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#SSLObject.shared_ciphers"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLObject.shared_ciphers" title="Link to this definition">¶</a></dt> <dd><p>Return a list of ciphers shared by the client during the handshake or None if this is not a valid server connection.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.unwrap"> <span class="sig-name descname"><span class="pre">unwrap</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#SSLObject.unwrap"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLObject.unwrap" title="Link to this definition">¶</a></dt> <dd><p>Start the SSL shutdown handshake.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.version"> <span class="sig-name descname"><span class="pre">version</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#SSLObject.version"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLObject.version" title="Link to this definition">¶</a></dt> <dd><p>Return a string identifying the protocol version used by the current SSL channel.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.write"> <span class="sig-name descname"><span class="pre">write</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#SSLObject.write"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLObject.write" title="Link to this definition">¶</a></dt> <dd><p>Write ‘data’ to the SSL object and return the number of bytes written.</p> <p>The ‘data’ argument must support the buffer interface.</p> </dd></dl> <dl class="py property"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.context"> <em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">context</span></span><a class="headerlink" href="#gevent.ssl.SSLObject.context" title="Link to this definition">¶</a></dt> <dd><p>The SSLContext that is currently in use.</p> </dd></dl> <dl class="py property"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.server_hostname"> <em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">server_hostname</span></span><a class="headerlink" href="#gevent.ssl.SSLObject.server_hostname" title="Link to this definition">¶</a></dt> <dd><p>The currently set server hostname (for SNI), or <code class="docutils literal notranslate"><span class="pre">None</span></code> if no server hostname is set.</p> </dd></dl> <dl class="py property"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.server_side"> <em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">server_side</span></span><a class="headerlink" href="#gevent.ssl.SSLObject.server_side" title="Link to this definition">¶</a></dt> <dd><p>Whether this is a server-side socket.</p> </dd></dl> <dl class="py property"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.session"> <em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">session</span></span><a class="headerlink" href="#gevent.ssl.SSLObject.session" title="Link to this definition">¶</a></dt> <dd><p>The SSLSession for client socket.</p> </dd></dl> <dl class="py property"> <dt class="sig sig-object py" id="gevent.ssl.SSLObject.session_reused"> <em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">session_reused</span></span><a class="headerlink" href="#gevent.ssl.SSLObject.session_reused" title="Link to this definition">¶</a></dt> <dd><p>Was the client session reused during handshake</p> </dd></dl> </dd></dl> <dl class="py class"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SSLSocket</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sock</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">keyfile</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">certfile</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">server_side</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cert_reqs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">VerifyMode.CERT_NONE</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ssl_version</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">_SSLMethod.PROTOCOL_TLS</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ca_certs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">do_handshake_on_connect</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">family</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">AddressFamily.AF_INET</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">SocketKind.SOCK_STREAM</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">proto</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fileno</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">suppress_ragged_eofs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">npn_protocols</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ciphers</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">server_hostname</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">_session</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">_context</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="gevent._socket3.html#gevent._socket3.socket" title="gevent._socket3.socket"><code class="xref py py-class docutils literal notranslate"><span class="pre">socket</span></code></a></p> <p>gevent <a class="reference external" href="https://docs.python.org/3/library/ssl.html#ssl-sockets">ssl.SSLSocket</a> for Python 3.</p> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.accept"> <span class="sig-name descname"><span class="pre">accept</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.accept"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.accept" title="Link to this definition">¶</a></dt> <dd><p>Accepts a new connection from a remote client, and returns a tuple containing that new connection wrapped with a server-side SSL channel, and the address of the remote client.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.connect"> <span class="sig-name descname"><span class="pre">connect</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">addr</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.connect"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.connect" title="Link to this definition">¶</a></dt> <dd><p>Connects to remote ADDR, and then wraps the connection in an SSL channel.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.connect_ex"> <span class="sig-name descname"><span class="pre">connect_ex</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">addr</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.connect_ex"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.connect_ex" title="Link to this definition">¶</a></dt> <dd><p>Connects to remote ADDR, and then wraps the connection in an SSL channel.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.do_handshake"> <span class="sig-name descname"><span class="pre">do_handshake</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.do_handshake"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.do_handshake" title="Link to this definition">¶</a></dt> <dd><p>Perform a TLS/SSL handshake.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.dup"> <span class="sig-name descname"><span class="pre">dup</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">socket</span> <span class="pre">object</span></span></span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.dup"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.dup" title="Link to this definition">¶</a></dt> <dd><p>Return a new socket object connected to the same system resource.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.get_channel_binding"> <span class="sig-name descname"><span class="pre">get_channel_binding</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cb_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'tls-unique'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.get_channel_binding"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.get_channel_binding" title="Link to this definition">¶</a></dt> <dd><p>Get channel binding data for current connection. Raise ValueError if the requested <code class="xref py py-obj docutils literal notranslate"><span class="pre">cb_type</span></code> is not supported. Return bytes of the data or None if the data is not available (e.g. before the handshake).</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.getpeercert"> <span class="sig-name descname"><span class="pre">getpeercert</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">binary_form</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.getpeercert"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.getpeercert" title="Link to this definition">¶</a></dt> <dd><p>Returns a formatted version of the data in the certificate provided by the other end of the SSL channel. Return None if no certificate was provided, {} if a certificate was provided, but not validated.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.read"> <span class="sig-name descname"><span class="pre">read</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">nbytes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2014</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">buffer</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.read"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.read" title="Link to this definition">¶</a></dt> <dd><p>Read up to LEN bytes and return them. Return zero-length string on EOF.</p> <div class="versionchanged"> <p><span class="versionmodified changed">Changed in version 24.2.1: </span>No longer requires a non-None <em>buffer</em> to implement <code class="docutils literal notranslate"><span class="pre">len()</span></code>. This is a backport from 3.11.8.</p> </div> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.recv"> <span class="sig-name descname"><span class="pre">recv</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">buffersize</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">flags</span></span></em><span class="optional">]</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">data</span></span></span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.recv"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.recv" title="Link to this definition">¶</a></dt> <dd><p>Receive up to buffersize bytes from the socket. For the optional flags argument, see the Unix manual. When no data is available, block until at least one byte is available or until the remote end is closed. When the remote end is closed and all data is read, return the empty string.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.recv_into"> <span class="sig-name descname"><span class="pre">recv_into</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">buffer</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">nbytes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">flags</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.recv_into"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.recv_into" title="Link to this definition">¶</a></dt> <dd><div class="versionchanged"> <p><span class="versionmodified changed">Changed in version 24.2.1: </span>No longer requires a non-None <em>buffer</em> to implement <code class="docutils literal notranslate"><span class="pre">len()</span></code>. This is a backport from 3.11.8.</p> </div> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.recvfrom"> <span class="sig-name descname"><span class="pre">recvfrom</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">buffersize[,</span> <span class="pre">flags])</span> <span class="pre">-&gt;</span> <span class="pre">(data,</span> <span class="pre">address</span> <span class="pre">info</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.recvfrom"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.recvfrom" title="Link to this definition">¶</a></dt> <dd><p>Like recv(buffersize, flags) but also return the sender’s address info.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.recvfrom_into"> <span class="sig-name descname"><span class="pre">recvfrom_into</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">buffer[,</span> <span class="pre">nbytes[,</span> <span class="pre">flags]])</span> <span class="pre">-&gt;</span> <span class="pre">(nbytes,</span> <span class="pre">address</span> <span class="pre">info</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.recvfrom_into"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.recvfrom_into" title="Link to this definition">¶</a></dt> <dd><p>Like recv_into(buffer[, nbytes[, flags]]) but also return the sender’s address info.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.send"> <span class="sig-name descname"><span class="pre">send</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">flags</span></span></em><span class="optional">]</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">count</span></span></span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.send"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.send" title="Link to this definition">¶</a></dt> <dd><p>Send a data string to the socket. For the optional flags argument, see the Unix manual. Return the number of bytes sent; this may be less than len(data) if the network is busy.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.sendall"> <span class="sig-name descname"><span class="pre">sendall</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">flags</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.sendall"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.sendall" title="Link to this definition">¶</a></dt> <dd><p>Send a data string to the socket. For the optional flags argument, see the Unix manual. This calls send() repeatedly until all data is sent. If an error occurs, it’s impossible to tell how much data has been sent.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.sendto"> <span class="sig-name descname"><span class="pre">sendto</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <span class="optional">[</span><em class="sig-param"><span class="n"><span class="pre">flags</span></span></em>, <span class="optional">]</span><em class="sig-param"><span class="n"><span class="pre">address</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">count</span></span></span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.sendto"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.sendto" title="Link to this definition">¶</a></dt> <dd><p>Like send(data, flags) but allows specifying the destination address. For IP sockets, the address is a pair (hostaddr, port).</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.shared_ciphers"> <span class="sig-name descname"><span class="pre">shared_ciphers</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.shared_ciphers"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.shared_ciphers" title="Link to this definition">¶</a></dt> <dd><p>Return a list of ciphers shared by the client during the handshake or None if this is not a valid server connection.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.shutdown"> <span class="sig-name descname"><span class="pre">shutdown</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">flag</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.shutdown"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.shutdown" title="Link to this definition">¶</a></dt> <dd><p>Shut down the reading side of the socket (flag == SHUT_RD), the writing side of the socket (flag == SHUT_WR), or both ends (flag == SHUT_RDWR).</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.version"> <span class="sig-name descname"><span class="pre">version</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.version"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.version" title="Link to this definition">¶</a></dt> <dd><p>Return a string identifying the protocol version used by the current SSL channel.</p> </dd></dl> <dl class="py method"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.write"> <span class="sig-name descname"><span class="pre">write</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#SSLSocket.write"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.SSLSocket.write" title="Link to this definition">¶</a></dt> <dd><p>Write DATA to the underlying SSL channel. Returns number of bytes of DATA actually transmitted.</p> </dd></dl> <dl class="py property"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.session"> <em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">session</span></span><a class="headerlink" href="#gevent.ssl.SSLSocket.session" title="Link to this definition">¶</a></dt> <dd><p>The SSLSession for client socket.</p> </dd></dl> <dl class="py property"> <dt class="sig sig-object py" id="gevent.ssl.SSLSocket.session_reused"> <em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">session_reused</span></span><a class="headerlink" href="#gevent.ssl.SSLSocket.session_reused" title="Link to this definition">¶</a></dt> <dd><p>Was the client session reused during handshake</p> </dd></dl> </dd></dl> <dl class="py class"> <dt class="sig sig-object py" id="gevent.ssl.TLSVersion"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">TLSVersion</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">module</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">qualname</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">start</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">boundary</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#TLSVersion"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.TLSVersion" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/enum.html#enum.IntEnum" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">IntEnum</span></code></a></p> <p>An enumeration.</p> </dd></dl> <dl class="py class"> <dt class="sig sig-object py" id="gevent.ssl.VerifyFlags"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">VerifyFlags</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">module</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">qualname</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">start</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">boundary</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#gevent.ssl.VerifyFlags" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/enum.html#enum.IntFlag" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">IntFlag</span></code></a></p> <p>An enumeration.</p> </dd></dl> <dl class="py class"> <dt class="sig sig-object py" id="gevent.ssl.VerifyMode"> <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">VerifyMode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">module</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">qualname</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">start</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">boundary</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#gevent.ssl.VerifyMode" title="Link to this definition">¶</a></dt> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/enum.html#enum.IntEnum" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">IntEnum</span></code></a></p> <p>An enumeration.</p> </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="gevent.ssl.DER_cert_to_PEM_cert"> <span class="sig-name descname"><span class="pre">DER_cert_to_PEM_cert</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">der_cert_bytes</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#DER_cert_to_PEM_cert"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.DER_cert_to_PEM_cert" title="Link to this definition">¶</a></dt> <dd><p>Takes a certificate in binary DER format and returns the PEM version of it as a string.</p> </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="gevent.ssl.PEM_cert_to_DER_cert"> <span class="sig-name descname"><span class="pre">PEM_cert_to_DER_cert</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pem_cert_string</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#PEM_cert_to_DER_cert"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.PEM_cert_to_DER_cert" title="Link to this definition">¶</a></dt> <dd><p>Takes a certificate in ASCII PEM format and returns the DER-encoded version of it as a byte sequence</p> </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="gevent.ssl.RAND_add"> <span class="sig-name descname"><span class="pre">RAND_add</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">string</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">entropy</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">/</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#gevent.ssl.RAND_add" title="Link to this definition">¶</a></dt> <dd><p>Mix string into the OpenSSL PRNG state.</p> <p>entropy (a float) is a lower bound on the entropy contained in string. See RFC 4086.</p> </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="gevent.ssl.RAND_bytes"> <span class="sig-name descname"><span class="pre">RAND_bytes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">n</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">/</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#gevent.ssl.RAND_bytes" title="Link to this definition">¶</a></dt> <dd><p>Generate n cryptographically strong pseudo-random bytes.</p> </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="gevent.ssl.RAND_pseudo_bytes"> <span class="sig-name descname"><span class="pre">RAND_pseudo_bytes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">n</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">/</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#gevent.ssl.RAND_pseudo_bytes" title="Link to this definition">¶</a></dt> <dd><p>Generate n pseudo-random bytes.</p> <p>Return a pair (bytes, is_cryptographic). is_cryptographic is True if the bytes generated are cryptographically strong.</p> </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="gevent.ssl.RAND_status"> <span class="sig-name descname"><span class="pre">RAND_status</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#gevent.ssl.RAND_status" title="Link to this definition">¶</a></dt> <dd><p>Returns True if the OpenSSL PRNG has been seeded with enough data and False if not.</p> <p>It is necessary to seed the PRNG with RAND_add() on some platforms before using the ssl() function.</p> </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="gevent.ssl.cert_time_to_seconds"> <span class="sig-name descname"><span class="pre">cert_time_to_seconds</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cert_time</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#cert_time_to_seconds"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.cert_time_to_seconds" title="Link to this definition">¶</a></dt> <dd><p>Return the time in seconds since the Epoch, given the timestring representing the “notBefore” or “notAfter” date from a certificate in <code class="docutils literal notranslate"><span class="pre">&quot;%b</span> <span class="pre">%d</span> <span class="pre">%H:%M:%S</span> <span class="pre">%Y</span> <span class="pre">%Z&quot;</span></code> strptime format (C locale).</p> <p>“notBefore” or “notAfter” dates must use UTC (RFC 5280).</p> <p>Month is one of: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec UTC should be specified as GMT (see ASN1_TIME_print())</p> </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="gevent.ssl.create_connection"> <span class="sig-name descname"><span class="pre">create_connection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">address</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timeout=&lt;object</span> <span class="pre">object&gt;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">source_address=None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">all_errors=False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/socket.html#create_connection"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.create_connection" title="Link to this definition">¶</a></dt> <dd><p>Connect to <em>address</em> and return the socket object.</p> <p>Convenience function. Connect to <em>address</em> (a 2-tuple <code class="docutils literal notranslate"><span class="pre">(host,</span> <span class="pre">port)</span></code>) and return the socket object. Passing the optional <em>timeout</em> parameter will set the timeout on the socket instance before attempting to connect. If no <em>timeout</em> is supplied, the global default timeout setting returned by <code class="xref py py-func docutils literal notranslate"><span class="pre">getdefaulttimeout()</span></code> is used. If <em>source_address</em> is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. A host of ‘’ or port 0 tells the OS to use the default. When a connection cannot be created, raises the last error if <em>all_errors</em> is False, and an ExceptionGroup of all errors if <em>all_errors</em> is True.</p> </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="gevent.ssl.create_default_context"> <span class="sig-name descname"><span class="pre">create_default_context</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">purpose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Purpose.SERVER_AUTH</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cafile</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">capath</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cadata</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#create_default_context"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.create_default_context" title="Link to this definition">¶</a></dt> <dd><p>Create a SSLContext object with default settings.</p> <dl class="simple"> <dt>NOTE: The protocol and settings may change anytime without prior</dt><dd><p>deprecation. The values represent a fair balance between maximum compatibility and security.</p> </dd> </dl> </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="gevent.ssl.get_default_verify_paths"> <span class="sig-name descname"><span class="pre">get_default_verify_paths</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#get_default_verify_paths"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.get_default_verify_paths" title="Link to this definition">¶</a></dt> <dd><p>Return paths to default cafile and capath.</p> </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="gevent.ssl.get_server_certificate"> <span class="sig-name descname"><span class="pre">get_server_certificate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">addr</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ssl_version</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">_SSLMethod.PROTOCOL_TLS</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ca_certs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/gevent/ssl.html#get_server_certificate"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.get_server_certificate" title="Link to this definition">¶</a></dt> <dd><p>Retrieve the certificate from the server at the specified address, and return it as a PEM-encoded string. If ‘ca_certs’ is specified, validate the server cert against it. If ‘ssl_version’ is specified, use it in the connection attempt.</p> </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="gevent.ssl.match_hostname"> <span class="sig-name descname"><span class="pre">match_hostname</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cert</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">hostname</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/ssl.html#match_hostname"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gevent.ssl.match_hostname" title="Link to this definition">¶</a></dt> <dd><p>Verify that <em>cert</em> (in decoded format as returned by SSLSocket.getpeercert()) matches the <em>hostname</em>. RFC 2818 and RFC 6125 rules are followed.</p> <p>The function matches IP addresses rather than dNSNames if hostname is a valid ipaddress string. IPv4 addresses are supported on all platforms. IPv6 addresses are supported on platforms with IPv6 support (AF_INET6 and inet_pton).</p> <p>CertificateError is raised on failure. On success, the function returns nothing.</p> </dd></dl> </section> </article> </div> <footer> <div class="related-pages"> <a class="next-page" href="gevent.select.html"> <div class="page-info"> <div class="context"> <span>Next</span> </div> <div class="title"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.select</span></code> – Waiting for I/O completion</div> </div> <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg> </a> <a class="prev-page" href="gevent._socket3.html"> <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg> <div class="page-info"> <div class="context"> <span>Previous</span> </div> <div class="title"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent._socket3</span></code> – Python 3 socket module</div> </div> </a> </div> <div class="bottom-of-page"> <div class="left-details"> <div class="copyright"> Copyright &#169; 2009-2023, gevent contributors </div> Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s <a href="https://github.com/pradyunsg/furo">Furo</a> </div> <div class="right-details"> </div> </div> </footer> </div> <aside class="toc-drawer"> <div class="toc-sticky toc-scroll"> <div class="toc-title-container"> <span class="toc-title"> On this page </span> </div> <div class="toc-tree-container"> <div class="toc-tree"> <ul> <li><a class="reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.ssl</span></code> – Secure Sockets Layer (SSL/TLS) module</a><ul> <li><a class="reference internal" href="#gevent.ssl.CertificateError"><code class="docutils literal notranslate"><span class="pre">CertificateError</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLCertVerificationError"><code class="docutils literal notranslate"><span class="pre">SSLCertVerificationError</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLEOFError"><code class="docutils literal notranslate"><span class="pre">SSLEOFError</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLError"><code class="docutils literal notranslate"><span class="pre">SSLError</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSyscallError"><code class="docutils literal notranslate"><span class="pre">SSLSyscallError</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLWantReadError"><code class="docutils literal notranslate"><span class="pre">SSLWantReadError</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLWantWriteError"><code class="docutils literal notranslate"><span class="pre">SSLWantWriteError</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLZeroReturnError"><code class="docutils literal notranslate"><span class="pre">SSLZeroReturnError</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.socket_error"><code class="docutils literal notranslate"><span class="pre">socket_error</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.AlertDescription"><code class="docutils literal notranslate"><span class="pre">AlertDescription</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.DefaultVerifyPaths"><code class="docutils literal notranslate"><span class="pre">DefaultVerifyPaths</span></code></a><ul> <li><a class="reference internal" href="#gevent.ssl.DefaultVerifyPaths.cafile"><code class="docutils literal notranslate"><span class="pre">DefaultVerifyPaths.cafile</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.DefaultVerifyPaths.capath"><code class="docutils literal notranslate"><span class="pre">DefaultVerifyPaths.capath</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.DefaultVerifyPaths.openssl_cafile"><code class="docutils literal notranslate"><span class="pre">DefaultVerifyPaths.openssl_cafile</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.DefaultVerifyPaths.openssl_cafile_env"><code class="docutils literal notranslate"><span class="pre">DefaultVerifyPaths.openssl_cafile_env</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.DefaultVerifyPaths.openssl_capath"><code class="docutils literal notranslate"><span class="pre">DefaultVerifyPaths.openssl_capath</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.DefaultVerifyPaths.openssl_capath_env"><code class="docutils literal notranslate"><span class="pre">DefaultVerifyPaths.openssl_capath_env</span></code></a></li> </ul> </li> <li><a class="reference internal" href="#gevent.ssl.Options"><code class="docutils literal notranslate"><span class="pre">Options</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.Purpose"><code class="docutils literal notranslate"><span class="pre">Purpose</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLContext"><code class="docutils literal notranslate"><span class="pre">SSLContext</span></code></a><ul> <li><a class="reference internal" href="#gevent.ssl.SSLContext.sslsocket_class"><code class="docutils literal notranslate"><span class="pre">SSLContext.sslsocket_class</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLContext.sni_callback"><code class="docutils literal notranslate"><span class="pre">SSLContext.sni_callback</span></code></a></li> </ul> </li> <li><a class="reference internal" href="#gevent.ssl.SSLErrorNumber"><code class="docutils literal notranslate"><span class="pre">SSLErrorNumber</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject"><code class="docutils literal notranslate"><span class="pre">SSLObject</span></code></a><ul> <li><a class="reference internal" href="#gevent.ssl.SSLObject.cipher"><code class="docutils literal notranslate"><span class="pre">SSLObject.cipher()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.compression"><code class="docutils literal notranslate"><span class="pre">SSLObject.compression()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.do_handshake"><code class="docutils literal notranslate"><span class="pre">SSLObject.do_handshake()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.get_channel_binding"><code class="docutils literal notranslate"><span class="pre">SSLObject.get_channel_binding()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.getpeercert"><code class="docutils literal notranslate"><span class="pre">SSLObject.getpeercert()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.pending"><code class="docutils literal notranslate"><span class="pre">SSLObject.pending()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.read"><code class="docutils literal notranslate"><span class="pre">SSLObject.read()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.selected_alpn_protocol"><code class="docutils literal notranslate"><span class="pre">SSLObject.selected_alpn_protocol()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.selected_npn_protocol"><code class="docutils literal notranslate"><span class="pre">SSLObject.selected_npn_protocol()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.shared_ciphers"><code class="docutils literal notranslate"><span class="pre">SSLObject.shared_ciphers()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.unwrap"><code class="docutils literal notranslate"><span class="pre">SSLObject.unwrap()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.version"><code class="docutils literal notranslate"><span class="pre">SSLObject.version()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.write"><code class="docutils literal notranslate"><span class="pre">SSLObject.write()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.context"><code class="docutils literal notranslate"><span class="pre">SSLObject.context</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.server_hostname"><code class="docutils literal notranslate"><span class="pre">SSLObject.server_hostname</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.server_side"><code class="docutils literal notranslate"><span class="pre">SSLObject.server_side</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.session"><code class="docutils literal notranslate"><span class="pre">SSLObject.session</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLObject.session_reused"><code class="docutils literal notranslate"><span class="pre">SSLObject.session_reused</span></code></a></li> </ul> </li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket"><code class="docutils literal notranslate"><span class="pre">SSLSocket</span></code></a><ul> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.accept"><code class="docutils literal notranslate"><span class="pre">SSLSocket.accept()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.connect"><code class="docutils literal notranslate"><span class="pre">SSLSocket.connect()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.connect_ex"><code class="docutils literal notranslate"><span class="pre">SSLSocket.connect_ex()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.do_handshake"><code class="docutils literal notranslate"><span class="pre">SSLSocket.do_handshake()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.dup"><code class="docutils literal notranslate"><span class="pre">SSLSocket.dup()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.get_channel_binding"><code class="docutils literal notranslate"><span class="pre">SSLSocket.get_channel_binding()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.getpeercert"><code class="docutils literal notranslate"><span class="pre">SSLSocket.getpeercert()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.read"><code class="docutils literal notranslate"><span class="pre">SSLSocket.read()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.recv"><code class="docutils literal notranslate"><span class="pre">SSLSocket.recv()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.recv_into"><code class="docutils literal notranslate"><span class="pre">SSLSocket.recv_into()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.recvfrom"><code class="docutils literal notranslate"><span class="pre">SSLSocket.recvfrom()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.recvfrom_into"><code class="docutils literal notranslate"><span class="pre">SSLSocket.recvfrom_into()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.send"><code class="docutils literal notranslate"><span class="pre">SSLSocket.send()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.sendall"><code class="docutils literal notranslate"><span class="pre">SSLSocket.sendall()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.sendto"><code class="docutils literal notranslate"><span class="pre">SSLSocket.sendto()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.shared_ciphers"><code class="docutils literal notranslate"><span class="pre">SSLSocket.shared_ciphers()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.shutdown"><code class="docutils literal notranslate"><span class="pre">SSLSocket.shutdown()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.version"><code class="docutils literal notranslate"><span class="pre">SSLSocket.version()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.write"><code class="docutils literal notranslate"><span class="pre">SSLSocket.write()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.session"><code class="docutils literal notranslate"><span class="pre">SSLSocket.session</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.SSLSocket.session_reused"><code class="docutils literal notranslate"><span class="pre">SSLSocket.session_reused</span></code></a></li> </ul> </li> <li><a class="reference internal" href="#gevent.ssl.TLSVersion"><code class="docutils literal notranslate"><span class="pre">TLSVersion</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.VerifyFlags"><code class="docutils literal notranslate"><span class="pre">VerifyFlags</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.VerifyMode"><code class="docutils literal notranslate"><span class="pre">VerifyMode</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.DER_cert_to_PEM_cert"><code class="docutils literal notranslate"><span class="pre">DER_cert_to_PEM_cert()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.PEM_cert_to_DER_cert"><code class="docutils literal notranslate"><span class="pre">PEM_cert_to_DER_cert()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.RAND_add"><code class="docutils literal notranslate"><span class="pre">RAND_add()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.RAND_bytes"><code class="docutils literal notranslate"><span class="pre">RAND_bytes()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.RAND_pseudo_bytes"><code class="docutils literal notranslate"><span class="pre">RAND_pseudo_bytes()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.RAND_status"><code class="docutils literal notranslate"><span class="pre">RAND_status()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.cert_time_to_seconds"><code class="docutils literal notranslate"><span class="pre">cert_time_to_seconds()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.create_connection"><code class="docutils literal notranslate"><span class="pre">create_connection()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.create_default_context"><code class="docutils literal notranslate"><span class="pre">create_default_context()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.get_default_verify_paths"><code class="docutils literal notranslate"><span class="pre">get_default_verify_paths()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.get_server_certificate"><code class="docutils literal notranslate"><span class="pre">get_server_certificate()</span></code></a></li> <li><a class="reference internal" href="#gevent.ssl.match_hostname"><code class="docutils literal notranslate"><span class="pre">match_hostname()</span></code></a></li> </ul> </li> </ul> </div> </div> </div> </aside> </div> </div><script src="../_static/documentation_options.js?v=32fdf4fc"></script> <script src="../_static/doctools.js?v=9bcbadda"></script> <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> <script src="../_static/scripts/furo.js?v=5fa4622c"></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10