0
0
mirror of https://github.com/OpenVPN/openvpn.git synced 2024-09-20 03:52:28 +02:00
OpenVPN is an open source VPN daemon
Go to file
Arne Schwabe 14a57be460 Do not write extra 0 byte for --gen-key with auth-token/tls-crypt-v2
Change crypto_pem_encode to not put a nul-terminated terminated
string into the buffer. This was  useful for printf but should
not be written into the file.

Instead do not assume that the buffer is null terminated and
print only the number of bytes in the buffer. Also fix a
similar case in printing static key where the 0 byte was
never added to the buffer

Patch V2: make pem_encode behave more like other similar functions in
OpenVPN
          and do not null terminate.

Patch V3: also make the mbed TLS variant of pem_decode behave like other
          similar functions in OpeNVPN and accept a not null-terminated
          buffer.

Patch V4: The newly introduced unit test
          test_tls_crypt_v2_write_client_key_file_metadata
          was added after the V3 version of the patch and now misses the
          strlen with memcmp replacment that were added to
          test_tls_crypt_v2_write_client_key_file. Also add the
          modifictions to this function.

          Unconditionally allocate buffer in mbed TLS path as
          requested by Steffan.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Steffan Karger <steffan.karger@foxcrypto.com>
Message-Id: <20200507132534.6380-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19852.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2020-05-15 17:56:50 +02:00
.github github: Add PR template with contributor related information 2017-02-06 11:26:05 +01:00
.travis Fetch OpenSSL versions via source/old links 2020-04-01 14:49:46 +02:00
build win: support for Visual Studio 2017 2018-10-01 08:16:29 +02:00
contrib Update copyright to include 2018 plus company name change 2018-02-01 08:29:21 +01:00
debug build: standard directory layout 2012-03-22 22:07:08 +01:00
dev-tools uncrustify openvpn/ sources 2018-12-12 13:43:17 +01:00
distro cleanup: Remove RPM openvpn.spec build approach 2019-02-28 16:54:02 +01:00
doc Document reneweal mechanic of auth-token in manual 2020-05-11 21:09:07 +02:00
include wintun: interactive service support 2019-12-17 21:00:50 +01:00
m4 Fix various spelling mistakes 2019-02-06 19:07:34 +01:00
sample Change client side of t_lpback.sh configs to use inline material. 2020-05-13 17:09:53 +02:00
src Do not write extra 0 byte for --gen-key with auth-token/tls-crypt-v2 2020-05-15 17:56:50 +02:00
tests Do not write extra 0 byte for --gen-key with auth-token/tls-crypt-v2 2020-05-15 17:56:50 +02:00
.gitattributes cleanup: add .gitattributes to control eol style explicitly 2012-04-26 20:54:26 +02:00
.gitignore cmocka: use relative paths 2019-04-17 22:04:53 +02:00
.mailmap Update .mailmap to unify and clean up odd names and e-mail addresses 2016-10-18 13:46:04 +02:00
.svncommitters Added mapping files from SVN commit ID to more descriptive commit IDs. 2010-10-21 11:31:26 +02:00
.travis.yml travis-ci: add arm64, s390x builds. 2020-03-24 16:32:55 +01:00
AUTHORS This is the start of the BETA21 branch. 2005-09-26 05:28:27 +00:00
ChangeLog Update copyright to include 2018 plus company name change 2018-02-01 08:29:21 +01:00
Changes.rst Fix various spelling mistakes 2019-02-06 19:07:34 +01:00
compat.m4 copyright: Update GPLv2 license texts 2017-06-16 10:38:03 +02:00
config-msvc-version.h.in Fix Building Using MSVC 2017-03-16 08:55:33 +01:00
config-msvc.h msvc: OpenSSL 1.1.x support 2019-11-02 21:31:53 +01:00
configure.ac build: Remove --disable-server from ./configure 2020-05-07 21:53:22 +02:00
CONTRIBUTING.rst Update CONTRIBUTING.rst to allow GitHub PRs for code review purposes 2016-05-19 11:22:50 +02:00
COPYING Update copyright to include 2018 plus company name change 2018-02-01 08:29:21 +01:00
COPYRIGHT.GPL copyright: Update GPLv2 license texts 2017-06-16 10:38:03 +02:00
INSTALL Implement --genkey type keyfile syntax and migrate tls-crypt-v2 2019-07-05 12:32:49 +02:00
Makefile.am Remove cmocka submodule, rely on system-wide installation instead. 2019-06-24 20:43:58 +02:00
msvc-build.bat win: support for Visual Studio 2017 2018-10-01 08:16:29 +02:00
msvc-dev.bat win: support for Visual Studio 2017 2018-10-01 08:16:29 +02:00
msvc-env.bat win: support for Visual Studio 2017 2018-10-01 08:16:29 +02:00
NEWS This is the start of the BETA21 branch. 2005-09-26 05:28:27 +00:00
openvpn.sln Introduce tapctl.exe utility and openvpnmsica.dll MSI CA 2019-01-17 15:31:18 +01:00
PORTS Update copyright to include 2018 plus company name change 2018-02-01 08:29:21 +01:00
README Update copyright to include 2018 plus company name change 2018-02-01 08:29:21 +01:00
README.ec Add support for elliptic curve diffie-hellmann key exchange (ECDH) 2014-04-25 19:36:52 +02:00
README.IPv6 Update IPv6 related readme files 2014-01-03 16:01:12 +01:00
README.mbedtls docs: Replace all PolarSSL references to mbed TLS 2017-09-06 23:42:55 +02:00
TODO.IPv6 Fix various spelling mistakes 2019-02-06 19:07:34 +01:00
version.m4 Bump master to version 2.5_git 2016-12-21 21:59:35 +01:00
version.sh.in build: windows: install version.sh to allow installer read version 2012-03-24 00:14:23 +01:00

OpenVPN -- A Secure tunneling daemon

Copyright (C) 2002-2018 OpenVPN Inc. This program is free software;
you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.

*************************************************************************

To get the latest release of OpenVPN, go to:

	https://openvpn.net/index.php/download/community-downloads.html

To Build and Install,

	tar -zxf openvpn-<version>.tar.gz
	cd openvpn-<version>
	./configure
	make
	make install

or see the file INSTALL for more info.

*************************************************************************

For detailed information on OpenVPN, including examples, see the man page
  http://openvpn.net/man.html

For a sample VPN configuration, see
  http://openvpn.net/howto.html

To report an issue, see
  https://community.openvpn.net/openvpn/report

For a description of OpenVPN's underlying protocol,
  see the file ssl.h included in the source distribution.

*************************************************************************

Other Files & Directories:

* configure.ac -- script to rebuild our configure
  script and makefile.

* sample/sample-scripts/verify-cn

  A sample perl script which can be used with OpenVPN's
  --tls-verify option to provide a customized authentication
  test on embedded X509 certificate fields.

* sample/sample-keys/

  Sample RSA keys and certificates.  DON'T USE THESE FILES
  FOR ANYTHING OTHER THAN TESTING BECAUSE THEY ARE TOTALLY INSECURE.

* sample/sample-config-files/

  A collection of OpenVPN config files and scripts from
  the HOWTO at http://openvpn.net/howto.html

*************************************************************************

Note that easy-rsa and tap-windows are now maintained in their own subprojects.
Their source code is available here:

  https://github.com/OpenVPN/easy-rsa
  https://github.com/OpenVPN/tap-windows

The old cross-compilation environment (domake-win) and the Python-based
buildsystem have been replaced with openvpn-build:

  https://github.com/OpenVPN/openvpn-build

See the INSTALL file for usage information.