0
0
mirror of https://github.com/OpenVPN/openvpn.git synced 2024-09-20 12:02:28 +02:00
Commit Graph

489 Commits

Author SHA1 Message Date
james
cc1d3998d2 Reverted some recent buffer.[ch] changes, including r3058 (except for
likely() and unlikely() macro additions to syshead.h) and r3061.

I would like to give more thought to the bigger issue of fortifying
buffer.[ch] through the use of additional defensive programming techniques.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3081 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-18 20:46:06 +00:00
james
de6dbb5fe2 Fixed format string issue in read_inline_file,
used in the config file parser.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3078 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-18 07:25:47 +00:00
james
6cd276ba3f status_printf function will now set error flag on
output truncation or failure of write() to write the
expected number of bytes.

Raised STATUS_PRINTF_MAXLEN to 512 (from 256).


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3077 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-18 07:15:27 +00:00
james
ddad0a8c23 gen_path will no longer silently truncate the generated
filename at 256 bytes.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3076 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-18 00:55:59 +00:00
james
5acd2baf6d Fixed code inclusion bug that was erroneously testing
defined(P2MP_SERVER) rather than P2MP_SERVER.

Fixed compile issues when USE_CRYPTO is undefined.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3075 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-18 00:42:37 +00:00
james
222f084046 Modified create_temp_filename to create unpredictable
filenames.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3074 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-18 00:32:40 +00:00
james
093e7eba18 Previously, OpenVPN might log a client's auth-user-pass
password if the verbosity was set to a high debug level
such as 7 or higher.  Normally this would only be used by
developers.  Now, even at high debug levels, the password
will not be output.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3073 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-17 23:31:16 +00:00
james
73b7e69884 gen_path now rejects filenames that match Windows
device names such as CON, NUL, LPT1, etc.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3072 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-17 22:41:15 +00:00
james
6ee8f6f8af Call prng_init after fork in background process
created by port_share_open, so as to ensure
a newly seeded PRNG sequence.  This is strictly
defensive programming since port_share_proxy
currently does not use the PRNG.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3070 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-17 20:57:42 +00:00
james
31f90e641b Added warning when using chroot without specifying user and group.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3069 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-17 20:47:12 +00:00
james
8e986316d9 Check for multiplication overflow on ALLOC_ARRAY* functions.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3068 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-17 20:10:18 +00:00
james
b1d8021106 Removed old version of extract_x509_field.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3066 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-17 19:07:41 +00:00
james
a1849f41cd Support wraparound of reliable.[ch] packet IDs. In
practice, wraparound of the packet ID sequence is
extremely unlikely since the sequence is restarted
for each mid-session TLS renegotiation.  But we will
support it for completeness.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3065 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-17 18:56:09 +00:00
james
e691cd568a Fixed a potential information leak in the new NTLM phase 3 code,
as well as a failure of the code to check the return value from
base64_decode.

Fixed compiler warnings in the new NTLM phase 3 code about implicit
casting between signed and unsigned char *.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3064 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-17 05:09:27 +00:00
james
24f8f368eb Fixed issue in read_key_file, where the return value of
read() wasn't being checked for errors.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3063 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-17 04:25:50 +00:00
james
e2e10f8d7a Added SOCKET_SND_RCV_BUF_MAX constant (set to 1000000) to limit the
maximum size passed to setsockopt SNDBUF/RCVBUF.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3062 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-16 23:11:29 +00:00
james
4fb01ce0ba In the Windows version of tun_finalize, on errors that would
return -1, set buf->len to 0 rather than -1.  While downstream
code is set up to consider the buffer invalidated if its length
is <= 0, this change makes the code cleaner and safer.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3061 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-16 22:37:09 +00:00
james
b29452f402 Used unlikely() macro to tell compiler that msg() will
usually be silent.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3060 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-16 21:50:43 +00:00
james
5d89a3629c Added likely() and unlikely() branch prediction hint macros
to syshead.h

Introduced BUF_MAX constant to limit struct buffer offset and length
values.  BUF_MAX has been set to 2^20.

Use likely() and unlikely() macros in buffer.h code to allow the
compiler to generate more efficient code.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3058 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-16 20:36:54 +00:00
james
1c0cc4ad89 Copyright change OpenVPN Solutions LLC -> Telethra, Inc.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3048 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-07-14 18:59:09 +00:00
james
fc71b7c962 Version 2.1_rc8
On Windows, use -leay32 and -lssl32 to link with OpenSSL.

On Windows, bundle pkcs11-helper-1.06-beta1.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2997 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-06-13 07:53:51 +00:00
james
eca86913db Updated copyright notice to 2008.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2995 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-06-11 21:59:26 +00:00
james
4d90d73272 Updated version & changelog.
Updated build-pkcs11-helper.sh to build
from OpenSSL 0.9.8h.

Added pkcs11-related fixes to easy-rsa/2.0/vars.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2994 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-06-11 21:38:07 +00:00
james
4e9a51d78f Merged connection profiles from
http://svn.openvpn.net/projects/openvpn/test/conn


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2993 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-06-11 10:48:50 +00:00
james
90efcacba6 Updated version to 2.1_rc7e.
Added client authentication and packet filtering capability
to management interface.

Extended packet filtering capability to work on both --dev tun
and --dev tap tunnels.

Updated valgrind-suppress file.

Made "Linux ip addr del failed" error nonfatal.

Amplified --client-cert-not-required warning.

