28#if defined(ENABLE_DCO)
40static inline dco_cipher_t
41dco_get_cipher(
const char *cipher)
43 if (strcmp(cipher,
"AES-256-GCM") == 0 || strcmp(cipher,
"AES-128-GCM") == 0
44 || strcmp(cipher,
"AES-192-GCM") == 0)
48 else if (strcmp(cipher,
"CHACHA20-POLY1305") == 0)
54 msg(
M_FATAL,
"DCO: provided unsupported cipher: %s", cipher);
64 struct sockaddr *localaddr,
struct sockaddr *remoteaddr,
65 struct in_addr *vpn_ipv4,
struct in6_addr *vpn_ipv6);
71 const uint8_t *encrypt_key,
const uint8_t *encrypt_iv,
72 const uint8_t *decrypt_key,
const uint8_t *decrypt_iv,
73 const char *ciphername);
int dco_del_key(dco_context_t *dco, unsigned int peerid, dco_key_slot_t slot)
int dco_del_peer(dco_context_t *dco, unsigned int peerid)
int dco_swap_keys(dco_context_t *dco, unsigned int peer_id)
int dco_new_peer(dco_context_t *dco, unsigned int peerid, int sd, struct sockaddr *localaddr, struct sockaddr *remoteaddr, struct in_addr *vpn_ipv4, struct in6_addr *vpn_ipv6)
int dco_new_key(dco_context_t *dco, unsigned int peerid, int keyid, dco_key_slot_t slot, const uint8_t *encrypt_key, const uint8_t *encrypt_iv, const uint8_t *decrypt_key, const uint8_t *decrypt_iv, const char *ciphername)
@ OVPN_CIPHER_ALG_CHACHA20_POLY1305
@ OVPN_CIPHER_ALG_AES_GCM