The FreeRADIUS server $Id: a4e7f8c94e8038b7627bcf52356b7ed15955c1d7 $
Loading...
Searching...
No Matches
tls.h
Go to the documentation of this file.
1#pragma once
2/*
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16 */
17
18/**
19 * $Id: c1eb3720429a607a3ce8010180071daa90981ae1 $
20 * @file lib/bio/tls.h
21 * @brief Binary IO abstractions for TLS and DTLS connections
22 *
23 * @copyright 2026 Network RADIUS SAS (legal@networkradius.com)
24 */
25RCSIDH(lib_bio_tls_h, "$Id: c1eb3720429a607a3ce8010180071daa90981ae1 $")
26
27#ifdef WITH_TLS
28#include <freeradius-devel/bio/base.h>
29#include <freeradius-devel/server/request.h>
30
31#include <openssl/ssl.h>
32
33typedef struct fr_tls_connection_s fr_tls_connection_t; /* see freeradius-devel/tls/connection.h */
34typedef struct fr_bio_tls_s fr_bio_tls_t;
35
36fr_bio_tls_t *fr_bio_tls_alloc(request_t *request, fr_bio_t *next, SSL_CTX *ssl_ctx,
37 bool client, bool client_cert) CC_HINT(nonnull);
38
39fr_tls_connection_t *fr_bio_tls_conn(fr_bio_tls_t *my) CC_HINT(nonnull);
40
41int fr_bio_tls_connect(fr_bio_tls_t *my) CC_HINT(nonnull);
42
43void fr_bio_tls_close_send(fr_bio_tls_t *my) CC_HINT(nonnull);
44
45
46#endif
void fr_bio_tls_close_send(fr_bio_tls_t *my)
Send a TLS close_notify alert to the peer.
Definition tls.c:957
bool client
Act as the client, and connect to a server.
Definition tls.c:78
fr_tls_connection_t * fr_bio_tls_conn(fr_bio_tls_t *my)
The TLS connection, so the caller can set conn->name
Definition tls.c:1082
SSL_CTX * ssl_ctx
Used to create the TLS session.
Definition tls.c:77
int fr_bio_tls_connect(fr_bio_tls_t *my)
Take the connection through every state which comes before application data.
Definition tls.c:1102
fr_bio_tls_t * fr_bio_tls_alloc(request_t *request, fr_bio_t *next, SSL_CTX *ssl_ctx, bool client, bool client_cert)
Allocate a TLS bio.
Definition tls.c:1031
bool client_cert
For a server, require a client certificate.
Definition tls.c:79
The TLS bio.
Definition tls.c:65
static uint8_t request[4]
#define RCSIDH(h, id)
Definition build.h:604
int nonnull(2, 5))