|
| TlsDatabase (TlsDatabase &&src) noexcept |
|
TlsDatabase & | operator= (TlsDatabase &&src) noexcept |
|
| ~TlsDatabase () noexcept override |
|
GTlsDatabase * | gobj () |
| Provides access to the underlying C GObject.
|
|
const GTlsDatabase * | gobj () const |
| Provides access to the underlying C GObject.
|
|
GTlsDatabase * | gobj_copy () |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
|
|
TlsCertificateFlags | verify_chain (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, const Glib::RefPtr< const SocketConnectable > & identity, const Glib::RefPtr< TlsInteraction > &interaction, const Glib::RefPtr< Cancellable > &cancellable, VerifyFlags flags=VerifyFlags::NONE) const |
| Determines the validity of a certificate chain, outside the context of a TLS session.
|
|
TlsCertificateFlags | verify_chain (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, const Glib::RefPtr< const SocketConnectable > & identity, const Glib::RefPtr< TlsInteraction > &interaction, VerifyFlags flags=VerifyFlags::NONE) const |
| A verify_chain() convenience overload.
|
|
TlsCertificateFlags | verify_chain (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, const Glib::RefPtr< const SocketConnectable > & identity, const Glib::RefPtr< Cancellable > &cancellable, VerifyFlags flags=VerifyFlags::NONE) const |
| A verify_chain() convenience overload.
|
|
TlsCertificateFlags | verify_chain (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, const Glib::RefPtr< const SocketConnectable > & identity, VerifyFlags flags=VerifyFlags::NONE) const |
| A verify_chain() convenience overload.
|
|
TlsCertificateFlags | verify_chain (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, const Glib::RefPtr< TlsInteraction > &interaction, const Glib::RefPtr< Cancellable > &cancellable, VerifyFlags flags=VerifyFlags::NONE) const |
| A verify_chain() convenience overload.
|
|
TlsCertificateFlags | verify_chain (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, const Glib::RefPtr< TlsInteraction > &interaction, VerifyFlags flags=VerifyFlags::NONE) const |
| A verify_chain() convenience overload.
|
|
TlsCertificateFlags | verify_chain (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, const Glib::RefPtr< Cancellable > &cancellable, VerifyFlags flags=VerifyFlags::NONE) const |
| A verify_chain() convenience overload.
|
|
TlsCertificateFlags | verify_chain (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, VerifyFlags flags=VerifyFlags::NONE) const |
| A verify_chain() convenience overload.
|
|
void | verify_chain_async (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, const Glib::RefPtr< const SocketConnectable > & identity, const Glib::RefPtr< TlsInteraction > &interaction, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, VerifyFlags flags=VerifyFlags::NONE) const |
| Asynchronously determines the validity of a certificate chain after looking up and adding any missing certificates to the chain.
|
|
void | verify_chain_async (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, const Glib::RefPtr< const SocketConnectable > & identity, const Glib::RefPtr< TlsInteraction > &interaction, const SlotAsyncReady &slot, VerifyFlags flags=VerifyFlags::NONE) const |
| A verify_chain_async() convenience overload.
|
|
void | verify_chain_async (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, const Glib::RefPtr< const SocketConnectable > & identity, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, VerifyFlags flags=VerifyFlags::NONE) const |
| A verify_chain_async() convenience overload.
|
|
void | verify_chain_async (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, const Glib::RefPtr< const SocketConnectable > & identity, const SlotAsyncReady &slot, VerifyFlags flags=VerifyFlags::NONE) const |
| A verify_chain_async() convenience overload.
|
|
void | verify_chain_async (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, const Glib::RefPtr< TlsInteraction > &interaction, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, VerifyFlags flags=VerifyFlags::NONE) const |
| A verify_chain_async() convenience overload.
|
|
void | verify_chain_async (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, const Glib::RefPtr< TlsInteraction > &interaction, const SlotAsyncReady &slot, VerifyFlags flags=VerifyFlags::NONE) const |
| A verify_chain_async() convenience overload.
|
|
void | verify_chain_async (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, VerifyFlags flags=VerifyFlags::NONE) const |
| A verify_chain_async() convenience overload.
|
|
void | verify_chain_async (const Glib::RefPtr< TlsCertificate > &chain, const Glib::ustring &purpose, const SlotAsyncReady &slot, VerifyFlags flags=VerifyFlags::NONE) const |
| A verify_chain_async() convenience overload.
|
|
TlsCertificateFlags | verify_chain_finish (const Glib::RefPtr< AsyncResult > &result) |
| Finish an asynchronous verify chain operation.
|
|
Glib::RefPtr< TlsCertificate > | lookup_certificate_issuer (const Glib::RefPtr< const TlsCertificate > &certificate, const Glib::RefPtr< TlsInteraction > &interaction, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) |
| Look up the issuer of certificate in the database.
|
|
Glib::RefPtr< TlsCertificate > | lookup_certificate_issuer (const Glib::RefPtr< const TlsCertificate > &certificate, const Glib::RefPtr< TlsInteraction > &interaction, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificate_issuer() convenience overload.
|
|
Glib::RefPtr< TlsCertificate > | lookup_certificate_issuer (const Glib::RefPtr< const TlsCertificate > &certificate, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificate_issuer() convenience overload.
|
|
Glib::RefPtr< TlsCertificate > | lookup_certificate_issuer (const Glib::RefPtr< const TlsCertificate > &certificate, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificate_issuer() convenience overload.
|
|
Glib::RefPtr< const TlsCertificate > | lookup_certificate_issuer (const Glib::RefPtr< const TlsCertificate > &certificate, const Glib::RefPtr< TlsInteraction > &interaction, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) const |
| Look up the issuer of certificate in the database.
|
|
Glib::RefPtr< const TlsCertificate > | lookup_certificate_issuer (const Glib::RefPtr< const TlsCertificate > &certificate, const Glib::RefPtr< TlsInteraction > &interaction, LookupFlags flags=LookupFlags::NONE) const |
| A lookup_certificate_issuer() convenience overload.
|
|
Glib::RefPtr< const TlsCertificate > | lookup_certificate_issuer (const Glib::RefPtr< const TlsCertificate > &certificate, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) const |
| A lookup_certificate_issuer() convenience overload.
|
|
Glib::RefPtr< const TlsCertificate > | lookup_certificate_issuer (const Glib::RefPtr< const TlsCertificate > &certificate, LookupFlags flags=LookupFlags::NONE) const |
| A lookup_certificate_issuer() convenience overload.
|
|
void | lookup_certificate_issuer_async (const Glib::RefPtr< const TlsCertificate > &certificate, const Glib::RefPtr< TlsInteraction > &interaction, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) |
| Asynchronously look up the issuer of certificate in the database.
|
|
void | lookup_certificate_issuer_async (const Glib::RefPtr< const TlsCertificate > &certificate, const Glib::RefPtr< TlsInteraction > &interaction, const SlotAsyncReady &slot, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificate_issuer_async() convenience overload.
|
|
void | lookup_certificate_issuer_async (const Glib::RefPtr< const TlsCertificate > &certificate, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificate_issuer_async() convenience overload.
|
|
void | lookup_certificate_issuer_async (const Glib::RefPtr< const TlsCertificate > &certificate, const SlotAsyncReady &slot, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificate_issuer_async() convenience overload.
|
|
Glib::RefPtr< TlsCertificate > | lookup_certificate_issuer_finish (const Glib::RefPtr< AsyncResult > &result) |
| Finish an asynchronous lookup issuer operation.
|
|
std::vector< Glib::RefPtr< TlsCertificate > > | lookup_certificates_issued_by (const Glib::RefPtr< Glib::ByteArray > &issuer_raw_dn, const Glib::RefPtr< TlsInteraction > &interaction, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) |
| Look up certificates issued by this issuer in the database.
|
|
std::vector< Glib::RefPtr< TlsCertificate > > | lookup_certificates_issued_by (const Glib::RefPtr< Glib::ByteArray > &issuer_raw_dn, const Glib::RefPtr< TlsInteraction > &interaction, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificates_issued_by() convenience overload.
|
|
std::vector< Glib::RefPtr< TlsCertificate > > | lookup_certificates_issued_by (const Glib::RefPtr< Glib::ByteArray > &issuer_raw_dn, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificates_issued_by() convenience overload.
|
|
std::vector< Glib::RefPtr< TlsCertificate > > | lookup_certificates_issued_by (const Glib::RefPtr< Glib::ByteArray > &issuer_raw_dn, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificates_issued_by() convenience overload.
|
|
std::vector< Glib::RefPtr< const TlsCertificate > > | lookup_certificates_issued_by (const Glib::RefPtr< Glib::ByteArray > &issuer_raw_dn, const Glib::RefPtr< TlsInteraction > &interaction, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) const |
| Look up certificates issued by this issuer in the database.
|
|
std::vector< Glib::RefPtr< const TlsCertificate > > | lookup_certificates_issued_by (const Glib::RefPtr< Glib::ByteArray > &issuer_raw_dn, const Glib::RefPtr< TlsInteraction > &interaction, LookupFlags flags=LookupFlags::NONE) const |
| A lookup_certificates_issued_by() convenience overload.
|
|
std::vector< Glib::RefPtr< const TlsCertificate > > | lookup_certificates_issued_by (const Glib::RefPtr< Glib::ByteArray > &issuer_raw_dn, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) const |
| A lookup_certificates_issued_by() convenience overload.
|
|
std::vector< Glib::RefPtr< const TlsCertificate > > | lookup_certificates_issued_by (const Glib::RefPtr< Glib::ByteArray > &issuer_raw_dn, LookupFlags flags=LookupFlags::NONE) const |
| A lookup_certificates_issued_by() convenience overload.
|
|
void | lookup_certificates_issued_by_async (const Glib::RefPtr< Glib::ByteArray > &issuer_raw_dn, const Glib::RefPtr< TlsInteraction > &interaction, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) |
| Asynchronously look up certificates issued by this issuer in the database.
|
|
void | lookup_certificates_issued_by_async (const Glib::RefPtr< Glib::ByteArray > &issuer_raw_dn, const Glib::RefPtr< TlsInteraction > &interaction, const SlotAsyncReady &slot, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificates_issued_by_async() convenience overload.
|
|
void | lookup_certificates_issued_by_async (const Glib::RefPtr< Glib::ByteArray > &issuer_raw_dn, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificates_issued_by_async() convenience overload.
|
|
void | lookup_certificates_issued_by_async (const Glib::RefPtr< Glib::ByteArray > &issuer_raw_dn, const SlotAsyncReady &slot, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificates_issued_by_async() convenience overload.
|
|
std::vector< Glib::RefPtr< TlsCertificate > > | lookup_certificates_issued_by_finish (const Glib::RefPtr< AsyncResult > &result) |
| Finish an asynchronous lookup of certificates.
|
|
Glib::ustring | create_certificate_handle (const Glib::RefPtr< const TlsCertificate > &certificate) const |
| Create a handle string for the certificate.
|
|
Glib::RefPtr< TlsCertificate > | lookup_certificate_for_handle (const Glib::ustring &handle, const Glib::RefPtr< TlsInteraction > &interaction, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) |
| Look up a certificate by its handle.
|
|
Glib::RefPtr< TlsCertificate > | lookup_certificate_for_handle (const Glib::ustring &handle, const Glib::RefPtr< TlsInteraction > &interaction, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificate_for_handle() convenience overload.
|
|
Glib::RefPtr< TlsCertificate > | lookup_certificate_for_handle (const Glib::ustring &handle, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificate_for_handle() convenience overload.
|
|
Glib::RefPtr< TlsCertificate > | lookup_certificate_for_handle (const Glib::ustring &handle, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificate_for_handle() convenience overload.
|
|
Glib::RefPtr< const TlsCertificate > | lookup_certificate_for_handle (const Glib::ustring &handle, const Glib::RefPtr< TlsInteraction > &interaction, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) const |
| Look up a certificate by its handle.
|
|
Glib::RefPtr< const TlsCertificate > | lookup_certificate_for_handle (const Glib::ustring &handle, const Glib::RefPtr< TlsInteraction > &interaction, LookupFlags flags=LookupFlags::NONE) const |
| A lookup_certificate_for_handle() convenience overload.
|
|
Glib::RefPtr< const TlsCertificate > | lookup_certificate_for_handle (const Glib::ustring &handle, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) const |
| A lookup_certificate_for_handle() convenience overload.
|
|
Glib::RefPtr< const TlsCertificate > | lookup_certificate_for_handle (const Glib::ustring &handle, LookupFlags flags=LookupFlags::NONE) const |
| A lookup_certificate_for_handle() convenience overload.
|
|
void | lookup_certificate_for_handle_async (const Glib::ustring &handle, const Glib::RefPtr< TlsInteraction > &interaction, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) |
| Asynchronously look up a certificate by its handle in the database.
|
|
void | lookup_certificate_for_handle_async (const Glib::ustring &handle, const Glib::RefPtr< TlsInteraction > &interaction, const SlotAsyncReady &slot, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificate_for_handle_async() convenience overload.
|
|
void | lookup_certificate_for_handle_async (const Glib::ustring &handle, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificate_for_handle_async() convenience overload.
|
|
void | lookup_certificate_for_handle_async (const Glib::ustring &handle, const SlotAsyncReady &slot, LookupFlags flags=LookupFlags::NONE) |
| A lookup_certificate_for_handle_async() convenience overload.
|
|
Glib::RefPtr< TlsCertificate > | lookup_certificate_for_handle_finish (const Glib::RefPtr< AsyncResult > &result) |
| Finish an asynchronous lookup of a certificate by its handle.
|
|
| Object (const Object &)=delete |
|
Object & | operator= (const Object &)=delete |
|
| Object (Object &&src) noexcept |
|
Object & | operator= (Object &&src) noexcept |
|
void * | get_data (const QueryQuark & key) |
|
void | set_data (const Quark & key, void *data) |
|
void | set_data_with_c_callback (const Quark & key, void *data, GDestroyNotify notify) |
|
void | set_data (const Quark & key, void *data, DestroyNotify notify) |
| Prefer set_data_with_c_callback() with a callback with C linkage.
|
|
void | remove_data (const QueryQuark &quark) |
|
void * | steal_data (const QueryQuark &quark) |
|
| ObjectBase (const ObjectBase &)=delete |
|
ObjectBase & | operator= (const ObjectBase &)=delete |
|
void | set_property_value (const Glib::ustring & property_name, const Glib::ValueBase & value) |
| You probably want to use a specific property_*() accessor method instead.
|
|
void | get_property_value (const Glib::ustring & property_name, Glib::ValueBase & value) const |
| You probably want to use a specific property_*() accessor method instead.
|
|
template<class PropertyType > |
void | set_property (const Glib::ustring & property_name, const PropertyType & value) |
| You probably want to use a specific property_*() accessor method instead.
|
|
template<class PropertyType > |
void | get_property (const Glib::ustring & property_name, PropertyType & value) const |
| You probably want to use a specific property_*() accessor method instead.
|
|
template<class PropertyType > |
PropertyType | get_property (const Glib::ustring & property_name) const |
| You probably want to use a specific property_*() accessor method instead.
|
|
sigc::connection | connect_property_changed (const Glib::ustring & property_name, const sigc::slot< void()> &slot) |
| You can use the signal_changed() signal of the property proxy instead.
|
|
sigc::connection | connect_property_changed (const Glib::ustring & property_name, sigc::slot< void()> &&slot) |
| You can use the signal_changed() signal of the property proxy instead.
|
|
void | freeze_notify () |
| Increases the freeze count on object.
|
|
void | thaw_notify () |
| Reverts the effect of a previous call to freeze_notify().
|
|
virtual void | reference () const |
| Increment the reference count for this object.
|
|
virtual void | unreference () const |
| Decrement the reference count for this object.
|
|
GObject * | gobj () |
| Provides access to the underlying C GObject.
|
|
const GObject * | gobj () const |
| Provides access to the underlying C GObject.
|
|
GObject * | gobj_copy () const |
| Give a ref-ed copy to someone. Use for direct struct access.
|
|
TlsDatabase - TLS database type.
TlsDatabase is used to lookup certificates and other information from a certificate or key store. It is an abstract base class which TLS library specific subtypes override.
Most common client applications will not directly interact with TlsDatabase. It is used internally by TlsConnection.
- Since glibmm 2.36:
Determines the validity of a certificate chain, outside the context of a TLS session.
chain is a chain of TlsCertificate objects each pointing to the next certificate in the chain by its TlsCertificate::property_issuer() property.
purpose describes the purpose (or usage) for which the certificate is being used. Typically purpose will be set to G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER which means that the certificate is being used to authenticate a server (and we are acting as the client).
The identity is used to ensure the server certificate is valid for the expected peer identity. If the identity does not match the certificate, Gio::TlsCertificateFlags::BAD_IDENTITY will be set in the return value. If identity is nullptr
, 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, and Gio::TlsDatabaseVerifyFlags::NONE should be used.
If chain is found to be valid, then the return value will be 0. If chain is found to be invalid, then the return value will indicate at least one problem found. If the function is unable to determine whether chain is valid (for example, because cancellable is triggered before it completes) then the return value will be Gio::TlsCertificateFlags::GENERIC_ERROR and error will be set accordingly. error is not set when chain is 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 Gio::TlsCertificateFlags::EXPIRED if 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 chain to represent the certification path built by TlsDatabase during certificate verification by adjusting the TlsCertificate::property_issuer() property of each certificate in chain. Since GLib 2.48, this no longer occurs, so you cannot rely on TlsCertificate::property_issuer() to represent the actual certification path used during certificate verification.
Because TLS session context is not used, TlsDatabase may not perform as many checks on the certificates as TlsConnection would. 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 let TlsConnection handle 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 g_tls_database_verify_chain_async() to perform the verification operation asynchronously.
- Since glibmm 2.30:
- Parameters
-
chain | A TlsCertificate chain. |
purpose | 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, or nullptr . |
- Returns
- The appropriate TlsCertificateFlags which represents the result of verification.
- Exceptions
-