glibmm 2.78.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gio::TlsDatabase Class Reference

TlsDatabase - TLS database type. More...

#include <giomm/tlsdatabase.h>

Inheritance diagram for Gio::TlsDatabase:
Inheritance graph
[legend]

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
 
TlsDatabaseoperator= (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< TlsCertificatelookup_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< TlsCertificatelookup_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< TlsCertificatelookup_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< TlsCertificatelookup_certificate_issuer (const Glib::RefPtr< const TlsCertificate > & certificate, LookupFlags flags=LookupFlags::NONE)
 A lookup_certificate_issuer() convenience overload. More...
 
Glib::RefPtr< const TlsCertificatelookup_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 TlsCertificatelookup_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 TlsCertificatelookup_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 TlsCertificatelookup_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< TlsCertificatelookup_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< TlsCertificatelookup_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< TlsCertificatelookup_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< TlsCertificatelookup_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< TlsCertificatelookup_certificate_for_handle (const Glib::ustring & handle, LookupFlags flags=LookupFlags::NONE)
 A lookup_certificate_for_handle() convenience overload. More...
 
Glib::RefPtr< const TlsCertificatelookup_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 TlsCertificatelookup_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 TlsCertificatelookup_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 TlsCertificatelookup_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< TlsCertificatelookup_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
 
Objectoperator= (const Object &)=delete
 
 Object (Object && src) noexcept
 
Objectoperator= (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
 
ObjectBaseoperator= (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< TlsCertificatelookup_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< TlsCertificatelookup_certificate_for_handle_finish_vfunc (const Glib::RefPtr< AsyncResult > & result)
 
virtual Glib::RefPtr< TlsCertificatelookup_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< TlsCertificatelookup_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
 
ObjectBaseoperator= (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::TlsDatabasewrap (GTlsDatabase * object, bool take_copy=false)
 A Glib::wrap() method for this object. More...
 

Detailed Description

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:

Constructor & Destructor Documentation

◆ TlsDatabase() [1/2]

Gio::TlsDatabase::TlsDatabase ( TlsDatabase &&  src)
noexcept

◆ ~TlsDatabase()

Gio::TlsDatabase::~TlsDatabase ( )
overridenoexcept

◆ TlsDatabase() [2/2]

Gio::TlsDatabase::TlsDatabase ( )
protected

Member Function Documentation

◆ create_certificate_handle()

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.

Since glibmm 2.30:
Parameters
certificateCertificate for which to create a handle.
Returns
A newly allocated string containing the handle.

◆ create_certificate_handle_vfunc()

virtual Glib::ustring Gio::TlsDatabase::create_certificate_handle_vfunc ( const Glib::RefPtr< const TlsCertificate > &  certificate) const
protectedvirtual

◆ get_type()

static GType Gio::TlsDatabase::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ gobj() [1/2]

GTlsDatabase * Gio::TlsDatabase::gobj ( )
inline

Provides access to the underlying C GObject.

◆ gobj() [2/2]

const GTlsDatabase * Gio::TlsDatabase::gobj ( ) const
inline

Provides access to the underlying C GObject.

◆ gobj_copy()

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.

◆ lookup_certificate_for_handle() [1/8]

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.

◆ lookup_certificate_for_handle() [2/8]

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.

◆ lookup_certificate_for_handle() [3/8]

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.

Since glibmm 2.30:
Parameters
handleA certificate handle.
interactionUsed to interact with the user if necessary.
flagsFlags which affect the lookup.
cancellableA Cancellable, or nullptr.
Returns
A newly allocated TlsCertificate, or nullptr. Use Glib::object_unref() to release the certificate.
Exceptions
Glib::Error

◆ lookup_certificate_for_handle() [4/8]

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.

Since glibmm 2.30:
Parameters
handleA certificate handle.
interactionUsed to interact with the user if necessary.
flagsFlags which affect the lookup.
cancellableA Cancellable, or nullptr.
Returns
A newly allocated TlsCertificate, or nullptr. Use Glib::object_unref() to release the certificate.
Exceptions
Glib::Error

◆ lookup_certificate_for_handle() [5/8]

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.

◆ lookup_certificate_for_handle() [6/8]

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.

◆ lookup_certificate_for_handle() [7/8]

Glib::RefPtr< TlsCertificate > Gio::TlsDatabase::lookup_certificate_for_handle ( const Glib::ustring handle,
LookupFlags  flags = LookupFlags::NONE 
)

A lookup_certificate_for_handle() convenience overload.

◆ lookup_certificate_for_handle() [8/8]

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.

◆ lookup_certificate_for_handle_async() [1/4]

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.

Since glibmm 2.30:
Parameters
handleA certificate handle.
interactionUsed to interact with the user if necessary.
flagsFlags which affect the lookup.
cancellableA Cancellable, or nullptr.
slotCallback to call when the operation completes.

◆ lookup_certificate_for_handle_async() [2/4]

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.

◆ lookup_certificate_for_handle_async() [3/4]

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.

◆ lookup_certificate_for_handle_async() [4/4]

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.

◆ lookup_certificate_for_handle_async_vfunc()

virtual void Gio::TlsDatabase::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 
)
protectedvirtual

◆ lookup_certificate_for_handle_finish()

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.

Since glibmm 2.30:
Parameters
resultA AsyncResult.
Returns
A newly allocated TlsCertificate object. Use Glib::object_unref() to release the certificate.
Exceptions
Glib::Error

◆ lookup_certificate_for_handle_finish_vfunc()

virtual Glib::RefPtr< TlsCertificate > Gio::TlsDatabase::lookup_certificate_for_handle_finish_vfunc ( const Glib::RefPtr< AsyncResult > &  result)
protectedvirtual
Exceptions
Glib::Error.

◆ lookup_certificate_for_handle_vfunc()

virtual Glib::RefPtr< TlsCertificate > Gio::TlsDatabase::lookup_certificate_for_handle_vfunc ( const Glib::ustring handle,
const Glib::RefPtr< TlsInteraction > &  interaction,
const Glib::RefPtr< Cancellable > &  cancellable,
LookupFlags  flags 
)
protectedvirtual
Exceptions
Glib::Error.

◆ lookup_certificate_issuer() [1/8]

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.

◆ lookup_certificate_issuer() [2/8]

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.

◆ lookup_certificate_issuer() [3/8]

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.

Since glibmm 2.30:
Parameters
certificateA TlsCertificate.
interactionUsed to interact with the user if necessary.
flagsFlags which affect the lookup operation.
cancellableA Cancellable, or nullptr.
Returns
A newly allocated issuer TlsCertificate, or nullptr. Use Glib::object_unref() to release the certificate.
Exceptions
Glib::Error

◆ lookup_certificate_issuer() [4/8]

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.

Since glibmm 2.30:
Parameters
certificateA TlsCertificate.
interactionUsed to interact with the user if necessary.
flagsFlags which affect the lookup operation.
cancellableA Cancellable, or nullptr.
Returns
A newly allocated issuer TlsCertificate, or nullptr. Use Glib::object_unref() to release the certificate.
Exceptions
Glib::Error

◆ lookup_certificate_issuer() [5/8]

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.

◆ lookup_certificate_issuer() [6/8]

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.

◆ lookup_certificate_issuer() [7/8]

Glib::RefPtr< TlsCertificate > Gio::TlsDatabase::lookup_certificate_issuer ( const Glib::RefPtr< const TlsCertificate > &  certificate,
LookupFlags  flags = LookupFlags::NONE 
)

A lookup_certificate_issuer() convenience overload.

◆ lookup_certificate_issuer() [8/8]

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.

◆ lookup_certificate_issuer_async() [1/4]

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.

Since glibmm 2.30:
Parameters
certificateA TlsCertificate.
interactionUsed to interact with the user if necessary.
flagsFlags which affect the lookup operation.
cancellableA Cancellable, or nullptr.
slotCallback to call when the operation completes.

◆ lookup_certificate_issuer_async() [2/4]

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.

◆ lookup_certificate_issuer_async() [3/4]

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.

◆ lookup_certificate_issuer_async() [4/4]

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.

◆ lookup_certificate_issuer_async_vfunc()

virtual void Gio::TlsDatabase::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 
)
protectedvirtual

◆ lookup_certificate_issuer_finish()

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.

Since glibmm 2.30:
Parameters
resultA AsyncResult.
Returns
A newly allocated issuer TlsCertificate, or nullptr. Use Glib::object_unref() to release the certificate.
Exceptions
Glib::Error

◆ lookup_certificate_issuer_finish_vfunc()

virtual Glib::RefPtr< TlsCertificate > Gio::TlsDatabase::lookup_certificate_issuer_finish_vfunc ( const Glib::RefPtr< AsyncResult > &  result)
protectedvirtual
Exceptions
Glib::Error.

◆ lookup_certificate_issuer_vfunc()

virtual Glib::RefPtr< TlsCertificate > Gio::TlsDatabase::lookup_certificate_issuer_vfunc ( const Glib::RefPtr< TlsCertificate > &  certificate,
const Glib::RefPtr< TlsInteraction > &  interaction,
const Glib::RefPtr< Cancellable > &  cancellable,
LookupFlags  flags 
)
protectedvirtual
Exceptions
Glib::Error.

◆ lookup_certificates_issued_by() [1/8]

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.

◆ lookup_certificates_issued_by() [2/8]

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.

◆ lookup_certificates_issued_by() [3/8]

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.

Since glibmm 2.30:
Parameters
issuer_raw_dnA ByteArray which holds the DER encoded issuer DN.
interactionUsed to interact with the user if necessary.
flagsFlags which affect the lookup operation.
cancellableA Cancellable, or nullptr.
Returns
A newly allocated list of TlsCertificate objects.
Exceptions
Glib::Error

◆ lookup_certificates_issued_by() [4/8]

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.

Since glibmm 2.30:
Parameters
issuer_raw_dnA ByteArray which holds the DER encoded issuer DN.
interactionUsed to interact with the user if necessary.
flagsFlags which affect the lookup operation.
cancellableA Cancellable, or nullptr.
Returns
A newly allocated list of TlsCertificate objects.
Exceptions
Glib::Error

◆ lookup_certificates_issued_by() [5/8]

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.

◆ lookup_certificates_issued_by() [6/8]

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.

◆ lookup_certificates_issued_by() [7/8]

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.

◆ lookup_certificates_issued_by() [8/8]

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.

◆ lookup_certificates_issued_by_async() [1/4]

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.

Since glibmm 2.30:
Parameters
issuer_raw_dnA ByteArray which holds the DER encoded issuer DN.
interactionUsed to interact with the user if necessary.
flagsFlags which affect the lookup operation.
cancellableA Cancellable, or nullptr.
slotCallback to call when the operation completes.

◆ lookup_certificates_issued_by_async() [2/4]

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.

◆ lookup_certificates_issued_by_async() [3/4]

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.

◆ lookup_certificates_issued_by_async() [4/4]

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.

◆ lookup_certificates_issued_by_async_vfunc()

virtual void Gio::TlsDatabase::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 
)
protectedvirtual

◆ lookup_certificates_issued_by_finish()

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.

Since glibmm 2.30:
Parameters
resultA AsyncResult.
Returns
A newly allocated list of TlsCertificate objects.
Exceptions
Glib::Error

◆ lookup_certificates_issued_by_finish_vfunc()

virtual std::vector< Glib::RefPtr< TlsCertificate > > Gio::TlsDatabase::lookup_certificates_issued_by_finish_vfunc ( const Glib::RefPtr< AsyncResult > &  result)
protectedvirtual
Exceptions
Glib::Error.

◆ lookup_certificates_issued_by_vfunc()

virtual std::vector< Glib::RefPtr< TlsCertificate > > Gio::TlsDatabase::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 
)
protectedvirtual
Exceptions
Glib::Error.

