File: __init__.py

package info (click to toggle)
pypy3 7.0.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 111,848 kB
  • sloc: python: 1,291,746; ansic: 74,281; asm: 5,187; cpp: 3,017; sh: 2,533; makefile: 544; xml: 243; lisp: 45; csh: 21; awk: 4
file content (29 lines) | stat: -rw-r--r-- 1,022 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from _cffi_ssl._stdssl import (_PROTOCOL_NAMES, _OPENSSL_API_VERSION,
        _test_decode_cert, _SSLContext)
from _cffi_ssl import _stdssl
from _cffi_ssl._stdssl import *


try: from __pypy__ import builtinify
except ImportError: builtinify = lambda f: f

RAND_add          = builtinify(RAND_add)
RAND_bytes        = builtinify(RAND_bytes)
RAND_pseudo_bytes = builtinify(RAND_pseudo_bytes)
RAND_status       = builtinify(RAND_status)
# RAND_egd is optional and might not be available on e.g. libressl
if hasattr(_stdssl, 'RAND_egd'):
    RAND_egd          = builtinify(RAND_egd)

import sys
if sys.platform == "win32":
    if 'enum_certificates' not in globals():
        def enum_certificates(*args, **kwds):
            import warnings
            warnings.warn("ssl.enum_certificates() is not implemented")
            return []
    if 'enum_crls' not in globals():
        def enum_crls(*args, **kwds):
            import warnings
            warnings.warn("ssl.enum_crls() is not implemented")
            return []