Go to the documentation of this file.
30 #ifndef OPENVPN_SSL_NCP_H
31 #define OPENVPN_SSL_NCP_H
75 const char *remote_cipher,
struct gc_arena *
gc);
125 #define MAX_NCP_CIPHERS_LENGTH 127
char * mutate_ncp_cipher_list(const char *list, struct gc_arena *gc)
Check whether the ciphers in the supplied list are supported.
Contains all state information for one tunnel.
bool tls_item_in_cipher_list(const char *item, const char *list)
Return true iff item is present in the colon-separated zero-terminated cipher list.
Security parameter state for a single VPN tunnel.
void p2p_mode_ncp(struct tls_multi *multi, struct tls_session *session)
Determines if there is common cipher of both peer by looking at the IV_CIPHER peer info.
struct gc_arena gc
Garbage collection arena for allocations done in the scope of this context structure.
char * ncp_get_best_cipher(const char *server_list, const char *peer_info, const char *remote_cipher, struct gc_arena *gc)
Iterates through the ciphers in server_list and return the first cipher that is also supported by the...
bool check_session_cipher(struct tls_session *session, struct options *options)
Checks if the cipher is allowed, otherwise returns false and reset the cipher to the config cipher.
Security parameter state of a single session within a VPN tunnel.
bool tls_peer_supports_ncp(const char *peer_info)
Returns whether the client supports NCP either by announcing IV_NCP>=2 or the IV_CIPHERS list.
Garbage collection arena used to keep track of dynamically allocated memory.
const char * tls_peer_ncp_list(const char *peer_info, struct gc_arena *gc)
Returns the support cipher list from the peer according to the IV_NCP and IV_CIPHER values in peer_in...
const char * get_p2p_ncp_cipher(struct tls_session *session, const char *peer_info, struct gc_arena *gc)
Determines the best common cipher from both peers IV_CIPHER lists.
bool check_pull_client_ncp(struct context *c, int found)
Checks whether the cipher negotiation is in an acceptable state and we continue to connect or should ...
void append_cipher_to_ncp_list(struct options *o, const char *ciphername)
Appends the cipher specified by the ciphernamer parameter to to the o->ncp_ciphers list.