e-soup-ssl-trust

e-soup-ssl-trust — SSL certificate trust handling for WebDAV sources

Functions

Includes

#include <libedataserver/libedataserver.h>

Description

Functions

e_soup_ssl_trust_connect ()

void
e_soup_ssl_trust_connect (SoupMessage *soup_message,
                          ESource *source);

Sets up automatic SSL certificate trust handling for soup_message using the trust data stored in source 's WebDAV extension. If soup_message is about to be sent on an SSL connection with an invalid certificate, the code checks if the WebDAV extension already has a trust response for that certificate and verifies it with e_source_webdav_verify_ssl_trust(). If the verification fails, then the soup_message send also fails.

This works by connecting to the "network-event" signal on soup_message and connecting to the "accept-certificate" signal on each GTlsConnection for which soup_message reports a G_SOCKET_CLIENT_TLS_HANDSHAKING event. These handlers are torn down automatically when soup_message is disposed. This process is not thread-safe; it is sufficient for safety if all use of soup_message 's session and the disposal of soup_message occur in the same thread.

Parameters

soup_message

a SoupMessage about to be sent to the source

 

source

an ESource that uses WebDAV

 

Since: 3.16

Types and Values