Dillo v3.1.1-46-g8a360e32
Loading...
Searching...
No Matches
tls.h
Go to the documentation of this file.
1/*
2 * File: tls.h
3 *
4 * Copyright (C) 2011 Benjamin Johnson <obeythepenguin@users.sourceforge.net>
5 * (for the https code offered from dplus browser that formed the basis...)
6 * Copyright 2016 corvid
7 * Copyright (C) 2023 Rodrigo Arias Mallo <rodarima@gmail.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * As a special exception, permission is granted to link Dillo with the OpenSSL
15 * or LibreSSL library, and distribute the linked executables without
16 * including the source code for OpenSSL or LibreSSL in the source
17 * distribution. You must obey the GNU General Public License, version 3, in
18 * all respects for all of the code used other than OpenSSL or LibreSSL.
19 */
20
21#ifndef __TLS_H__
22#define __TLS_H__
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#include "../url.h"
29
30#define TLS_CONNECT_NEVER -1
31#define TLS_CONNECT_NOT_YET 0
32#define TLS_CONNECT_READY 1
33
34void a_Tls_init(void);
36int a_Tls_connect_ready(const DilloUrl *url);
37void a_Tls_reset_server_state(const DilloUrl *url);
38void a_Tls_connect(int fd, const DilloUrl *url);
39void *a_Tls_connection(int fd);
40void a_Tls_freeall(void);
41void a_Tls_close_by_fd(int fd);
42int a_Tls_read(void *conn, void *buf, size_t len);
43int a_Tls_write(void *conn, void *buf, size_t len);
44
45#ifdef __cplusplus
46}
47#endif
48
49#endif /* __TLS_H__ */
50
Definition url.h:88
void a_Tls_reset_server_state(const DilloUrl *url)
Definition tls.c:115
void a_Tls_connect(int fd, const DilloUrl *url)
Definition tls.c:128
int a_Tls_read(void *conn, void *buf, size_t len)
Definition tls.c:154
int a_Tls_connect_ready(const DilloUrl *url)
The purpose here is to permit a single initial connection to a server.
Definition tls.c:68
void a_Tls_init(void)
Initialize TLS library.
Definition tls.c:31
int a_Tls_write(void *conn, void *buf, size_t len)
Definition tls.c:167
void a_Tls_close_by_fd(int fd)
Definition tls.c:141
int a_Tls_certificate_is_clean(const DilloUrl *url)
Did everything seem proper with the certificate – no warnings to click through?.
Definition tls.c:85
void a_Tls_freeall(void)
Clean up the TLS library.
Definition tls.c:101
void * a_Tls_connection(int fd)
Return TLS connection information for a given file descriptor, or NULL if no TLS connection was found...
Definition tls.c:48