◆ operator=()

TlsDatabase & Gio::TlsDatabase::operator= ( TlsDatabase &&  src)
noexcept

◆ verify_chain() [1/8]

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.

◆ verify_chain() [2/8]

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.

◆ verify_chain() [3/8]

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.

Since glibmm 2.30:
Parameters
chainA TlsCertificate chain.
purposeThe purpose that this certificate chain will be used for.
identityThe expected peer identity.
interactionUsed to interact with the user if necessary.
flagsAdditional verify flags.
cancellableA Cancellable, or nullptr.
Returns
The appropriate TlsCertificateFlags which represents the result of verification.
Exceptions
Glib::Error

◆ verify_chain() [4/8]

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.

◆ verify_chain() [5/8]

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.

◆ verify_chain() [6/8]

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.

◆ verify_chain() [7/8]

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.

◆ verify_chain() [8/8]

TlsCertificateFlags Gio::TlsDatabase::verify_chain ( const Glib::RefPtr< TlsCertificate > &  chain,
const Glib::ustring purpose,
VerifyFlags  flags = VerifyFlags::NONE 
) const

A verify_chain() convenience overload.

◆ verify_chain_async() [1/8]

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.

Since glibmm 2.30:
Parameters
chainA TlsCertificate chain.
purposeThe purpose that this certificate chain will be used for.
identityThe expected peer identity.
interactionUsed to interact with the user if necessary.
flagsAdditional verify flags.
cancellableA Cancellable, or nullptr.
slotCallback to call when the operation completes.

◆ verify_chain_async() [2/8]

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.

◆ verify_chain_async() [3/8]

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.

◆ verify_chain_async() [4/8]

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.

◆ verify_chain_async() [5/8]

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.

◆ verify_chain_async() [6/8]

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.

◆ verify_chain_async() [7/8]

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.

◆ verify_chain_async() [8/8]

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.

◆ verify_chain_async_vfunc()

virtual void Gio::TlsDatabase::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
protectedvirtual

◆ verify_chain_finish()

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.

Since glibmm 2.30:
Parameters
resultA AsyncResult.
Returns
The appropriate TlsCertificateFlags which represents the result of verification.
Exceptions
Glib::Error

◆ verify_chain_finish_vfunc()

virtual TlsCertificateFlags Gio::TlsDatabase::verify_chain_finish_vfunc ( const Glib::RefPtr< AsyncResult > &  result)
protectedvirtual
Exceptions
Glib::Error.

◆ verify_chain_vfunc()

virtual TlsCertificateFlags Gio::TlsDatabase::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
protectedvirtual
Exceptions
Glib::Error.

Friends And Related Function Documentation

◆ wrap()

Glib::RefPtr< Gio::TlsDatabase > wrap ( GTlsDatabase *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.