Dillo v3.1.1-119-g140d9ebd
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-2024 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
34const char *a_Tls_version(char *buf, int n);
35void a_Tls_init(void);
37int a_Tls_connect_ready(const DilloUrl *url);
38void a_Tls_reset_server_state(const DilloUrl *url);
39void a_Tls_connect(int fd, const DilloUrl *url);
40void *a_Tls_connection(int fd);
41void a_Tls_freeall(void);
42void a_Tls_close_by_fd(int fd);
43int a_Tls_read(void *conn, void *buf, size_t len);
44int a_Tls_write(void *conn, void *buf, size_t len);
45
46#ifdef __cplusplus
47}
48#endif
49
50#endif /* __TLS_H__ */
51
Definition url.h:88
void a_Tls_reset_server_state(const DilloUrl *url)
Definition tls.c:131
void a_Tls_connect(int fd, const DilloUrl *url)
Definition tls.c:144
int a_Tls_read(void *conn, void *buf, size_t len)
Definition tls.c:170
int a_Tls_connect_ready(const DilloUrl *url)
The purpose here is to permit a single initial connection to a server.
Definition tls.c:84
const char * a_Tls_version(char *buf, int n)
Get the version of the TLS library.
Definition tls.c:31
void a_Tls_init(void)
Initialize TLS library.
Definition tls.c:47
int a_Tls_write(void *conn, void *buf, size_t len)
Definition tls.c:183
void a_Tls_close_by_fd(int fd)
Definition tls.c:157
int a_Tls_certificate_is_clean(const DilloUrl *url)
Did everything seem proper with the certificate – no warnings to click through?.
Definition tls.c:101
void a_Tls_freeall(void)
Clean up the TLS library.
Definition tls.c:117
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:64