]> git.ipfire.org Git - thirdparty/openvpn.git/log
thirdparty/openvpn.git
13 years agoRefactored: renamed X509 functions from verify_*
Adriaan de Jong [Thu, 30 Jun 2011 13:44:24 +0000 (15:44 +0200)] 
Refactored: renamed X509 functions from verify_*

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored: made M_SSL dependent on USE_OPENSSL
Adriaan de Jong [Wed, 29 Jun 2011 12:53:41 +0000 (14:53 +0200)] 
Refactored: made M_SSL dependent on USE_OPENSSL

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoCleaned up ssl.h
Adriaan de Jong [Thu, 30 Jun 2011 13:11:47 +0000 (15:11 +0200)] 
Cleaned up ssl.h

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored: Moved verify_cert to ssl_verify
Adriaan de Jong [Thu, 30 Jun 2011 13:07:21 +0000 (15:07 +0200)] 
Refactored: Moved verify_cert to ssl_verify

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoMinor cleanup in verify_cert:
Adriaan de Jong [Thu, 30 Jun 2011 13:03:33 +0000 (15:03 +0200)] 
Minor cleanup in verify_cert:

 - Removed envname variable
 - Removed debug code
 - Changed ERR_clear_error to tls_clear_error
 - Changed verify_get_subject to match verify_get_serial more closely

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored CRL checks
Adriaan de Jong [Thu, 30 Jun 2011 12:55:53 +0000 (14:55 +0200)] 
Refactored CRL checks

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored tls-verify script code
Adriaan de Jong [Thu, 30 Jun 2011 12:38:38 +0000 (14:38 +0200)] 
Refactored tls-verify script code

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored tls-verify-plugin code
Adriaan de Jong [Thu, 30 Jun 2011 12:15:40 +0000 (14:15 +0200)] 
Refactored tls-verify-plugin code

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored tls-remote checking
Adriaan de Jong [Wed, 29 Jun 2011 12:28:44 +0000 (14:28 +0200)] 
Refactored tls-remote checking

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored EKU verification
Adriaan de Jong [Wed, 29 Jun 2011 12:24:15 +0000 (14:24 +0200)] 
Refactored EKU verification

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored key usage verification code
Adriaan de Jong [Wed, 29 Jun 2011 12:20:43 +0000 (14:20 +0200)] 
Refactored key usage verification code

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored: Netscape certificate type verification
Adriaan de Jong [Thu, 30 Jun 2011 11:51:16 +0000 (13:51 +0200)] 
Refactored: Netscape certificate type verification

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored: separated environment setup during verification
Adriaan de Jong [Thu, 30 Jun 2011 11:43:46 +0000 (13:43 +0200)] 
Refactored: separated environment setup during verification

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored: removed global x509_username_field
Adriaan de Jong [Thu, 30 Jun 2011 10:37:33 +0000 (12:37 +0200)] 
Refactored: removed global x509_username_field

