TlsDatabase#
Added in version 2.30.
Superclasses: Object
GTlsDatabase is used to look up certificates and other information
from a certificate or key store. It is an abstract base class which
TLS library specific subtypes override.
A GTlsDatabase may be accessed from multiple threads by the TLS backend.
All implementations are required to be fully thread-safe.
Most common client applications will not directly interact with
GTlsDatabase. It is used internally by TlsConnection.
Methods#
- class TlsDatabase
- create_certificate_handle(certificate: TlsCertificate) str | None#
Create a handle string for the certificate. The database will only be able to create a handle for certificates that originate from the database. In cases where the database cannot create a handle for a certificate,
Nonewill be returned.This handle should be stable across various instances of the application, and between applications. If a certificate is modified in the database, then it is not guaranteed that this handle will continue to point to it.
Added in version 2.30.
- Parameters:
certificate – certificate for which to create a handle.
- do_create_certificate_handle(self, certificate: TlsCertificate) str | None#
- Parameters:
certificate
- do_lookup_certificate_for_handle(self, handle: str, interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None) TlsCertificate | None#
- Parameters:
handle
interaction
flags
cancellable
- do_lookup_certificate_for_handle_async(self, handle: str, interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None, callback: Callable[[Object | None, AsyncResult, Any], None] | None = None, user_data: Any = None) None#
- Parameters:
handle
interaction
flags
cancellable
callback
user_data
- do_lookup_certificate_for_handle_finish(self, result: AsyncResult) TlsCertificate#
- Parameters:
result
- do_lookup_certificate_issuer(self, certificate: TlsCertificate, interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None) TlsCertificate#
- Parameters:
certificate
interaction
flags
cancellable
- do_lookup_certificate_issuer_async(self, certificate: TlsCertificate, interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None, callback: Callable[[Object | None, AsyncResult, Any], None] | None = None, user_data: Any = None) None#
- Parameters:
certificate
interaction
flags
cancellable
callback
user_data
- do_lookup_certificate_issuer_finish(self, result: AsyncResult) TlsCertificate#
- Parameters:
result
- do_lookup_certificates_issued_by(self, issuer_raw_dn: list[int], interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None) list[TlsCertificate]#
- Parameters:
issuer_raw_dn
interaction
flags
cancellable
- do_lookup_certificates_issued_by_async(self, issuer_raw_dn: list[int], interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None, callback: Callable[[Object | None, AsyncResult, Any], None] | None = None, user_data: Any = None) None#
- Parameters:
issuer_raw_dn
interaction
flags
cancellable
callback
user_data
- do_lookup_certificates_issued_by_finish(self, result: AsyncResult) list[TlsCertificate]#
- Parameters:
result
- do_verify_chain(self, chain: TlsCertificate, purpose: str, identity: SocketConnectable | None, interaction: TlsInteraction | None, flags: TlsDatabaseVerifyFlags, cancellable: Cancellable | None = None) TlsCertificateFlags#
- Parameters:
chain
purpose
identity
interaction
flags
cancellable
- do_verify_chain_async(self, chain: TlsCertificate, purpose: str, identity: SocketConnectable | None, interaction: TlsInteraction | None, flags: TlsDatabaseVerifyFlags, cancellable: Cancellable | None = None, callback: Callable[[Object | None, AsyncResult, Any], None] | None = None, user_data: Any = None) None#
- Parameters:
chain
purpose
identity
interaction
flags
cancellable
callback
user_data
- do_verify_chain_finish(self, result: AsyncResult) TlsCertificateFlags#
- Parameters:
result
- lookup_certificate_for_handle(handle: str, interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None) TlsCertificate | None#
Look up a certificate by its handle.
The handle should have been created by calling
create_certificate_handle()on aTlsDatabaseobject of the same TLS backend. The handle is designed to remain valid across instantiations of the database.If the handle is no longer valid, or does not point to a certificate in this database, then
Nonewill be returned.This function can block, use
lookup_certificate_for_handle_async()to perform the lookup operation asynchronously.Added in version 2.30.
- Parameters:
handle – a certificate handle
interaction – used to interact with the user if necessary
flags – Flags which affect the lookup.
cancellable – a
Cancellable, orNone
- async lookup_certificate_for_handle_async(self, handle: str, interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags) TlsCertificate#
This is the awaitable version of
lookup_certificate_for_handle_async().Added in version 2.30.
- Parameters:
handle – a certificate handle
interaction – used to interact with the user if necessary
flags – Flags which affect the lookup.
- lookup_certificate_for_handle_async(handle: str, interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None, callback: Callable[[Object | None, AsyncResult, Any], None] | None = None, user_data: Any = None) None#
Asynchronously look up a certificate by its handle in the database. See
lookup_certificate_for_handle()for more information.Added in version 2.30.
- Parameters:
handle – a certificate handle
interaction – used to interact with the user if necessary
flags – Flags which affect the lookup.
cancellable – a
Cancellable, orNonecallback – callback to call when the operation completes
user_data – the data to pass to the callback function
- lookup_certificate_for_handle_finish(result: AsyncResult) TlsCertificate#
Finish an asynchronous lookup of a certificate by its handle. See
lookup_certificate_for_handle()for more information.If the handle is no longer valid, or does not point to a certificate in this database, then
Nonewill be returned.Added in version 2.30.
- Parameters:
result – a
AsyncResult.
- lookup_certificate_issuer(certificate: TlsCertificate, interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None) TlsCertificate#
Look up the issuer of
certificatein the database. TheTlsCertificate:issuer property ofcertificateis not modified, and the two certificates are not hooked into a chain.This function can block. Use
lookup_certificate_issuer_async()to perform the lookup operation asynchronously.Beware this function cannot be used to build certification paths. The issuer certificate returned by this function may not be the same as the certificate that would actually be used to construct a valid certification path during certificate verification. RFC 4158 explains why an issuer certificate cannot be naively assumed to be part of the the certification path (though GLib’s TLS backends may not follow the path building strategies outlined in this RFC). Due to the complexity of certification path building, GLib does not provide any way to know which certification path will actually be used when verifying a TLS certificate. Accordingly, this function cannot be used to make security-related decisions. Only GLib itself should make security decisions about TLS certificates.
Added in version 2.30.
- Parameters:
certificate – a
TlsCertificateinteraction – used to interact with the user if necessary
flags – flags which affect the lookup operation
cancellable – a
Cancellable, orNone
- async lookup_certificate_issuer_async(self, certificate: TlsCertificate, interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags) TlsCertificate#
This is the awaitable version of
lookup_certificate_issuer_async().Added in version 2.30.
- Parameters:
certificate – a
TlsCertificateinteraction – used to interact with the user if necessary
flags – flags which affect the lookup operation
- lookup_certificate_issuer_async(certificate: TlsCertificate, interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None, callback: Callable[[Object | None, AsyncResult, Any], None] | None = None, user_data: Any = None) None#
Asynchronously look up the issuer of
certificatein the database. Seelookup_certificate_issuer()for more information.Added in version 2.30.
- Parameters:
certificate – a
TlsCertificateinteraction – used to interact with the user if necessary
flags – flags which affect the lookup operation
cancellable – a
Cancellable, orNonecallback – callback to call when the operation completes
user_data – the data to pass to the callback function
- lookup_certificate_issuer_finish(result: AsyncResult) TlsCertificate#
Finish an asynchronous lookup issuer operation. See
lookup_certificate_issuer()for more information.Added in version 2.30.
- Parameters:
result – a
AsyncResult.
- lookup_certificates_issued_by(issuer_raw_dn: list[int], interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None) list[TlsCertificate]#
Look up certificates issued by this issuer in the database.
This function can block, use
lookup_certificates_issued_by_async()to perform the lookup operation asynchronously.Added in version 2.30.
- Parameters:
issuer_raw_dn – a
GByteArraywhich holds the DER encoded issuer DN.interaction – used to interact with the user if necessary
flags – Flags which affect the lookup operation.
cancellable – a
Cancellable, orNone
- async lookup_certificates_issued_by_async(self, issuer_raw_dn: list[int], interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags) list[TlsCertificate]#
This is the awaitable version of
lookup_certificates_issued_by_async().Added in version 2.30.
- Parameters:
issuer_raw_dn – a
GByteArraywhich holds the DER encoded issuer DN.interaction – used to interact with the user if necessary
flags – Flags which affect the lookup operation.
- lookup_certificates_issued_by_async(issuer_raw_dn: list[int], interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None, callback: Callable[[Object | None, AsyncResult, Any], None] | None = None, user_data: Any = None) None#
Asynchronously look up certificates issued by this issuer in the database. See
lookup_certificates_issued_by()for more information.The database may choose to hold a reference to the issuer byte array for the duration of this asynchronous operation. The byte array should not be modified during this time.
Added in version 2.30.
- Parameters:
issuer_raw_dn – a
GByteArraywhich holds the DER encoded issuer DN.interaction – used to interact with the user if necessary
flags – Flags which affect the lookup operation.
cancellable – a
Cancellable, orNonecallback – callback to call when the operation completes
user_data – the data to pass to the callback function
- lookup_certificates_issued_by_finish(result: AsyncResult) list[TlsCertificate]#
Finish an asynchronous lookup of certificates. See
lookup_certificates_issued_by()for more information.Added in version 2.30.
- Parameters:
result – a
AsyncResult.
- verify_chain(chain: TlsCertificate, purpose: str, identity: SocketConnectable | None, interaction: TlsInteraction | None, flags: TlsDatabaseVerifyFlags, cancellable: Cancellable | None = None) TlsCertificateFlags#
Determines the validity of a certificate chain, outside the context of a TLS session.
chainis a chain ofTlsCertificateobjects each pointing to the next certificate in the chain by itsTlsCertificate:issuer property.purposedescribes the purpose (or usage) for which the certificate is being used. Typicallypurposewill be set toTLS_DATABASE_PURPOSE_AUTHENTICATE_SERVERwhich means that the certificate is being used to authenticate a server (and we are acting as the client).The
identityis used to ensure the server certificate is valid for the expected peer identity. If the identity does not match the certificate,BAD_IDENTITYwill be set in the return value. IfidentityisNone, that bit will never be set in the return value. The peer identity may also be used to check for pinned certificates (trust exceptions) in the database. These may override the normal verification process on a host-by-host basis.Currently there are no
flags, andNONEshould be used.If
chainis found to be valid, then the return value will be 0. Ifchainis found to be invalid, then the return value will indicate at least one problem found. If the function is unable to determine whetherchainis valid (for example, becausecancellableis triggered before it completes) then the return value will beGENERIC_ERRORanderrorwill be set accordingly.erroris not set whenchainis successfully analyzed but found to be invalid.GLib guarantees that if certificate verification fails, at least one error will be set in the return value, but it does not guarantee that all possible errors will be set. Accordingly, you may not safely decide to ignore any particular type of error. For example, it would be incorrect to mask
EXPIREDif you want to allow expired certificates, because this could potentially be the only error flag set even if other problems exist with the certificate.Prior to GLib 2.48, GLib’s default TLS backend modified
chainto represent the certification path built byTlsDatabaseduring certificate verification by adjusting theTlsCertificate:issuer property of each certificate inchain. Since GLib 2.48, this no longer occurs, so you cannot rely onTlsCertificate:issuer to represent the actual certification path used during certificate verification.Because TLS session context is not used,
TlsDatabasemay not perform as many checks on the certificates asTlsConnectionwould. For example, certificate constraints may not be honored, and revocation checks may not be performed. The best way to verify TLS certificates used by a TLS connection is to letTlsConnectionhandle the verification.The TLS backend may attempt to look up and add missing certificates to the chain. This may involve HTTP requests to download missing certificates.
This function can block. Use
verify_chain_async()to perform the verification operation asynchronously.Added in version 2.30.
- Parameters:
chain – a
TlsCertificatechainpurpose – the purpose that this certificate chain will be used for.
identity – the expected peer identity
interaction – used to interact with the user if necessary
flags – additional verify flags
cancellable – a
Cancellable, orNone
- async verify_chain_async(self, chain: TlsCertificate, purpose: str, identity: SocketConnectable | None, interaction: TlsInteraction | None, flags: TlsDatabaseVerifyFlags) TlsCertificateFlags#
This is the awaitable version of
verify_chain_async().Added in version 2.30.
- Parameters:
chain – a
TlsCertificatechainpurpose – the purpose that this certificate chain will be used for.
identity – the expected peer identity
interaction – used to interact with the user if necessary
flags – additional verify flags
- verify_chain_async(chain: TlsCertificate, purpose: str, identity: SocketConnectable | None, interaction: TlsInteraction | None, flags: TlsDatabaseVerifyFlags, cancellable: Cancellable | None = None, callback: Callable[[Object | None, AsyncResult, Any], None] | None = None, user_data: Any = None) None#
Asynchronously determines the validity of a certificate chain after looking up and adding any missing certificates to the chain. See
verify_chain()for more information.Added in version 2.30.
- Parameters:
chain – a
TlsCertificatechainpurpose – the purpose that this certificate chain will be used for.
identity – the expected peer identity
interaction – used to interact with the user if necessary
flags – additional verify flags
cancellable – a
Cancellable, orNonecallback – callback to call when the operation completes
user_data – the data to pass to the callback function
- verify_chain_finish(result: AsyncResult) TlsCertificateFlags#
Finish an asynchronous verify chain operation. See
verify_chain()for more information.If
chainis found to be valid, then the return value will be 0. Ifchainis found to be invalid, then the return value will indicate the problems found. If the function is unable to determine whetherchainis valid or not (eg, becausecancellableis triggered before it completes) then the return value will beGENERIC_ERRORanderrorwill be set accordingly.erroris not set whenchainis successfully analyzed but found to be invalid.Added in version 2.30.
- Parameters:
result – a
AsyncResult.
Virtual Methods#
- class TlsDatabase
- do_create_certificate_handle(certificate: TlsCertificate) str | None#
Create a handle string for the certificate. The database will only be able to create a handle for certificates that originate from the database. In cases where the database cannot create a handle for a certificate,
Nonewill be returned.This handle should be stable across various instances of the application, and between applications. If a certificate is modified in the database, then it is not guaranteed that this handle will continue to point to it.
Added in version 2.30.
- Parameters:
certificate – certificate for which to create a handle.
- do_lookup_certificate_for_handle(handle: str, interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None) TlsCertificate | None#
Look up a certificate by its handle.
The handle should have been created by calling
create_certificate_handle()on aTlsDatabaseobject of the same TLS backend. The handle is designed to remain valid across instantiations of the database.If the handle is no longer valid, or does not point to a certificate in this database, then
Nonewill be returned.This function can block, use
lookup_certificate_for_handle_async()to perform the lookup operation asynchronously.Added in version 2.30.
- Parameters:
handle – a certificate handle
interaction – used to interact with the user if necessary
flags – Flags which affect the lookup.
cancellable – a
Cancellable, orNone
- do_lookup_certificate_for_handle_async(handle: str, interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None, callback: Callable[[Object | None, AsyncResult, Any], None] | None = None, user_data: Any = None) None#
Asynchronously look up a certificate by its handle in the database. See
lookup_certificate_for_handle()for more information.Added in version 2.30.
- Parameters:
handle – a certificate handle
interaction – used to interact with the user if necessary
flags – Flags which affect the lookup.
cancellable – a
Cancellable, orNonecallback – callback to call when the operation completes
user_data – the data to pass to the callback function
- do_lookup_certificate_for_handle_finish(result: AsyncResult) TlsCertificate#
Finish an asynchronous lookup of a certificate by its handle. See
lookup_certificate_for_handle()for more information.If the handle is no longer valid, or does not point to a certificate in this database, then
Nonewill be returned.Added in version 2.30.
- Parameters:
result – a
AsyncResult.
- do_lookup_certificate_issuer(certificate: TlsCertificate, interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None) TlsCertificate#
Look up the issuer of
certificatein the database. TheTlsCertificate:issuer property ofcertificateis not modified, and the two certificates are not hooked into a chain.This function can block. Use
lookup_certificate_issuer_async()to perform the lookup operation asynchronously.Beware this function cannot be used to build certification paths. The issuer certificate returned by this function may not be the same as the certificate that would actually be used to construct a valid certification path during certificate verification. RFC 4158 explains why an issuer certificate cannot be naively assumed to be part of the the certification path (though GLib’s TLS backends may not follow the path building strategies outlined in this RFC). Due to the complexity of certification path building, GLib does not provide any way to know which certification path will actually be used when verifying a TLS certificate. Accordingly, this function cannot be used to make security-related decisions. Only GLib itself should make security decisions about TLS certificates.
Added in version 2.30.
- Parameters:
certificate – a
TlsCertificateinteraction – used to interact with the user if necessary
flags – flags which affect the lookup operation
cancellable – a
Cancellable, orNone
- do_lookup_certificate_issuer_async(certificate: TlsCertificate, interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None, callback: Callable[[Object | None, AsyncResult, Any], None] | None = None, user_data: Any = None) None#
Asynchronously look up the issuer of
certificatein the database. Seelookup_certificate_issuer()for more information.Added in version 2.30.
- Parameters:
certificate – a
TlsCertificateinteraction – used to interact with the user if necessary
flags – flags which affect the lookup operation
cancellable – a
Cancellable, orNonecallback – callback to call when the operation completes
user_data – the data to pass to the callback function
- do_lookup_certificate_issuer_finish(result: AsyncResult) TlsCertificate#
Finish an asynchronous lookup issuer operation. See
lookup_certificate_issuer()for more information.Added in version 2.30.
- Parameters:
result – a
AsyncResult.
- do_lookup_certificates_issued_by(issuer_raw_dn: list[int], interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None) list[TlsCertificate]#
Look up certificates issued by this issuer in the database.
This function can block, use
lookup_certificates_issued_by_async()to perform the lookup operation asynchronously.Added in version 2.30.
- Parameters:
issuer_raw_dn – a
GByteArraywhich holds the DER encoded issuer DN.interaction – used to interact with the user if necessary
flags – Flags which affect the lookup operation.
cancellable – a
Cancellable, orNone
- do_lookup_certificates_issued_by_async(issuer_raw_dn: list[int], interaction: TlsInteraction | None, flags: TlsDatabaseLookupFlags, cancellable: Cancellable | None = None, callback: Callable[[Object | None, AsyncResult, Any], None] | None = None, user_data: Any = None) None#
Asynchronously look up certificates issued by this issuer in the database. See
lookup_certificates_issued_by()for more information.The database may choose to hold a reference to the issuer byte array for the duration of this asynchronous operation. The byte array should not be modified during this time.
Added in version 2.30.
- Parameters:
issuer_raw_dn – a
GByteArraywhich holds the DER encoded issuer DN.interaction – used to interact with the user if necessary
flags – Flags which affect the lookup operation.
cancellable – a
Cancellable, orNonecallback – callback to call when the operation completes
user_data – the data to pass to the callback function
- do_lookup_certificates_issued_by_finish(result: AsyncResult) list[TlsCertificate]#
Finish an asynchronous lookup of certificates. See
lookup_certificates_issued_by()for more information.Added in version 2.30.
- Parameters:
result – a
AsyncResult.
- do_verify_chain(chain: TlsCertificate, purpose: str, identity: SocketConnectable | None, interaction: TlsInteraction | None, flags: TlsDatabaseVerifyFlags, cancellable: Cancellable | None = None) TlsCertificateFlags#
Determines the validity of a certificate chain, outside the context of a TLS session.
chainis a chain ofTlsCertificateobjects each pointing to the next certificate in the chain by itsTlsCertificate:issuer property.purposedescribes the purpose (or usage) for which the certificate is being used. Typicallypurposewill be set toTLS_DATABASE_PURPOSE_AUTHENTICATE_SERVERwhich means that the certificate is being used to authenticate a server (and we are acting as the client).The
identityis used to ensure the server certificate is valid for the expected peer identity. If the identity does not match the certificate,BAD_IDENTITYwill be set in the return value. IfidentityisNone, that bit will never be set in the return value. The peer identity may also be used to check for pinned certificates (trust exceptions) in the database. These may override the normal verification process on a host-by-host basis.Currently there are no
flags, andNONEshould be used.If
chainis found to be valid, then the return value will be 0. Ifchainis found to be invalid, then the return value will indicate at least one problem found. If the function is unable to determine whetherchainis valid (for example, becausecancellableis triggered before it completes) then the return value will beGENERIC_ERRORanderrorwill be set accordingly.erroris not set whenchainis successfully analyzed but found to be invalid.GLib guarantees that if certificate verification fails, at least one error will be set in the return value, but it does not guarantee that all possible errors will be set. Accordingly, you may not safely decide to ignore any particular type of error. For example, it would be incorrect to mask
EXPIREDif you want to allow expired certificates, because this could potentially be the only error flag set even if other problems exist with the certificate.Prior to GLib 2.48, GLib’s default TLS backend modified
chainto represent the certification path built byTlsDatabaseduring certificate verification by adjusting theTlsCertificate:issuer property of each certificate inchain. Since GLib 2.48, this no longer occurs, so you cannot rely onTlsCertificate:issuer to represent the actual certification path used during certificate verification.Because TLS session context is not used,
TlsDatabasemay not perform as many checks on the certificates asTlsConnectionwould. For example, certificate constraints may not be honored, and revocation checks may not be performed. The best way to verify TLS certificates used by a TLS connection is to letTlsConnectionhandle the verification.The TLS backend may attempt to look up and add missing certificates to the chain. This may involve HTTP requests to download missing certificates.
This function can block. Use
verify_chain_async()to perform the verification operation asynchronously.Added in version 2.30.
- Parameters:
chain – a
TlsCertificatechainpurpose – the purpose that this certificate chain will be used for.
identity – the expected peer identity
interaction – used to interact with the user if necessary
flags – additional verify flags
cancellable – a
Cancellable, orNone
- do_verify_chain_async(chain: TlsCertificate, purpose: str, identity: SocketConnectable | None, interaction: TlsInteraction | None, flags: TlsDatabaseVerifyFlags, cancellable: Cancellable | None = None, callback: Callable[[Object | None, AsyncResult, Any], None] | None = None, user_data: Any = None) None#
Asynchronously determines the validity of a certificate chain after looking up and adding any missing certificates to the chain. See
verify_chain()for more information.Added in version 2.30.
- Parameters:
chain – a
TlsCertificatechainpurpose – the purpose that this certificate chain will be used for.
identity – the expected peer identity
interaction – used to interact with the user if necessary
flags – additional verify flags
cancellable – a
Cancellable, orNonecallback – callback to call when the operation completes
user_data – the data to pass to the callback function
- do_verify_chain_finish(result: AsyncResult) TlsCertificateFlags#
Finish an asynchronous verify chain operation. See
verify_chain()for more information.If
chainis found to be valid, then the return value will be 0. Ifchainis found to be invalid, then the return value will indicate the problems found. If the function is unable to determine whetherchainis valid or not (eg, becausecancellableis triggered before it completes) then the return value will beGENERIC_ERRORanderrorwill be set accordingly.erroris not set whenchainis successfully analyzed but found to be invalid.Added in version 2.30.
- Parameters:
result – a
AsyncResult.