Go to file
Emmanuel Deloget 17d1ab90c2 OpenSSL: don't use direct access to the internal of X509
OpenSSL 1.1 does not allow us to directly access the internal of
any data type, including X509. We have to use the defined
functions to do so.

In x509_verify_ns_cert_type() in particular, this means that we
cannot directly check for the extended flags to find whether the
certificate should be used as a client or as a server certificate.
We need to leverage the X509_check_purpose() API yet this API is
far stricter than the currently implemented check. So far, I have
not been able to find a situation where this stricter test fails
(although I must admit that I haven't tested that very well).

We double-check the certificate purpose using "direct access" to the
internal of the certificate object (of course, this is not a real
direct access, but we still fetch ASN1 strings within the X509 object
and we check the internal value of these strings). This allow us to
warn the user if there is a discrepancy between the X509_check_purpose()
return value and our internal, less strict check.

We use these changes to make peer_cert a non-const parameter to
x509_verify_ns_cert_type(). The underlying library waits for a
non-const pointer, and forcing it to be a const pointer does not make
much sense (please note that this has an effect on the mbedtls part
too).

Compatibility with OpenSSL 1.0 is kept by defining the corresponding
functions when they are not found in the library.

Signed-off-by: Emmanuel Deloget <logout@free.fr>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <20170612134330.20971-2-logout@free.fr>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14792.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2017-06-18 12:01:42 +02:00
.github github: Add PR template with contributor related information 2017-02-06 11:26:05 +01:00
.travis v4, travis-ci: add 2 mingw "build only" configurations 2017-05-08 18:26:10 +02:00
build Update copyrights 2016-12-21 21:57:58 +01:00
contrib copyright: Update GPLv2 license texts 2017-06-16 10:38:03 +02:00
debug build: standard directory layout 2012-03-22 22:07:08 +01:00
dev-tools dev-tools: Script generating the source releases in an automated fashion 2017-06-16 10:43:33 +02:00
distro systemd: Add more security feature for systemd units 2017-01-25 19:40:39 +01:00
doc copyright: Update GPLv2 license texts 2017-06-16 10:38:03 +02:00
include copyright: Update GPLv2 license texts 2017-06-16 10:38:03 +02:00
m4 copyright: Update GPLv2 license texts 2017-06-16 10:38:03 +02:00
sample copyright: Update GPLv2 license texts 2017-06-16 10:38:03 +02:00
src OpenSSL: don't use direct access to the internal of X509 2017-06-18 12:01:42 +02:00
tests copyright: Update GPLv2 license texts 2017-06-16 10:38:03 +02:00
vendor git: Merge .gitignore files into a single file 2017-01-23 00:51:34 +01:00
.gitattributes cleanup: add .gitattributes to control eol style explicitly 2012-04-26 20:54:26 +02:00
.gitignore systemd: Use automake tools to install unit files 2017-01-25 19:39:42 +01:00
.gitmodules Change cmocka remote to use https in stead of git protocol 2016-11-22 22:24:25 +01: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 v4, travis-ci: add 2 mingw "build only" configurations 2017-05-08 18:26:10 +02:00
AUTHORS This is the start of the BETA21 branch. 2005-09-26 05:28:27 +00:00
ChangeLog Update copyrights 2016-12-21 21:57:58 +01:00
Changes.rst crypto: Enable SHA256 fingerprint checking in --verify-hash 2017-05-18 13:21:50 +02: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 Fix Building Using MSVC 2017-03-16 08:55:33 +01:00
configure.ac OpenSSL: don't use direct access to the internal of X509 2017-06-18 12:01:42 +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 copyrights 2016-12-21 21:57:58 +01:00
COPYRIGHT.GPL copyright: Update GPLv2 license texts 2017-06-16 10:38:03 +02:00
INSTALL Mention that OpenVPN 2.4 requires Windows Vista or higher 2016-12-01 16:31:01 +01:00
Makefile.am copyright: Update GPLv2 license texts 2017-06-16 10:38:03 +02:00
msvc-build.bat build: msvc: chdir with change drive to script location 2012-06-29 10:26:15 +02:00
msvc-dev.bat build: msvc: chdir with change drive to script location 2012-06-29 10:26:15 +02:00
msvc-env.bat Continuation of MSVS fixes 2015-10-06 13:17:34 +02:00
NEWS This is the start of the BETA21 branch. 2005-09-26 05:28:27 +00:00
openvpn.sln build: msvc: upgrade to Visual Studio 2010 + fixups 2012-03-29 12:31:10 +02:00
PORTS Update copyrights 2016-12-21 21:57:58 +01:00
README Remove last rest of INSTALL-win32.txt references 2016-10-27 18:57:24 +02: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.polarssl Update README.polarssl 2014-06-24 22:51:27 +02:00
TODO.IPv6 Update IPv6 related readme files 2014-01-03 16:01:12 +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-2010 OpenVPN Technologies, 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.