Moved to tls_options.

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoAdded function to verify and extract the username
Adriaan de Jong [Thu, 30 Jun 2011 09:43:38 +0000 (11:43 +0200)] 
Added function to verify and extract the username

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoAdded function to extract and verify the subject from a certificate
Adriaan de Jong [Wed, 29 Jun 2011 11:29:33 +0000 (13:29 +0200)] 
Added function to extract and verify the subject from a certificate

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored: split verify_callback into two parts
Adriaan de Jong [Thu, 30 Jun 2011 09:19:07 +0000 (11:19 +0200)] 
Refactored: split verify_callback into two parts

 - One part is the actual callback, and is OpenSSL-specific
 - One part, verify_cert(), is called by the callback to process the actual
   verification

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoAdd some extra comments
Adriaan de Jong [Wed, 29 Jun 2011 10:40:12 +0000 (12:40 +0200)] 
Add some extra comments

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored username and password authentication code
Adriaan de Jong [Thu, 30 Jun 2011 08:48:18 +0000 (10:48 +0200)] 
Refactored username and password authentication code

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored common name locking functions
Adriaan de Jong [Tue, 28 Jun 2011 14:22:40 +0000 (16:22 +0200)] 
Refactored common name locking functions

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored certificate hash lock checks
Adriaan de Jong [Thu, 30 Jun 2011 08:10:28 +0000 (10:10 +0200)] 
Refactored certificate hash lock checks

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored client_config_dir_exclusive function
Adriaan de Jong [Tue, 28 Jun 2011 13:41:32 +0000 (15:41 +0200)] 
Refactored client_config_dir_exclusive function

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoMigrated data structures needed by verification functions to ssl_common.h
Adriaan de Jong [Thu, 30 Jun 2011 08:04:56 +0000 (10:04 +0200)] 
Migrated data structures needed by verification functions to ssl_common.h

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored Doxygen for tls_multi functions
Adriaan de Jong [Thu, 30 Jun 2011 07:58:48 +0000 (09:58 +0200)] 
Refactored Doxygen for tls_multi functions

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored: moved write_empty_string function back
Adriaan de Jong [Tue, 28 Jun 2011 09:03:45 +0000 (11:03 +0200)] 
Refactored: moved write_empty_string function back

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored: removed ks and ks_lame macro for clarity
Adriaan de Jong [Tue, 28 Jun 2011 08:41:22 +0000 (10:41 +0200)] 
Refactored: removed ks and ks_lame macro for clarity

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored: Moved BIO debug functions to OpenSSL backend
Adriaan de Jong [Tue, 28 Jun 2011 08:08:08 +0000 (10:08 +0200)] 
Refactored: Moved BIO debug functions to OpenSSL backend

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored key_state write functions
Adriaan de Jong [Tue, 28 Jun 2011 08:02:47 +0000 (10:02 +0200)] 
Refactored key_state write functions

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored key_state read code (including bio_read())
Adriaan de Jong [Tue, 28 Jun 2011 07:47:52 +0000 (09:47 +0200)] 
Refactored key_state read code (including bio_read())

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored print_details
Adriaan de Jong [Thu, 30 Jun 2011 07:43:14 +0000 (09:43 +0200)] 
Refactored print_details

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored key_state free code
Adriaan de Jong [Mon, 27 Jun 2011 15:51:23 +0000 (17:51 +0200)] 
Refactored key_state free code

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored initalisation of key_states
Adriaan de Jong [Mon, 27 Jun 2011 15:44:40 +0000 (17:44 +0200)] 
Refactored initalisation of key_states

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored tls_options, key_state, and key_source data structures
Adriaan de Jong [Thu, 30 Jun 2011 07:33:41 +0000 (09:33 +0200)] 
Refactored tls_options, key_state, and key_source data structures

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored cipher restriction code
Adriaan de Jong [Wed, 29 Jun 2011 16:32:44 +0000 (18:32 +0200)] 
Refactored cipher restriction code

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored CA and extra certs code
Adriaan de Jong [Wed, 29 Jun 2011 16:28:02 +0000 (18:28 +0200)] 
Refactored CA and extra certs code

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored external key loading from management
Adriaan de Jong [Thu, 30 Jun 2011 06:57:52 +0000 (08:57 +0200)] 
Refactored external key loading from management

