Giter Club home page Giter Club logo

openvpn-build's Introduction

OpenVPN -- A Secure tunneling daemon

Copyright (C) 2002-2022 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/community-downloads/

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 information on how to build OpenVPN on/for Windows with MinGW
or MSVC see README.cmake.md.

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

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://github.com/OpenVPN/openvpn/issues/new
  (Note: We recently switched to GitHub for reporting new issues,
   old issues can be found at:
   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-windows6

Community-provided Windows installers (MSI) and Debian packages are built from

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

See the INSTALL file for usage information.

openvpn-build's People

Contributors

alonbl avatar becm avatar chipitsine avatar conspi avatar crazyevent avatar cron2 avatar egroeper avatar flichtenheld avatar freddysdad avatar gertvdijk avatar guandalf avatar ikreb7 avatar johnmah avatar lstipakov avatar mattock avatar michaelbprice avatar mindaugasveblauskas avatar openvpn-inc-ci avatar ordex avatar queuingkoala avatar reduxionist avatar rozmansi avatar schwabe avatar selvanair avatar syzzer avatar tincantech avatar uddr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openvpn-build's Issues

Where can I find the code for ldap_context object?

I am looking into a bug in my logging system.
I have read this explanation about post_auth:
https://docs.openvpn.net/docs/access-server/openvpn-access-server-post-auth-scripting.html
I would like to understand what ldap_context object is doing, especially in this part of the example script in pas.py:
l.search_ext_s(user_dn, ldap.SCOPE_SUBTREE, attrlist=["memberOf"])
Where can I find the source code for that "ldap_context (object) -- ... a Python LDAP context object" which is written about in that article?

The bug I am looking into is this error I get when user_dn contains cyrillic letters:
AUTH_RETURN
status : FAIL
reason : post_auth script failed: 'ascii' codec can't encode
characters in position 3-9: ordinal not in range(128):
python/threadpool:210,python/context:59,python/context:37,auth/authdelegate:154,<string>:153,ldap/ldapobject:590,ldap/ldapobject:586,ldap/ldapobject:106
(exceptions.UnicodeEncodeError)

As far as I can see from our logs, the problem appears in this part of the script in the definition of the post_auth:
ldap_groups = ldap_groups_parse(l.search_ext_s(user_dn, ldap.SCOPE_SUBTREE, attrlist=["memberOf"]))

I tried to use this hack in my script:
import sys
reload(sys)
sys.setdefaultencoding('UTF8')
but everything just breaks after that, so I quit using this hack.

Please point me to the source code of the ldap_context object or/and advise on the problem itself.
Thank you.

build msvc fail

openvpn-build-openvpn\openvpn.sln”()。
openvpn-build-openvpn\openvpn.sln.metaproj : error MSB4126: specified solution configuration
“Debug|x64”invalid。

Value of exe_path in registry not updated during reinstall

If OpenVPN is reinstalled to a different path, the base directory for OpenVPN in the registry changes, but value for exe_path does not. This means that OpenVPNService is unable to find openvpn.exe when it tries to launch OpenVPN connections, which is evident from the Application EventLog. The problem can be reproduced with both interactive and silent (/S) installs using the official OpenVPN 2.4_beta1 installers.

A full "uninstall" then "install" procedure works around this problem, as the "HKLM:\SOFTWARE\OpenVPN" key is removed entirely during uninstall.

OpenVPN 2.4.5 static linking on Linux/MacOS

I tested openvpn-build with openvpn 2.4.5 / openssl-1.1.0f and I can confirm that the DO_STATIC=1 switch doesn't work as expected (libcrypto and libssl are always linked dynamically).
I managed to get a static build of openvpn by adding the "-static" flat to EXTRA_OPENSSL_CONFIG param.

*nix compilation with 2.4.3

First little issue: the OPENVPN_VERSION in current generic/build.vars contain '2.4.3',
but the relative file it's not yet here: http://build.openvpn.net/downloads/snapshots/ .
Resolved by using directly https://swupdate.openvpn.org/community/releases/openvpn-2.4.3.tar.gz

Second issue: under Linux Debian 7 (both 32bit and 64bit) and under macOS Sierra 10.12.5 throw a
ld: unrecognized option '--dynamicbase'.

Third issue (optional): here: https://openvpn.net/index.php/open-source/downloads.html
say "support for building with OpenSSL 1.1."
but still throw 'Unsupported options: no-multilib'.

Thx for any feedback.

Cross compiling for Windows fails

System: Xubuntu 18.04 with mingw-w64 installed
openvpn-build commit 62383bd

I applied the following changes to build.vars and ran ./build

CHOST=x86_64-w64-mingw32
CBUILD=x86_64-pc-linux-gnu
IMAGEROOT=`pwd`/image-win64

Crash log

Can't find the lib when exec the openvpn.exe in windows OS.

I have gone through the compile based on the READEME, and generate the below executable programs, but when i double hit the "openvpn.exe", pop up the error: can't find the lzo2.dll and libpkcs11-helper-1.dll. In the "openvpn-build\msvc\image\lib" directory, i can see these libs. next, what can i do?
x64-Output\Release\openvpn.exe
x64-Output\Release\openvpnserv.exe
x64-Output\Release\tapctl.exe
已复制 3 个文件。
include\openvpn-msg.h
include\openvpn-plugin.h
已复制 2 个文件。
SUCCESS

Thanks

Enable cron build on travis-ci

@mattock , can you please enable daily cron builds at travis-ci ?

it can be done only at web interface, I beleive it is somewhat useful (especially for catching error on snapshot builds)

Exception KernelBase.dll access denied

“openvpnserv.exe”(Win32): 已加载“C:\openvpn-build\msvc\build.tmp\openvpn-master\x64-Output\Debug\openvpnserv.exe”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\ntdll.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\kernel32.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\KernelBase.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\shlwapi.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\msvcrt.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\combase.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\ucrtbase.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\userenv.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\IPHLPAPI.DLL”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\FWPUCLNT.DLL”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\rpcrt4.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\profapi.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\bcryptprimitives.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\netapi32.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\bcrypt.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\gdi32.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\gdi32full.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\user32.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\win32u.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\advapi32.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\sechost.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\shell32.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\cfgmgr32.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\windows.storage.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\powrprof.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\kernel.appcore.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\SHCore.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\vcruntime140d.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\ucrtbased.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\netutils.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\samcli.dll”。已加载符号。
“openvpnserv.exe”(Win32): 已加载“C:\Windows\System32\imm32.dll”。已加载符号。
0x00007FFFFED74048 (KernelBase.dll)处(位于 openvpnserv.exe 中)引发的异常: 0x00000005: 拒绝访问。。
线程 0xc38 已退出,返回值为 0 (0x0)。
线程 0x2e1c 已退出,返回值为 0 (0x0)。
线程 0x2ddc 已退出,返回值为 0 (0x0)。
程序“[9308] openvpnserv.exe”已退出,返回值为 0 (0x0)。

Several minor issues in openvpn.nsi

While reviewing PR#58 I noticed several small issues not related to that PR.

1. Location of !addplugindir

Right now !addplugindir command in openvpn.nsi is right before nsProcess.nsh is included

; nsProcess.nsh to detect whether OpenVPN process is running ( http://nsis.sourceforge.net/NsProcess_plugin )
!addplugindir .
!include "nsProcess.nsh"

This is technically correct, as nsProcess.nsh is the only .nsh file that ships a DLL. See !addplugindir reference for details.

In my opinion, however, it !addplugindir should be to the top, before all !include lines. This way we would not have to remember to add new !include lines (that may bring DLL's with them) after !include "nsProcess.nsh".

2. Some links are http instead of https

See lines 400 and 401.

3. Confusingly named labels

Labels "guiEndYes" and "guiEndNo" are used in both -pre and .onInit section. According to NSIS documentation labels are local (per-section) by default, so this is safe. However, the use of those labels in .onInit function is confusing, as the section has nothing to do with stopping the GUI.

4. Selecting OpenVPN GUI section does not select OpenVPN User-space components

As the header says. In addition, selecting the "OpenVPN Service" section does select OpenVPN User-space component section. So we're not being consistent.


I can provide a PR that fixes all/some of these, depending on what we want.

EDIT: added two other minor issues.
EDIT 2: added yet another minor issue

pay more attention to .net installer

if I install openvpn on "just installed russian win7 sp1 x86_64", it installs .net without reboot.

but if I install openvpn on "just installed english win7 x86_64" (the same, but without sp1), .net installer suggest reboot (which can be avoided, and actually is not desirablt here)

we should tweak .net installer to make it not rebooting (it is easy to reproduce, just install on win7 without sp1)

make pkcs11-helper problem, syntax error near unexpected token `|'

windows-nsis
./build-complete

i686 works without any problems, but i can't compile x64.

libtool: link: nm  .libs/pkcs11h-mem.o .libs/pkcs11h-sys.o .libs/pkcs11h-crypto.o .libs/_pkcs11h-crypto-openssl.o .libs/_pkcs11h-crypto-nss.o .libs/_pkcs11h-crypto-gnutls.o .libs/_pkcs11h-crypto-mbedtls.o .libs/_pkcs11h-crypto-cryptoapi.o .libs/pkcs11h-threading.o .libs/pkcs11h-util.o .libs/pkcs11h-session.o .libs/pkcs11h-token.o .libs/pkcs11h-certificate.o .libs/pkcs11h-slotevent.o .libs/pkcs11h-core.o .libs/pkcs11h-data.o .libs/pkcs11h-serialization.o .libs/pkcs11h-openssl.o .libs/versioninfo.o   |  | /usr/bin/sed -e '/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //' | sort | uniq > .libs/libpkcs11-helper.exp
../libtool: eval: line 1783: syntax error near unexpected token `|'
../libtool: eval: line 1783: `nm  .libs/pkcs11h-mem.o .libs/pkcs11h-sys.o .libs/pkcs11h-crypto.o .libs/_pkcs11h-crypto-openssl.o .libs/_pkcs11h-crypto-nss.o .libs/_pkcs11h-crypto-gnutls.o .libs/_pkcs11h-crypto-mbedtls.o .libs/_pkcs11h-crypto-cryptoapi.o .libs/pkcs11h-threading.o .libs/pkcs11h-util.o .libs/pkcs11h-session.o .libs/pkcs11h-token.o .libs/pkcs11h-certificate.o .libs/pkcs11h-slotevent.o .libs/pkcs11h-core.o .libs/pkcs11h-data.o .libs/pkcs11h-serialization.o .libs/pkcs11h-openssl.o .libs/versioninfo.o   |  | /usr/bin/sed -e '/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //' | sort | uniq > .libs/libpkcs11-helper.exp'
FATAL: make pkcs11-helper
FATAL: build x86_64 >&2

Windows-nsis error

Im tryin to compile Windows NSIS 32- and 64-bit installers but I always encounter this issue and I have no idea how to fix this and even after googling for possible fix

Copying documents
Copying sources
Cleaning empty directories
Packing images
find: ‘tmp/installer/openvpn/share/doc/*’: No such file or directory
xargs: unix2dos: No such file or directory
FATAL: unix2dos
FATAL: pack installer >&2
User@HP-Pavilion-g6:~/Desktop/openvpn-build/windows-nsis$

Binary for Win10

Hi Guys,
Is there any way to build installer for Win10, like the one on Openvpn.net. openvpn-install-2.4.7-I607-Win10.exe

Thanks,
Joey

Generic build for windows

Hello,

I'm trying to cross compile openvpn for windows from an Ubuntu 14.04. I followed this guide : https://community.openvpn.net/openvpn/wiki/SettingUpGenericBuildsystem

then went into the generic folder and type :

IMAGEROOT=pwd/image-win32 CHOST=i686-w64-mingw32 CBUILD=x86_64-pc-linux-gnu ./build

And i get errors related to patches i've installed for mingw-w64 as per requested: https://community.openvpn.net/openvpn/wiki/PatchingDebs

(The two patches at the bottom of the page.)

I get these errors :

In file included from /usr/share/mingw-w64/include/ipsectypes.h:8:0,
                 from /usr/share/mingw-w64/include/fwpmtypes.h:9,
                 from /usr/share/mingw-w64/include/fwpmu.h:10,
                 from block_dns.c:40:
/usr/share/mingw-w64/include/iketypes.h:747:2: error: #endif without #if
 #endif /* __iketypes_h__ */
  ^
In file included from /usr/share/mingw-w64/include/fwpmtypes.h:10:0,
                 from /usr/share/mingw-w64/include/fwpmu.h:10,
                 from block_dns.c:40:
/usr/share/mingw-w64/include/iketypes.h:747:2: error: #endif without #if
 #endif /* __iketypes_h__ */
  ^
In file included from /usr/share/mingw-w64/include/fwpmu.h:10:0,
                 from block_dns.c:40:
/usr/share/mingw-w64/include/fwpmtypes.h:51:16: error: redefinition of ‘struct FWPM_DISPLAY_DATA0_’
 typedef struct FWPM_DISPLAY_DATA0_ {
                ^
In file included from /usr/share/mingw-w64/include/fwpmu.h:9:0,
                 from block_dns.c:40:
/usr/share/mingw-w64/include/fwptypes.h:336:16: note: originally defined here
 typedef struct FWPM_DISPLAY_DATA0_ {
                ^
In file included from /usr/share/mingw-w64/include/fwpmu.h:10:0,
                 from block_dns.c:40:
/usr/share/mingw-w64/include/fwpmtypes.h:54:3: error: conflicting types for ‘FWPM_DISPLAY_DATA0’
 } FWPM_DISPLAY_DATA0;
   ^
In file included from /usr/share/mingw-w64/include/fwpmu.h:9:0,
                 from block_dns.c:40:
/usr/share/mingw-w64/include/fwptypes.h:339:3: note: previous declaration of ‘FWPM_DISPLAY_DATA0’ was here
 } FWPM_DISPLAY_DATA0;
   ^
In file included from /usr/share/mingw-w64/include/fwpmu.h:11:0,
                 from block_dns.c:40:
/usr/share/mingw-w64/include/iketypes.h:747:2: error: #endif without #if
 #endif /* __iketypes_h__ */
  ^

Restoring service states on OpenVPN install?

The current OpenVPN Chocolatey package contains Powershell code that checks the state of OpenVPN services (stopped, running) and restores it after install. As discussed here it would probably make sense for openvpn.nsi to take care of this instead, so that non-chocolatey users would also benefit from this.

Shall I implement this functionality in openvpn.nsi?

build-complete broken

I use the latest master branch and run ./build-complete. I get this error message:

Build openvpn
../generic/build: 256: cd: can't cd to openvpn-build/windows-nsis/tmp/build-i686/openvpn-2.4.7
FATAL: cd openvpn
FATAL: build i686 >&2

building snapshots is broken

when I run ./build-snapshot

make[1]: Leaving directory '/home/ilia/temp/openvpn-build/windows-nsis/tmp/build-i686/pkcs11-helper-1.11'
tap-windows
Fixup libtool files
Restore libtool files
Fixup libtool files
Build openvpn
../generic/build: line 284: cd: /home/ilia/temp/openvpn-build/windows-nsis/tmp/build-i686/openvpn-2.3_git: No such file or directory
FATAL: cd openvpn
FATAL: build i686 >&2
FATAL: build-complete >&2
[ilia@localhost windows-nsis]$ 

compile is not working with openssl 1.1.0f

if i try to cross compile with openssl 1.1.0f and openvpn 2.4.3, i get :
unsupported options: no-multilib
FATAL: Configure openssl
i know that openvpn version 2.4.3 does support openssl 1.1.0.

Feature request: Update configurations

Hello,

the latest version of Tunnelblick offers the capability to update the configurations [1].

Are there any plans that the windows or linux OpenVPN client supports this feature? What do you think about this idea?

automatic snapshot releases

@mattock, what do you think about https://github.com/chipitsine/openvpn-build/commit/509ab6ef8b38bf63f2d2226cf2f6ba089975fc82 ?

I cannot make a PR, there are specific tokens (and they were enabled by "travis setup releases")

it is a step to "cloud releases" instead of build.openvpn.net, we can sign, publish tag releases, etc, etc, etc

as a first step I would enable snapshot releases (like the one in the above commit), it will allow automatic testing of windows installers (as they are published on cron builds)

We should upgrade openssl to 1.1.0g+ for building Windows binary

SSL_CTX_set_max/min_proto_version() and the corresponding getters are not compatible when built with 1.1 prior to 1.1.0g because those versions define the setters but not the getters. (1.0 is fine as neither is defined). This leads to using setters from the library and getters from the compat layer meant for 1.0.
It seems the only ill effect is less than ideal error messages in some rare cases[*], but it would be much better to use 1.1.0g (or newer when available) for the next release.

cross-compiling Win32 build on Ubuntu 16.04 fails if DO_REALLY_STATIC=1

Fails with:

...
configure: WARNING: tap-windows.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: tap-windows.h: proceeding with the compiler's result
checking for tap-windows.h... yes
checking whether TUNSETPERSIST is declared... no
checking for setcon in -lselinux... no
checking for pam_start in -lpam... no
checking for PKCS11_HELPER... yes
checking for SSL_CTX_new... no
configure: error: openssl check failed
FATAL: Configure openvpn

This previously worked for me for OpenVPN 2.3.10 w/ OpenSSL 1.0.2k. Also current master builds fine without DO_REALLY_STATIC variable set. FWIW, also fails on Ubuntu 14.04.

I've attached output for the build process when DO_REALLY_STATIC is set.

openvpn-build-output.txt

disable save-passwords

With this feature proposed for the GUI, shall we add the registry key during install (set to 0, i.e., save password enabled by default) and also provide an option to set it to 1 (i.e., save password disabled) ?

Adding the key at install time has advantage that admins need not consult README to see how exactly to spell the key. Providing an option to set/unset during install is also nice, but it adds one more section (though hidden under the Advanced options).

Thoughts?

error occurred while compiling on Ubuntu 18.04

error occurred when i run commands below, may i know how to fix this?

==== compile command(both of the commands throw the same error)
== command 1
$ cd openvpn-build/generic
$ IMAGEROOT=pwd/image-win32 CHOST=i686-w64-mingw32
CBUILD=x86_64-pc-linux-gnu ./build

==command 2
$ cd openvpn-build/windows-nsis
$ ./build-snapshot

==== error message
....
i686-w64-mingw32-windres -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I../../src/compat -DWIN32_LEAN_AND_MEAN -DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA -i "openvpn_win32_resources.rc" -o "openvpn_win32_resources.o"
i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I../../src/compat -DWIN32_LEAN_AND_MEAN -DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA -I/home/workspace/openvpn/openvpn-build/generic/image-win32/openvpn/include -I/home/workspace/openvpn/openvpn-build/generic/image-win32/openvpn/include -I/home/workspace/openvpn/openvpn-build/generic/image-win32/openvpn/include -I/home/workspace/openvpn/openvpn-build/generic/image-win32/openvpn/include -DPLUGIN_LIBDIR="//lib/openvpn/plugins" -municode -UUNICODE -Wall -Wno-unused-parameter -Wno-unused-function -Wl,--dynamicbase,--nxcompat -std=c99 -MT block_dns.o -MD -MP -MF .deps/block_dns.Tpo -c -o block_dns.o block_dns.c
mv -f .deps/tun.Tpo .deps/tun.Po
In file included from buffer.h:28:0,
from cryptoapi.c:50:
cryptoapi.c: In function ‘priv_enc_CNG’:

  • cryptoapi.c:230:28: error: ‘CERT_NCRYPT_KEY_SPEC’ undeclared (first use in this function)
  • ASSERT(cd->key_spec == CERT_NCRYPT_KEY_SPEC);
  • ^
  • error.h:221:30: note: in definition of macro ‘ASSERT’
  • #define ASSERT(x) do { if (!(x)) {assert_failed(FILE, LINE, #x);}} while (false)
    ^
    cryptoapi.c:230:28: note: each undeclared identifier is reported only once for each function it appears in
    ASSERT(cd->key_spec == CERT_NCRYPT_KEY_SPEC);
    ^
    error.h:221:30: note: in definition of macro ‘ASSERT’
    #define ASSERT(x) do { if (!(x)) {assert_failed(FILE, LINE, #x);}} while (false)
    ^
    cryptoapi.c: In function ‘rsa_priv_enc’:
    cryptoapi.c:270:25: error: ‘CERT_NCRYPT_KEY_SPEC’ undeclared (first use in this function)
    if (cd->key_spec == CERT_NCRYPT_KEY_SPEC)
    ^
    cryptoapi.c: In function ‘finish’:
    cryptoapi.c:430:29: error: ‘CERT_NCRYPT_KEY_SPEC’ undeclared (first use in this function)
    if (cd->key_spec == CERT_NCRYPT_KEY_SPEC)
    ^
    cryptoapi.c: In function ‘SSL_CTX_use_CryptoAPI_certificate’:
    cryptoapi.c:575:21: error: ‘CRYPT_ACQUIRE_PREFER_NCRYPT_KEY_FLAG’ undeclared (first use in this function)
    | CRYPT_ACQUIRE_PREFER_NCRYPT_KEY_FLAG;
    ^
    cryptoapi.c:591:28: error: ‘CERT_NCRYPT_KEY_SPEC’ undeclared (first use in this function)
    && cd->key_spec != CERT_NCRYPT_KEY_SPEC)
    ^
    Makefile:674: recipe for target 'cryptoapi.o' failed
    make[4]: *** [cryptoapi.o] Error 1
    make[4]: *** Waiting for unfinished jobs....
    ...

Error

When trying to connect a error occures. That the connection to the administration interface failed. It recommends me to go to the log file to check for more details. Here's the log file:
Thu Feb 14 09:00:20 2019 us=409649 PLUGIN_INIT: could not load plugin DLL: ./keyingmaterialexporter.so: Unknown error (errno=126)
Thu Feb 14 09:00:20 2019 us=409649 Exiting due to fatal error

Generic build for windows

Hello,

I'm trying to cross compile openvpn for windows from an Ubuntu 14.04. I followed this guide : https://community.openvpn.net/openvpn/wiki/SettingUpGenericBuildsystem

then went into the generic folder and type :

IMAGEROOT=pwd/image-win32 CHOST=i686-w64-mingw32 CBUILD=x86_64-pc-linux-gnu ./build

And i get errors related to patches i've installed for mingw-w64 as per requested: https://community.openvpn.net/openvpn/wiki/PatchingDebs

(The two patches at the bottom of the page.)

I get these errors :

In file included from /usr/share/mingw-w64/include/ipsectypes.h:8:0,
                 from /usr/share/mingw-w64/include/fwpmtypes.h:9,
                 from /usr/share/mingw-w64/include/fwpmu.h:10,
                 from block_dns.c:40:
/usr/share/mingw-w64/include/iketypes.h:747:2: error: #endif without #if
 #endif /* __iketypes_h__ */
  ^
In file included from /usr/share/mingw-w64/include/fwpmtypes.h:10:0,
                 from /usr/share/mingw-w64/include/fwpmu.h:10,
                 from block_dns.c:40:
/usr/share/mingw-w64/include/iketypes.h:747:2: error: #endif without #if
 #endif /* __iketypes_h__ */
  ^
In file included from /usr/share/mingw-w64/include/fwpmu.h:10:0,
                 from block_dns.c:40:
/usr/share/mingw-w64/include/fwpmtypes.h:51:16: error: redefinition of ‘struct FWPM_DISPLAY_DATA0_’
 typedef struct FWPM_DISPLAY_DATA0_ {
                ^
In file included from /usr/share/mingw-w64/include/fwpmu.h:9:0,
                 from block_dns.c:40:
/usr/share/mingw-w64/include/fwptypes.h:336:16: note: originally defined here
 typedef struct FWPM_DISPLAY_DATA0_ {
                ^
In file included from /usr/share/mingw-w64/include/fwpmu.h:10:0,
                 from block_dns.c:40:
/usr/share/mingw-w64/include/fwpmtypes.h:54:3: error: conflicting types for ‘FWPM_DISPLAY_DATA0’
 } FWPM_DISPLAY_DATA0;
   ^
In file included from /usr/share/mingw-w64/include/fwpmu.h:9:0,
                 from block_dns.c:40:
/usr/share/mingw-w64/include/fwptypes.h:339:3: note: previous declaration of ‘FWPM_DISPLAY_DATA0’ was here
 } FWPM_DISPLAY_DATA0;
   ^
In file included from /usr/share/mingw-w64/include/fwpmu.h:11:0,
                 from block_dns.c:40:
/usr/share/mingw-w64/include/iketypes.h:747:2: error: #endif without #if
 #endif /* __iketypes_h__ */
  ^

Double and tripple backslash in directory address resulting to No such file or directory

Hi,
I'm trying to compile openvpn using my raspberry pi (raspbian-jessie-lite) using the command
IMAGEROOT='pwd'/image-native ./build
but i always end up having this issue

installing man3/d2i_SSL_SESSION.3
i2d_SSL_SESSION.3 => d2i_SSL_SESSION.3
installing man3/ssl.3
SSL.3 => ssl.3
created directory 'pwd/image-native/openvpn//bin'
created directory 'pwd/image-native/openvpn///lib'
created directory 'pwd/image-native/openvpn///lib/engines'
created directory 'pwd/image-native/openvpn///lib/pkgconfig'
created directory 'pwd/image-native/openvpn//include'
created directory 'pwd/image-native/openvpn//include/openssl'
created directory 'pwd/image-native/openvpn/etc'
created directory 'pwd/image-native/openvpn/etc/ssl'
created directory 'pwd/image-native/openvpn/etc/ssl/misc'
created directory 'pwd/image-native/openvpn/etc/ssl/certs'
created directory 'pwd/image-native/openvpn/etc/ssl/private'
making install in crypto...
make[1]: Entering directory '/home/pi/openvpn-build/generic/tmp/openssl-1.0.2h/crypto'
cp: cannot create regular file 'pwd/image-native/openvpn//include/openssl/crypto.h': No such file or directory
chmod: cannot access 'pwd/image-native/openvpn//include/openssl/crypto.h': No such file or directory
cp: cannot create regular file 'pwd/image-native/openvpn//include/openssl/opensslv.h': No such file or directory
chmod: cannot access 'pwd/image-native/openvpn//include/openssl/opensslv.h': No such file or directory
cp: cannot create regular file 'pwd/image-native/openvpn//include/openssl/opensslconf.h': No such file or directory
chmod: cannot access 'pwd/image-native/openvpn//include/openssl/opensslconf.h': No such file or directory
cp: cannot create regular file 'pwd/image-native/openvpn//include/openssl/ebcdic.h': No such file or directory
chmod: cannot access 'pwd/image-native/openvpn//include/openssl/ebcdic.h': No such file or directory
cp: cannot create regular file 'pwd/image-native/openvpn//include/openssl/symhacks.h': No such file or directory
chmod: cannot access 'pwd/image-native/openvpn//include/openssl/symhacks.h': No such file or directory
cp: cannot create regular file 'pwd/image-native/openvpn//include/openssl/ossl_typ.h': No such file or directory
chmod: cannot access 'pwd/image-native/openvpn//include/openssl/ossl_typ.h': No such file or directory
Makefile:117: recipe for target 'install' failed
make[1]: *** [install] Error 1
make[1]: Leaving directory '/home/pi/openvpn-build/generic/tmp/openssl-1.0.2h/crypto'
Makefile:536: recipe for target 'install_sw' failed
make: *** [install_sw] Error 1
FATAL: make openssl

also experience those errors having double backslash in creating a directory resulting to No such file or directory when im cross compiling for windows 64bit using ubuntu 16.04 64bit but i was able to build and compile windows 32bit though.
trying to compile also for ubuntu 16.04 64bit using the same command to my raspberry pi will throw same error.

Compiling for ARM devices using the command
IMAGEROOT='pwd'/image-arm CHOST=arm-linux-gnueabi CBUILD=x86_64-pc-linux-gnu ./build
in ubuntu 16.04 will result in libpam missing although i have installed libpam0g-dev

I've been googling for days already trying to resolve the issue and as much as possible, not asking the contributor but this is something i know i cant resolve just by googling. Hope you can shed a light on this issue

btw, im using this repo as source for openvpn client
https://github.com/schwabe/openvpn/tree/icsopenvpn

Regards,
modfiles

Error in raspberry (raspbian-jessie-lite) trying to compile using the command IMAGEROOT='pwd'/image-native ./build
raspberry

Error in Ubuntu 16.04 LTS 64bit trying to compile using the command IMAGEROOT='pwd'/image-arm CHOST=arm-linux-gnueabi CBUILD=x86_64-pc-linux-gnu ./build
screenshot from 2016-09-20 02-09-32

Building with openssl-1.1.1 fails

This is the tail of the log:

make[1]: Leaving directory '/home/tct/openvpn/bsys/generic/tmp/openssl-1.1.1'
*** Installing development files
Cannot create directory //include: No such file or directory
make: *** [Makefile:320: install_dev] Error 2
FATAL: make openssl

Because everybody wants the new SSL I hope this can be fixed soon-ish ;-)

Unsupported options: no-multilib

If i try to compile with OpenSSL 1.1.0 and OpenVPN 2.3.12,
***** Unsupported options: no-multilib
FATAL: Configure openssl

In both Linux (Debian 8) and OS X. I try to replace it with without-multilib or disable-multilib without success.
Thanks for any feedback.

The situation needs to change

With increasing popularity of your project,the GFW which has been built in mainland China has reset your software's network flow more frequent.Is there any method to avoid it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.