Dillo v3.1.1-119-g140d9ebd
Loading...
Searching...
No Matches
tls.h File Reference
#include "../url.h"
Include dependency graph for tls.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TLS_CONNECT_NEVER   -1
 
#define TLS_CONNECT_NOT_YET   0
 
#define TLS_CONNECT_READY   1
 

Functions

const char * a_Tls_version (char *buf, int n)
 Get the version of the TLS library.
 
void a_Tls_init (void)
 Initialize TLS library.
 
int a_Tls_certificate_is_clean (const DilloUrl *url)
 Did everything seem proper with the certificate – no warnings to click through?.
 
int a_Tls_connect_ready (const DilloUrl *url)
 The purpose here is to permit a single initial connection to a server.
 
void a_Tls_reset_server_state (const DilloUrl *url)
 
void a_Tls_connect (int fd, const DilloUrl *url)
 
void * a_Tls_connection (int fd)
 Return TLS connection information for a given file descriptor, or NULL if no TLS connection was found.
 
void a_Tls_freeall (void)
 Clean up the TLS library.
 
void a_Tls_close_by_fd (int fd)
 
int a_Tls_read (void *conn, void *buf, size_t len)
 
int a_Tls_write (void *conn, void *buf, size_t len)
 

Macro Definition Documentation

◆ TLS_CONNECT_NEVER

#define TLS_CONNECT_NEVER   -1

Definition at line 30 of file tls.h.

◆ TLS_CONNECT_NOT_YET

#define TLS_CONNECT_NOT_YET   0

Definition at line 31 of file tls.h.

◆ TLS_CONNECT_READY

#define TLS_CONNECT_READY   1

Definition at line 32 of file tls.h.

Function Documentation

◆ a_Tls_certificate_is_clean()

int a_Tls_certificate_is_clean ( const DilloUrl url)

Did everything seem proper with the certificate – no warnings to click through?.

Definition at line 101 of file tls.c.

References a_Tls_mbedtls_certificate_is_clean(), and a_Tls_openssl_certificate_is_clean().

Referenced by a_Hsts_set().

◆ a_Tls_close_by_fd()

void a_Tls_close_by_fd ( int  fd)

Definition at line 157 of file tls.c.

References a_Tls_mbedtls_close_by_fd(), and a_Tls_openssl_close_by_fd().

Referenced by Http_socket_free().

◆ a_Tls_connect()

void a_Tls_connect ( int  fd,
const DilloUrl url 
)

Definition at line 144 of file tls.c.

References a_Tls_mbedtls_connect(), and a_Tls_openssl_connect().

Referenced by a_Http_ccc(), and Http_connect_tls().

◆ a_Tls_connect_ready()

int a_Tls_connect_ready ( const DilloUrl url)

The purpose here is to permit a single initial connection to a server.

Once we have the certificate, know whether we like it – and whether the user accepts it – HTTP can run through queued sockets as normal.

Return: TLS_CONNECT_READY or TLS_CONNECT_NOT_YET or TLS_CONNECT_NEVER.

Definition at line 84 of file tls.c.

References a_Tls_mbedtls_connect_ready(), a_Tls_openssl_connect_ready(), and TLS_CONNECT_NEVER.

Referenced by Http_connect_queued_sockets().

◆ a_Tls_connection()

void * a_Tls_connection ( int  fd)

Return TLS connection information for a given file descriptor, or NULL if no TLS connection was found.

Definition at line 64 of file tls.c.

References a_Tls_mbedtls_connection(), and a_Tls_openssl_connection().

Referenced by IO_read(), and IO_write().

◆ a_Tls_freeall()

void a_Tls_freeall ( void  )

Clean up the TLS library.

Definition at line 117 of file tls.c.

References a_Tls_mbedtls_freeall(), and a_Tls_openssl_freeall().

Referenced by main().

◆ a_Tls_init()

void a_Tls_init ( void  )

Initialize TLS library.

Definition at line 47 of file tls.c.

References a_Tls_mbedtls_init(), a_Tls_openssl_init(), and MSG.

Referenced by main().

◆ a_Tls_read()

int a_Tls_read ( void *  conn,
void *  buf,
size_t  len 
)

Definition at line 170 of file tls.c.

References a_Tls_mbedtls_read(), and a_Tls_openssl_read().

Referenced by IO_read().

◆ a_Tls_reset_server_state()

void a_Tls_reset_server_state ( const DilloUrl url)

Definition at line 131 of file tls.c.

References a_Tls_mbedtls_reset_server_state(), and a_Tls_openssl_reset_server_state().

Referenced by Http_socket_free().

◆ a_Tls_version()

const char * a_Tls_version ( char *  buf,
int  n 
)

Get the version of the TLS library.

Definition at line 31 of file tls.c.

References a_Tls_mbedtls_version(), and a_Tls_openssl_version().

Referenced by print_libs().

◆ a_Tls_write()

int a_Tls_write ( void *  conn,
void *  buf,
size_t  len 
)

Definition at line 183 of file tls.c.

References a_Tls_mbedtls_write(), and a_Tls_openssl_write().

Referenced by IO_write().