Fixed a bug in external key loading, where if no certificate file was
specified, the program would still try to use an external private key.

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored private key loading code
Adriaan de Jong [Mon, 27 Jun 2011 12:39:23 +0000 (14:39 +0200)] 
Refactored private key loading code

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored load certificate functions
Adriaan de Jong [Wed, 29 Jun 2011 15:59:55 +0000 (17:59 +0200)] 
Refactored load certificate functions

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored windows cert loading
Adriaan de Jong [Mon, 27 Jun 2011 12:13:16 +0000 (14:13 +0200)] 
Refactored windows cert loading

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored PKCS#11 loading
Adriaan de Jong [Mon, 27 Jun 2011 12:01:22 +0000 (14:01 +0200)] 
Refactored PKCS#11 loading

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored PKCS#12 key loading
Adriaan de Jong [Wed, 29 Jun 2011 14:51:16 +0000 (16:51 +0200)] 
Refactored PKCS#12 key loading

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored root TLS option settings
Adriaan de Jong [Wed, 29 Jun 2011 14:30:38 +0000 (16:30 +0200)] 
Refactored root TLS option settings

 - Started merge of new feature (x509_altnames), will continue in a
future patch

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored DH paramater loading
Adriaan de Jong [Mon, 27 Jun 2011 11:03:07 +0000 (13:03 +0200)] 
Refactored DH paramater loading

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored new external key code
Adriaan de Jong [Wed, 29 Jun 2011 13:45:44 +0000 (15:45 +0200)] 
Refactored new external key code

 - To make patch application easier in the future

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored root SSL context initialisation
Adriaan de Jong [Wed, 29 Jun 2011 13:30:34 +0000 (15:30 +0200)] 
Refactored root SSL context initialisation

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored get_highest_preference_tls_cipher
Adriaan de Jong [Mon, 27 Jun 2011 07:52:59 +0000 (09:52 +0200)] 
Refactored get_highest_preference_tls_cipher

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored tls_show_available_ciphers
Adriaan de Jong [Mon, 27 Jun 2011 07:44:47 +0000 (09:44 +0200)] 
Refactored tls_show_available_ciphers

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored TLS_PRF to new hmac and md primitives
Adriaan de Jong [Mon, 27 Jun 2011 07:22:08 +0000 (09:22 +0200)] 
Refactored TLS_PRF to new hmac and md primitives

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored SSL initialisation functions
Adriaan de Jong [Wed, 29 Jun 2011 13:15:32 +0000 (15:15 +0200)] 
Refactored SSL initialisation functions

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored: Added stubs for new files
Adriaan de Jong [Fri, 24 Jun 2011 13:05:28 +0000 (15:05 +0200)] 
Refactored: Added stubs for new files

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoAdded a check for Openssl or PolarSSL defines
Adriaan de Jong [Thu, 23 Jun 2011 16:02:45 +0000 (18:02 +0200)] 
Added a check for Openssl or PolarSSL defines

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRemoved stale OpenSSL defines from crypto.h
Adriaan de Jong [Thu, 23 Jun 2011 15:54:49 +0000 (17:54 +0200)] 
Removed stale OpenSSL defines from crypto.h

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored: Moved crypto.h inline functions to end of file
Adriaan de Jong [Thu, 23 Jun 2011 15:52:47 +0000 (17:52 +0200)] 
Refactored: Moved crypto.h inline functions to end of file

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoAdded PRNG doxygen
Adriaan de Jong [Thu, 23 Jun 2011 15:44:35 +0000 (17:44 +0200)] 
Added PRNG doxygen

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored cipher functions
Adriaan de Jong [Thu, 23 Jun 2011 15:39:42 +0000 (17:39 +0200)] 
Refactored cipher functions

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored cipher key types
Adriaan de Jong [Thu, 23 Jun 2011 15:31:19 +0000 (17:31 +0200)] 
Refactored cipher key types

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored HMAC functions
Adriaan de Jong [Thu, 23 Jun 2011 15:18:32 +0000 (17:18 +0200)] 
Refactored HMAC functions

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored message digest functions
Adriaan de Jong [Thu, 23 Jun 2011 14:56:29 +0000 (16:56 +0200)] 
Refactored message digest functions

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored message digest type functions
Adriaan de Jong [Thu, 23 Jun 2011 14:21:32 +0000 (16:21 +0200)] 
Refactored message digest type functions

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored NTLM DES key generation
Adriaan de Jong [Thu, 23 Jun 2011 13:03:09 +0000 (15:03 +0200)] 
Refactored NTLM DES key generation

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored DES key manipulation functions
Adriaan de Jong [Thu, 23 Jun 2011 10:45:29 +0000 (12:45 +0200)] 
Refactored DES key manipulation functions

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored crypto initialisation functions
Adriaan de Jong [Thu, 23 Jun 2011 09:40:52 +0000 (11:40 +0200)] 
Refactored crypto initialisation functions

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored SSL_clear_error()
Adriaan de Jong [Thu, 23 Jun 2011 09:07:12 +0000 (11:07 +0200)] 
Refactored SSL_clear_error()

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored show_available_* functions
Adriaan de Jong [Thu, 23 Jun 2011 08:18:36 +0000 (10:18 +0200)] 
Refactored show_available_* functions

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored maximum cipher and hmac length constants
Adriaan de Jong [Thu, 23 Jun 2011 07:41:28 +0000 (09:41 +0200)] 
Refactored maximum cipher and hmac length constants

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored OpenSSL-specific constants
Adriaan de Jong [Thu, 23 Jun 2011 07:05:12 +0000 (09:05 +0200)] 
Refactored OpenSSL-specific constants

[David S: Fixed a few whitespace errors before merging]

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoRefactored to rand_bytes for OpenSSL-independency
Adriaan de Jong [Wed, 22 Jun 2011 15:16:03 +0000 (17:16 +0200)] 
Refactored to rand_bytes for OpenSSL-independency

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoChanged configure to accept --with-ssl-type=openssl
Adriaan de Jong [Fri, 24 Jun 2011 06:37:33 +0000 (08:37 +0200)] 
Changed configure to accept --with-ssl-type=openssl

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoMove block for "stale-routes-check" config inside #ifdef P2MP_SERVER block
Gert Doering [Sat, 8 Oct 2011 10:26:52 +0000 (12:26 +0200)] 
Move block for "stale-routes-check" config inside #ifdef P2MP_SERVER block

options->stale_routes_ageing_time etc.  are not defined otherwise, and
compilation fails.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Davide Guerri <d.guerri@caspur.it>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
13 years agoNew feauture: Add --stale-routes-check
Davide Guerri [Thu, 15 Sep 2011 21:42:22 +0000 (23:42 +0200)] 
New feauture: Add --stale-routes-check

This patch adds a stale-routes-check option that takes 2 parameters: a ageing
time (in seconds) and a check interval (in seconds). The latter defaults to the
former if it's not present.  Internally, a new "check" is added in
multi_process_per_second_timers_dowork(). This check deletes stale routes and
it is inspired to the function multi_reap_range().

We're running a very large connectivity infrastructure based on openVPN (more
than 4000 different clients connected per day per server), so we can throughly
check this patch (or, of course, any variant of it).

Signed-off-by: Davide Guerri <d.guerri@caspur.it>
Reviewed-by: David Sommerseth <davids@redhat.com>
Acked-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoPlatform cleanup for NetBSD
Gert Doering [Fri, 16 Sep 2011 17:51:09 +0000 (19:51 +0200)] 
Platform cleanup for NetBSD

make TAP devices work (need to go via multiplex device /dev/tap)
cleanup TUN devices at program end ("ifconfig tunX destroy")
correctly setup TUN devices for "topology subnet"
don't try to put TAP devices into TUNSIFHEAD mode (get rid of error message)

Tested on NetBSD 5.1_STABLE / Sparc64

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agofix ipv6 compilation under macosx >= 1070 - v3
JuanJo Ciarlante [Mon, 19 Sep 2011 14:07:14 +0000 (16:07 +0200)] 
fix ipv6 compilation under macosx >= 1070 - v3

 - use __APPLE_USE_RFC_3542 for macosx build environment >= 1070
 - define SOL_IP from IPPROTO_IP if it's missing
   In Linux man 7 ip says:
   "Using SOL_IP socket options level isn't portable, BSD-based
   stacks use IPPROTO_IP level."

