brk-code

pyopenssl の API リファレンス

pyopenssl (pyca/pyopenssl) の公開 API 92 件 —— クラス 8、関数 9、メソッド 75。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: pyca/pyopenssl

種別件数
クラス8
関数9
メソッド75

API 一覧

methodsrc.OpenSSL.SSL.Connection.export_keying_material(label:bytes, olen:int, context:bytes | None=None) -> bytes
Obtain keying material for application use.
methodsrc.OpenSSL.SSL.Connection.get_alpn_proto_negotiated() -> bytes
Get the protocol that was negotiated by ALPN.
methodsrc.OpenSSL.SSL.Connection.get_app_data() -> Any
Retrieve application data as set by :meth:`set_app_data`.
methodsrc.OpenSSL.SSL.Connection.get_cipher_name() -> str | None
Obtain the name of the currently used cipher.
methodsrc.OpenSSL.SSL.Connection.get_finished() -> bytes | None
Obtain the latest TLS Finished message that we sent.
methodsrc.OpenSSL.SSL.Connection.get_selected_srtp_profile() -> bytes
Get the SRTP protocol which was negotiated.
methodsrc.OpenSSL.SSL.Connection.get_session() -> Session | None
Returns the Session currently used.
methodsrc.OpenSSL.SSL.Connection.get_shutdown() -> int
Get the shutdown state of the Connection.
methodsrc.OpenSSL.SSL.Connection.master_key() -> bytes | None
Retrieve the value of the master key for this session.
methodsrc.OpenSSL.SSL.Connection.recv(bufsiz:int, flags:int | None=None) -> bytes
Receive data on the connection.
methodsrc.OpenSSL.SSL.Connection.renegotiate() -> bool
Renegotiate the session.
methodsrc.OpenSSL.SSL.Connection.send(buf:_Buffer, flags:int=0) -> int
Send data on the connection.
methodsrc.OpenSSL.SSL.Connection.sendall(buf:_Buffer, flags:int=0) -> int
Send "all" data on the connection.
methodsrc.OpenSSL.SSL.Connection.set_accept_state() -> None
Set the connection to work in server mode.
methodsrc.OpenSSL.SSL.Connection.set_alpn_protos(protos:list[bytes]) -> None
Specify the client's ALPN protocol list.
methodsrc.OpenSSL.SSL.Connection.set_app_data(data:Any) -> None
Set application data :param data: The application data :return: None
methodsrc.OpenSSL.SSL.Connection.set_connect_state() -> None
Set the connection to work in client mode.
methodsrc.OpenSSL.SSL.Connection.set_context(context:Context) -> None
Switch this connection to a new session context.
methodsrc.OpenSSL.SSL.Connection.set_info_callback(callback:Callable[[Connection, int, int], None]) -> None
Set the information callback to *callback*.
methodsrc.OpenSSL.SSL.Connection.set_options(options:int) -> int
Add options.
methodsrc.OpenSSL.SSL.Connection.set_shutdown(state:int) -> None
Set the shutdown state of the Connection.
methodsrc.OpenSSL.SSL.Connection.shutdown() -> bool
Send the shutdown message to the Connection.
methodsrc.OpenSSL.SSL.Connection.sock_shutdown(*args:Any, **kwargs:Any) -> None
Call the :meth:`shutdown` method of the underlying socket.
methodsrc.OpenSSL.SSL.Connection.total_renegotiations() -> int
Find out the total number of renegotiations.
methodsrc.OpenSSL.SSL.Context.get_cert_store() -> X509Store | None
Get the certificate store for the context.
methodsrc.OpenSSL.SSL.Context.get_session_cache_mode() -> int
Get the current session cache mode.
methodsrc.OpenSSL.SSL.Context.get_timeout() -> int
Retrieve session timeout, as set by :meth:`set_timeout`.
methodsrc.OpenSSL.SSL.Context.load_client_ca(cafile:bytes) -> None
Load the trusted certificates that will be sent to the client.
methodsrc.OpenSSL.SSL.Context.set_cipher_list(cipher_list:bytes) -> None
Set the list of ciphers to be used in this context.
methodsrc.OpenSSL.SSL.Context.set_info_callback(callback:Callable[[Connection, int, int], None]) -> None
Set the information callback to *callback*.
methodsrc.OpenSSL.SSL.Context.set_keylog_callback(callback:Callable[[Connection, bytes], None]) -> None
Set the TLS key logging callback to *callback*.
methodsrc.OpenSSL.SSL.Context.set_max_proto_version(version:int) -> None
Set the maximum supported protocol version.
methodsrc.OpenSSL.SSL.Context.set_min_proto_version(version:int) -> None
Set the minimum supported protocol version.
methodsrc.OpenSSL.SSL.Context.set_mode(mode:int) -> int
Add modes via bitmask.
methodsrc.OpenSSL.SSL.Context.set_options(options:int) -> int
Add options.
methodsrc.OpenSSL.SSL.Context.set_passwd_cb(callback:_PassphraseCallback[_T], userdata:_T | None=None) -> None
Set the passphrase callback.
methodsrc.OpenSSL.SSL.Context.set_tls13_ciphersuites(ciphersuites:bytes) -> None
Set the list of TLS 1.3 ciphers to be used in this context.
methodsrc.OpenSSL.SSL.Context.set_tlsext_use_srtp(profiles:bytes) -> None
Enable support for negotiating SRTP keying material.
methodsrc.OpenSSL.SSL.Context.set_tmp_ecdh(curve:_EllipticCurve | ec.EllipticCurve) -> None
Select a curve to use for ECDHE key exchange.
methodsrc.OpenSSL.SSL.Context.use_certificate_chain_file(certfile:_StrOrBytesPath) -> None
Load a certificate chain from a file.
classsrc.OpenSSL.SSL.Error
An error occurred in an `OpenSSL.SSL` API.
funcsrc.OpenSSL.SSL.OpenSSL_version(type:int) -> bytes
Return a string describing the version of OpenSSL in use.
classsrc.OpenSSL.SSL.Session
A class representing an SSL session.
funcsrc.OpenSSL._util.exception_from_error_queue(exception_type:type[Exception]) -> NoReturn
Convert an OpenSSL library failure into a Python exception.
funcsrc.OpenSSL._util.openssl_assert(ok:bool) -> None
If *ok* is not True, retrieve the error from OpenSSL and raise it.
funcsrc.OpenSSL._util.text(charp:Any) -> str
Get a native string type representing of the given CFFI ``char*`` object.
classsrc.OpenSSL.crypto.Error
An error occurred in an `OpenSSL.crypto` API.
classsrc.OpenSSL.crypto.PKey
A class representing an DSA or RSA public key or key pair.
methodsrc.OpenSSL.crypto.PKey.check() -> bool
Check the consistency of an RSA private key.
methodsrc.OpenSSL.crypto.PKey.from_cryptography_key(crypto_key:_Key) -> PKey
Construct based on a ``cryptography`` *crypto_key*.
methodsrc.OpenSSL.crypto.PKey.generate_key(type:int, bits:int) -> None
Generate a key pair of the given type, with the given number of bits.
methodsrc.OpenSSL.crypto.PKey.to_cryptography_key() -> _Key
Export as a ``cryptography`` key.
methodsrc.OpenSSL.crypto.PKey.type() -> int
Returns the type of the key :return: The type of the key.
classsrc.OpenSSL.crypto.X509
An X.509 certificate.
methodsrc.OpenSSL.crypto.X509.digest(digest_name:str) -> bytes
Return the digest of the X509 object.
methodsrc.OpenSSL.crypto.X509.from_cryptography(crypto_cert:x509.Certificate) -> X509
Construct based on a ``cryptography`` *crypto_cert*.
methodsrc.OpenSSL.crypto.X509.get_extension_count() -> int
Get the number of extensions on this certificate.
methodsrc.OpenSSL.crypto.X509.get_issuer() -> X509Name
Return the issuer of this certificate.
methodsrc.OpenSSL.crypto.X509.get_notAfter() -> bytes | None
Get the timestamp at which the certificate stops being valid.
methodsrc.OpenSSL.crypto.X509.get_pubkey() -> PKey
Get the public key of the certificate.
methodsrc.OpenSSL.crypto.X509.get_serial_number() -> int
Return the serial number of this certificate.
methodsrc.OpenSSL.crypto.X509.get_signature_algorithm() -> bytes
Return the signature algorithm used in the certificate.
methodsrc.OpenSSL.crypto.X509.get_subject() -> X509Name
Return the subject of this certificate.
methodsrc.OpenSSL.crypto.X509.get_version() -> int
Return the version number of the certificate.
methodsrc.OpenSSL.crypto.X509.gmtime_adj_notAfter(amount:int) -> None
Adjust the time stamp on which the certificate stops being valid.
methodsrc.OpenSSL.crypto.X509.gmtime_adj_notBefore(amount:int) -> None
Adjust the timestamp on which the certificate starts being valid.
methodsrc.OpenSSL.crypto.X509.has_expired() -> bool
Check whether the certificate has expired.
methodsrc.OpenSSL.crypto.X509.set_issuer(issuer:X509Name) -> None
Set the issuer of this certificate.
methodsrc.OpenSSL.crypto.X509.set_notAfter(when:bytes) -> None
Set the timestamp at which the certificate stops being valid.
methodsrc.OpenSSL.crypto.X509.set_notBefore(when:bytes) -> None
Set the timestamp at which the certificate starts being valid.
methodsrc.OpenSSL.crypto.X509.set_pubkey(pkey:PKey) -> None
Set the public key of the certificate.
methodsrc.OpenSSL.crypto.X509.set_serial_number(serial:int) -> None
Set the serial number of the certificate.
methodsrc.OpenSSL.crypto.X509.set_subject(subject:X509Name) -> None
Set the subject of this certificate.
methodsrc.OpenSSL.crypto.X509.set_version(version:int) -> None
Set the version number of the certificate.
methodsrc.OpenSSL.crypto.X509.sign(pkey:PKey, digest:str) -> None
Sign the certificate with this key and digest type.
methodsrc.OpenSSL.crypto.X509.subject_name_hash() -> int
Return the hash of the X509 subject.
methodsrc.OpenSSL.crypto.X509.to_cryptography() -> x509.Certificate
Export as a ``cryptography`` certificate.
classsrc.OpenSSL.crypto.X509Name
An X.509 Distinguished Name.
methodsrc.OpenSSL.crypto.X509Name.der() -> bytes
Return the DER encoding of this name.
classsrc.OpenSSL.crypto.X509Store
An X.509 store.
methodsrc.OpenSSL.crypto.X509Store.add_cert(cert:X509) -> None
Adds a trusted certificate to this store.
methodsrc.OpenSSL.crypto.X509Store.add_crl(crl:x509.CertificateRevocationList) -> None
Add a certificate revocation list to this store.
methodsrc.OpenSSL.crypto.X509Store.set_flags(flags:int) -> None
Set verification flags to this store.
methodsrc.OpenSSL.crypto.X509Store.set_time(vfy_time:datetime.datetime) -> None
Set the time against which the certificates are verified.
classsrc.OpenSSL.crypto.X509StoreContext
An X.509 store context.
methodsrc.OpenSSL.crypto.X509StoreContext.set_store(store:X509Store) -> None
Set the context's X.509 store.
methodsrc.OpenSSL.crypto.X509StoreContext.verify_certificate() -> None
Verify a certificate in a context.
funcsrc.OpenSSL.crypto.dump_publickey(type:int, pkey:PKey) -> bytes
Dump a public key to a buffer.
funcsrc.OpenSSL.crypto.get_elliptic_curve(name:str) -> _EllipticCurve
Return a single curve object selected by name.
funcsrc.OpenSSL.crypto.load_publickey(type:int, buffer:str | bytes) -> PKey
Load a public key from a buffer.
funcsrc.OpenSSL.rand.add(buffer:bytes, entropy:int) -> None
Mix bytes from *string* into the PRNG state.
funcsrc.OpenSSL.rand.status() -> int
Check whether the PRNG has been seeded with enough data.

この情報について

掲載しているシグネチャは pyca/pyopenssl の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る