glibmm 2.80.0
|
TlsDatabase - TLS database type. More...
#include <giomm/tlsdatabase.h>
Public Types | |
enum class | VerifyFlags { VerifyFlags::NONE = 0x0 } |
Flags for g_tls_database_verify_chain(). More... | |
enum class | LookupFlags { LookupFlags::NONE = 0x0 , LookupFlags::KEYPAIR = 0x1 } |
Flags for g_tls_database_lookup_certificate_for_handle(), g_tls_database_lookup_certificate_issuer(), and g_tls_database_lookup_certificates_issued_by(). More... | |
Public Types inherited from Glib::Object | |
using | DestroyNotify = void(*)(gpointer data) |
Public Member Functions | |
TlsDatabase (TlsDatabase && src) noexcept | |
TlsDatabase & | operator= (TlsDatabase && src) noexcept |
~TlsDatabase () noexcept override | |
GTlsDatabase * | gobj () |
Provides access to the underlying C GObject. More... | |
const GTlsDatabase * | gobj () const |
Provides access to the underlying C GObject. More... | |
GTlsDatabase * | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
TlsCertificateFlags | verify_chain (const Glib::RefPtr< TlsCertificate > & chain, const Glib::ustring & purpose, VerifyFlags flags=VerifyFlags::NONE) const |
A verify_chain() convenience overload. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
TlsCertificateFlags | verify_chain_finish (const Glib::RefPtr< AsyncResult > & result) |
Finish an asynchronous verify chain operation. More... | |
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. More... | |
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. More... | |
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. More... | |
Glib::RefPtr< TlsCertificate > | lookup_certificate_issuer (const Glib::RefPtr< const TlsCertificate > & certificate, LookupFlags flags=LookupFlags::NONE) |
A lookup_certificate_issuer() convenience overload. More... | |
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. More... | |
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. More... | |
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. More... | |
Glib::RefPtr< const TlsCertificate > | lookup_certificate_issuer (const Glib::RefPtr< const TlsCertificate > & certificate, LookupFlags flags=LookupFlags::NONE) const |
A lookup_certificate_issuer() convenience overload. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Glib::RefPtr< TlsCertificate > | lookup_certificate_issuer_finish (const Glib::RefPtr< AsyncResult > & result) |
Finish an asynchronous lookup issuer operation. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
std::vector< Glib::RefPtr< TlsCertificate > > | lookup_certificates_issued_by_finish (const Glib::RefPtr< AsyncResult > & result) |
Finish an asynchronous lookup of certificates. More... | |
Glib::ustring | create_certificate_handle (const Glib::RefPtr< const TlsCertificate > & certificate) const |
Create a handle string for the certificate. More... | |
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. More... | |
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. More... | |
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. More... | |
Glib::RefPtr< TlsCertificate > | lookup_certificate_for_handle (const Glib::ustring & handle, LookupFlags flags=LookupFlags::NONE) |
A lookup_certificate_for_handle() convenience overload. More... | |
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. More... | |
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. More... | |
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. More... | |
Glib::RefPtr< const TlsCertificate > | lookup_certificate_for_handle (const Glib::ustring & handle, LookupFlags flags=LookupFlags::NONE) const |
A lookup_certificate_for_handle() convenience overload. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Glib::RefPtr< TlsCertificate > | lookup_certificate_for_handle_finish (const Glib::RefPtr< AsyncResult > & result) |
Finish an asynchronous lookup of a certificate by its handle. More... | |
Public Member Functions inherited from Glib::Object | |
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. More... | |
void | remove_data (const QueryQuark & quark) |
void * | steal_data (const QueryQuark & quark) |
Public Member Functions inherited from Glib::ObjectBase | |
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. More... | |
void | get_property_value (const Glib::ustring & property_name, Glib::ValueBase & value) const |
You probably want to use a specific property_*() accessor method instead. More... | |
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. More... | |
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. More... | |
template<class PropertyType > | |
PropertyType | get_property (const Glib::ustring & property_name) const |
You probably want to use a specific property_*() accessor method instead. More... | |
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. More... | |
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. More... | |
void | freeze_notify () |
Increases the freeze count on object. More... | |
void | thaw_notify () |
Reverts the effect of a previous call to freeze_notify(). More... | |
virtual void | reference () const |
Increment the reference count for this object. More... | |
virtual void | unreference () const |
Decrement the reference count for this object. More... | |
GObject * | gobj () |
Provides access to the underlying C GObject. More... | |
const GObject * | gobj () const |
Provides access to the underlying C GObject. More... | |
GObject * | gobj_copy () const |
Give a ref-ed copy to someone. Use for direct struct access. More... | |
Static Public Member Functions | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. More... | |
Protected Member Functions | |
TlsDatabase () | |
virtual TlsCertificateFlags | verify_chain_vfunc (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) const |
virtual void | verify_chain_async_vfunc (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) const |
virtual TlsCertificateFlags | verify_chain_finish_vfunc (const Glib::RefPtr< AsyncResult > & result) |
virtual Glib::ustring | create_certificate_handle_vfunc (const Glib::RefPtr< const TlsCertificate > & certificate) const |
virtual Glib::RefPtr< TlsCertificate > | lookup_certificate_for_handle_vfunc (const Glib::ustring & handle, const Glib::RefPtr< TlsInteraction > & interaction, const Glib::RefPtr< Cancellable > & cancellable, LookupFlags flags) |
virtual void | lookup_certificate_for_handle_async_vfunc (const Glib::ustring & handle, const Glib::RefPtr< TlsInteraction > & interaction, const SlotAsyncReady & slot, const Glib::RefPtr< Cancellable > & cancellable, LookupFlags flags) |
virtual Glib::RefPtr< TlsCertificate > | lookup_certificate_for_handle_finish_vfunc (const Glib::RefPtr< AsyncResult > & result) |
virtual Glib::RefPtr< TlsCertificate > | lookup_certificate_issuer_vfunc (const Glib::RefPtr< TlsCertificate > & certificate, const Glib::RefPtr< TlsInteraction > & interaction, const Glib::RefPtr< Cancellable > & cancellable, LookupFlags flags) |
virtual void | lookup_certificate_issuer_async_vfunc (const Glib::RefPtr< TlsCertificate > & certificate, const Glib::RefPtr< TlsInteraction > & interaction, const SlotAsyncReady & slot, const Glib::RefPtr< Cancellable > & cancellable, LookupFlags flags) |
virtual Glib::RefPtr< TlsCertificate > | lookup_certificate_issuer_finish_vfunc (const Glib::RefPtr< AsyncResult > & result) |
virtual std::vector< Glib::RefPtr< TlsCertificate > > | lookup_certificates_issued_by_vfunc (const Glib::RefPtr< Glib::ByteArray > & issuer_raw_dn, const Glib::RefPtr< TlsInteraction > & interaction, const Glib::RefPtr< Cancellable > & cancellable, LookupFlags flags) |
virtual void | lookup_certificates_issued_by_async_vfunc (const Glib::RefPtr< Glib::ByteArray > & issuer_raw_dn, const Glib::RefPtr< TlsInteraction > & interaction, const SlotAsyncReady & slot, const Glib::RefPtr< Cancellable > & cancellable, LookupFlags flags) |
virtual std::vector< Glib::RefPtr< TlsCertificate > > | lookup_certificates_issued_by_finish_vfunc (const Glib::RefPtr< AsyncResult > & result) |
Protected Member Functions inherited from Glib::Object | |
Object () | |
Object (const Glib::ConstructParams & construct_params) | |
Object (GObject * castitem) | |
~Object () noexcept override | |
Protected Member Functions inherited from Glib::ObjectBase | |
ObjectBase () | |
This default constructor is called implicitly from the constructor of user-derived classes, even if, for instance, Gtk::Button calls a different ObjectBase constructor. More... | |
ObjectBase (const char * custom_type_name) | |
A derived constructor always overrides this choice. More... | |
ObjectBase (const std::type_info & custom_type_info) | |
This constructor is a special feature to allow creation of derived types on the fly, without having to use g_object_new() manually. More... | |
ObjectBase (ObjectBase && src) noexcept | |
ObjectBase & | operator= (ObjectBase && src) noexcept |
virtual | ~ObjectBase () noexcept=0 |
void | initialize (GObject * castitem) |
void | initialize_move (GObject * castitem, Glib::ObjectBase * previous_wrapper) |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gio::TlsDatabase > | wrap (GTlsDatabase * object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
Related Functions inherited from Glib::Object | |
Glib::RefPtr< Glib::Object > | wrap (GObject * object, bool take_copy=false) |
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.
|
noexcept |
|
overridenoexcept |
|
protected |
Glib::ustring Gio::TlsDatabase::create_certificate_handle | ( | const Glib::RefPtr< const TlsCertificate > & | certificate | ) | const |
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, nullptr
will 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.
certificate | Certificate for which to create a handle. |
|
protectedvirtual |
|
static |
Get the GType for this class, for use with the underlying GObject type system.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
GTlsDatabase * Gio::TlsDatabase::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::RefPtr< TlsCertificate > Gio::TlsDatabase::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< const TlsCertificate > Gio::TlsDatabase::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< TlsCertificate > Gio::TlsDatabase::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.
The handle should have been created by calling g_tls_database_create_certificate_handle() on a TlsDatabase object 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 nullptr
will be returned.
This function can block, use g_tls_database_lookup_certificate_for_handle_async() to perform the lookup operation asynchronously.
handle | A certificate handle. |
interaction | Used to interact with the user if necessary. |
flags | Flags which affect the lookup. |
cancellable | A Cancellable, or nullptr . |
nullptr
. Use Glib::object_unref() to release the certificate.Glib::Error |
Glib::RefPtr< const TlsCertificate > Gio::TlsDatabase::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.
The handle should have been created by calling g_tls_database_create_certificate_handle() on a TlsDatabase object 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 nullptr
will be returned.
This function can block, use g_tls_database_lookup_certificate_for_handle_async() to perform the lookup operation asynchronously.
handle | A certificate handle. |
interaction | Used to interact with the user if necessary. |
flags | Flags which affect the lookup. |
cancellable | A Cancellable, or nullptr . |
nullptr
. Use Glib::object_unref() to release the certificate.Glib::Error |
Glib::RefPtr< TlsCertificate > Gio::TlsDatabase::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< const TlsCertificate > Gio::TlsDatabase::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< TlsCertificate > Gio::TlsDatabase::lookup_certificate_for_handle | ( | const Glib::ustring & | handle, |
LookupFlags | flags = LookupFlags::NONE |
||
) |
A lookup_certificate_for_handle() convenience overload.
Glib::RefPtr< const TlsCertificate > Gio::TlsDatabase::lookup_certificate_for_handle | ( | const Glib::ustring & | handle, |
LookupFlags | flags = LookupFlags::NONE |
||
) | const |
A lookup_certificate_for_handle() convenience overload.
void Gio::TlsDatabase::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.
See g_tls_database_lookup_certificate_for_handle() for more information.
handle | A certificate handle. |
interaction | Used to interact with the user if necessary. |
flags | Flags which affect the lookup. |
cancellable | A Cancellable, or nullptr . |
slot | Callback to call when the operation completes. |
void Gio::TlsDatabase::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 Gio::TlsDatabase::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 Gio::TlsDatabase::lookup_certificate_for_handle_async | ( | const Glib::ustring & | handle, |
const SlotAsyncReady & | slot, | ||
LookupFlags | flags = LookupFlags::NONE |
||
) |
A lookup_certificate_for_handle_async() convenience overload.
|
protectedvirtual |
Glib::RefPtr< TlsCertificate > Gio::TlsDatabase::lookup_certificate_for_handle_finish | ( | const Glib::RefPtr< AsyncResult > & | result | ) |
Finish an asynchronous lookup of a certificate by its handle.
See g_tls_database_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 nullptr
will be returned.
result | A AsyncResult. |
Glib::Error |
|
protectedvirtual |
Glib::Error. |
|
protectedvirtual |
Glib::Error. |
Glib::RefPtr< TlsCertificate > Gio::TlsDatabase::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< const TlsCertificate > Gio::TlsDatabase::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< TlsCertificate > Gio::TlsDatabase::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.
The TlsCertificate::property_issuer() property of certificate is not modified, and the two certificates are not hooked into a chain.
This function can block. Use g_tls_database_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.
certificate | A TlsCertificate. |
interaction | Used to interact with the user if necessary. |
flags | Flags which affect the lookup operation. |
cancellable | A Cancellable, or nullptr . |
nullptr
. Use Glib::object_unref() to release the certificate.Glib::Error |
Glib::RefPtr< const TlsCertificate > Gio::TlsDatabase::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.
The TlsCertificate::property_issuer() property of certificate is not modified, and the two certificates are not hooked into a chain.
This function can block. Use g_tls_database_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.
certificate | A TlsCertificate. |
interaction | Used to interact with the user if necessary. |
flags | Flags which affect the lookup operation. |
cancellable | A Cancellable, or nullptr . |
nullptr
. Use Glib::object_unref() to release the certificate.Glib::Error |
Glib::RefPtr< TlsCertificate > Gio::TlsDatabase::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< const TlsCertificate > Gio::TlsDatabase::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< TlsCertificate > Gio::TlsDatabase::lookup_certificate_issuer | ( | const Glib::RefPtr< const TlsCertificate > & | certificate, |
LookupFlags | flags = LookupFlags::NONE |
||
) |
A lookup_certificate_issuer() convenience overload.
Glib::RefPtr< const TlsCertificate > Gio::TlsDatabase::lookup_certificate_issuer | ( | const Glib::RefPtr< const TlsCertificate > & | certificate, |
LookupFlags | flags = LookupFlags::NONE |
||
) | const |
A lookup_certificate_issuer() convenience overload.
void Gio::TlsDatabase::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.
See g_tls_database_lookup_certificate_issuer() for more information.
certificate | A TlsCertificate. |
interaction | Used to interact with the user if necessary. |
flags | Flags which affect the lookup operation. |
cancellable | A Cancellable, or nullptr . |
slot | Callback to call when the operation completes. |
void Gio::TlsDatabase::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 Gio::TlsDatabase::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 Gio::TlsDatabase::lookup_certificate_issuer_async | ( | const Glib::RefPtr< const TlsCertificate > & | certificate, |
const SlotAsyncReady & | slot, | ||
LookupFlags | flags = LookupFlags::NONE |
||
) |
A lookup_certificate_issuer_async() convenience overload.
|
protectedvirtual |
Glib::RefPtr< TlsCertificate > Gio::TlsDatabase::lookup_certificate_issuer_finish | ( | const Glib::RefPtr< AsyncResult > & | result | ) |
Finish an asynchronous lookup issuer operation.
See g_tls_database_lookup_certificate_issuer() for more information.
result | A AsyncResult. |
nullptr
. Use Glib::object_unref() to release the certificate.Glib::Error |
|
protectedvirtual |
Glib::Error. |
|
protectedvirtual |
Glib::Error. |
std::vector< Glib::RefPtr< TlsCertificate > > Gio::TlsDatabase::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< const TlsCertificate > > Gio::TlsDatabase::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< TlsCertificate > > Gio::TlsDatabase::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.
This function can block, use g_tls_database_lookup_certificates_issued_by_async() to perform the lookup operation asynchronously.
issuer_raw_dn | A ByteArray which 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, or nullptr . |
Glib::Error |
std::vector< Glib::RefPtr< const TlsCertificate > > Gio::TlsDatabase::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.
This function can block, use g_tls_database_lookup_certificates_issued_by_async() to perform the lookup operation asynchronously.
issuer_raw_dn | A ByteArray which 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, or nullptr . |
Glib::Error |
std::vector< Glib::RefPtr< TlsCertificate > > Gio::TlsDatabase::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< const TlsCertificate > > Gio::TlsDatabase::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< TlsCertificate > > Gio::TlsDatabase::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 > > Gio::TlsDatabase::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 Gio::TlsDatabase::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.
See g_tls_database_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.
issuer_raw_dn | A ByteArray which 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, or nullptr . |
slot | Callback to call when the operation completes. |
void Gio::TlsDatabase::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 Gio::TlsDatabase::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 Gio::TlsDatabase::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.
|
protectedvirtual |
std::vector< Glib::RefPtr< TlsCertificate > > Gio::TlsDatabase::lookup_certificates_issued_by_finish | ( | const Glib::RefPtr< AsyncResult > & | result | ) |
Finish an asynchronous lookup of certificates.
See g_tls_database_lookup_certificates_issued_by() for more information.
result | A AsyncResult. |
Glib::Error |
|
protectedvirtual |
Glib::Error. |
|
protectedvirtual |
Glib::Error. |
|
noexcept |
TlsCertificateFlags Gio::TlsDatabase::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 Gio::TlsDatabase::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 Gio::TlsDatabase::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.
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.
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 . |
Glib::Error |
TlsCertificateFlags Gio::TlsDatabase::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 Gio::TlsDatabase::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 Gio::TlsDatabase::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 Gio::TlsDatabase::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 Gio::TlsDatabase::verify_chain | ( | const Glib::RefPtr< TlsCertificate > & | chain, |
const Glib::ustring & | purpose, | ||
VerifyFlags | flags = VerifyFlags::NONE |
||
) | const |
A verify_chain() convenience overload.
void Gio::TlsDatabase::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.
See g_tls_database_verify_chain() for more information.
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 . |
slot | Callback to call when the operation completes. |
void Gio::TlsDatabase::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 Gio::TlsDatabase::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 Gio::TlsDatabase::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 Gio::TlsDatabase::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 Gio::TlsDatabase::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 Gio::TlsDatabase::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 Gio::TlsDatabase::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.
|
protectedvirtual |
TlsCertificateFlags Gio::TlsDatabase::verify_chain_finish | ( | const Glib::RefPtr< AsyncResult > & | result | ) |
Finish an asynchronous verify chain operation.
See g_tls_database_verify_chain() for more information.
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 the problems found. If the function is unable to determine whether chain is valid or not (eg, 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.
result | A AsyncResult. |
Glib::Error |
|
protectedvirtual |
Glib::Error. |
|
protectedvirtual |
Glib::Error. |
|
related |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |