diff options
author | Steffan Karger | 2016-10-12 09:32:49 +0200 |
---|---|---|
committer | David Sommerseth | 2016-10-13 17:23:20 +0200 |
commit | dc4fa3c4656b92aff3f26d4134c509410add142e (patch) | |
tree | 2789363d06c5dff789c497d51cf9cad4c929e66f /src/openvpn/crypto_backend.h | |
parent | 396d30c264e6cb6b9f57c3e566f3b71879999662 (diff) | |
download | openvpn-dc4fa3c4656b92aff3f26d4134c509410add142e.zip openvpn-dc4fa3c4656b92aff3f26d4134c509410add142e.tar.gz |
Check --ncp-ciphers list on startup
Currently, if --ncp-ciphers contains an invalid cipher, OpenVPN will only
error out when that cipher is selected by negotiation. That's not very
friendly to the user, so check the list on startup, and give a clear error
message immediately.
This patches changes the cipher_kt_get() to let the caller decide what
action to take if no valid cipher was found. This enables us to print all
invalid ciphers in the list, instead of just the first invalid cipher.
This should fix trac #737.
v2: improve tls_check_ncp_cipher_list() with Selva's review suggestions.
Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Selva Nair <selva.nair@gmail.com>
Message-Id: <1476257569-16301-1-git-send-email-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg12671.html
Trac: #737
Signed-off-by: David Sommerseth <davids@openvpn.net>
Diffstat (limited to 'src/openvpn/crypto_backend.h')
-rw-r--r-- | src/openvpn/crypto_backend.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/openvpn/crypto_backend.h b/src/openvpn/crypto_backend.h index a699673..bf7d78c 100644 --- a/src/openvpn/crypto_backend.h +++ b/src/openvpn/crypto_backend.h @@ -195,7 +195,8 @@ void cipher_des_encrypt_ecb (const unsigned char key[DES_KEY_LENGTH], * \c AES-128-CBC). * * @return A statically allocated structure containing parameters - * for the given cipher. + * for the given cipher, or NULL if no matching parameters + * were found. */ const cipher_kt_t * cipher_kt_get (const char *ciphername); |