Added #pragma pack to proto.h.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2991 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-06-11 08:45:09 +00:00
james
4d84de11b1 Added support for building and linking with
openssl-0.9.8h on Windows.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2982 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-06-04 10:53:57 +00:00
james
f7a6676725 Fixed unbounded memory growth bug in
environmental variable code that could
have caused long-running OpenVPN sessions
with many TLS renegotiations to incrementally
increase memory usage over time.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2981 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-06-04 07:23:20 +00:00
james
9712c4c6a0 Fixed an issue in extract_x509_field_ssl where the extraction
would fail on the first field of the subject name, such as
the common name in:

  /CN=foo/emailAddress=foo@bar.com


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2980 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-06-04 06:17:53 +00:00
james
1e0b714162 In auth-pam authentication module, even when in debug mode,
never output passwords to stderr.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2979 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-06-04 06:00:42 +00:00
james
47ae8457f9 Incremented version to 2.1_rc7d.
Support asynchronous authentication by plugins by allowing
OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY to return
OPENVPN_PLUGIN_FUNC_DEFERRED.  See comments in
openvpn-plugin.h for documentation.  Enabled by ENABLE_DEF_AUTH.

Added a simple packet filter functionality that can be driven by
a plugin.  See comments in openvpn-plugin.h for documentation.
Enabled by ENABLE_PF.

See openvpn/plugin/defer/simple.c for examples of ENABLE_DEF_AUTH
and ENABLE_PF.

"TLS Error: local/remote TLS keys are out of sync" is no longer a
fatal error for TCP-based sessions, since the error can arise
normally in the course of deferred authentication.  In a related
change, allow packet-id sequence to begin at some number n > 0 for
TCP sessions, rather than strictly requiring sequence to begin
at 1.

Added a test to configure.ac for LoadLibrary function on Windows.

Modified "make dist" function to include all files from
install-win32 so that ./domake-win can be run from a
tarball-expanded directory.

setenv and setenv-safe directives may now omit a value argument
which defaults to "".


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2978 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-06-04 05:16:44 +00:00
james
7c51fe16b4 Fixed a bug in plugin.c that caused openvpn_plugin_client_destructor_v1
to not be called for the top-level "generic" client template.

Added additional documentation to openvpn-plugin.h that more clearly
illustrates the full sequence and ordering of plugin callbacks
(plugin/defer/simple.c was extended to provide the raw data for this
documentation).


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2973 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-05-25 22:31:25 +00:00
james
344ee91817 Support asynchronous/deferred authentication in
OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY plugin handler.

See documentation in openvpn-plugin.h and example
usage in plugin/defer/simple.c.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2969 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-05-24 23:26:11 +00:00
james
4da783f3a5 Did:
svn propset svn:ignore -F .svnignore .
on the modified .svnignore files.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2967 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-05-24 19:17:12 +00:00
james
9e6a5e01b3 Modified .svnignore to only ignore files generated
by the auto* tools and make.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2966 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-05-24 19:05:59 +00:00
james
1bda73a7b0 Moved branch into official BETA21 position.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2959 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-05-12 20:31:43 +00:00
james
9ca8f3cf77 Misc XGUI fixes.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2836 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-03-11 06:03:12 +00:00
james
d4fb6d493a Set tool defaults in pkitool.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2835 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-03-11 05:58:39 +00:00
james
cefe973e4c First working version of XGUI inclusion.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2834 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-03-10 10:02:20 +00:00
james
4fe9708d67 Added new OpenVPN icon and installer graphic.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2783 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-03-05 01:48:30 +00:00
james
5449d7431d Version 2.1_rc7a.
Minor Windows build system changes:
* Fall back to prebuilt-binary if gcc is not available.
* Documentation changes in ./domake-win


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2760 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-02-18 17:47:13 +00:00
james
b4ddf9e434 Clarified tcp-queue-limit man page entry
(Matti Linnanvuori).


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2750 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-02-17 08:27:34 +00:00
james
522fccc3f0 The new function extract_x509_field_ssl tends to break
in early versions of OpenSSL 0.9.6.  Now we will fall
back to the old function extract_x509_field for OpenSSL
0.9.6.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2749 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-02-17 08:21:28 +00:00
james
252a728256 Cleanup IP address for persistence interfaces for tap and also using
ifconfig, gentoo#209055 (Alon Bar-Lev).


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2748 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-02-17 07:05:49 +00:00
james
ba865c55a6 Changes to Windows build system: added GENOUT_PREBUILT mode
to allow building an OpenVPN installer with a reduced set
of prerequisites.  See comments in domake-win for more info.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2711 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-02-01 19:44:53 +00:00
james
63082c8a21 Changes to Windows build system to make it easier to do
partial builds, where only a subset of OpenVPN installer
components are built.  See ./domake-win comments.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2710 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-02-01 10:13:59 +00:00
james
81c7d6558e Version 2.1_rc7
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2702 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-01-30 00:37:54 +00:00
james
4fa5b75834 Fixup null interface on close, don't use ip addr flush
(Alon Bar-Lev).


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2683 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-01-26 04:43:13 +00:00
james
67463ad592 Added a few extra files that exist in the svn repo
but were not being copied into the tarball by
make dist.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2674 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-01-25 01:01:51 +00:00
james
9a569a97c9 VERSION 2.1_rc6
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2666 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-01-24 07:44:49 +00:00
james
e9a57dcd98 Fixed pkcs11_private_mode undef.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2664 e7ae566f-a301-0410-adde-c780ea21d3b5
2008-01-24 00:58:14 +00:00