Lines Matching refs:_ffi
14 ffi as _ffi, unknown
331 self.callback = _ffi.callback(
355 instr = _ffi.buffer(in_, inlen)[:]
379 _ffi.new("unsigned char *", len(outbytes)),
380 _ffi.new("unsigned char[]", outbytes),
391 self.callback = _ffi.callback(
431 if cdata != _ffi.NULL:
432 data = _ffi.from_handle(cdata)
453 _ffi.buffer(data_ptr, ocsp_data_length)[:] = ocsp_data
464 self.callback = _ffi.callback("int (*)(SSL *, void *)", wrapper)
498 if cdata != _ffi.NULL:
499 data = _ffi.from_handle(cdata)
504 ocsp_ptr = _ffi.new("unsigned char **")
511 ocsp_data = _ffi.buffer(ocsp_ptr[0], ocsp_len)[:]
523 self.callback = _ffi.callback("int (*)(SSL *, void *)", wrapper)
552 return _ffi.string(_lib.SSLeay_version(type))
635 _openssl_assert(method_obj != _ffi.NULL)
638 _openssl_assert(context != _ffi.NULL)
639 context = _ffi.gc(context, _lib.SSL_CTX_free)
682 cafile = _ffi.NULL
687 capath = _ffi.NULL
762 dir_env_var = _ffi.string(_lib.X509_get_default_cert_dir_env()).decode(
765 file_env_var = _ffi.string(
769 default_dir = _ffi.string(_lib.X509_get_default_cert_dir())
770 default_file = _ffi.string(_lib.X509_get_default_cert_file())
950 _openssl_assert(ca_list != _ffi.NULL)
1023 _lib.SSL_CTX_set_verify(self._context, mode, _ffi.NULL)
1075 if bio == _ffi.NULL:
1077 bio = _ffi.gc(bio, _lib.BIO_free)
1079 dh = _lib.PEM_read_bio_DHparams(bio, _ffi.NULL, _ffi.NULL, _ffi.NULL)
1080 dh = _ffi.gc(dh, _lib.DH_free)
1149 _openssl_assert(name_stack != _ffi.NULL)
1159 _openssl_assert(copy != _ffi.NULL)
1231 self._info_callback = _ffi.callback(
1253 line = _ffi.string(line)
1256 self._keylog_callback = _ffi.callback(
1287 if store == _ffi.NULL:
1337 self._tlsext_servername_callback = _ffi.callback(
1378 input_str = _ffi.new("unsigned char[]", protostr)
1399 self._context, self._alpn_select_callback, _ffi.NULL
1411 self._ocsp_data = _ffi.NULL
1413 self._ocsp_data = _ffi.new_handle(data)
1476 self._ssl = _ffi.gc(ssl, _lib.SSL_free)
1503 _openssl_assert(self._into_ssl != _ffi.NULL)
1506 _openssl_assert(self._from_ssl != _ffi.NULL)
1553 errno = _ffi.getwinerror()[0]
1555 errno = _ffi.errno
1600 if name == _ffi.NULL:
1603 return _ffi.string(name)
1703 return _ffi.buffer(buf, result)[:]
1740 buffer[:result] = memoryview(_ffi.buffer(buf, result))
1784 return _ffi.buffer(buf, result)[:]
1929 if result == _ffi.NULL:
1931 ciphers.append(_native(_ffi.string(result)))
1948 if ca_names == _ffi.NULL:
1956 _openssl_assert(copy != _ffi.NULL)
1959 pyname._name = _ffi.gc(copy, _lib.X509_NAME_free)
2019 return _ffi.string(_lib.SSL_state_string_long(self._ssl))
2028 if session == _ffi.NULL:
2030 length = _lib.SSL_get_server_random(self._ssl, _ffi.NULL, 0)
2034 return _ffi.buffer(outp, length)[:]
2043 if session == _ffi.NULL:
2046 length = _lib.SSL_get_client_random(self._ssl, _ffi.NULL, 0)
2050 return _ffi.buffer(outp, length)[:]
2059 if session == _ffi.NULL:
2062 length = _lib.SSL_SESSION_get_master_key(session, _ffi.NULL, 0)
2066 return _ffi.buffer(outp, length)[:]
2078 context_buf = _ffi.NULL
2096 return _ffi.buffer(outp, olen)[:]
2114 if cert != _ffi.NULL:
2126 if cert != _ffi.NULL:
2139 _openssl_assert(cert != _ffi.NULL)
2154 if cert_stack == _ffi.NULL:
2173 if cert_stack == _ffi.NULL:
2224 if session == _ffi.NULL:
2228 pysession._session = _ffi.gc(session, _lib.SSL_SESSION_free)
2270 empty = _ffi.new("char[]", 0)
2278 return _ffi.buffer(buf, size)[:]
2315 if cipher == _ffi.NULL:
2318 name = _ffi.string(_lib.SSL_CIPHER_get_name(cipher))
2332 if cipher == _ffi.NULL:
2335 return _lib.SSL_CIPHER_get_bits(cipher, _ffi.NULL)
2348 if cipher == _ffi.NULL:
2351 version = _ffi.string(_lib.SSL_CIPHER_get_version(cipher))
2363 version = _ffi.string(_lib.SSL_get_version(self._ssl))
2396 input_str = _ffi.new("unsigned char[]", protostr)
2407 data = _ffi.new("unsigned char **")
2408 data_len = _ffi.new("unsigned int *")
2415 return _ffi.buffer(data[0], data_len[0])[:]