OpenVPN
acc.h
Go to the documentation of this file.
1/*
2 * OpenVPN -- An application to securely tunnel IP networks
3 * over a single TCP/UDP port, with support for SSL/TLS-based
4 * session authentication and key exchange,
5 * packet encryption, packet authentication, and
6 * packet compression.
7 *
8 * Copyright (C) 2025 OpenVPN Inc <sales@openvpn.net>
9 * Copyright (C) 2025 Arne Schwabe <arne@rfc2549.org>
10 *
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2
14 * as published by the Free Software Foundation.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 */
25
26#ifndef ACC_H
27#define ACC_H
28
29#include "openvpn.h"
30
31#define ACC_MIN_MSG_LEN 64
32#define ACC_MAX_MSG_LEN 1280
33
42void
43receive_acc_message(struct context *c, const struct buffer *buffer);
44
45bool
47 struct tls_multi *tls_multi,
48 struct tls_session *session,
49 const char *protocol, bool fragment,
50 const char *msg, bool base64);
51
52
71char *
72parse_acc_parameters(const char *capabilities,
73 const char *delim,
74 int *max_acc_len,
75 bool server,
76 struct gc_arena *gc);
77
90void
92
102
108int
109parse_acc_message_flags(const char *flags, const char **err_reason, struct gc_arena *gc);
110
120struct buffer
121get_list_intersection(struct gc_arena *gc, const char *list1, const char *list2);
122
128void
130#endif
struct buffer get_list_intersection(struct gc_arena *gc, const char *list1, const char *list2)
Calculates the intersection of two list that are both separated by : Items in the result will have th...
Definition acc.c:351
void receive_acc_message(struct context *c, const struct buffer *buffer)
This method parses an app custom control message and delivers it to the management interface.
Definition acc.c:152
char * parse_acc_parameters(const char *capabilities, const char *delim, int *max_acc_len, bool server, struct gc_arena *gc)
Parses an info message from the server that contains app custom control info information prior to the...
Definition acc.c:287
bool send_acc_message(struct context *c, struct tls_multi *tls_multi, struct tls_session *session, const char *protocol, bool fragment, const char *msg, bool base64)
Definition acc.c:240
void determine_common_acc_protocols(struct tls_multi *multi, struct tls_session *session)
Parses the IV_ACC of the peer and sets multi.acc_negotiated_protocols to the common protocols of serv...
Definition acc.c:382
acc_message_flag
Flags returned by the parse_acc_message_flags method.
Definition acc.h:97
@ ACC_MESSAGE_FLAGS_FRAGMENT
Definition acc.h:100
@ ACC_MESSAGE_FLAGS_BASE64
Definition acc.h:99
@ ACC_MESSAGE_FLAGS_ASCII
Definition acc.h:98
int parse_acc_message_flags(const char *flags, const char **err_reason, struct gc_arena *gc)
Parses the flags field of an app control message If there is an error parsing the flags field the met...
Definition acc.c:91
void notify_client_acc_protocols(struct tls_multi *multi)
Notifies a client via management interface of the negotiated app custom protocols.
Definition acc.c:436
#define msg(flags,...)
Definition error.h:152
Wrapper structure for dynamically allocated memory.
Definition buffer.h:71
Contains all state information for one tunnel.
Definition openvpn.h:471
Structure for reassembling one incoming fragmented packet.
Definition fragment.h:65
Garbage collection arena used to keep track of dynamically allocated memory.
Definition buffer.h:127
Security parameter state for a single VPN tunnel.
Definition ssl_common.h:619
Security parameter state of a single session within a VPN tunnel.
Definition ssl_common.h:497
struct gc_arena gc
Definition test_ssl.c:138