/* At this point the ciphers have already been normalised */
if (o->enable_ncp_fallback
- && !tls_item_in_cipher_list(o->ciphername, DCO_SUPPORTED_CIPHERS))
+ && !tls_item_in_cipher_list(o->ciphername, dco_get_supported_ciphers()))
{
msg(msglevel, "Note: --data-cipher-fallback with cipher '%s' "
"disables data channel offload.", o->ciphername);
const char *token;
while ((token = strsep(&tmp_ciphers, ":")))
{
- if (!tls_item_in_cipher_list(token, DCO_SUPPORTED_CIPHERS))
+ if (!tls_item_in_cipher_list(token, dco_get_supported_ciphers()))
{
msg(msglevel, "Note: cipher '%s' in --data-ciphers is not supported "
"by ovpn-dco, disabling data channel offload.", token);
*/
void dco_delete_iroutes(struct multi_context *m, struct multi_instance *mi);
+/**
+ * Retrieve the list of ciphers supported by the current platform
+ *
+ * @return list of colon-separated ciphers
+ */
+const char *dco_get_supported_ciphers();
+
#else /* if defined(ENABLE_DCO) */
typedef void *dco_context_t;
{
}
+static inline const char *
+dco_get_supported_ciphers()
+{
+ return "";
+}
+
#endif /* defined(ENABLE_DCO) */
#endif /* ifndef DCO_H */
}
}
+const char *
+dco_get_supported_ciphers()
+{
+ return "AES-128-GCM:AES-256-GCM:AES-192-GCM:CHACHA20-POLY1305";
+}
+
#endif /* defined(ENABLE_DCO) && defined(TARGET_LINUX) */
typedef enum ovpn_key_slot dco_key_slot_t;
typedef enum ovpn_cipher_alg dco_cipher_t;
-#define DCO_SUPPORTED_CIPHERS "AES-128-GCM:AES-256-GCM:AES-192-GCM:CHACHA20-POLY1305"
typedef struct
{