Signed-off-by: JuanJo Ciarlante <jjo+ml@google.com>
Tested-by: Eric F Crist <ecrist@secure-computing.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoFixed compile issues on FreeBSD and Solaris
David Sommerseth [Mon, 19 Sep 2011 14:43:04 +0000 (16:43 +0200)] 
Fixed compile issues on FreeBSD and Solaris

In commit 7fb0e07ec3f7c5f6514523085dbe struct route changed and
this change was not fixed in all places in tun.c, which caused
a compilation error.  A few whitespace fixes is added as well.

OSX needs to be fixed as well, but this will be done in a separate patch.

Tested-by: Eric F Crist <ecrist@secure-computing.net> (FreeBSD)
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoFixed management interface bug where >FATAL notifications were
James Yonan [Fri, 2 Sep 2011 23:49:45 +0000 (23:49 +0000)] 
Fixed management interface bug where >FATAL notifications were
not being output properly because the management interface
socket was being closed before the >FATAL notification could
be transmitted.

Version 2.1.14

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7587 e7ae566f-a301-0410-adde-c780ea21d3b5

13 years agoMinor fix to CC_PRINT char class -- treat DEL (ascii 127)
James Yonan [Fri, 26 Aug 2011 00:43:45 +0000 (00:43 +0000)] 
Minor fix to CC_PRINT char class -- treat DEL (ascii 127)
as a control char.

Version 2.1.13.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7581 e7ae566f-a301-0410-adde-c780ea21d3b5

13 years agoadd --mark option to set SO_MARK sockopt
Heiko Hund [Wed, 31 Aug 2011 18:05:15 +0000 (20:05 +0200)] 
add --mark option to set SO_MARK sockopt

Signed-off-by: Heiko Hund <heiko.hund@sophos.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agodefine IN6_ARE_ADDR_EQUAL macro for WIN32
Heiko Hund [Wed, 31 Aug 2011 14:49:22 +0000 (14:49 +0000)] 
define IN6_ARE_ADDR_EQUAL macro for WIN32

Windows headers do not define the IN6_ARE_ADDR_EQUAL macro. It needs
to be defined locally when building for WIN32.

Signed-off-by: Heiko Hund <heiko.hund@sophos.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agolowercase include header name in syshead.h
Heiko Hund [Wed, 31 Aug 2011 14:38:08 +0000 (14:38 +0000)] 
lowercase include header name in syshead.h

Cross compiling for Windows is broken since commit
739fa9881f12e67dc8b9cadc7230e59e7fe42423 added the mixed
case header name "NtDDNdis.h" to the file. While this header
exists in a MinGW build environment it's lowercase there.

Windows doesn't mind the case of a file name, but Linux does.
So, lowercasing the filename will make openvpn build in both
worlds.

Signed-off-by: Heiko Hund <heiko.hund@sophos.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoFixed a typo in win32.h that prevented building with Visual Studio
Samuli Seppänen [Thu, 14 Jul 2011 00:12:29 +0000 (17:12 -0700)] 
Fixed a typo in win32.h that prevented building with Visual Studio

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Tested-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoAdditional Visual Studio 2008 build fixes to tun.c
Samuli Seppänen [Thu, 14 Jul 2011 00:12:28 +0000 (17:12 -0700)] 
Additional Visual Studio 2008 build fixes to tun.c

Tested-by: Samuli Seppänen <samuli@openvpn.net>
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoUSE_PF_INET6 by default for v2.3
JuanJo Ciarlante [Thu, 26 May 2011 17:01:42 +0000 (19:01 +0200)] 
USE_PF_INET6 by default for v2.3

- put all #ifdef'd code in place, kill the cpp symbol,
- thus in v2.3 it's not actually possible to --disable-ipv6 :)

RATIONALE:
 #1 some wacky compilers choke on #ifdef'd constructions for
    concatenated strings, and given that:
 #2 v2.3 has already transport ipv6 by default
=> doesn't justify putting effort on #1 to keep USE_PF_INET6
   ifdef wraps.

Signed-off-by: JuanJo Ciarlante <jjo+ml@google.com>
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoReplace 32-bit-based add_in6_addr() implementation by an 8-bit based one
Gert Doering [Sat, 28 May 2011 20:50:40 +0000 (22:50 +0200)] 
Replace 32-bit-based add_in6_addr() implementation by an 8-bit based one

Windows has no 32-bit accessor to the union inside "struct in6_addr",
and the 8-bit accessor is the only common denominator across BSD, Solaris,
Linux and Windows...

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Samuli Seppänen <samuli@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoFix a Visual Studio 2008 build issue in socket.c
Samuli Seppänen [Tue, 31 May 2011 13:17:40 +0000 (16:17 +0300)] 
Fix a Visual Studio 2008 build issue in socket.c

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoFix a Visual Studio 2008 build error in options.c
Samuli Seppanen [Thu, 26 May 2011 13:23:05 +0000 (16:23 +0300)] 
Fix a Visual Studio 2008 build error in options.c

Partially fixes Trac ticket #137

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Tested-by: Samuli Seppänen <samuli@openvpn.net>
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoFix a Visual Studio 2008 build error in tun.c
Samuli Seppanen [Thu, 26 May 2011 13:23:04 +0000 (16:23 +0300)] 
Fix a Visual Studio 2008 build error in tun.c

Partially fixes ticket #137

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Tested-by: Samuli Seppänen <samuli@openvpn.net>
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoFix Microsoft Visual Studio incompatibility in plugin.c
David Sommerseth [Thu, 26 May 2011 13:23:03 +0000 (16:23 +0300)] 
Fix Microsoft Visual Studio incompatibility in plugin.c

MS Visual Studio don't like to have struct members named in the
variable declaration.  Without this fix, Visual Studio is not able
to compile the new v3 plug-in API.

Signed-off-by: David Sommerseth <davids@redhat.com>
Tested-by: Samuli Seppänen <samuli@openvpn.net>
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
13 years agoFixed a number of fatal build errors on Visual Studio 2008
Samuli Seppänen [Thu, 26 May 2011 13:23:02 +0000 (16:23 +0300)] 
Fixed a number of fatal build errors on Visual Studio 2008

Partially fixes ticket #137

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Tested-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoSkip rather than fail test in addressless FreeBSD jails.
Matthias Andree [Wed, 20 Jul 2011 20:56:20 +0000 (22:56 +0200)] 
Skip rather than fail test in addressless FreeBSD jails.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoremove legacy code to query IE proxy information
Heiko Hund [Thu, 11 Aug 2011 15:19:46 +0000 (15:19 +0000)] 
remove legacy code to query IE proxy information

The code in ieproxy.[ch] is not used anywhere in OpenVPN anymore.
So, there's no need to keep it.

Signed-off-by: Heiko Hund <heiko.hund@sophos.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoMerged TODO.IPv6 with TODO.ipv6 and README.IPv6 with README.ipv6
Samuli Seppänen [Thu, 11 Aug 2011 16:00:57 +0000 (19:00 +0300)] 
Merged TODO.IPv6 with TODO.ipv6 and README.IPv6 with README.ipv6

Prior to this patch were two sets of IPv6 README/TODO files: one from payload
and one from transport patchset. Unfortunately Git on Windows gets very confused
of these files, as they only differ in case. This patch merges these sets into
one.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoremove function is_proto_tcp()
Heiko Hund [Thu, 18 Aug 2011 10:16:21 +0000 (10:16 +0000)] 
remove function is_proto_tcp()

The implementation of is_proto_tcp() was invalid since the IPv6 stuff got
merged into master. There's proto_is_tcp() that does the same job right.

Remove is_proto_tcp() and make its only caller use proto_is_tcp() instead.

Signed-off-by: Heiko Hund <heiko.hund@sophos.com>
Acked-By: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoadd .gitignore to official repository
Heiko Hund [Thu, 18 Aug 2011 12:17:50 +0000 (12:17 +0000)] 
add .gitignore to official repository

This .gitignore make the output of git status a lot more readable. It was
made from the dynamically generated files that showed after using both
build system.

Signed-off-by: Samuli Seppänen <samuli@openvpn.ne>
Signed-off-by: Heiko Hund <heiko.hund@sophos.com>
Acked-By: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoFor all accesses to "struct route_list * rl", check first that rl is non-NULL
Gert Doering [Tue, 16 Aug 2011 18:05:13 +0000 (20:05 +0200)] 
For all accesses to "struct route_list * rl", check first that rl is non-NULL

In IPv4-only mode, this cannot happen, but if IPv6 is enabled
and a servers pushes IPv6 routes and no IPv4 routes -> crash boom.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-By: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
13 years ago"status" management interface command (version >= 2) will now
James Yonan [Fri, 19 Aug 2011 03:15:25 +0000 (03:15 +0000)] 
"status" management interface command (version >= 2) will now
include the username for each connected user.  This should
generally be backward compatible with existing management
interface clients since the new username field is added
to the CLIENT_LIST header as well.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7539 e7ae566f-a301-0410-adde-c780ea21d3b5

Conflicts:
multi.c - hash_iterator_init() takes only 2 arguments now.

Signed-off-by: David Sommerseth <davids@redhat.com>
13 years agoCC_PRINT character class now allows any 8-bit character value >= 32.
James Yonan [Fri, 19 Aug 2011 03:10:08 +0000 (03:10 +0000)] 
CC_PRINT character class now allows any 8-bit character value >= 32.
This is done to allow UTF-8 and restrict the use of control characters
in usernames, passwords, common names, etc.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7538 e7ae566f-a301-0410-adde-c780ea21d3b5

13 years agoFixed issue where redirect-gateway block-local code was not
James Yonan [Fri, 19 Aug 2011 03:07:27 +0000 (03:07 +0000)] 
Fixed issue where redirect-gateway block-local code was not
correctly calculating the two halves of the subnet if the
gateway was in the upper half (Gert Doering).

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7537 e7ae566f-a301-0410-adde-c780ea21d3b5

13 years agoIncreased the --verb threshold for "PID_ERR replay" messages
James Yonan [Thu, 11 Aug 2011 07:03:39 +0000 (07:03 +0000)] 
Increased the --verb threshold for "PID_ERR replay" messages
to 4 from 3.

Version 2.1.10

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7522 e7ae566f-a301-0410-adde-c780ea21d3b5

13 years agoChanged CC_PRINT character class to allow UTF-8 chars.
James Yonan [Sat, 6 Aug 2011 20:06:31 +0000 (20:06 +0000)] 
Changed CC_PRINT character class to allow UTF-8 chars.
This allows usernames, common names, etc. to be UTF-8.

Version 2.1.9

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7518 e7ae566f-a301-0410-adde-c780ea21d3b5

13 years agoModified sanitize_control_message to remove redacted data from
James Yonan [Thu, 28 Jul 2011 06:01:23 +0000 (06:01 +0000)] 
Modified sanitize_control_message to remove redacted data from
control string rather than blotting it out with "_" chars.

Version 2.1.8

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7482 e7ae566f-a301-0410-adde-c780ea21d3b5

13 years agoRedact "echo" directive strings from log, since
James Yonan [Thu, 28 Jul 2011 01:29:12 +0000 (01:29 +0000)] 
Redact "echo" directive strings from log, since
these strings (going forward) could conceivably
contain security-sensitive data.

Version 2.1.7

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7480 e7ae566f-a301-0410-adde-c780ea21d3b5