build revolution
cover build revolution
As asked by David Sommerseth, I am sending the series to the list for review. This is a lot to review, please don't ACK just for the sake of ACK.
The mission, as I understood, is to cleanup the project build system and reduce source complexity. This process touches all sources and reached only to its first milestone.
The question we need to ask is if the state of the code base will be better after the process and stability period or worse.
I am sure I can help reaching much better state. But this requires trust during the process.
So what I actually asking at this point is *NOT* to review *NOT* to merge but to test the intermediate outputs. Please notice that some of the options of configure have changed.
Repository is at github[1] branch build. Build system is at github[2].
Tarballs and windows binaries are at downloads[3].
If you want to send notes on specific hanks, please use github interface, at this point it would be much easier to manage changes within github.
Summary of the changes or processes:
1. Cleanup the conditional in code and merge them into autoconf.
2. Rename inconsistent conditionals to meet some sane standard.
3. Cleanup autoconf/automake usage.
4. Introduce libtool for better support of windows cross compile.
5. Use msbuild for MSVC.
6. Split out the tap-win32, easy-rsa, windows build, windows installer, leave only openvpn in own repository and release cycle.
7. Re-structure source tree to align with most projects.
8. Reduce the differences between environments.
9. One change: autoconf will only check for libraries, not for headers, I've done this in all other projects, it reduces code complexity and works correctly.
Build:
1. Using the openvpn-build project openvpn can be built using cross compiler to any environment. This also works in cygwin to produce windows native binaries.
Put openvpn tarball of branch in sources directory.
2. Within the openvpn-build project a primitive MSVC build script is available to build the dependencies and openvpn using MSVC.
QUESTION: Why do we need to build openvpn using MSVC?
3. Within the openvpn project it-self there are two scrpits:
msvc-dev - open ide with openvpn project.
msvc-build - build openvpn using msbuild (requires dependencies).
Please try to compile in as many environment as possible, I will try to provide a quick fix for any issue, make sure you attach config.log. It will take a while to stabilize but once stabilized it will be in much better shape.
I invested a lot of time in this as I was promised for cooperation of openvpn project managers, I truly hope this was not for nothing.
I am stopping at this point to know where I stand.
Alon.
[1] https://github.com/alonbl/openvpn/
[2] https://github.com/alonbl/openvpn-build
[3] https://github.com/alonbl/openvpn/downloads
Alon Bar-Lev (35):
cleanup: options.c: remove redundant include
cleanup: crypto_openssl.c: remove support for pre-openssl-0.9.6
cleanup: tun.c: fix incorrect option in message (ip-win32)
cleanup: memcmp.c: remove unused source
build: correct place to alter WINVER is at build system Update .gitignore
build: tests do not work disable
build: handle printf style format in mingw
build: rename plugin directory to plugins
build: plugins: properly use CFLAGS and LDFLAGS Remove install-win32
Remove easy-rsa
Remove tap-win32
cleanup: rename tap-windows function from win32 to win
build: remove windows specific build system
build: split acinclude.m4 into m4/*
build: m4/ax_varargs.m4: cleanup
build: m4/ax_emptyarray.m4: cleanup
build: m4/ax_socklen_t.m4: cleanup
build: autotools: first pass of trivial autotools changes
build: autoconf: remove OPENVPN_ADD_LIBS useless macro
build: remove awk and non-standard autoconf output processing
build: standard directory layout
build: add libtool + windows resources for executables
build: autoconf: commands as environment
build: libdl usage
build: properly detect and use socket libs
build: autoconf: minor cleanups
build: proper selinux detection and usage
build: proper pkcs11-helper detection and usage
build: properly process lzo-stub
build: proper lzo detection and usage
build: proper crypto detection and usage
build: win-msvc: msbuild format
build: move out config.h include from syshead
.gitignore | 41 +- .svnignore | 20 - Makefile.am | 150 +- acinclude.m4 | 131 - base64.c | 163 - base64.h | 44 - basic.h | 49 - buffer.c | 1095 ---- buffer.h | 906 --- build/Makefile.am | 17 + build/ltrc.inc | 23 + build/msvc/Makefile.am | 15 + build/msvc/msvc-generate/Makefile.am | 18 + build/msvc/msvc-generate/Makefile.mak | 13 + build/msvc/msvc-generate/msvc-generate.js | 59 + build/msvc/msvc-generate/msvc-generate.vcproj | 74 + circ_list.h | 78 - clinat.c | 263 - clinat.h | 65 - common.h | 107 - compat.c | 129 - compat.h | 42 - config-msvc-version.h.in | 10 + config-msvc.h | 117 + configure.ac | 1579 +++--- configure_h.awk | 39 - configure_log.awk | 33 - crypto.c | 1455 ----- crypto.h | 398 -- crypto_backend.h | 490 -- crypto_openssl.c | 793 --- crypto_openssl.h | 73 - crypto_polarssl.c | 560 -- crypto_polarssl.h | 74 - cryptoapi.c | 476 -- cryptoapi.h | 7 - debug/doval | 4 + debug/dovalns | 2 + dhcp.c | 206 - dhcp.h | 87 - distro/Makefile.am | 15 + distro/rpm/Makefile.am | 15 + distro/rpm/openvpn.init.d.suse | 264 + distro/rpm/openvpn.spec.in | 281 + doc/Makefile.am | 28 + doc/doxygen/doc_compression.h | 92 + doc/doxygen/doc_control_processor.h | 189 + doc/doxygen/doc_control_tls.h | 105 + doc/doxygen/doc_data_control.h | 103 + doc/doxygen/doc_data_crypto.h | 75 + doc/doxygen/doc_eventloop.h | 67 + doc/doxygen/doc_external_multiplexer.h | 46 + doc/doxygen/doc_fragmentation.h | 96 + doc/doxygen/doc_internal_multiplexer.h | 44 + doc/doxygen/doc_key_generation.h | 153 + doc/doxygen/doc_mainpage.h | 162 + doc/doxygen/doc_memory_management.h | 99 + doc/doxygen/doc_protocol_overview.h | 199 + doc/doxygen/doc_reliable.h | 49 + doc/doxygen/doc_tunnel_state.h | 155 + doc/doxygen/openvpn.doxyfile | 279 + doc/management-notes.txt | 980 ++++ doc/openvpn.8 | 6251 +++++++++++++++++++++ doclean | 73 - domake-win | 138 - doval | 4 - dovalns | 2 - doxygen/doc_compression.h | 92 - doxygen/doc_control_processor.h | 189 - doxygen/doc_control_tls.h | 105 - doxygen/doc_data_control.h | 103 - doxygen/doc_data_crypto.h | 75 - doxygen/doc_eventloop.h | 67 - doxygen/doc_external_multiplexer.h | 46 - doxygen/doc_fragmentation.h | 96 - doxygen/doc_internal_multiplexer.h | 44 - doxygen/doc_key_generation.h | 153 - doxygen/doc_mainpage.h | 162 - doxygen/doc_memory_management.h | 99 - doxygen/doc_protocol_overview.h | 199 - doxygen/doc_reliable.h | 49 - doxygen/doc_tunnel_state.h | 155 - doxygen/openvpn.doxyfile | 279 - easy-rsa/1.0/README | 161 - easy-rsa/1.0/build-ca | 13 - easy-rsa/1.0/build-dh | 12 - easy-rsa/1.0/build-inter | 19 - easy-rsa/1.0/build-key | 20 - easy-rsa/1.0/build-key-pass | 20 - easy-rsa/1.0/build-key-pkcs12 | 21 - easy-rsa/1.0/build-key-server | 22 - easy-rsa/1.0/build-req | 18 - easy-rsa/1.0/build-req-pass | 18 - easy-rsa/1.0/clean-all | 19 - easy-rsa/1.0/list-crl | 18 - easy-rsa/1.0/make-crl | 18 - easy-rsa/1.0/openssl.cnf | 255 - easy-rsa/1.0/revoke-crt | 18 - easy-rsa/1.0/revoke-full | 29 - easy-rsa/1.0/sign-req | 18 - easy-rsa/1.0/vars | 49 - easy-rsa/2.0/Makefile | 13 - easy-rsa/2.0/README | 229 - easy-rsa/2.0/build-ca | 8 - easy-rsa/2.0/build-dh | 11 - easy-rsa/2.0/build-inter | 7 - easy-rsa/2.0/build-key | 7 - easy-rsa/2.0/build-key-pass | 7 - easy-rsa/2.0/build-key-pkcs12 | 8 - easy-rsa/2.0/build-key-server | 10 - easy-rsa/2.0/build-req | 7 - easy-rsa/2.0/build-req-pass | 7 - easy-rsa/2.0/clean-all | 16 - easy-rsa/2.0/inherit-inter | 39 - easy-rsa/2.0/list-crl | 13 - easy-rsa/2.0/openssl-0.9.6.cnf | 265 - easy-rsa/2.0/openssl-0.9.8.cnf | 290 - easy-rsa/2.0/openssl-1.0.0.cnf | 285 - easy-rsa/2.0/pkitool | 379 -- easy-rsa/2.0/revoke-full | 40 - easy-rsa/2.0/sign-req | 7 - easy-rsa/2.0/vars | 74 - easy-rsa/2.0/whichopensslcnf | 26 - easy-rsa/Windows/README.txt | 44 - easy-rsa/Windows/build-ca-pass.bat | 8 - easy-rsa/Windows/build-ca.bat | 4 - easy-rsa/Windows/build-dh.bat | 4 - easy-rsa/Windows/build-key-pass.bat | 8 - easy-rsa/Windows/build-key-pkcs12.bat | 10 - easy-rsa/Windows/build-key-server-pass.bat | 8 - easy-rsa/Windows/build-key-server.bat | 8 - easy-rsa/Windows/build-key.bat | 8 - easy-rsa/Windows/clean-all.bat | 13 - easy-rsa/Windows/init-config.bat | 1 - easy-rsa/Windows/revoke-full.bat | 13 - easy-rsa/Windows/serial.start | 1 - easy-rsa/Windows/vars.bat.sample | 40 - errlevel.h | 179 - error.c | 878 --- error.h | 355 -- event.c | 1055 ---- event.h | 158 - fdmisc.c | 72 - fdmisc.h | 31 - forward-inline.h | 294 - forward.c | 1545 ----- forward.h | 242 - fragment.c | 408 -- fragment.h | 479 -- gremlin.c | 215 - gremlin.h | 72 - helper.c | 531 -- helper.h | 38 - httpdigest.c | 148 - httpdigest.h | 60 - images/.svnignore | 2 - images/Makefile.am | 41 - images/icon.ico | Bin 22486 -> 0 bytes images/install-whirl.bmp | Bin 25820 -> 0 bytes include/Makefile.am | 17 + include/openvpn-plugin.h | 727 +++ include/tap-windows.h | 68 + init.c | 3786 ------------- init.h | 128 - install-win32/.svnignore | 4 - install-win32/GetWindowsVersion.nsi | 109 - install-win32/Makefile.am | 97 - install-win32/build-pkcs11-helper.sh | 24 - install-win32/buildinstaller | 14 - install-win32/ddk-common | 2 - install-win32/doclean | 6 - install-win32/dosname.pl | 9 - install-win32/getgui | 19 - install-win32/getopenssl | 19 - install-win32/getpkcs11helper | 17 - install-win32/getprebuilt | 10 - install-win32/getxgui | 28 - install-win32/ifdef.pl | 53 - install-win32/m4todef.pl | 15 - install-win32/macro.pl | 61 - install-win32/makeopenvpn | 67 - install-win32/maketap | 17 - install-win32/maketapinstall | 15 - install-win32/maketext | 59 - install-win32/openssl/README.txt | 21 - install-win32/openssl/openssl097.patch | 68 - install-win32/openssl/openssl098.patch | 56 - install-win32/openvpn.nsi | 886 --- install-win32/sample.ovpn | 103 - install-win32/setpath.nsi | 231 - install-win32/settings.in | 71 - install-win32/trans.pl | 97 - install-win32/u2d.c | 20 - install-win32/winconfig | 18 - integer.h | 114 - interval.c | 77 - interval.h | 247 - list.c | 643 --- list.h | 196 - lladdr.c | 61 - lladdr.h | 8 - lzo.c | 304 - lzo.h | 344 -- m4/ax_emptyarray.m4 | 40 + m4/ax_socklen_t.m4 | 63 + m4/ax_varargs.m4 | 75 + manage.c | 3365 ----------- manage.h | 570 -- management/management-notes.txt | 980 ---- mbuf.c | 169 - mbuf.h | 109 - memcmp.c | 43 - memdbg.h | 114 - misc.c | 2577 --------- misc.h | 472 -- mroute.c | 552 -- mroute.h | 214 - mss.c | 114 - mss.h | 34 - mstats.c | 116 - mstats.h | 51 - msvc-build.bat | 34 + msvc-dev.bat | 9 + msvc-env.bat | 21 + msvc/autodefs.h.in | 20 - msvc/config.py | 93 - msvc/msvc.mak | 52 - mtcp.c | 721 --- mtcp.h | 77 - mtu.c | 290 - mtu.h | 308 - mudp.c | 285 - mudp.h | 71 - multi.c | 2861 ---------- multi.h | 582 -- ntlm.c | 346 -- ntlm.h | 11 - occ-inline.h | 85 - occ.c | 393 -- occ.h | 95 - openvpn-plugin.h | 718 --- openvpn.8 | 6251 --------------------- openvpn.c | 285 - openvpn.h | 594 -- openvpn.sln | 45 + openvpn.spec.in | 281 - options.c | 6809 ---------------------- options.h | 840 --- otime.c | 273 - otime.h | 271 - packet_id.c | 596 -- packet_id.h | 338 -- perf.c | 293 - perf.h | 82 - pf-inline.h | 59 - pf.c | 711 --- pf.h | 102 - ping-inline.h | 59 - ping.c | 92 - ping.h | 47 - pkcs11.c | 938 ---- pkcs11.h | 80 - pkcs11_backend.h | 77 - pkcs11_openssl.c | 188 - pkcs11_polarssl.c | 120 - plugin.c | 799 --- plugin.h | 211 - plugin/README | 47 - plugin/auth-pam/.svnignore | 1 - plugin/auth-pam/Makefile | 30 - plugin/auth-pam/README | 74 - plugin/auth-pam/auth-pam.c | 804 --- plugin/auth-pam/pamdl.c | 180 - plugin/auth-pam/pamdl.h | 7 - plugin/defer/README | 16 - plugin/defer/build | 14 - plugin/defer/simple.c | 305 - plugin/defer/simple.def | 6 - plugin/defer/winbuild | 18 - plugin/down-root/Makefile | 17 - plugin/down-root/README | 29 - plugin/down-root/down-root.c | 553 -- plugin/examples/README | 16 - plugin/examples/build | 14 - plugin/examples/log.c | 184 - plugin/examples/log_v3.c | 249 - plugin/examples/simple.c | 120 - plugin/examples/simple.def | 6 - plugin/examples/winbuild | 18 - pool.c | 583 -- pool.h | 91 - proto.c | 122 - proto.h | 236 - proxy.c | 1124 ---- proxy.h | 114 - ps.c | 968 ---- ps.h | 59 - push.c | 537 -- push.h | 74 - pushlist.h | 42 - reliable.c | 751 --- reliable.h | 480 -- route.c | 3237 ----------- route.h | 339 -- sample-config-files/README | 6 - sample-config-files/client.conf | 123 - sample-config-files/firewall.sh | 108 - sample-config-files/home.up | 2 - sample-config-files/loopback-client | 25 - sample-config-files/loopback-server | 26 - sample-config-files/office.up | 2 - sample-config-files/openvpn-shutdown.sh | 5 - sample-config-files/openvpn-startup.sh | 34 - sample-config-files/server.conf | 299 - sample-config-files/static-home.conf | 72 - sample-config-files/static-office.conf | 69 - sample-config-files/tls-home.conf | 83 - sample-config-files/tls-office.conf | 83 - sample-config-files/xinetd-client-config | 11 - sample-config-files/xinetd-server-config | 25 - sample-keys/README | 14 - sample-keys/ca.crt | 19 - sample-keys/ca.key | 15 - sample-keys/client.crt | 65 - sample-keys/client.key | 15 - sample-keys/dh1024.pem | 5 - sample-keys/pass.crt | 65 - sample-keys/pass.key | 18 - sample-keys/pkcs12.p12 | Bin 2685 -> 0 bytes sample-keys/server.crt | 67 - sample-keys/server.key | 15 - sample-scripts/auth-pam.pl | 97 - sample-scripts/bridge-start | 39 - sample-scripts/bridge-stop | 18 - sample-scripts/openvpn.init | 244 - sample-scripts/ucn.pl | 11 - sample-scripts/verify-cn | 64 - sample/Makefile.am | 18 + sample/sample-config-files/README | 6 + sample/sample-config-files/client.conf | 123 + sample/sample-config-files/firewall.sh | 108 + sample/sample-config-files/home.up | 2 + sample/sample-config-files/loopback-client | 25 + sample/sample-config-files/loopback-server | 26 + sample/sample-config-files/office.up | 2 + sample/sample-config-files/openvpn-shutdown.sh | 5 + sample/sample-config-files/openvpn-startup.sh | 34 + sample/sample-config-files/server.conf | 299 + sample/sample-config-files/static-home.conf | 72 + sample/sample-config-files/static-office.conf | 69 + sample/sample-config-files/tls-home.conf | 83 + sample/sample-config-files/tls-office.conf | 83 + sample/sample-config-files/xinetd-client-config | 11 + sample/sample-config-files/xinetd-server-config | 25 + sample/sample-keys/README | 14 + sample/sample-keys/ca.crt | 19 + sample/sample-keys/ca.key | 15 + sample/sample-keys/client.crt | 65 + sample/sample-keys/client.key | 15 + sample/sample-keys/dh1024.pem | 5 + sample/sample-keys/pass.crt | 65 + sample/sample-keys/pass.key | 18 + sample/sample-keys/pkcs12.p12 | Bin 0 -> 2685 bytes sample/sample-keys/server.crt | 67 + sample/sample-keys/server.key | 15 + sample/sample-scripts/auth-pam.pl | 97 + sample/sample-scripts/bridge-start | 39 + sample/sample-scripts/bridge-stop | 18 + sample/sample-scripts/openvpn.init | 244 + sample/sample-scripts/ucn.pl | 11 + sample/sample-scripts/verify-cn | 64 + schedule.c | 653 --- schedule.h | 132 - service-win32/.svnignore | 4 - service-win32/Makefile.am | 41 - service-win32/msvc.mak | 30 - service-win32/openvpnserv.c | 530 -- service-win32/service.c | 695 --- service-win32/service.h | 141 - session_id.c | 61 - session_id.h | 86 - shaper.c | 95 - shaper.h | 178 - sig.c | 376 -- sig.h | 104 - socket.c | 3641 ------------ socket.h | 1088 ---- socks.c | 551 -- socks.h | 78 - sources | 2 - src/Makefile.am | 18 + src/openvpn/Makefile.am | 116 + src/openvpn/base64.c | 169 + src/openvpn/base64.h | 44 + src/openvpn/basic.h | 49 + src/openvpn/buffer.c | 1101 ++++ src/openvpn/buffer.h | 914 +++ src/openvpn/circ_list.h | 78 + src/openvpn/clinat.c | 269 + src/openvpn/clinat.h | 65 + src/openvpn/common.h | 107 + src/openvpn/compat.c | 135 + src/openvpn/compat.h | 40 + src/openvpn/crypto.c | 1461 +++++ src/openvpn/crypto.h | 398 ++ src/openvpn/crypto_backend.h | 488 ++ src/openvpn/crypto_openssl.c | 738 +++ src/openvpn/crypto_openssl.h | 73 + src/openvpn/crypto_polarssl.c | 566 ++ src/openvpn/crypto_polarssl.h | 74 + src/openvpn/cryptoapi.c | 482 ++ src/openvpn/cryptoapi.h | 7 + src/openvpn/dhcp.c | 212 + src/openvpn/dhcp.h | 87 + src/openvpn/errlevel.h | 179 + src/openvpn/error.c | 884 +++ src/openvpn/error.h | 359 ++ src/openvpn/event.c | 1061 ++++ src/openvpn/event.h | 158 + src/openvpn/fdmisc.c | 78 + src/openvpn/fdmisc.h | 31 + src/openvpn/forward-inline.h | 294 + src/openvpn/forward.c | 1551 ++++++ src/openvpn/forward.h | 242 + src/openvpn/fragment.c | 414 ++ src/openvpn/fragment.h | 479 ++ src/openvpn/gremlin.c | 221 + src/openvpn/gremlin.h | 72 + src/openvpn/helper.c | 537 ++ src/openvpn/helper.h | 38 + src/openvpn/httpdigest.c | 154 + src/openvpn/httpdigest.h | 60 + src/openvpn/init.c | 3792 +++++++++++++ src/openvpn/init.h | 128 + src/openvpn/integer.h | 114 + src/openvpn/interval.c | 83 + src/openvpn/interval.h | 247 + src/openvpn/list.c | 649 +++ src/openvpn/list.h | 196 + src/openvpn/lladdr.c | 67 + src/openvpn/lladdr.h | 8 + src/openvpn/lzo.c | 310 + src/openvpn/lzo.h | 347 ++ src/openvpn/manage.c | 3371 +++++++++++ src/openvpn/manage.h | 570 ++ src/openvpn/mbuf.c | 175 + src/openvpn/mbuf.h | 109 + src/openvpn/memdbg.h | 114 + src/openvpn/misc.c | 2583 +++++++++ src/openvpn/misc.h | 480 ++ src/openvpn/mroute.c | 558 ++ src/openvpn/mroute.h | 214 + src/openvpn/mss.c | 120 + src/openvpn/mss.h | 34 + src/openvpn/mstats.c | 122 + src/openvpn/mstats.h | 51 + src/openvpn/mtcp.c | 727 +++ src/openvpn/mtcp.h | 77 + src/openvpn/mtu.c | 296 + src/openvpn/mtu.h | 308 + src/openvpn/mudp.c | 291 + src/openvpn/mudp.h | 71 + src/openvpn/multi.c | 2867 ++++++++++ src/openvpn/multi.h | 582 ++ src/openvpn/ntlm.c | 352 ++ src/openvpn/ntlm.h | 11 + src/openvpn/occ-inline.h | 85 + src/openvpn/occ.c | 399 ++ src/openvpn/occ.h | 95 + src/openvpn/openvpn.c | 291 + src/openvpn/openvpn.h | 594 ++ src/openvpn/openvpn.vcproj | 769 +++ src/openvpn/openvpn_win32_resources.rc | 41 + src/openvpn/options.c | 6814 +++++++++++++++++++++++ src/openvpn/options.h | 840 +++ src/openvpn/otime.c | 279 + src/openvpn/otime.h | 271 + src/openvpn/packet_id.c | 602 ++ src/openvpn/packet_id.h | 338 ++ src/openvpn/perf.c | 299 + src/openvpn/perf.h | 82 + src/openvpn/pf-inline.h | 59 + src/openvpn/pf.c | 717 +++ src/openvpn/pf.h | 102 + src/openvpn/ping-inline.h | 59 + src/openvpn/ping.c | 98 + src/openvpn/ping.h | 47 + src/openvpn/pkcs11.c | 944 ++++ src/openvpn/pkcs11.h | 80 + src/openvpn/pkcs11_backend.h | 77 + src/openvpn/pkcs11_openssl.c | 194 + src/openvpn/pkcs11_polarssl.c | 126 + src/openvpn/plugin.c | 809 +++ src/openvpn/plugin.h | 211 + src/openvpn/pool.c | 589 ++ src/openvpn/pool.h | 91 + src/openvpn/proto.c | 128 + src/openvpn/proto.h | 236 + src/openvpn/proxy.c | 1130 ++++ src/openvpn/proxy.h | 114 + src/openvpn/ps.c | 974 ++++ src/openvpn/ps.h | 59 + src/openvpn/push.c | 543 ++ src/openvpn/push.h | 74 + src/openvpn/pushlist.h | 42 + src/openvpn/reliable.c | 757 +++ src/openvpn/reliable.h | 480 ++ src/openvpn/route.c | 3243 +++++++++++ src/openvpn/route.h | 339 ++ src/openvpn/schedule.c | 659 +++ src/openvpn/schedule.h | 132 + src/openvpn/session_id.c | 67 + src/openvpn/session_id.h | 86 + src/openvpn/shaper.c | 101 + src/openvpn/shaper.h | 178 + src/openvpn/sig.c | 382 ++ src/openvpn/sig.h | 104 + src/openvpn/socket.c | 3647 ++++++++++++ src/openvpn/socket.h | 1088 ++++ src/openvpn/socks.c | 557 ++ src/openvpn/socks.h | 78 + src/openvpn/ssl.c | 3379 +++++++++++ src/openvpn/ssl.h | 507 ++ src/openvpn/ssl_backend.h | 441 ++ src/openvpn/ssl_common.h | 499 ++ src/openvpn/ssl_openssl.c | 1196 ++++ src/openvpn/ssl_openssl.h | 58 + src/openvpn/ssl_polarssl.c | 872 +++ src/openvpn/ssl_polarssl.h | 85 + src/openvpn/ssl_verify.c | 1224 ++++ src/openvpn/ssl_verify.h | 252 + src/openvpn/ssl_verify_backend.h | 272 + src/openvpn/ssl_verify_openssl.c | 632 +++ src/openvpn/ssl_verify_openssl.h | 78 + src/openvpn/ssl_verify_polarssl.c | 431 ++ src/openvpn/ssl_verify_polarssl.h | 82 + src/openvpn/status.c | 290 + src/openvpn/status.h | 99 + src/openvpn/syshead.h | 708 +++ src/openvpn/tun.c | 5119 +++++++++++++++++ src/openvpn/tun.h | 467 ++ src/openvpn/win32.c | 1180 ++++ src/openvpn/win32.h | 282 + src/openvpnserv/Makefile.am | 26 + src/openvpnserv/openvpnserv.c | 534 ++ src/openvpnserv/openvpnserv.vcproj | 209 + src/openvpnserv/openvpnserv_resources.rc | 41 + src/openvpnserv/service.c | 700 +++ src/openvpnserv/service.h | 139 + src/plugins/README | 47 + src/plugins/auth-pam/Makefile | 31 + src/plugins/auth-pam/README | 74 + src/plugins/auth-pam/auth-pam.c | 804 +++ src/plugins/auth-pam/pamdl.c | 180 + src/plugins/auth-pam/pamdl.h | 7 + src/plugins/defer/README | 16 + src/plugins/defer/build | 14 + src/plugins/defer/simple.c | 305 + src/plugins/defer/simple.def | 6 + src/plugins/defer/winbuild | 18 + src/plugins/down-root/Makefile | 17 + src/plugins/down-root/README | 29 + src/plugins/down-root/down-root.c | 553 ++ src/plugins/examples/README | 16 + src/plugins/examples/build | 14 + src/plugins/examples/log.c | 184 + src/plugins/examples/log_v3.c | 247 + src/plugins/examples/simple.c | 120 + src/plugins/examples/simple.def | 6 + src/plugins/examples/winbuild | 18 + ssl.c | 3373 ----------- ssl.h | 507 -- ssl_backend.h | 441 -- ssl_common.h | 499 -- ssl_openssl.c | 1190 ---- ssl_openssl.h | 58 - ssl_polarssl.c | 866 --- ssl_polarssl.h | 85 - ssl_verify.c | 1218 ---- ssl_verify.h | 252 - ssl_verify_backend.h | 272 - ssl_verify_openssl.c | 626 --- ssl_verify_openssl.h | 74 - ssl_verify_polarssl.c | 425 -- ssl_verify_polarssl.h | 79 - status.c | 284 - status.h | 95 - suse/openvpn.init | 264 - syshead.h | 752 --- t_client.rc-sample | 92 - t_client.sh.in | 303 - t_cltsrv-down.sh | 2 - t_cltsrv.sh | 87 - t_lpback.sh | 31 - tap-win32/MAKEFILE | 6 - tap-win32/SOURCES.in | 64 - tap-win32/common.h | 82 - tap-win32/constants.h | 52 - tap-win32/dhcp.c | 599 -- tap-win32/dhcp.h | 164 - tap-win32/endian.h | 35 - tap-win32/error.c | 378 -- tap-win32/error.h | 88 - tap-win32/hexdump.c | 69 - tap-win32/hexdump.h | 63 - tap-win32/i386/OemWin2k.inf.in | 195 - tap-win32/instance.c | 241 - tap-win32/lock.h | 75 - tap-win32/macinfo.c | 154 - tap-win32/macinfo.h | 38 - tap-win32/mem.c | 186 - tap-win32/proto.h | 224 - tap-win32/prototypes.h | 260 - tap-win32/resource.rc | 58 - tap-win32/tapdrvr.c | 3146 ----------- tap-win32/types.h | 178 - tests/Makefile.am | 21 + tests/t_client.rc-sample | 92 + tests/t_client.sh.in | 303 + tests/t_cltsrv-down.sh | 2 + tests/t_cltsrv.sh | 87 + tests/t_lpback.sh | 31 + tun.c | 5113 ----------------- tun.h | 467 -- version.m4 | 12 +- win/autodefs.h.in | 31 - win/build.py | 23 - win/build_all.py | 69 - win/build_ddk.py | 55 - win/build_exe.py | 15 - win/config.h.in | 363 -- win/config.py | 21 - win/config_all.py | 13 - win/config_tap.py | 35 - win/config_ti.py | 18 - win/js.py | 10 - win/make_dist.py | 107 - win/msvc.mak.in | 69 - win/openvpn.nsi | 822 --- win/setpath.nsi | 231 - win/settings.in | 100 - win/show.py | 9 - win/sign.py | 23 - win/tap_span.py | 129 - win/wb.py | 322 -- win32.c | 1173 ---- win32.h | 293 - 647 files changed, 102519 insertions(+), 114820 deletions(-) delete mode 100644 .svnignore delete mode 100644 acinclude.m4 delete mode 100644 base64.c delete mode 100644 base64.h delete mode 100644 basic.h delete mode 100644 buffer.c delete mode 100644 buffer.h create mode 100644 build/Makefile.am create mode 100644 build/ltrc.inc create mode 100644 build/msvc/Makefile.am create mode 100644 build/msvc/msvc-generate/Makefile.am create mode 100755 build/msvc/msvc-generate/Makefile.mak create mode 100644 build/msvc/msvc-generate/msvc-generate.js create mode 100644 build/msvc/msvc-generate/msvc-generate.vcproj delete mode 100644 circ_list.h delete mode 100644 clinat.c delete mode 100644 clinat.h delete mode 100644 common.h delete mode 100644 compat.c delete mode 100644 compat.h create mode 100644 config-msvc-version.h.in create mode 100644 config-msvc.h delete mode 100644 configure_h.awk delete mode 100644 configure_log.awk delete mode 100644 crypto.c delete mode 100644 crypto.h delete mode 100644 crypto_backend.h delete mode 100644 crypto_openssl.c delete mode 100644 crypto_openssl.h delete mode 100644 crypto_polarssl.c delete mode 100644 crypto_polarssl.h delete mode 100644 cryptoapi.c delete mode 100644 cryptoapi.h create mode 100755 debug/doval create mode 100755 debug/dovalns delete mode 100644 dhcp.c delete mode 100644 dhcp.h create mode 100644 distro/Makefile.am create mode 100644 distro/rpm/Makefile.am create mode 100644 distro/rpm/openvpn.init.d.suse create mode 100644 distro/rpm/openvpn.spec.in create mode 100644 doc/Makefile.am create mode 100644 doc/doxygen/doc_compression.h create mode 100644 doc/doxygen/doc_control_processor.h create mode 100644 doc/doxygen/doc_control_tls.h create mode 100644 doc/doxygen/doc_data_control.h create mode 100644 doc/doxygen/doc_data_crypto.h create mode 100644 doc/doxygen/doc_eventloop.h create mode 100644 doc/doxygen/doc_external_multiplexer.h create mode 100644 doc/doxygen/doc_fragmentation.h create mode 100644 doc/doxygen/doc_internal_multiplexer.h create mode 100644 doc/doxygen/doc_key_generation.h create mode 100644 doc/doxygen/doc_mainpage.h create mode 100644 doc/doxygen/doc_memory_management.h create mode 100644 doc/doxygen/doc_protocol_overview.h create mode 100644 doc/doxygen/doc_reliable.h create mode 100644 doc/doxygen/doc_tunnel_state.h create mode 100644 doc/doxygen/openvpn.doxyfile create mode 100644 doc/management-notes.txt create mode 100644 doc/openvpn.8 delete mode 100755 doclean delete mode 100644 domake-win delete mode 100755 doval delete mode 100755 dovalns delete mode 100644 doxygen/doc_compression.h delete mode 100644 doxygen/doc_control_processor.h delete mode 100644 doxygen/doc_control_tls.h delete mode 100644 doxygen/doc_data_control.h delete mode 100644 doxygen/doc_data_crypto.h delete mode 100644 doxygen/doc_eventloop.h delete mode 100644 doxygen/doc_external_multiplexer.h delete mode 100644 doxygen/doc_fragmentation.h delete mode 100644 doxygen/doc_internal_multiplexer.h delete mode 100644 doxygen/doc_key_generation.h delete mode 100644 doxygen/doc_mainpage.h delete mode 100644 doxygen/doc_memory_management.h delete mode 100644 doxygen/doc_protocol_overview.h delete mode 100644 doxygen/doc_reliable.h delete mode 100644 doxygen/doc_tunnel_state.h delete mode 100644 doxygen/openvpn.doxyfile delete mode 100644 easy-rsa/1.0/README delete mode 100755 easy-rsa/1.0/build-ca delete mode 100755 easy-rsa/1.0/build-dh delete mode 100755 easy-rsa/1.0/build-inter delete mode 100755 easy-rsa/1.0/build-key delete mode 100755 easy-rsa/1.0/build-key-pass delete mode 100755 easy-rsa/1.0/build-key-pkcs12 delete mode 100755 easy-rsa/1.0/build-key-server delete mode 100755 easy-rsa/1.0/build-req delete mode 100755 easy-rsa/1.0/build-req-pass delete mode 100755 easy-rsa/1.0/clean-all delete mode 100644 easy-rsa/1.0/list-crl delete mode 100644 easy-rsa/1.0/make-crl delete mode 100644 easy-rsa/1.0/openssl.cnf delete mode 100644 easy-rsa/1.0/revoke-crt delete mode 100755 easy-rsa/1.0/revoke-full delete mode 100755 easy-rsa/1.0/sign-req delete mode 100644 easy-rsa/1.0/vars delete mode 100644 easy-rsa/2.0/Makefile delete mode 100644 easy-rsa/2.0/README delete mode 100755 easy-rsa/2.0/build-ca delete mode 100755 easy-rsa/2.0/build-dh delete mode 100755 easy-rsa/2.0/build-inter delete mode 100755 easy-rsa/2.0/build-key delete mode 100755 easy-rsa/2.0/build-key-pass delete mode 100755 easy-rsa/2.0/build-key-pkcs12 delete mode 100755 easy-rsa/2.0/build-key-server delete mode 100755 easy-rsa/2.0/build-req delete mode 100755 easy-rsa/2.0/build-req-pass delete mode 100755 easy-rsa/2.0/clean-all delete mode 100755 easy-rsa/2.0/inherit-inter delete mode 100755 easy-rsa/2.0/list-crl delete mode 100755 easy-rsa/2.0/openssl-0.9.6.cnf delete mode 100755 easy-rsa/2.0/openssl-0.9.8.cnf delete mode 100755 easy-rsa/2.0/openssl-1.0.0.cnf delete mode 100755 easy-rsa/2.0/pkitool delete mode 100755 easy-rsa/2.0/revoke-full delete mode 100755 easy-rsa/2.0/sign-req delete mode 100755 easy-rsa/2.0/vars delete mode 100755 easy-rsa/2.0/whichopensslcnf delete mode 100644 easy-rsa/Windows/README.txt delete mode 100644 easy-rsa/Windows/build-ca-pass.bat delete mode 100644 easy-rsa/Windows/build-ca.bat delete mode 100644 easy-rsa/Windows/build-dh.bat delete mode 100644 easy-rsa/Windows/build-key-pass.bat delete mode 100644 easy-rsa/Windows/build-key-pkcs12.bat delete mode 100644 easy-rsa/Windows/build-key-server-pass.bat delete mode 100644 easy-rsa/Windows/build-key-server.bat delete mode 100644 easy-rsa/Windows/build-key.bat delete mode 100644 easy-rsa/Windows/clean-all.bat delete mode 100644 easy-rsa/Windows/index.txt.start delete mode 100755 easy-rsa/Windows/init-config.bat delete mode 100644 easy-rsa/Windows/revoke-full.bat delete mode 100644 easy-rsa/Windows/serial.start delete mode 100644 easy-rsa/Windows/vars.bat.sample delete mode 100644 errlevel.h delete mode 100644 error.c delete mode 100644 error.h delete mode 100644 event.c delete mode 100644 event.h delete mode 100644 fdmisc.c delete mode 100644 fdmisc.h delete mode 100644 forward-inline.h delete mode 100644 forward.c delete mode 100644 forward.h delete mode 100644 fragment.c delete mode 100644 fragment.h delete mode 100644 gremlin.c delete mode 100644 gremlin.h delete mode 100644 helper.c delete mode 100644 helper.h delete mode 100644 httpdigest.c delete mode 100644 httpdigest.h delete mode 100644 images/.svnignore delete mode 100644 images/Makefile.am delete mode 100755 images/icon.ico delete mode 100755 images/install-whirl.bmp create mode 100644 include/Makefile.am create mode 100644 include/openvpn-plugin.h create mode 100644 include/tap-windows.h delete mode 100644 init.c delete mode 100644 init.h delete mode 100644 install-win32/.svnignore delete mode 100644 install-win32/GetWindowsVersion.nsi delete mode 100644 install-win32/Makefile.am delete mode 100644 install-win32/build-pkcs11-helper.sh delete mode 100644 install-win32/buildinstaller delete mode 100644 install-win32/ddk-common delete mode 100644 install-win32/doclean delete mode 100644 install-win32/dosname.pl delete mode 100644 install-win32/getgui delete mode 100644 install-win32/getopenssl delete mode 100644 install-win32/getpkcs11helper delete mode 100644 install-win32/getprebuilt delete mode 100644 install-win32/getxgui delete mode 100644 install-win32/ifdef.pl delete mode 100644 install-win32/m4todef.pl delete mode 100644 install-win32/macro.pl delete mode 100755 install-win32/makeopenvpn delete mode 100644 install-win32/maketap delete mode 100644 install-win32/maketapinstall delete mode 100644 install-win32/maketext delete mode 100644 install-win32/openssl/README.txt delete mode 100644 install-win32/openssl/openssl097.patch delete mode 100644 install-win32/openssl/openssl098.patch delete mode 100755 install-win32/openvpn.nsi delete mode 100755 install-win32/sample.ovpn delete mode 100755 install-win32/setpath.nsi delete mode 100644 install-win32/settings.in delete mode 100644 install-win32/trans.pl delete mode 100755 install-win32/u2d.c delete mode 100644 install-win32/winconfig delete mode 100644 integer.h delete mode 100644 interval.c delete mode 100644 interval.h delete mode 100644 list.c delete mode 100644 list.h delete mode 100644 lladdr.c delete mode 100644 lladdr.h delete mode 100644 lzo.c delete mode 100644 lzo.h create mode 100644 m4/.keep create mode 100644 m4/ax_emptyarray.m4 create mode 100644 m4/ax_socklen_t.m4 create mode 100644 m4/ax_varargs.m4 delete mode 100644 manage.c delete mode 100644 manage.h delete mode 100644 management/management-notes.txt delete mode 100644 mbuf.c delete mode 100644 mbuf.h delete mode 100644 memcmp.c delete mode 100644 memdbg.h delete mode 100644 misc.c delete mode 100644 misc.h delete mode 100644 mroute.c delete mode 100644 mroute.h delete mode 100644 mss.c delete mode 100644 mss.h delete mode 100644 mstats.c delete mode 100644 mstats.h create mode 100644 msvc-build.bat create mode 100644 msvc-dev.bat create mode 100644 msvc-env.bat delete mode 100644 msvc/autodefs.h.in delete mode 100644 msvc/config.py delete mode 100644 msvc/msvc.mak delete mode 100644 mtcp.c delete mode 100644 mtcp.h delete mode 100644 mtu.c delete mode 100644 mtu.h delete mode 100644 mudp.c delete mode 100644 mudp.h delete mode 100644 multi.c delete mode 100644 multi.h delete mode 100644 ntlm.c delete mode 100644 ntlm.h delete mode 100644 occ-inline.h delete mode 100644 occ.c delete mode 100644 occ.h delete mode 100644 openvpn-plugin.h delete mode 100644 openvpn.8 delete mode 100644 openvpn.c delete mode 100644 openvpn.h create mode 100644 openvpn.sln delete mode 100644 openvpn.spec.in delete mode 100644 options.c delete mode 100644 options.h delete mode 100644 otime.c delete mode 100644 otime.h delete mode 100644 packet_id.c delete mode 100644 packet_id.h delete mode 100644 perf.c delete mode 100644 perf.h delete mode 100644 pf-inline.h delete mode 100644 pf.c delete mode 100644 pf.h delete mode 100644 ping-inline.h delete mode 100644 ping.c delete mode 100644 ping.h delete mode 100644 pkcs11.c delete mode 100644 pkcs11.h delete mode 100644 pkcs11_backend.h delete mode 100644 pkcs11_openssl.c delete mode 100644 pkcs11_polarssl.c delete mode 100644 plugin.c delete mode 100644 plugin.h delete mode 100644 plugin/README delete mode 100644 plugin/auth-pam/.svnignore delete mode 100755 plugin/auth-pam/Makefile delete mode 100644 plugin/auth-pam/README delete mode 100644 plugin/auth-pam/auth-pam.c delete mode 100644 plugin/auth-pam/pamdl.c delete mode 100644 plugin/auth-pam/pamdl.h delete mode 100644 plugin/defer/README delete mode 100755 plugin/defer/build delete mode 100644 plugin/defer/simple.c delete mode 100755 plugin/defer/simple.def delete mode 100755 plugin/defer/winbuild delete mode 100755 plugin/down-root/Makefile delete mode 100644 plugin/down-root/README delete mode 100644 plugin/down-root/down-root.c delete mode 100644 plugin/examples/README delete mode 100755 plugin/examples/build delete mode 100644 plugin/examples/log.c delete mode 100644 plugin/examples/log_v3.c delete mode 100644 plugin/examples/simple.c delete mode 100755 plugin/examples/simple.def delete mode 100755 plugin/examples/winbuild delete mode 100644 pool.c delete mode 100644 pool.h delete mode 100644 proto.c delete mode 100644 proto.h delete mode 100644 proxy.c delete mode 100644 proxy.h delete mode 100644 ps.c delete mode 100644 ps.h delete mode 100644 push.c delete mode 100644 push.h delete mode 100644 pushlist.h delete mode 100644 reliable.c delete mode 100644 reliable.h delete mode 100644 route.c delete mode 100644 route.h delete mode 100644 sample-config-files/README delete mode 100644 sample-config-files/client.conf delete mode 100755 sample-config-files/firewall.sh delete mode 100755 sample-config-files/home.up delete mode 100644 sample-config-files/loopback-client delete mode 100644 sample-config-files/loopback-server delete mode 100755 sample-config-files/office.up delete mode 100755 sample-config-files/openvpn-shutdown.sh delete mode 100755 sample-config-files/openvpn-startup.sh delete mode 100644 sample-config-files/server.conf delete mode 100644 sample-config-files/static-home.conf delete mode 100644 sample-config-files/static-office.conf delete mode 100644 sample-config-files/tls-home.conf delete mode 100644 sample-config-files/tls-office.conf delete mode 100644 sample-config-files/xinetd-client-config delete mode 100644 sample-config-files/xinetd-server-config delete mode 100644 sample-keys/README delete mode 100644 sample-keys/ca.crt delete mode 100644 sample-keys/ca.key delete mode 100644 sample-keys/client.crt delete mode 100644 sample-keys/client.key delete mode 100644 sample-keys/dh1024.pem delete mode 100644 sample-keys/pass.crt delete mode 100644 sample-keys/pass.key delete mode 100644 sample-keys/pkcs12.p12 delete mode 100644 sample-keys/server.crt delete mode 100644 sample-keys/server.key delete mode 100755 sample-scripts/auth-pam.pl delete mode 100755 sample-scripts/bridge-start delete mode 100755 sample-scripts/bridge-stop delete mode 100755 sample-scripts/openvpn.init delete mode 100755 sample-scripts/ucn.pl delete mode 100755 sample-scripts/verify-cn create mode 100644 sample/Makefile.am create mode 100644 sample/sample-config-files/README create mode 100644 sample/sample-config-files/client.conf create mode 100755 sample/sample-config-files/firewall.sh create mode 100755 sample/sample-config-files/home.up create mode 100644 sample/sample-config-files/loopback-client create mode 100644 sample/sample-config-files/loopback-server create mode 100755 sample/sample-config-files/office.up create mode 100755 sample/sample-config-files/openvpn-shutdown.sh create mode 100755 sample/sample-config-files/openvpn-startup.sh create mode 100644 sample/sample-config-files/server.conf create mode 100644 sample/sample-config-files/static-home.conf create mode 100644 sample/sample-config-files/static-office.conf create mode 100644 sample/sample-config-files/tls-home.conf create mode 100644 sample/sample-config-files/tls-office.conf create mode 100644 sample/sample-config-files/xinetd-client-config create mode 100644 sample/sample-config-files/xinetd-server-config create mode 100644 sample/sample-keys/README create mode 100644 sample/sample-keys/ca.crt create mode 100644 sample/sample-keys/ca.key create mode 100644 sample/sample-keys/client.crt create mode 100644 sample/sample-keys/client.key create mode 100644 sample/sample-keys/dh1024.pem create mode 100644 sample/sample-keys/pass.crt create mode 100644 sample/sample-keys/pass.key create mode 100644 sample/sample-keys/pkcs12.p12 create mode 100644 sample/sample-keys/server.crt create mode 100644 sample/sample-keys/server.key create mode 100755 sample/sample-scripts/auth-pam.pl create mode 100755 sample/sample-scripts/bridge-start create mode 100755 sample/sample-scripts/bridge-stop create mode 100755 sample/sample-scripts/openvpn.init create mode 100755 sample/sample-scripts/ucn.pl create mode 100755 sample/sample-scripts/verify-cn delete mode 100644 schedule.c delete mode 100644 schedule.h delete mode 100644 service-win32/.svnignore delete mode 100644 service-win32/Makefile.am delete mode 100644 service-win32/msvc.mak delete mode 100755 service-win32/openvpnserv.c delete mode 100644 service-win32/service.c delete mode 100644 service-win32/service.h delete mode 100644 session_id.c delete mode 100644 session_id.h delete mode 100644 shaper.c delete mode 100644 shaper.h delete mode 100644 sig.c delete mode 100644 sig.h delete mode 100644 socket.c delete mode 100644 socket.h delete mode 100644 socks.c delete mode 100644 socks.h delete mode 100755 sources create mode 100644 src/Makefile.am create mode 100644 src/openvpn/Makefile.am create mode 100644 src/openvpn/base64.c create mode 100644 src/openvpn/base64.h create mode 100644 src/openvpn/basic.h create mode 100644 src/openvpn/buffer.c create mode 100644 src/openvpn/buffer.h create mode 100644 src/openvpn/circ_list.h create mode 100644 src/openvpn/clinat.c create mode 100644 src/openvpn/clinat.h create mode 100644 src/openvpn/common.h create mode 100644 src/openvpn/compat.c create mode 100644 src/openvpn/compat.h create mode 100644 src/openvpn/crypto.c create mode 100644 src/openvpn/crypto.h create mode 100644 src/openvpn/crypto_backend.h create mode 100644 src/openvpn/crypto_openssl.c create mode 100644 src/openvpn/crypto_openssl.h create mode 100644 src/openvpn/crypto_polarssl.c create mode 100644 src/openvpn/crypto_polarssl.h create mode 100644 src/openvpn/cryptoapi.c create mode 100644 src/openvpn/cryptoapi.h create mode 100644 src/openvpn/dhcp.c create mode 100644 src/openvpn/dhcp.h create mode 100644 src/openvpn/errlevel.h create mode 100644 src/openvpn/error.c create mode 100644 src/openvpn/error.h create mode 100644 src/openvpn/event.c create mode 100644 src/openvpn/event.h create mode 100644 src/openvpn/fdmisc.c create mode 100644 src/openvpn/fdmisc.h create mode 100644 src/openvpn/forward-inline.h create mode 100644 src/openvpn/forward.c create mode 100644 src/openvpn/forward.h create mode 100644 src/openvpn/fragment.c create mode 100644 src/openvpn/fragment.h create mode 100644 src/openvpn/gremlin.c create mode 100644 src/openvpn/gremlin.h create mode 100644 src/openvpn/helper.c create mode 100644 src/openvpn/helper.h create mode 100644 src/openvpn/httpdigest.c create mode 100644 src/openvpn/httpdigest.h create mode 100644 src/openvpn/init.c create mode 100644 src/openvpn/init.h create mode 100644 src/openvpn/integer.h create mode 100644 src/openvpn/interval.c create mode 100644 src/openvpn/interval.h create mode 100644 src/openvpn/list.c create mode 100644 src/openvpn/list.h create mode 100644 src/openvpn/lladdr.c create mode 100644 src/openvpn/lladdr.h create mode 100644 src/openvpn/lzo.c create mode 100644 src/openvpn/lzo.h create mode 100644 src/openvpn/manage.c create mode 100644 src/openvpn/manage.h create mode 100644 src/openvpn/mbuf.c create mode 100644 src/openvpn/mbuf.h create mode 100644 src/openvpn/memdbg.h create mode 100644 src/openvpn/misc.c create mode 100644 src/openvpn/misc.h create mode 100644 src/openvpn/mroute.c create mode 100644 src/openvpn/mroute.h create mode 100644 src/openvpn/mss.c create mode 100644 src/openvpn/mss.h create mode 100644 src/openvpn/mstats.c create mode 100644 src/openvpn/mstats.h create mode 100644 src/openvpn/mtcp.c create mode 100644 src/openvpn/mtcp.h create mode 100644 src/openvpn/mtu.c create mode 100644 src/openvpn/mtu.h create mode 100644 src/openvpn/mudp.c create mode 100644 src/openvpn/mudp.h create mode 100644 src/openvpn/multi.c create mode 100644 src/openvpn/multi.h create mode 100644 src/openvpn/ntlm.c create mode 100644 src/openvpn/ntlm.h create mode 100644 src/openvpn/occ-inline.h create mode 100644 src/openvpn/occ.c create mode 100644 src/openvpn/occ.h create mode 100644 src/openvpn/openvpn.c create mode 100644 src/openvpn/openvpn.h create mode 100644 src/openvpn/openvpn.vcproj create mode 100644 src/openvpn/openvpn_win32_resources.rc create mode 100644 src/openvpn/options.c create mode 100644 src/openvpn/options.h create mode 100644 src/openvpn/otime.c create mode 100644 src/openvpn/otime.h create mode 100644 src/openvpn/packet_id.c create mode 100644 src/openvpn/packet_id.h create mode 100644 src/openvpn/perf.c create mode 100644 src/openvpn/perf.h create mode 100644 src/openvpn/pf-inline.h create mode 100644 src/openvpn/pf.c create mode 100644 src/openvpn/pf.h create mode 100644 src/openvpn/ping-inline.h create mode 100644 src/openvpn/ping.c create mode 100644 src/openvpn/ping.h create mode 100644 src/openvpn/pkcs11.c create mode 100644 src/openvpn/pkcs11.h create mode 100644 src/openvpn/pkcs11_backend.h create mode 100644 src/openvpn/pkcs11_openssl.c create mode 100644 src/openvpn/pkcs11_polarssl.c create mode 100644 src/openvpn/plugin.c create mode 100644 src/openvpn/plugin.h create mode 100644 src/openvpn/pool.c create mode 100644 src/openvpn/pool.h create mode 100644 src/openvpn/proto.c create mode 100644 src/openvpn/proto.h create mode 100644 src/openvpn/proxy.c create mode 100644 src/openvpn/proxy.h create mode 100644 src/openvpn/ps.c create mode 100644 src/openvpn/ps.h create mode 100644 src/openvpn/push.c create mode 100644 src/openvpn/push.h create mode 100644 src/openvpn/pushlist.h create mode 100644 src/openvpn/reliable.c create mode 100644 src/openvpn/reliable.h create mode 100644 src/openvpn/route.c create mode 100644 src/openvpn/route.h create mode 100644 src/openvpn/schedule.c create mode 100644 src/openvpn/schedule.h create mode 100644 src/openvpn/session_id.c create mode 100644 src/openvpn/session_id.h create mode 100644 src/openvpn/shaper.c create mode 100644 src/openvpn/shaper.h create mode 100644 src/openvpn/sig.c create mode 100644 src/openvpn/sig.h create mode 100644 src/openvpn/socket.c create mode 100644 src/openvpn/socket.h create mode 100644 src/openvpn/socks.c create mode 100644 src/openvpn/socks.h create mode 100644 src/openvpn/ssl.c create mode 100644 src/openvpn/ssl.h create mode 100644 src/openvpn/ssl_backend.h create mode 100644 src/openvpn/ssl_common.h create mode 100644 src/openvpn/ssl_openssl.c create mode 100644 src/openvpn/ssl_openssl.h create mode 100644 src/openvpn/ssl_polarssl.c create mode 100644 src/openvpn/ssl_polarssl.h create mode 100644 src/openvpn/ssl_verify.c create mode 100644 src/openvpn/ssl_verify.h create mode 100644 src/openvpn/ssl_verify_backend.h create mode 100644 src/openvpn/ssl_verify_openssl.c create mode 100644 src/openvpn/ssl_verify_openssl.h create mode 100644 src/openvpn/ssl_verify_polarssl.c create mode 100644 src/openvpn/ssl_verify_polarssl.h create mode 100644 src/openvpn/status.c create mode 100644 src/openvpn/status.h create mode 100644 src/openvpn/syshead.h create mode 100644 src/openvpn/tun.c create mode 100644 src/openvpn/tun.h create mode 100644 src/openvpn/win32.c create mode 100644 src/openvpn/win32.h create mode 100644 src/openvpnserv/Makefile.am create mode 100755 src/openvpnserv/openvpnserv.c create mode 100644 src/openvpnserv/openvpnserv.vcproj create mode 100644 src/openvpnserv/openvpnserv_resources.rc create mode 100644 src/openvpnserv/service.c create mode 100644 src/openvpnserv/service.h create mode 100644 src/plugins/README create mode 100755 src/plugins/auth-pam/Makefile create mode 100644 src/plugins/auth-pam/README create mode 100644 src/plugins/auth-pam/auth-pam.c create mode 100644 src/plugins/auth-pam/pamdl.c create mode 100644 src/plugins/auth-pam/pamdl.h create mode 100644 src/plugins/defer/README create mode 100755 src/plugins/defer/build create mode 100644 src/plugins/defer/simple.c create mode 100755 src/plugins/defer/simple.def create mode 100755 src/plugins/defer/winbuild create mode 100755 src/plugins/down-root/Makefile create mode 100644 src/plugins/down-root/README create mode 100644 src/plugins/down-root/down-root.c create mode 100644 src/plugins/examples/README create mode 100755 src/plugins/examples/build create mode 100644 src/plugins/examples/log.c create mode 100644 src/plugins/examples/log_v3.c create mode 100644 src/plugins/examples/simple.c create mode 100755 src/plugins/examples/simple.def create mode 100755 src/plugins/examples/winbuild delete mode 100644 ssl.c delete mode 100644 ssl.h delete mode 100644 ssl_backend.h delete mode 100644 ssl_common.h delete mode 100644 ssl_openssl.c delete mode 100644 ssl_openssl.h delete mode 100644 ssl_polarssl.c delete mode 100644 ssl_polarssl.h delete mode 100644 ssl_verify.c delete mode 100644 ssl_verify.h delete mode 100644 ssl_verify_backend.h delete mode 100644 ssl_verify_openssl.c delete mode 100644 ssl_verify_openssl.h delete mode 100644 ssl_verify_polarssl.c delete mode 100644 ssl_verify_polarssl.h delete mode 100644 status.c delete mode 100644 status.h delete mode 100644 suse/openvpn.init delete mode 100644 syshead.h delete mode 100644 t_client.rc-sample delete mode 100755 t_client.sh.in delete mode 100755 t_cltsrv-down.sh delete mode 100755 t_cltsrv.sh delete mode 100755 t_lpback.sh delete mode 100755 tap-win32/MAKEFILE delete mode 100755 tap-win32/SOURCES.in delete mode 100755 tap-win32/common.h delete mode 100755 tap-win32/constants.h delete mode 100755 tap-win32/dhcp.c delete mode 100755 tap-win32/dhcp.h delete mode 100755 tap-win32/endian.h delete mode 100755 tap-win32/error.c delete mode 100755 tap-win32/error.h delete mode 100755 tap-win32/hexdump.c delete mode 100755 tap-win32/hexdump.h delete mode 100755 tap-win32/i386/OemWin2k.inf.in delete mode 100755 tap-win32/instance.c delete mode 100755 tap-win32/lock.h delete mode 100755 tap-win32/macinfo.c delete mode 100755 tap-win32/macinfo.h delete mode 100755 tap-win32/mem.c delete mode 100755 tap-win32/proto.h delete mode 100755 tap-win32/prototypes.h delete mode 100755 tap-win32/resource.rc delete mode 100755 tap-win32/tapdrvr.c delete mode 100755 tap-win32/types.h create mode 100644 tests/Makefile.am create mode 100644 tests/t_client.rc-sample create mode 100755 tests/t_client.sh.in create mode 100755 tests/t_cltsrv-down.sh create mode 100755 tests/t_cltsrv.sh create mode 100755 tests/t_lpback.sh delete mode 100644 tun.c delete mode 100644 tun.h delete mode 100644 win/__init__.py delete mode 100644 win/autodefs.h.in delete mode 100644 win/build.py delete mode 100644 win/build_all.py delete mode 100644 win/build_ddk.py delete mode 100644 win/build_exe.py delete mode 100644 win/config.h.in delete mode 100644 win/config.py delete mode 100644 win/config_all.py delete mode 100644 win/config_tap.py delete mode 100644 win/config_ti.py delete mode 100644 win/js.py delete mode 100644 win/make_dist.py delete mode 100644 win/msvc.mak.in delete mode 100755 win/openvpn.nsi delete mode 100755 win/setpath.nsi delete mode 100644 win/settings.in delete mode 100644 win/show.py delete mode 100644 win/sign.py delete mode 100644 win/tap_span.py delete mode 100644 win/wb.py delete mode 100644 win32.c delete mode 100644 win32.h
Signature · 1 line
1.7.3.4
PATCH 1/35 cleanup: options.c: remove redundant include
--- options.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
options.c +0 -1
@@ -50,7 +50,6 @@#include "manage.h" #include "forward.h" #include "configure.h" -#include "forward.h" #include <ctype.h> #include "memdbg.h"
Signature · 1 line
1.7.3.4
PATCH 2/35 cleanup: crypto_openssl.c: remove support for pre-openssl-0.9.6
In reply to Alon Bar-Levautoconf rejecting this anyway:
---AC_MSG_CHECKING([that OpenSSL Library is at least version 0.9.6]) <snip>AC_MSG_ERROR([OpenSSL crypto Library is too old.])
---
--- crypto_openssl.c | 49 ------------------------------------------------- 1 files changed, 0 insertions(+), 49 deletions(-)
crypto_openssl.c +0 -49
@@ -78,47 +78,6 @@#endif -#if SSLEAY_VERSION_NUMBER <0x00906000 - -#undef EVP_CIPHER_mode -#define EVP_CIPHER_mode (x) 1 -#define EVP_CIPHER_CTX_mode (x) 1 -#define EVP_CIPHER_flags (x) 0 - -#define EVP_CIPH_CBC_MODE 1 -#define EVP_CIPH_CFB_MODE 0 -#define EVP_CIPH_OFB_MODE 0 -#define EVP_CIPH_VARIABLE_LENGTH 0 - -#define OPENSSL_malloc (x) malloc(x) -#define OPENSSL_free (x) free(x) - -static inline int -EVP_CipherInit_ov (EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type,uint8_t *key,uint8_t *iv,int enc) -{ -EVP_CipherInit (ctx, type, key, iv, enc); -return 1 ; -} - -static inline int -EVP_CipherUpdate_ov (EVP_CIPHER_CTX *ctx,uint8_t *out,int *outl,uint8_t *in,int inl) -{ -EVP_CipherUpdate (ctx, out, outl, in, inl); -return 1 ; -} - -static inline bool -cipher_ok (const char * name) -{ -const int i =strlen (name) -4 ; -if (i >=0 ) -return !strcmp (name + i,"-CBC" ); -else -return false; -} - -#else -static inline int EVP_CipherInit_ov (EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type,uint8_t *key,uint8_t *iv,int enc) {
@@ -137,14 +96,6 @@ cipher_ok (const char* name)return true; } -#endif - -#if SSLEAY_VERSION_NUMBER <0x0090581f - -#undef DES_check_key_parity -#define DES_check_key_parity (x) 1 -#endif /* SSLEAY_VERSION_NUMBER < 0x0090581f */ -#ifndef EVP_CIPHER_name#define EVP_CIPHER_name (e) OBJ_nid2sn(EVP_CIPHER_nid(e))#endif
Signature · 1 line
1.7.3.4
Re: [Openvpn-devel] [PATCH 02/35] cleanup: crypto_openssl.c: remove support for pre-openssl-0.9.6
Ack, I'll be glad to be rid of some of this cruft.
Adriaan
Quoted 103 lines
-----Original Message-----
From: Alon Bar-Lev [mailto:[email protected]...]
Sent: dinsdag 21 februari 2012 2:22
To: [email protected]
Cc: Alon Bar-Lev
Subject: [Openvpn-devel] [PATCH 02/35] cleanup:crypto_openssl.c:
remove support for pre-openssl-0.9.6autoconf rejecting this anyway:
---AC_MSG_CHECKING([that OpenSSL Library is at least version 0.9.6])<snip>AC_MSG_ERROR([OpenSSL crypto Library is too old.])
---Signed-off-by Alon Bar-Lev <[email protected]...>--- crypto_openssl.c | 49 ---------------------------------------------- --- 1 files changed, 0 insertions(+), 49 deletions(-)crypto_openssl.c index 0a41b39..e5e1122 renamed from crypto_openssl.c +0
-0100644
crypto_openssl.c +0
-39@@ -78,47 +78,6 @@#endif -#if SSLEAY_VERSION_NUMBER <0x00906000 - -#undef EVP_CIPHER_mode -#define EVP_CIPHER_mode (x) 1 -#define EVP_CIPHER_CTX_mode (x) 1 -#define EVP_CIPHER_flags (x) 0 - -#define EVP_CIPH_CBC_MODE 1 -#define EVP_CIPH_CFB_MODE 0 -#define EVP_CIPH_OFB_MODE 0 -#define EVP_CIPH_VARIABLE_LENGTH 0 - -#define OPENSSL_malloc (x) malloc(x) -#define OPENSSL_free (x) free(x) - -static inline int -EVP_CipherInit_ov (EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, uint8_t *key, uint8_t *iv, int enc) -{ -EVP_CipherInit (ctx, type, key, iv, enc); -return 1 ; -} - -static inline int -EVP_CipherUpdate_ov (EVP_CIPHER_CTX *ctx,uint8_t *out,int *outl, uint8_t *in, int inl) -{ -EVP_CipherUpdate (ctx, out, outl, in, inl); -return 1 ; -} - -static inline bool -cipher_ok (const char * name) -{ -const int i =strlen (name) -4 ; -if (i >=0 ) -return !strcmp (name + i,"-CBC" ); -else -return false; -} - -#else - static inline int EVP_CipherInit_ov (EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
uint8_t*key,uint8_t*iv, int enc) { @@ -137,14 +96,6 @@cipher_ok(const char* name)
return true;
}crypto_openssl.c +0
-9-#endif - -#if SSLEAY_VERSION_NUMBER <0x0090581f - -#undef DES_check_key_parity -#define DES_check_key_parity (x) 1 -#endif /* SSLEAY_VERSION_NUMBER < 0x0090581f */ -#ifndef EVP_CIPHER_name#define EVP_CIPHER_name (e) OBJ_nid2sn(EVP_CIPHER_nid(e))#endif --1.7.3.4
-----------------------------------------------------------------------
-------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
PATCH 3/35 cleanup: tun.c: fix incorrect option in message (ip-win32)
In reply to Alon Bar-Lev--- tun.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
tun.c +1 -1
@@ -4492,7 +4492,7 @@ dhcp_masq_addr (const in_addr_t local, const in_addr_t netmask, const int offsetmsg (M_FATAL ,"ERROR: There is a clash between the --ifconfig local address and the internal DHCP server address -- both are set to %s -- please use the --ip-win32 dynamic option to choose a different free address from the --ifconfig subnet for the internal DHCP server" ,print_in_addr_t (dsa,0 , &gc));if ((local & netmask) != (dsa & netmask)) -msg (M_FATAL ,"ERROR: --tap-win32 dynamic [offset] : offset is outside of --ifconfig subnet" ); +msg (M_FATAL ,"ERROR: --ip-win32 dynamic [offset] : offset is outside of --ifconfig subnet" );gc_free (&gc);return htonl (dsa);
Signature · 1 line
1.7.3.4
Re: [Openvpn-devel] [PATCH 03/35] cleanup: tun.c: fix incorrect option in message (ip-win32)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 11 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...>--- tun.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)tun.c +0
-0
tun.c dhcp_masq_addr (const in_addr_t local, const in_addr_t netmask, const int offset · line 4498
Quoted 8 lines
tun.c +1
-1@@ -4492,7 +4492,7 @@ dhcp_masq_addr (const in_addr_t local, const in_addr_t netmask, const int offsetmsg (M_FATAL ,"ERROR: There is a clash between the --ifconfig local address and the internal DHCP server address -- both are set to %s -- please use the --ip-win32 dynamic option to choose a different free address from the --ifconfig subnet for the internal DHCP server" ,print_in_addr_t (dsa,0 , &gc));if ((local & netmask) != (dsa & netmask)) -msg (M_FATAL ,"ERROR: --tap-win32 dynamic [offset] : offset is outside of --ifconfig subnet" ); +msg (M_FATAL ,"ERROR: --ip-win32 dynamic [offset] : offset is outside of --ifconfig subnet" );gc_free (&gc);return htonl (dsa);
ACK.
Kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LRJEACgkQDC186MBRfrpufwCaApTJnlpQQJ9iWW3PBh+sJCxo 0TIAn1j4gSvEM7GiwuVhep7q/yELWcuf
=F7DR
-----END PGP SIGNATURE-----
PATCH 4/35 cleanup: memcmp.c: remove unused source
In reply to Alon Bar-Lev--- configure.ac | 3 --- memcmp.c | 43 ------------------------------------------- 2 files changed, 0 insertions(+), 46 deletions(-) delete mode 100644 memcmp.c
configure.ac +0 -3
@@ -564,9 +564,6 @@ else fi -dnl Required library functions -AC_FUNC_MEMCMP - dnl dnl Check for res_init dnl
memcmp.c deleted +0 -43
43 lines not on this page · raw message
Signature · 1 line
1.7.3.4
Re: [Openvpn-devel] [PATCH 04/35] cleanup: memcmp.c: remove unused source
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 27 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> --- configure.ac |3 ---
memcmp.c| 43 -------------------------------------------2 files changed, 0 insertions(+), 46 deletions(-) delete mode 100644
memcmp.cconfigure.ac index 25dcc37..1c4d66c renamed from configure.ac +0
-0100644 --- a/configure.ac +++ b/configure.ac @@ -564,9 +564,6 @@ else
fi
-dnl Required library functions -AC_FUNC_MEMCMP - dnl dnl Check for
res_initdnl diff --gita/memcmp.cb/memcmp.cdeleted file mode 100644 index d921aac..0000000 ---a/memcmp.c+++/dev/null@@ -1,43 +0,0 @@ -/* - * OpenVPN -- An application to securely tunnel IP
networks - * over a single TCP/UDP port, with support for
SSL/TLS-based - * session authentication and key
exchange, - * packet encryption, packet authentication,
and - * packet compression. - * - * Copyright (C)
2002-2010 OpenVPN Technologies, Inc. <[email protected]...> - * - * 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of
Quoted 8 lines
the GNU General Public License - * along with this program (see the file COPYING included with this - * distribution); if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "
syshead.h" - -#include "memdbg.h" - -int -memcmp (const void *s1, const void *s2,size_tn) -{ - unsigned const char *p1 = s1, *p2 = s2; - int d; - - if (n) -
while (n-- > 0) - { - d = *p1++ - *p2++; - if (d != 0) - return
d; - } - return 0; -}
ACK.
Kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LRPAACgkQDC186MBRfrryIgCfZey8UxGKJWZRtLOcAnwyE4Ew nB0AoKFQCqaIam9Wb37VlP07dushqYqs
=CVAz
-----END PGP SIGNATURE-----
PATCH 5/35 build: correct place to alter WINVER is at build system
In reply to Alon Bar-Lev--- configure.ac | 2 +- syshead.h | 4 ---- win/msvc.mak.in | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-)
configure.ac +1 -1
@@ -342,7 +342,7 @@ case "$host" in ;; *-mingw*) AC_DEFINE(TARGET_WIN32, 1, [Are we running WIN32?]) - CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN" + CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501" OPENVPN_ADD_LIBS(-lgdi32) OPENVPN_ADD_LIBS(-lws2_32) OPENVPN_ADD_LIBS(-lwininet)
syshead.h +0 -4
@@ -28,10 +28,6 @@/* * Only include if not during configure */ -#ifdef WIN32 -/* PF_INET6: win32 ipv6 exists only after 0x0501 (XP) */ -#define WINVER 0x0501 -#endif #ifndef PACKAGE_NAME #include "config.h" #include "compat.h"
win/msvc.mak.in +1 -1
@@ -38,7 +38,7 @@ LIB_DIRS = -LIBPATH:$(OPENSSL)\lib -LIBPATH:$(POLARSSL)\build\library -LIBPATH:$ EXE = openvpn.exe CPP=cl.exe -CPP_ARG_COMMON=/nologo /W3 -DWIN32 -DWIN32_LEAN_AND_MEAN -D_CONSOLE -D_MBCS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS $(INCLUDE_DIRS) /FD /c +CPP_ARG_COMMON=/nologo /W3 -DWIN32 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501 -D_CONSOLE -D_MBCS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS $(INCLUDE_DIRS) /FD /c LINK32=link.exe
Signature · 1 line
1.7.3.4
Re: [Openvpn-devel] [PATCH 05/35] build: correct place to alter WINVER is at build system
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 29 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> --- configure.ac| 2 +-
syshead.h| 4 ---- win/msvc.mak.in | 2 +- 3
files changed, 2 insertions(+), 6 deletions(-)configure.ac index 1c4d66c..aa1d509 renamed from configure.ac +0
-0100644 --- a/configure.ac +++ b/configure.ac @@ -342,7 +342,7 @@ case "$host" in ;; *-mingw*) AC_DEFINE(TARGET_WIN32, 1, [Are we running
WIN32?]) - CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN" +
CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501"OPENVPN_ADD_LIBS(-lgdi32)OPENVPN_ADD_LIBS(-lws2_32)OPENVPN_ADD_LIBS(-lwininet)diff --gita/syshead.hb/syshead.hindex 0235abd..e8e70d2 100644 ---a/syshead.h+++b/syshead.h@@ -28,10 +28,6 @@ /* * Only include if not during configure */ -#ifdef WIN32 -/*PF_INET6: win32 ipv6 exists only after0x0501(XP) */ -#define WINVER0x0501-#endif #ifndefPACKAGE_NAME#include "config.h" #include "compat.h" diff --git a/win/msvc.mak.in b/win/msvc.mak.in index 191f370..43c3335 100644 --- a/win/msvc.mak.in +++ b/win/msvc.mak.in @@ -38,7 +38,7 @@LIB_DIRS= -LIBPATH:$(OPENSSL)\lib -LIBPATH:$(POLARSSL)\build\library -LIBPATH:$ EXE = openvpn.exeCPP=cl.exe -CPP_ARG_COMMON=/nologo /W3 -DWIN32 -DWIN32_LEAN_AND_MEAN
configure.ac index 1c4d66c..aa1d509 renamed from configure.ac +0
-2-D_CONSOLE -D_MBCS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS $(INCLUDE_DIRS)/FD /c +CPP_ARG_COMMON=/nologo /W3 -DWIN32 -DWIN32_LEAN_AND_MEAN
configure.ac index 1c4d66c..aa1d509 renamed from configure.ac +0
-2-DWINVER=0x0501 -D_CONSOLE -D_MBCS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS $(INCLUDE_DIRS)/FD /c
Quoted 2 lines
LINK32=link.exe
ACK.
Kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LRT4ACgkQDC186MBRfroHHwCfRYRV4pvQvDbGIYO8ODj2rU8i 0H4AniwZ45kaq/lG5W/1QGxj7UT7uE2b
=9b4K
-----END PGP SIGNATURE-----
PATCH 6/35 Update .gitignore
In reply to Alon Bar-Lev--- .gitignore | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
.gitignore +1 -0
@@ -5,6 +5,7 @@ *.obj *.pyc *.so +*~ .deps Makefile Makefile.in
Signature · 1 line
1.7.3.4
Re: [Openvpn-devel] [PATCH 06/35] Update .gitignore
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 7 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> --- .gitignore |1 + 1 files changed, 1 insertions(+), 0 deletions(-)
.gitignore index 3d12f5d..8cc07de 100644 --- renamed from .gitignore +0
-0a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ *.obj *.pyc *.so +*~ .deps
MakefileMakefile.in
ACK.
Kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LRUYACgkQDC186MBRfroV+wCglSwC6DGYbaMFnX8UM1z5rUj5 7dsAn3z7mYskOnLVfsALjIs6DE3U2RMA
=Z3OF
-----END PGP SIGNATURE-----
PATCH 7/35 build: tests do not work disable
In reply to Alon Bar-Lev--- Makefile.am | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
Makefile.am +3 -2
@@ -57,16 +57,17 @@ SUBDIRS = \ service-win32 \ install-win32 -TESTS = t_client.sh t_lpback.sh t_cltsrv.sh +test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh +#TESTS = $(test_scripts) sbin_PROGRAMS = openvpn dist_doc_DATA = \ management/management-notes.txt dist_noinst_SCRIPTS = \ - $(TESTS) \ doclean \ domake-win \ + $(test_scripts) \ t_cltsrv-down.sh \ configure_h.awk configure_log.awk
Signature · 1 line
1.7.3.4
Re: [Openvpn-devel] [PATCH 07/35] build: tests do not work disable
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 12 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> --- Makefile.am |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
Makefile.am index 26b80f3..f96eb45 100644 renamed from Makefile.am +0
-1--- a/Makefile.am +++ b/Makefile.am @@ -57,16 +57,17 @@ SUBDIRS = \service-win32 \ install-win32
-TESTS =
t_client.sht_lpback.sht_cltsrv.sh+test_scripts =t_client.sht_lpback.sht_cltsrv.sh+#TESTS = $(test_scripts)sbin_PROGRAMS= openvpn
Quoted 6 lines
dist_doc_DATA= \management/management-notes.txt
dist_noinst_SCRIPTS= \ - $(TESTS) \ doclean \ domake-win \ +
$(test_scripts) \t_cltsrv-down.sh\ configure_h.awk configure_log.awk
Which of these tests are not working? And how do they fail?
I'm running 'make check' before pushing a new git tree, and it passes fine for me. The only "exception" is t_client.sh (generated via t_client.sh.in) which depends on a configuration file (t_client.rc) - otherwise it is just skipped. This test is however run in our buildbot farm, AFAIR. Gert also runs this test in his development repos. So it's rather odd to hear that these tests fail.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LRl4ACgkQDC186MBRfrrWcQCgklcEZ8ATjLQqsQ9mxOFLbMjM 2FAAoI2cJAVd7GVdv9hO7TvkSSVCAPmK
=xG/s
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 07/35] build: tests do not work disable
Checkout the latest HEAD.
The tests were modified and it is now working.
Quoted 47 lines · David Sommerseth
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 12 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> --- Makefile.am |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
Makefile.am index 26b80f3..f96eb45 100644 renamed from Makefile.am +0
-1--- a/Makefile.am +++ b/Makefile.am @@ -57,16 +57,17 @@ SUBDIRS = \service-win32 \ install-win32
-TESTS =
t_client.sht_lpback.sht_cltsrv.sh+test_scripts =t_client.sht_lpback.sht_cltsrv.sh+#TESTS = $(test_scripts)sbin_PROGRAMS= openvpnQuoted 6 lines
dist_doc_DATA= \management/management-notes.txt
dist_noinst_SCRIPTS= \ - $(TESTS) \ doclean \ domake-win \ + $(test_scripts) \t_cltsrv-down.sh\ configure_h.awk configure_log.awkWhich of these tests are not working? And how do they fail?
I'm running 'make check' before pushing a new git tree, and it passes fine for me. The only "exception" is
t_client.sh(generated via t_client.sh.in) which depends on a configuration file (t_client.rc) - otherwise it is just skipped. This test is however run in our buildbot farm, AFAIR. Gert also runs this test in his development repos. So it's rather odd to hear that these tests fail.kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/iEYEARECAAYFAk9LRl4ACgkQDC186MBRfrrWcQCgklcEZ8ATjLQqsQ9mxOFLbMjM 2FAAoI2cJAVd7GVdv9hO7TvkSSVCAPmK
=xG/s
-----END PGP SIGNATURE-----
PATCH 8/35 build: handle printf style format in mingw
In reply to Alon Bar-Lev--- buffer.h | 12 ++++++++++-- error.h | 6 +++++- misc.h | 12 ++++++++++-- status.h | 6 +++++- 4 files changed, 30 insertions(+), 6 deletions(-)
buffer.h +10 -2
@@ -312,7 +312,11 @@ has_digit (const unsigned char* src)*/ bool buf_printf (struct buffer *buf, const char *format, ...)#ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 2, 3))) +#else + __attribute__ ((format (__printf__, 2, 3))) +#endif #endif ;
@@ -326,7 +330,11 @@ bool buf_puts (struct buffer *buf, const char *str);*/ bool openvpn_snprintf(char *str, size_t size, const char *format, ...)#ifdef __GNUC__ - __attribute__ ((format (printf, 3, 4))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 3, 4))) +#else + __attribute__ ((format (__printf__, 3, 4))) +#endif #endif ;
error.h +5 -1
@@ -178,7 +178,11 @@ bool dont_mute (unsigned int flags); /* check muting filter */ void x_msg (const unsigned int flags, const char *format, ...)#ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 2, 3))) +#else + __attribute__ ((format (__printf__, 2, 3))) +#endif #endif ;/* should be called via msg above */
misc.h +10 -2
@@ -435,13 +435,21 @@ void argv_printf_arglist (struct argv *a, const char *format, const unsigned int void argv_printf (struct argv *a, const char *format, ...) #ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 2, 3))) +#else + __attribute__ ((format (__printf__, 2, 3))) +#endif #endif ; void argv_printf_cat (struct argv *a, const char *format, ...) #ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 2, 3))) +#else + __attribute__ ((format (__printf__, 2, 3))) +#endif #endif ;
status.h +5 -1
@@ -77,7 +77,11 @@ void status_flush (struct status_output *so);bool status_close (struct status_output *so); void status_printf (struct status_output *so, const char *format, ...)#ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 2, 3))) +#else + __attribute__ ((format (__printf__, 2, 3))) +#endif #endif ;
Signature · 1 line
1.7.3.4
Re: [Openvpn-devel] [PATCH 08/35] build: handle printf style format in mingw
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 91 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...>--- buffer.h | 12 ++++++++++-- error.h | 6 +++++- misc.h | 12 ++++++++++-- status.h | 6 +++++- 4 files changed, 30 insertions(+), 6 deletions(-)buffer.h +10
-2@@ -312,7 +312,11 @@ has_digit (const unsigned char* src)*/ bool buf_printf (struct buffer *buf, const char *format, ...)#ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 2, 3))) +#else + __attribute__ ((format (__printf__, 2, 3))) +#endif #endif ;@@ -326,7 +330,11 @@ bool buf_puts (struct buffer *buf, const char *str);*/ bool openvpn_snprintf(char *str, size_t size, const char *format, ...)#ifdef __GNUC__ - __attribute__ ((format (printf, 3, 4))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 3, 4))) +#else + __attribute__ ((format (__printf__, 3, 4))) +#endif #endif ;error.h +5
-1@@ -178,7 +178,11 @@ bool dont_mute (unsigned int flags); /* check muting filter */ void x_msg (const unsigned int flags, const char *format, ...)#ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 2, 3))) +#else + __attribute__ ((format (__printf__, 2, 3))) +#endif #endif ;/* should be called via msg above */ misc.h +10
-2@@ -435,13 +435,21 @@ void argv_printf_arglist (struct argv *a, const char *format, const unsigned int void argv_printf (struct argv *a, const char *format, ...) #ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 2, 3))) +#else + __attribute__ ((format (__printf__, 2, 3))) +#endif #endif ; void argv_printf_cat (struct argv *a, const char *format, ...) #ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 2, 3))) +#else + __attribute__ ((format (__printf__, 2, 3))) +#endif #endif ;status.h +0
-0@@ -77,7 +77,11 @@ void status_flush (struct status_output *so);bool status_close (struct status_output *so);void status_printf (struct status_output *so,const char *format, ...)
status.h void status_flush (struct status_output *so); · line 87
Quoted 10 lines
status.h +5
-1#ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 2, 3))) +#else + __attribute__ ((format (__printf__, 2, 3))) +#endif #endif ;
ACK!
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LSM0ACgkQDC186MBRfrqI/QCePqdjVuyvhqEBEXcJb8IHaoBr dL4AoJnbRxUayMqsg17JgTb5CcQ1FsIV
=S8gc
-----END PGP SIGNATURE-----
PATCH 9/35 build: rename plugin directory to plugins
In reply to Alon Bar-LevThis to avoid conflit with plugin.c rules
--- Makefile.am | 3 +- plugin/README | 47 --- plugin/auth-pam/.svnignore | 1 - plugin/auth-pam/Makefile | 30 -- plugin/auth-pam/README | 74 ---- plugin/auth-pam/auth-pam.c | 804 ----------------------------------------- plugin/auth-pam/pamdl.c | 180 --------- plugin/auth-pam/pamdl.h | 7 - plugin/defer/README | 16 - plugin/defer/build | 14 - plugin/defer/simple.c | 305 ---------------- plugin/defer/simple.def | 6 - plugin/defer/winbuild | 18 - plugin/down-root/Makefile | 17 - plugin/down-root/README | 29 -- plugin/down-root/down-root.c | 553 ---------------------------- plugin/examples/README | 16 - plugin/examples/build | 14 - plugin/examples/log.c | 184 ---------- plugin/examples/log_v3.c | 249 ------------- plugin/examples/simple.c | 120 ------ plugin/examples/simple.def | 6 - plugin/examples/winbuild | 18 - plugins/README | 47 +++ plugins/auth-pam/.svnignore | 1 + plugins/auth-pam/Makefile | 30 ++ plugins/auth-pam/README | 74 ++++ plugins/auth-pam/auth-pam.c | 804 +++++++++++++++++++++++++++++++++++++++++ plugins/auth-pam/pamdl.c | 180 +++++++++ plugins/auth-pam/pamdl.h | 7 + plugins/defer/README | 16 + plugins/defer/build | 14 + plugins/defer/simple.c | 305 ++++++++++++++++ plugins/defer/simple.def | 6 + plugins/defer/winbuild | 18 + plugins/down-root/Makefile | 17 + plugins/down-root/README | 29 ++ plugins/down-root/down-root.c | 553 ++++++++++++++++++++++++++++ plugins/examples/README | 16 + plugins/examples/build | 14 + plugins/examples/log.c | 184 ++++++++++ plugins/examples/log_v3.c | 249 +++++++++++++ plugins/examples/simple.c | 120 ++++++ plugins/examples/simple.def | 6 + plugins/examples/winbuild | 18 + 45 files changed, 2709 insertions(+), 2710 deletions(-) delete mode 100644 plugin/README delete mode 100644 plugin/auth-pam/.svnignore delete mode 100755 plugin/auth-pam/Makefile delete mode 100644 plugin/auth-pam/README delete mode 100644 plugin/auth-pam/auth-pam.c delete mode 100644 plugin/auth-pam/pamdl.c delete mode 100644 plugin/auth-pam/pamdl.h delete mode 100644 plugin/defer/README delete mode 100755 plugin/defer/build delete mode 100644 plugin/defer/simple.c delete mode 100755 plugin/defer/simple.def delete mode 100755 plugin/defer/winbuild delete mode 100755 plugin/down-root/Makefile delete mode 100644 plugin/down-root/README delete mode 100644 plugin/down-root/down-root.c delete mode 100644 plugin/examples/README delete mode 100755 plugin/examples/build delete mode 100644 plugin/examples/log.c delete mode 100644 plugin/examples/log_v3.c delete mode 100644 plugin/examples/simple.c delete mode 100755 plugin/examples/simple.def delete mode 100755 plugin/examples/winbuild create mode 100644 plugins/README create mode 100644 plugins/auth-pam/.svnignore create mode 100755 plugins/auth-pam/Makefile create mode 100644 plugins/auth-pam/README create mode 100644 plugins/auth-pam/auth-pam.c create mode 100644 plugins/auth-pam/pamdl.c create mode 100644 plugins/auth-pam/pamdl.h create mode 100644 plugins/defer/README create mode 100755 plugins/defer/build create mode 100644 plugins/defer/simple.c create mode 100755 plugins/defer/simple.def create mode 100755 plugins/defer/winbuild create mode 100755 plugins/down-root/Makefile create mode 100644 plugins/down-root/README create mode 100644 plugins/down-root/down-root.c create mode 100644 plugins/examples/README create mode 100755 plugins/examples/build create mode 100644 plugins/examples/log.c create mode 100644 plugins/examples/log_v3.c create mode 100644 plugins/examples/simple.c create mode 100755 plugins/examples/simple.def create mode 100755 plugins/examples/winbuild
Makefile.am +1 -2
@@ -24,7 +24,6 @@ # LDADD = @LIBOBJS@ -.PHONY: plugin # This option prevents autoreconf from overriding our COPYING and # INSTALL targets:
@@ -49,7 +48,7 @@ EXTRA_DIST = \ tap-win32 \ contrib \ debug \ - plugin \ + plugins \ win SUBDIRS = \
plugin/README deleted +0 -47
47 lines not on this page · raw message
plugin/auth-pam/.svnignore deleted +0 -1
@@ -1 +0,0 @@ -*.so
plugin/auth-pam/Makefile deleted +0 -30
@@ -1,30 +0,0 @@ -# -# Build the OpenVPN auth-pam plugin module. -# - -# If PAM modules are not linked against libpam.so, set DLOPEN_PAM to 1. This -# must be done on SUSE 9.1, at least. -DLOPEN_PAM=0 - -ifeq ($(DLOPEN_PAM),1) - LIBPAM=-ldl -else - LIBPAM=-lpam -endif - -# This directory is where we will look for openvpn-plugin.h -INCLUDE=-I../.. - -CC_FLAGS=-O2 -Wall -DDLOPEN_PAM=$(DLOPEN_PAM) - -openvpn-auth-pam.so : auth-pam.o pamdl.o - gcc ${CC_FLAGS} -fPIC -shared -Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so auth-pam.o pamdl.o -lc $(LIBPAM) - -auth-pam.o : auth-pam.c pamdl.h - gcc ${CC_FLAGS} -fPIC -c ${INCLUDE} auth-pam.c - -pamdl.o : pamdl.c pamdl.h - gcc ${CC_FLAGS} -fPIC -c ${INCLUDE} pamdl.c - -clean : - rm -f *.o *.so
plugin/auth-pam/README deleted +0 -74
74 lines not on this page · raw message
plugin/auth-pam/auth-pam.c deleted +0 -804
804 lines not on this page · raw message
plugin/auth-pam/pamdl.c deleted +0 -180
180 lines not on this page · raw message
plugin/auth-pam/pamdl.h deleted +0 -7
@@ -1,7 +0,0 @@ -#if DLOPEN_PAM -#include <security/pam_appl.h> - -/* Dynamically load and unload the PAM library */ -int dlopen_pam (const char *so); -void dlclose_pam (void ); -#endif
plugin/defer/README deleted +0 -16
@@ -1,16 +0,0 @@ -OpenVPN plugin examples. - -Examples provided: - -simple.c -- using the --auth-user-pass-verify callback, - test deferred authentication. - -To build: - - ./build simple (Linux/BSD/etc.) - ./winbuild simple (MinGW on Windows) - -To use in OpenVPN, add to config file: - - plugin simple.so (Linux/BSD/etc.) - plugin simple.dll (MinGW on Windows)
plugin/defer/build deleted +0 -14
@@ -1,14 +0,0 @@ -#!/bin/sh - -# -# Build an OpenVPN plugin module on *nix. The argument should -# be the base name of the C source file (without the .c). -# - -# This directory is where we will look for openvpn-plugin.h -INCLUDE="-I../.." - -CC_FLAGS="-O2 -Wall -g" - -gcc $CC_FLAGS -fPIC -c $INCLUDE $1.c && \ -gcc $CC_FLAGS -fPIC -shared -Wl,-soname,$1.so -o $1.so $1.o -lc
plugin/defer/simple.c deleted +0 -305
305 lines not on this page · raw message
plugin/defer/simple.def deleted +0 -6
@@ -1,6 +0,0 @@ -LIBRARY OpenVPN_PLUGIN_SAMPLE -DESCRIPTION "Sample OpenVPN plug-in module." -EXPORTS - openvpn_plugin_open_v1 @1 - openvpn_plugin_func_v1 @2 - openvpn_plugin_close_v1 @3
plugin/defer/winbuild deleted +0 -18
@@ -1,18 +0,0 @@ -# -# Build an OpenVPN plugin module on Windows/MinGW. -# The argument should be the base name of the C source file -# (without the .c). -# - -# This directory is where we will look for openvpn-plugin.h -INCLUDE="-I.." - -CC_FLAGS="-O2 -Wall" - -gcc -DBUILD_DLL $CC_FLAGS $INCLUDE -c $1.c -gcc --disable-stdcall-fixup -mdll -DBUILD_DLL -o junk.tmp -Wl,--base-file,base.tmp $1.o -rm junk.tmp -dlltool --dllname $1.dll --base-file base.tmp --output-exp temp.exp --input-def $1.def -rm base.tmp -gcc --enable-stdcall-fixup -mdll -DBUILD_DLL -o $1.dll $1.o -Wl,temp.exp -rm temp.exp
plugin/down-root/Makefile deleted +0 -17
@@ -1,17 +0,0 @@ -# -# Build the OpenVPN down-root plugin module. -# - -# This directory is where we will look for openvpn-plugin.h -INCLUDE=-I../.. - -CC_FLAGS=-O2 -Wall - -down-root.so : down-root.o - gcc ${CC_FLAGS} -fPIC -shared -Wl,-soname,openvpn-down-root.so -o openvpn-down-root.so down-root.o -lc - -down-root.o : down-root.c - gcc ${CC_FLAGS} -fPIC -c ${INCLUDE} down-root.c - -clean : - rm -f *.o *.so
plugin/down-root/README deleted +0 -29
@@ -1,29 +0,0 @@ -down-root -- an OpenVPN Plugin Module - -SYNOPSIS - -The down-root module allows an OpenVPN configuration to -call a down script with root privileges, even when privileges -have been dropped using --user/--group/--chroot. - -This module uses a split privilege execution model which will -fork() before OpenVPN drops root privileges, at the point where -the --up script is usually called. The module will then remain -in a wait state until it receives a message from OpenVPN via -pipe to execute the down script. Thus, the down script will be -run in the same execution environment as the up script. - -BUILD - -Build this module with the "make" command. The plugin -module will be named openvpn-down-root.so - -USAGE - -To use this module, add to your OpenVPN config file: - - plugin openvpn-down-root.so "command ..." - -CAVEATS - -This module will only work on *nix systems, not Windows.
plugin/down-root/down-root.c deleted +0 -553
553 lines not on this page · raw message
plugin/examples/README deleted +0 -16
@@ -1,16 +0,0 @@ -OpenVPN plugin examples. - -Examples provided: - -simple.c -- using the --auth-user-pass-verify callback, verify - that the username/password is "foo"/"bar". - -To build: - - ./build simple (Linux/BSD/etc.) - ./winbuild simple (MinGW on Windows) - -To use in OpenVPN, add to config file: - - plugin simple.so (Linux/BSD/etc.) - plugin simple.dll (MinGW on Windows)
plugin/examples/build deleted +0 -14
@@ -1,14 +0,0 @@ -#!/bin/sh - -# -# Build an OpenVPN plugin module on *nix. The argument should -# be the base name of the C source file (without the .c). -# - -# This directory is where we will look for openvpn-plugin.h -INCLUDE="-I../.." - -CC_FLAGS="-O2 -Wall -g" - -gcc $CC_FLAGS -fPIC -c $INCLUDE $1.c && \ -gcc $CC_FLAGS -fPIC -shared -Wl,-soname,$1.so -o $1.so $1.o -lc
plugin/examples/log.c deleted +0 -184
184 lines not on this page · raw message
plugin/examples/log_v3.c deleted +0 -249
249 lines not on this page · raw message
plugin/examples/simple.c deleted +0 -120
120 lines not on this page · raw message
plugin/examples/simple.def deleted +0 -6
@@ -1,6 +0,0 @@ -LIBRARY OpenVPN_PLUGIN_SAMPLE -DESCRIPTION "Sample OpenVPN plug-in module." -EXPORTS - openvpn_plugin_open_v1 @1 - openvpn_plugin_func_v1 @2 - openvpn_plugin_close_v1 @3
plugin/examples/winbuild deleted +0 -18
@@ -1,18 +0,0 @@ -# -# Build an OpenVPN plugin module on Windows/MinGW. -# The argument should be the base name of the C source file -# (without the .c). -# - -# This directory is where we will look for openvpn-plugin.h -INCLUDE="-I.." - -CC_FLAGS="-O2 -Wall" - -gcc -DBUILD_DLL $CC_FLAGS $INCLUDE -c $1.c -gcc --disable-stdcall-fixup -mdll -DBUILD_DLL -o junk.tmp -Wl,--base-file,base.tmp $1.o -rm junk.tmp -dlltool --dllname $1.dll --base-file base.tmp --output-exp temp.exp --input-def $1.def -rm base.tmp -gcc --enable-stdcall-fixup -mdll -DBUILD_DLL -o $1.dll $1.o -Wl,temp.exp -rm temp.exp
plugins/README new file +47 -0
47 lines not on this page · raw message
plugins/auth-pam/.svnignore new file +1 -0
@@ -0,0 +1 @@ +*.so
plugins/auth-pam/Makefile new file +30 -0
@@ -0,0 +1,30 @@ +# +# Build the OpenVPN auth-pam plugin module. +# + +# If PAM modules are not linked against libpam.so, set DLOPEN_PAM to 1. This +# must be done on SUSE 9.1, at least. +DLOPEN_PAM=0 + +ifeq ($(DLOPEN_PAM),1) + LIBPAM=-ldl +else + LIBPAM=-lpam +endif + +# This directory is where we will look for openvpn-plugin.h +INCLUDE=-I../.. + +CC_FLAGS=-O2 -Wall -DDLOPEN_PAM=$(DLOPEN_PAM) + +openvpn-auth-pam.so : auth-pam.o pamdl.o + gcc ${CC_FLAGS} -fPIC -shared -Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so auth-pam.o pamdl.o -lc $(LIBPAM) + +auth-pam.o : auth-pam.c pamdl.h + gcc ${CC_FLAGS} -fPIC -c ${INCLUDE} auth-pam.c + +pamdl.o : pamdl.c pamdl.h + gcc ${CC_FLAGS} -fPIC -c ${INCLUDE} pamdl.c + +clean : + rm -f *.o *.so
plugins/auth-pam/README new file +74 -0
74 lines not on this page · raw message
plugins/auth-pam/auth-pam.c new file +804 -0
125 lines not on this page · raw message
plugins/auth-pam/pamdl.c new file +180 -0
180 lines not on this page · raw message
plugins/defer/simple.c new file +305 -0
305 lines not on this page · raw message
plugins/down-root/down-root.c new file +553 -0
553 lines not on this page · raw message
plugins/examples/log.c new file +184 -0
184 lines not on this page · raw message
plugins/examples/log_v3.c new file +249 -0
249 lines not on this page · raw message
plugins/examples/simple.c new file +120 -0
120 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.3.4
Part of the diff is not shown here. View the raw message.
Re: [Openvpn-devel] [PATCH 09/35] build: rename plugin directory to plugins
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 59 lines · Alon Bar-Lev
This to avoid conflit with
plugin.crulesSigned-off-by Alon Bar-Lev <[email protected]...> --- Makefile.am| 3 +- plugin/README | 47 --- plugin/auth-pam/.svnignore | 1 - plugin/auth-pam/Makefile | 30 -- plugin/auth-pam/README | 74 ---- plugin/auth-pam/auth-pam.c | 804 ----------------------------------------- plugin/auth-pam/pamdl.c | 180 --------- plugin/auth-pam/pamdl.h | 7 - plugin/defer/README | 16 - plugin/defer/build | 14 - plugin/defer/simple.c | 305 ---------------- plugin/defer/simple.def | 6 - plugin/defer/winbuild | 18 - plugin/down-root/Makefile | 17 - plugin/down-root/README | 29 -- plugin/down-root/down-root.c | 553 ---------------------------- plugin/examples/README | 16 - plugin/examples/build | 14 - plugin/examples/log.c | 184 ---------- plugin/examples/log_v3.c | 249 ------------- plugin/examples/simple.c | 120 ------ plugin/examples/simple.def | 6 - plugin/examples/winbuild | 18 - plugins/README | 47 +++ plugins/auth-pam/.svnignore | 1 + plugins/auth-pam/Makefile | 30 ++ plugins/auth-pam/README | 74 ++++ plugins/auth-pam/auth-pam.c | 804 +++++++++++++++++++++++++++++++++++++++++ plugins/auth-pam/pamdl.c | 180 +++++++++ plugins/auth-pam/pamdl.h | 7 + plugins/defer/README | 16 + plugins/defer/build | 14 + plugins/defer/simple.c | 305 ++++++++++++++++ plugins/defer/simple.def | 6 + plugins/defer/winbuild | 18 + plugins/down-root/Makefile | 17 + plugins/down-root/README | 29 ++ plugins/down-root/down-root.c | 553 ++++++++++++++++++++++++++++ plugins/examples/README | 16 + plugins/examples/build | 14 + plugins/examples/log.c | 184 ++++++++++ plugins/examples/log_v3.c | 249 +++++++++++++ plugins/examples/simple.c | 120 ++++++ plugins/examples/simple.def | 6 + plugins/examples/winbuild |18 + 45 files changed, 2709 insertions(+), 2710 deletions(-) delete mode 100644 plugin/README delete mode 100644 plugin/auth-pam/.svnignore delete mode 100755 plugin/auth-pam/Makefile delete mode 100644 plugin/auth-pam/README delete mode 100644
plugin/auth-pam/auth-pam.cdelete mode 100644plugin/auth-pam/pamdl.cdelete mode 100644plugin/auth-pam/pamdl.hdelete mode 100644 plugin/defer/README delete mode 100755 plugin/defer/build delete mode 100644plugin/defer/simple.cdelete mode 100755 plugin/defer/simple.def delete mode 100755 plugin/defer/winbuild delete mode 100755 plugin/down-root/Makefile delete mode 100644 plugin/down-root/README delete mode 100644plugin/down-root/down-root.cdelete mode 100644 plugin/examples/README delete mode 100755 plugin/examples/build delete mode 100644plugin/examples/log.cdelete mode 100644plugin/examples/log_v3.cdelete mode 100644plugin/examples/simple.cdelete mode 100755 plugin/examples/simple.def delete mode 100755 plugin/examples/winbuild create mode 100644 plugins/README create mode 100644 plugins/auth-pam/.svnignore create mode 100755 plugins/auth-pam/Makefile create mode 100644 plugins/auth-pam/README create mode 100644plugins/auth-pam/auth-pam.ccreate mode 100644plugins/auth-pam/pamdl.ccreate mode 100644plugins/auth-pam/pamdl.hcreate mode 100644 plugins/defer/README create mode 100755 plugins/defer/build create mode 100644plugins/defer/simple.ccreate mode 100755 plugins/defer/simple.def create mode 100755 plugins/defer/winbuild create mode 100755 plugins/down-root/Makefile
Quoted 8 lines
create mode 100644 plugins/down-root/README create mode 100644
plugins/down-root/down-root.ccreate mode 100644 plugins/examples/README create mode 100755 plugins/examples/build create mode 100644plugins/examples/log.ccreate mode 100644plugins/examples/log_v3.ccreate mode 100644plugins/examples/simple.ccreate mode 100755 plugins/examples/simple.def create mode 100755 plugins/examples/winbuild
ACK. I've not checked that files are not modified, but will check that more carefully when it is pulled into the tree.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LSWIACgkQDC186MBRfrofjACcDmONwrtbSxSR1kAqGA2QHVjn 6IQAni6jfx/gPtGsv1ousJKaj84XAICP
=NvNR
-----END PGP SIGNATURE-----
PATCH 10/35 build: plugins: properly use CFLAGS and LDFLAGS
In reply to Alon Bar-Lev--- plugins/auth-pam/Makefile | 9 +++++---- plugins/defer/build | 6 +++--- plugins/down-root/Makefile | 6 +++--- plugins/examples/build | 6 +++--- 4 files changed, 14 insertions(+), 13 deletions(-)
plugins/auth-pam/Makefile +5 -4
@@ -15,16 +15,17 @@ endif # This directory is where we will look for openvpn-plugin.h INCLUDE=-I../.. -CC_FLAGS=-O2 -Wall -DDLOPEN_PAM=$(DLOPEN_PAM) +CFLAGS=-O2 -Wall +DEFS = -DDLOPEN_PAM=$(DLOPEN_PAM) openvpn-auth-pam.so : auth-pam.o pamdl.o - gcc ${CC_FLAGS} -fPIC -shared -Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so auth-pam.o pamdl.o -lc $(LIBPAM) + gcc $(CFLAGS) -fPIC -shared $(LDFLAGS) -Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so auth-pam.o pamdl.o -lc $(LIBPAM) auth-pam.o : auth-pam.c pamdl.h - gcc ${CC_FLAGS} -fPIC -c ${INCLUDE} auth-pam.c + gcc $(CFLAGS) $(DEFS) -fPIC -c $(INCLUDE) auth-pam.c pamdl.o : pamdl.c pamdl.h - gcc ${CC_FLAGS} -fPIC -c ${INCLUDE} pamdl.c + gcc $(CFLAGS) $(DEFS) -fPIC -c $(INCLUDE) pamdl.c clean : rm -f *.o *.so
plugins/defer/build +3 -3
@@ -8,7 +8,7 @@ # This directory is where we will look for openvpn-plugin.h INCLUDE="-I../.." -CC_FLAGS="-O2 -Wall -g" +CFLAGS="${CFLAGS:--O2 -Wall -g}" -gcc $CC_FLAGS -fPIC -c $INCLUDE $1.c && \ -gcc $CC_FLAGS -fPIC -shared -Wl,-soname,$1.so -o $1.so $1.o -lc +gcc $CFLAGS -fPIC -c $INCLUDE $1.c && \ +gcc $CFLAGS -fPIC -shared $LDFLAGS -Wl,-soname,$1.so -o $1.so $1.o -lc
plugins/down-root/Makefile +3 -3
@@ -5,13 +5,13 @@ # This directory is where we will look for openvpn-plugin.h INCLUDE=-I../.. -CC_FLAGS=-O2 -Wall +CFLAGS=-O2 -Wall down-root.so : down-root.o - gcc ${CC_FLAGS} -fPIC -shared -Wl,-soname,openvpn-down-root.so -o openvpn-down-root.so down-root.o -lc + gcc $(CFLAGS) -fPIC -shared $(LDFLAGS) -Wl,-soname,openvpn-down-root.so -o openvpn-down-root.so down-root.o -lc down-root.o : down-root.c - gcc ${CC_FLAGS} -fPIC -c ${INCLUDE} down-root.c + gcc $(CFLAGS) -fPIC -c $(INCLUDE) down-root.c clean : rm -f *.o *.so
plugins/examples/build +3 -3
@@ -8,7 +8,7 @@ # This directory is where we will look for openvpn-plugin.h INCLUDE="-I../.." -CC_FLAGS="-O2 -Wall -g" +CFLAGS="${CFLAGS:--O2 -Wall -g}" -gcc $CC_FLAGS -fPIC -c $INCLUDE $1.c && \ -gcc $CC_FLAGS -fPIC -shared -Wl,-soname,$1.so -o $1.so $1.o -lc +gcc $CFLAGS -fPIC -c $INCLUDE $1.c && \ +gcc $CFLAGS -fPIC -shared ${LDFLAS} -Wl,-soname,$1.so -o $1.so $1.o -lc
Signature · 1 line
1.7.3.4
Re: [Openvpn-devel] [PATCH 10/35] build: plugins: properly use CFLAGS and LDFLAGS
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 65 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> ---plugins/auth-pam/Makefile | 9 +++++---- plugins/defer/build
| 6 +++--- plugins/down-root/Makefile | 6 +++--- plugins/examples/build | 6 +++--- 4 files changed, 14insertions(+), 13 deletions(-)
plugins/auth-pam/Makefile +0
-0b/plugins/auth-pam/Makefile @@ -15,16 +15,17 @@ endif # This directory is where we will look for
openvpn-plugin.hINCLUDE=-I../..-CC_FLAGS=-O2 -Wall -DDLOPEN_PAM=$(DLOPEN_PAM) +CFLAGS=-O2 -Wall +DEFS = -DDLOPEN_PAM=$(DLOPEN_PAM)
openvpn-auth-pam.so : auth-pam.o pamdl.o - gcc ${CC_FLAGS} -fPIC
-shared -Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so
auth-pam.o pamdl.o -lc $(LIBPAM) + gcc $(CFLAGS) -fPIC -shared
$(LDFLAGS) -Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so auth-pam.o pamdl.o -lc $(LIBPAM)auth-pam.o :
auth-pam.cpamdl.h- gcc ${CC_FLAGS} -fPIC -c ${INCLUDE}auth-pam.c+ gcc $(CFLAGS) $(DEFS) -fPIC -c $(INCLUDE)auth-pam.cpamdl.o :
pamdl.cpamdl.h- gcc ${CC_FLAGS} -fPIC -c ${INCLUDE}pamdl.c+ gcc $(CFLAGS) $(DEFS) -fPIC -c $(INCLUDE)pamdl.cclean : rm -f *.o *.so diff --git a/plugins/defer/build b/plugins/defer/build index 5907afa..cb650f3 100755 --- a/plugins/defer/build +++ b/plugins/defer/build @@ -8,7 +8,7 @@ # This directory is where we will look for
openvpn-plugin.hINCLUDE="-I../.."plugins/auth-pam/Makefile +0
-3-CC_FLAGS="-O2 -Wall -g" +CFLAGS="${CFLAGS:--O2 -Wall -g}" -gcc $CC_FLAGS -fPIC -c $INCLUDE $1.c && \ -gcc $CC_FLAGS -fPIC -shared -Wl,-soname,$1.so -o $1.so $1.o -lc +gcc $CFLAGS -fPIC -c$INCLUDE $1.c && \ +gcc $CFLAGS -fPIC -shared $LDFLAGS -Wl,-soname,$1.so -o $1.so $1.o -lc diff --git a/plugins/down-root/Makefile b/plugins/down-root/Makefile index 5ce4ffb..f8a183c 100755 --- a/plugins/down-root/Makefile +++ b/plugins/down-root/Makefile @@ -5,13 +5,13 @@ # This directory is where we will look for
openvpn-plugin.hINCLUDE=-I../..-CC_FLAGS=-O2 -Wall +CFLAGS=-O2 -Wall
down-root.so : down-root.o - gcc ${CC_FLAGS} -fPIC -shared
plugins/auth-pam/Makefile +0
-4-Wl,-soname,openvpn-down-root.so -o openvpn-down-root.so down-root.o -lc + gcc $(CFLAGS) -fPIC -shared $(LDFLAGS) -Wl,-soname,openvpn-down-root.so -o openvpn-down-root.so down-root.o -lcdown-root.o :
down-root.c- gcc ${CC_FLAGS} -fPIC -c ${INCLUDE}down-root.c+ gcc $(CFLAGS) -fPIC -c $(INCLUDE)down-root.cclean : rm -f *.o *.so diff --git a/plugins/examples/build b/plugins/examples/build index 5907afa..93e1936 100755 --- a/plugins/examples/build +++ b/plugins/examples/build @@ -8,7 +8,7 @@ # This directory is where we will look for
openvpn-plugin.hINCLUDE="-I../.."plugins/auth-pam/Makefile +0
-3-CC_FLAGS="-O2 -Wall -g" +CFLAGS="${CFLAGS:--O2 -Wall -g}" -gcc $CC_FLAGS -fPIC -c $INCLUDE $1.c && \ -gcc $CC_FLAGS -fPIC -shared -Wl,-soname,$1.so -o $1.so $1.o -lc +gcc $CFLAGS -fPIC -c
Quoted 2 lines
$INCLUDE $1.c && \ +gcc $CFLAGS -fPIC -shared ${LDFLAS} -Wl,-soname,$1.so -o $1.so $1.o -lc
ACK.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LSZMACgkQDC186MBRfrrtNgCgkEkksNlbExJPBynVkEXn5QNA 9RQAoIX4+5mbNoeKXlVKjE1qBlRrNLrv
=yG8v
-----END PGP SIGNATURE-----
PATCH 11/35 Remove install-win32
In reply to Alon Bar-Lev--- Makefile.am | 5 +- configure.ac | 3 - images/.svnignore | 2 - images/Makefile.am | 41 -- images/icon.ico | Bin 22486 -> 0 bytes images/install-whirl.bmp | Bin 25820 -> 0 bytes install-win32/.svnignore | 4 - install-win32/GetWindowsVersion.nsi | 109 ---- install-win32/Makefile.am | 97 ---- install-win32/build-pkcs11-helper.sh | 24 - install-win32/buildinstaller | 14 - install-win32/ddk-common | 2 - install-win32/doclean | 6 - install-win32/dosname.pl | 9 - install-win32/getgui | 19 - install-win32/getopenssl | 19 - install-win32/getpkcs11helper | 17 - install-win32/getprebuilt | 10 - install-win32/getxgui | 28 - install-win32/ifdef.pl | 53 -- install-win32/m4todef.pl | 15 - install-win32/macro.pl | 61 --- install-win32/makeopenvpn | 67 --- install-win32/maketap | 17 - install-win32/maketapinstall | 15 - install-win32/maketext | 59 --- install-win32/openssl/README.txt | 21 - install-win32/openssl/openssl097.patch | 68 --- install-win32/openssl/openssl098.patch | 56 -- install-win32/openvpn.nsi | 886 -------------------------------- install-win32/sample.ovpn | 103 ---- install-win32/setpath.nsi | 231 --------- install-win32/settings.in | 71 --- install-win32/trans.pl | 97 ---- install-win32/u2d.c | 20 - install-win32/winconfig | 18 - 36 files changed, 1 insertions(+), 2266 deletions(-) delete mode 100644 images/.svnignore delete mode 100644 images/Makefile.am delete mode 100755 images/icon.ico delete mode 100755 images/install-whirl.bmp delete mode 100644 install-win32/.svnignore delete mode 100644 install-win32/GetWindowsVersion.nsi delete mode 100644 install-win32/Makefile.am delete mode 100644 install-win32/build-pkcs11-helper.sh delete mode 100644 install-win32/buildinstaller delete mode 100644 install-win32/ddk-common delete mode 100644 install-win32/doclean delete mode 100644 install-win32/dosname.pl delete mode 100644 install-win32/getgui delete mode 100644 install-win32/getopenssl delete mode 100644 install-win32/getpkcs11helper delete mode 100644 install-win32/getprebuilt delete mode 100644 install-win32/getxgui delete mode 100644 install-win32/ifdef.pl delete mode 100644 install-win32/m4todef.pl delete mode 100644 install-win32/macro.pl delete mode 100755 install-win32/makeopenvpn delete mode 100644 install-win32/maketap delete mode 100644 install-win32/maketapinstall delete mode 100644 install-win32/maketext delete mode 100644 install-win32/openssl/README.txt delete mode 100644 install-win32/openssl/openssl097.patch delete mode 100644 install-win32/openssl/openssl098.patch delete mode 100755 install-win32/openvpn.nsi delete mode 100755 install-win32/sample.ovpn delete mode 100755 install-win32/setpath.nsi delete mode 100644 install-win32/settings.in delete mode 100644 install-win32/trans.pl delete mode 100755 install-win32/u2d.c delete mode 100644 install-win32/winconfig
Makefile.am +1 -4
@@ -51,10 +51,7 @@ EXTRA_DIST = \ plugins \ win -SUBDIRS = \ - images \ - service-win32 \ - install-win32 +SUBDIRS = service-win32 test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh #TESTS = $(test_scripts)
configure.ac +0 -3
@@ -988,8 +988,5 @@ AC_CONFIG_FILES([t_client.sh], [chmod +x t_client.sh]) AC_OUTPUT([ Makefile openvpn.spec - images/Makefile service-win32/Makefile - install-win32/Makefile - install-win32/settings ])
images/.svnignore deleted +0 -2
@@ -1,2 +0,0 @@ -Makefile -Makefile.in
images/Makefile.am deleted +0 -41
41 lines not on this page · raw message
images/icon.ico deleted binary +0 -0
zcmeHP2Xs$*PoC;=v7f_5_*>[email protected]...&#s6adn3Cc*gzDOq9}-B14RTxYJh<B [email protected]...?Io$vRX_vY=(vRO8Wp6E-?|3uq&[email protected]...?z?67p%7uBm?&Rf;3+Of z6cu7PYSGa~dscBFwxh3kbF*Dmh-U!?ezX7Aw<[email protected]...(OsOg=p4Nhz6KW z7SVt(@KH~gQP}?;I-4gqtY0hJy3&&5<K#Q^;z=UpR(nKb!+7-i!)_rW|r*xUWRP+ zx<__+H(mChnjxoc%$6T-&X!+o&z1+0_sQAYvgI}7(xunym2nF)WnNyMd}no*+_-+7 zOixdjhYuZ;[email protected]...)s6^o$I-c6E~6x_OhFkd!6YtXe4>zUGl_C#1_)[email protected]... zhY!h|JSo4}k}aS6E>k*ZdF4y<y)y0mdAakapXAfuc)=@E=Hz6{O&iwBT4Ox&NNS#Z zVV)N}*UGk7OM_QEaysO^?+dSt{n9HB>#_W$EM4PYqI1mA7;[email protected]...+H*WtF4~nX z&!0OdQ%>i}XCeQtojc_7pjGbk91)VP8>fjm+a1wlYhvPA8g2yxsdJ9!4$b*N47ln zSDswGYK0u~Q3lqUA#-zc<=vlq<>7+|WmZ<U{Qb9I<zsWbvc>pxITd?*{9K;A{[email protected]...| z<Gqv{dHM#%GxaX3D%jkB2h+T|MBSKVdX#gZx8-a9dPowwMVgHO|DT@{JFQYvu12; z*p=eOdhF%sP7yS8+*62uVZLr!&IgXzJ_}8(Y^I>2Oqbwk+vzbaD<F7~9o(i^I{Y z+Z_%^cv0uoHKH3kyR>jPqHc3IN;{if6&rhPb!SzF<E~l#}&?Mv3SZmYdajRi#QyO zoHw!Eo&<}ubvQ~mi#[email protected]...;Uy~A-1<F+voMVLZ zJ|H+s^lVj{<vr-{&5H3fAfBAFr!s5LN%Sv0c{$VD%Gyv4Q%R{?NUqH*=Rs#fMsW4 zqy3*<JARfw|F~Ty|CuX~9yuaw!)8sv@il$jvT!-Q+^9u^4p$0^3Kn^GTq}*w(<5) zGUVfPGiCQF8Ok1>_vXoAGre-}$y|97Hfa%T(t=$%@*db5+UL)<X3H6yU=v|?X%Bxp zkt_Sd*6oLl{vm0VvSou{r)cYGqnGT-ky$xX=HyD54cKusSFT>ULivG{=kw%1*z6y- zZI$C!X31BUWy$SZx5!zr[email protected]...+0!ZN&9kST4tVnc#c;# ze<NL{oXJx*@%6+kWh?1#{ycR-uOX=?D>9%^kz$C<41m*DIfUCE4LobmD$<Z^33Ve z@?O~PHt-9yrSu68e(jaJVXse~JR#5h^_NUJuwVHNhYLsgI4U#QGTn{o9S}?&K%~ [email protected]...n>NYcuxI=B?v=^=ewW>_pSRA)P(FgbXziNSa@MW<a$8Y$r-TQhRt7-oFo5C z%agzE{zdLPlEJ1nj^peB}bk;b4HH(K2ttDKNGlFa^B8t$eblTSyFD_vRNKGdPL6r z&!+#Qb_?&<{}g?<@2L}BBCJJ=u*V0q^Yz(lb*jawr_saqUZY;QA<7cQcr#SH6u0Bt z{j{qn+AkU7v8dK{m91c5TwlVYJ=9T#qPemUg+CK4v1+yUOKqUDv?vZucM&8kIsn zyP95aAjF{ViYS6cGmf|J<aSrMgMDSyczae|t}D^FkK?USX=wCO$a+1DdL-(DIDQ){ zql~VknuUA>gs^*QjIX)50&O-XH~bmj8VP4E4tl-<Km)kMA^h)^!8|QLxfSQ%;85y zU_6|)VrF;4%EoYacE*[email protected]...(u_b(}nw+?O-HhS5I8tb7j6c)IDBGedOpo7F$L+q? zU{JE68t3kG8m7mGKMM)3Rs*#RJ{+&pT8}^Qyfy9|XwWYPmOZ%i)h@^SPfj&*%&X4 zuBY_)AT-P!>{ZtoFIOLZHya31sJd$z{X?qXZ&uj(l&Ds%RX5hmX^m^BlLku1k?eNY z!P4+_scp=vS>[email protected]...#2<&P0f18D)kJE^2Kj5yB_L^p1$T$xLiH1 zd9>2VVs~{nM_sO=Y65i8_ZZ7I+A#(_cUj-Cz1H94=Wfv3-mUAzF<yAQQDG0kGdkc zW7gBwR5LwXv%NKBR_b1BoG38vFLIa$tFhiy4SQRS+YatCvULL^^XVs?Ka~Srj+*r ztT?3v8h%e>#[email protected]...*!fCy~^j)r!(H5Zyk;NY#!?>4-6yb1|[email protected]... z$aBsim&!yg$b9iA@+12E7vV1%TWs6BS$=}tkvZS-qetZ)<Ut3LlT}VdU(ML02l6uJ zP0almTWn0pRWZdm#6KCxCx1SYE1#T~DZfMPlMVmtNlTNASAIEEAK<D$Jm4M&Y5(? z8t~t(-%3~U5c4j^MvR*n|Im-$JS{+MBK9taR+0UImmr~*|9^#J&c_g6V!Rxqv8t2 z3XDr8ArE9OS|2%PC&WLDZ5VIt+cv9>lj-wwqpFln1C_PG30%x|NK+MXk8|!%Qp~H [email protected]...?!u*mk*pWXDs~B*@+8<Pwt3?QnSp$nxiRzJ-Me<m)U#(*[email protected]...)xe z&B#[email protected]...^?EQ6*Jagu>?2WvA+zRBc$Uzy;F{geTIr?Pepa12a|68#HUfF*v z_OY2PquSot;nWgcj;2S*29AvTwo0^KzFxyX!jHs*Rtt_;}`Ul^5Kt+xM0-QaSffb z+g-zl&j<znk}=T*Pt86z8ixNFAO4*Rt5c82au=Z2d(q{hzlBHcWliX<I^bf9GuE;{ zS9XK_uN0-auGaW1pHS^E3=O@;j_tl;C>_cGV*yWV{HqmCR3(m;w@)ZnoLw$gV}(#w z<5ySBGDaZP&nA-goV67~1&x1?YCdStauv50UBc{f#ndE5M0az75h*s(qbh*H_!Wb6 zPgRDDZg*D$|EVTy)O<{j_UOpA+iekWxfsq^@ra7t+}[email protected]...&[email protected]...|-Fm^wudhRml z*HVpJEOeKv9ee87Iv!OhO|McDs;[email protected]...{L{H*h)mJs#;l6PfR`8^+ zSxI|$rJ~(U<*eDkhcV3UhTiDMI4-yIftHH?aFf9e12lrGTg_X|I1F9J?z=0fXqhv5 z4K^eyV&UI-T~Xie^iiWvDB+22y<a-a!n97l?J8+#)V&6(@z;1^nhA?R2}>7T_bdId zX+Nf1WxT+?6-P!|Q;pN>Z6_ZWXQTpV)[email protected]...?lS}5@?Wj5v+!KCj9O8cfV)OEYf zTu5d0N*#2nT^|x$lv}LI^omEJE~anmsh82DZiR^l~WOU)<Oy|W>sBAI9J0?-gqNz zDqY2VJ2|Vrq7A8hq$<&6;;;|AI-YP+pjt*F(Y!jD_RrUnhIoE10acJcJ;[email protected]... [email protected]...<)8Luzi_z~5rU9a9=PI_9PaLRNE9-4{xdvJ$!{DU;w(z0% zpg}V;E7jXvhvF7~P2YjKT+P{C#%[email protected]...=bberpVP*BfcX>XZaE~7Ezs*?bHGp z8s>gHT6d_jQg~gaqVD<)Us4&YH7GRic2<{JDPO#F={BwXdy%b~kMAY$$Fa2y{WWIL zC0yjV4S{zU%$;[email protected]...|_U*#SZEiP3w~C-^sACt#oYL5)C;1taHx<#MZB$zI zx0znwi~*JNi*B1$G74C&!~w;0lmAP)T;4A{S1Ey^Z}JhcP@~&p5cxv([email protected]...%9Z<9 zDONOqdi$kA|26;R9mxN?WwgOPz<oM?D-#yDJfiQr$HcN_iN#i}SpF6AnL{QlOkBRK z%;5J9i|DvCAHIDq>!Ur-N5^}b&G>Fp*ox&#*E1g?puT7J;QOR#-zmn=LPT!w|M$! zOh=!L9+ftH^z2_m;?l)q_58$TOQwyV^D}u5R5%HqFHjb-(RkYI=lmJ>eQ-cv&aJlj zBOdv9pTO973opUrGUwMsdEV-GdA4;[email protected]...*0ci$OMhNm5Ixm_kQ~r[email protected]...<Fhi z>j0jy_2q%boxW^7t5C|jmF$F054=|{FuRi5O8yC[email protected]... zwfvAHdGWH9Q60yh6wxlv8Vf(cvl{h3toEq1$q&ug&%GO|=jsxDFDV&bN*ib4CwLB{ ze#mN%N_%g_M{53~dY&#Z|M^ER+(XX&-kR_B{CM5iKPmr}IP;(NT%JGVuiE~NQ<Q(b zg`eQzem-GqOYHG|L#[email protected]...^[email protected]...<y49+|&*<rQ~NJ;?nZ0^B?s{wUO|0#a>#>A;I^ zJ@&L1J}p^1Fg;mtPtkWLaD3;S;PIdx1E4-X3{bxtTP4<lv-|)[email protected]...<*Pi zU6>dECqGT!+z<WcYC4ai|5Ok<XD~)x*Z6_T>KGphm=8E$!gna20z?7w&GAMFkrFP% zT73KPG9Utf>0bEJ=lSL;YmWo<J*TM;HN|iky_69J_1AL?{=)=;Rh3bk3ZiF+N09M zgt<RacLnq&0^kHp11tfo1JIr<1<U|E1}Fo)5}z*INV{Wz-XzV5o{cum8lOV(HT5 z<R1=51}OU#pv*=ebzBUeet^1_Z%+%w*N};N-3q!UCeQnkwu>@M4Zv5+vxdB9Em|*P zMuYcg56}FLOW+%cIa2C)90dJN)u0gx>uh;Y!LoqDdX6$chIJC?b<GXj([email protected]...<c zcuN8L9r=>IB4=8f@=fs)<O6Wrk*I94w*q?w2jUN)GGsm$xsaAi*0i#!(RBVqRn4F zBNi=NC17*QfdBCTGVtsh!aj>W?;NK+BOjj)HYTLxW0m92xKdAaE|q<%QK<V<{qpL zz&{1NBj+z&BO1Jt%Cj#AJ|_TrA9YC|8Hj)H0JwV2AfD%Ib9QMRcq;(^MU?Hs1zYsm zuMI-aUnjZmJA>fAL;j8rmH(y=3<|(Mj%WYE=f7&*dngD!X{?S4hw?IJ($h&?E2OT zo<I551!Vcj(1W^v$NPsge|t=!_t9R7V{j!07(G*n7vLv9uxgyn$m0222h6IZ2Zro zUY=v_S-S;sG3RQ)o*;C&-$enn0a-!t2J*v^5zM#V2RRy@*V;>VdL*XeK_}K(b7b5 z6YQn={&xjkdt75*7wfG6v~m9Zy1kuxUq2yLeE$6gZU0[email protected]...)ums6pGVc#tNK{R{i ztiXHAeMk&KpMEviIlaJjJo0g}SZ?^An}YDxGB}9)>}S8}J#Yl!KLcZP3mhNq=}5i% zVEz{U-Y15@|[email protected]...)dilJ{SW3v%sx5 zcgYW;&X~W*pL%$%03PemU(orGfBk6ipS4KwFAClVLg0TI{3}og>Wn$3JXR<|625a zUBDQ1uq*ff{rTIp?kx;~|3>QI#|t+bZwBh4d~coQ?1)9>1$pG*!%4D(bT{D5lfi* z*Cho0w-R^cOqJJA|1XSTef*|j{FWg6cjF8q>[email protected]...<@4=HnWO$i2Xx8HOqTv|4 zf7HK(d~v;fZLB{4V4jr$@E_Cd;XH%3<Ng%iEMBc;=mr_S1^f=!2lyV)pS+P{h#nK* ze~s8n#~+%Oz2uoR1yDwRpKr%Ijq!%0*M96N@!@>z1NN7^pl1<)qO5bzXMVRqbcc^H zc{BE69%ZLxuW!LvIDq_b4uZ!ydjU<j54CU>&T0F_q;I#0FTY=>-iO>Z50oFlq~A; zeKXe0{AJrkXgV=Y-UQ0Q*u*ZMf1Ud<0%uxG*>=bhJ%)4PYgmV#Vyp;o?gAXS2(4c+ zUL2tLvuqD2$WGa1*#*[email protected]...}8>_wc7PqXpn5;x*[email protected]...?Kt-O zqyl([email protected]...%Uzl8EfhF1}Yg7eD)8>@EvHDx(IK(Jn_KIxlD3Q0G)[email protected]... z#GEyMLk7O%[email protected]...$=~xPJxtF}seW18*5%DBx1o98AV2(4;JU|Goq;eju;e0Q#}p z0JQ<ZXyhA{DUp(pH?pkTJF;w4>d3O?Qks{IOley>GO2C#@c6dX!w8~7bs?UwiOU6C zFz}LrmlM2jP?rwo#luKkJOC&DhEXCu${Q9RnG%+S>xmR0A_=KNl*<t!Do+Tvj2DV; z{_l38g?j23h5c_~)}(L|dp3FPtnx=@&cL|22%rX_JAii;Zvtil<^a9{d<J+MKp)!& z5Ch<y2j{97aNy)4+Q#SG$3n|@u``12uH<5*kNuxs-u1;BJ79buU(?0k<K5zEaFv zvRbrw?X<wX**10UK{*UXZYjA$VqHxz<Z;M$*sqk<CLcS^zppE<z2{S-)k+euWSw; zjT9gF)i=NS*?tCN3L*ar%Fex?jTpLCf{KSJe<eUMc>Esa;%H~|3v`fIob#n7jWOW zf0PBl*iG;6#md(?hjVRrN|ci}H4E?-pd{dO$X*6?<^!}XU7+YfhkCw!T<xJLe?^pM zLR>=+B|l=rhi4?~e2}[email protected]...^(u<jrLQ9z^XY4}>?{ueBAEj>dNoxnSi0K2hD{;J ze-1cTQ-11CpLg&(2je_L#&7+2{f2f6b4=reTGqfk&bQ0XI(>gb#CD4BlzCPTMjd)D z1o^iCCycVsMJ}jfV<R7l1l|1s_?<)[email protected]...!dCLVQ<Ijq0zx;<FY<NfJO>;9DTJ3^5E zW8f&8KV{x_``*_B&Flhr{*Hd;+o7z1v1Y+{55}6ND_XEYw)<Dg-x82_ku^L>`I##{ z^C|8^e0FmfXzKk5R5A|<<(+=)B6LXm7eEpEn^ySU2fsCGKTrm;1-iqv+oLv=pLd#E zyO~#UUuTBE_f6mgI|J(cnGopkx2PI?2Y8>)J21*axd5vHc6sgf(-^BrpT{+G?WWJA zecllQU)t7|fP&WWNeDFb+4fa*[email protected]...>KYi!rs<&v1_wGy1%~OQ;E2jBhpV zVC72SQOEt)a2@(L!?3auPPdl|3Tw7RK5R0gUCOL^3!j<t?q-Dm6^OlJSFL5g?& zHOwjjd([email protected]...HN1fSdx>aF3E7?=FA$vAw&&[email protected]...=A) zaE%-WciOz$rahr-fJndrfL-rd=bD-U)c*7CPTfrydqRMZU*[email protected]...*@|<SfM8 z1Hdh(=HgC<zkkog{T2NYWiuhreeN-gac#<0En1Rj_+IFrDF^RrHUk358>sIUa~|j0 z<C{RZ_CCXR!FDztb4Gl&(7J!8>{O([email protected]...#zj0qxbCMXN<y+@0CthxU*q z)ZBg>aA~)AcW?w?m$9Ha?}&=1*a3S#9[email protected]...{V<@Rr<0;dl^>D))S|BQ*Z z>=5^IX^65g7N*^50tnUaya-&Sw*w{}vD<vcV~0YJU9W{PTqC^($FvmtyD$_y3fe#a z{$9Wh)pl>&6UqWylA^S=iUeV?OMz1Uou})dqDrk%iVQMw}DMeF)dgbDuZ3e^4s zxFzW?jo*B&[email protected]...?_%v-%xTCqtV~Q4o!(O4>gacQ6L<xZ!M~69SIl+%vbKT zfv4h?0h5l}?M=^1kX^6se#%dOc9-w>O|D^Dh%zx|nh_!{?~;_Bl9w%Sbp8$bUsm$N zcknwXn?D#AqD*suH$6n$ueJPlPR%F(eSbs#1T8<m!?MZ$Mj>Ph6?cu2A9l0fyZQ8| z)8CN)E+s$oX9&L)^!c(-<4EexBO$K!B=E{I?``[email protected]...{77fTHo!Z7qUk)mR1e zg=lAdt47^tEb()QGEvX?n?s=YHBetW?Yky?V}1KX#I(k&frtM_xuen+HLu;D9A(K z6o|in-^0MG4=5<_^vCC2u([email protected]...|X+<;([email protected]...|w)#>Z1YWaue*PRg|%1+t3 [email protected]...(SL7puktbxBv8gVG>&P05_rQ#ps4ubl#F+^GD<8)5{ zMTm2_X1*VSMvAU4;E~-ub~uVqfI#&U>(ehCju%1RP6Kl!gZqQ%[email protected]...) z9Ba)voLiWf<23NAtGS3H8sqom_wgMB<2c)0F7x;f0NR&(09^qU0en}[email protected]... zw#A;MK$G_*{yJMw+la-umkFLL0F<jBT>t(bfLjuv12e_eF0rswp__(TZfXDGP939 zk8$(3uYVFvUOr>Ld!WssfAr^[email protected]...#tL&e{apKExp5c5fQA)qwChV6B%E|{#?Sdl z%wLkE;tR^FWnPGHgeK12CT^[email protected]...%6tf3MU!r^~wN3-t~_(^-u<(H1S< zW5U1DKlHDCcoLb<NbryCwDeggI{E8{[email protected]...=@lZ}R!pJk}N*v{t^<~<H5 zW6|XIO_YXlz=sv-#lqv#ejPcAO&Ej6-xapi_e8;Pyu6yEcWb?g!8xb_DQu2ra8F znKSc_#tmQ|[email protected]...)pwC%ijChGybN2Pu+b~*;I<6KJpY0wBHvwz<^ zmx0%%$QNu5_kniGU)F-!-~K;Z1M{&Gg^-<VqQ26;1lyB;V{A8Mr~xQwpM&*t4TZID [email protected]...!DI|&>}}AvoN|Ri>r3!7V#U8NKi9~6x8#3e9Vfu!AwVemT3DQlp!+%? z4G_v676vB=G^YYCRo4r%7RF8!0o<#?$QTGW6*N8pv<4JLhRcC_C3sS=J_RuLWn36Y zMtdLkIR)@F;9h_ci~sww>&rd4P(GQfDr)RZ!@NSA3&XB-g6V65uhZ%fBq%4rHl{b z|2ouHCK>HxN#V!X|5{SL6(t8;VCHd!c)Ri+(P7_OzI?rH#{XWDGHx2vBYOesbNN$ z5|$bn&(E2{Qp?5jb0&L<e^V9DHp_5txg?g6DUm4x5BT7FCVbHZjC>_{u?=29OUjUM zo=L}~8&5t4-zdcwtBprH2|FMtr*P-7Oc7CDLHYTwz)%AP2S*[email protected]...!+9s>D9v+bev1 hg?)-gDe+$tKG0&Bf+ewp&~VaM_MRlQaJbh{{ZxLA(a3C
images/install-whirl.bmp deleted binary +0 -0
z=gc{0#_F|S=)U<p@53#68>%G-&Op3%[email protected]...{F{T8^3N8Kgq7ba=RgI+RSqD- [email protected][email protected]...!Ep6+VD-<SB8L?WS3d_<{|qW}Si$gr;6Nq_ z=H}-73fW91m&@j|S-<einKP$P&-f*p&t|iUPeUgLdyaQgt~6xmWqN8dm&<8kKA(ps zlgTX1&ugJ((&@8j&z{j&GPAR}nVD([email protected]...#~xb?Ch+*[email protected]...%=ENRL*ew) z6kYganrA$;[email protected]...~vy?M>=0*GY!XEkbCdy%RQ^V<*0&tGCxApb*0D?{eZZ<X4 [email protected]...+4=4<5~!1{gK1XjrDL{3%k2IJC7ZO<ytaw>[email protected]... z42>K*cz~|8q_g8#ecfSdY02coc-`Sz3V~Y-k9T+ZgQ1)mH8([email protected]...$nDnoN8%m93LCi z5<fFGHoABBPC)Yu+gn>E#>e~;@*T(8>8r7!jw*>yZz6{DpTMxKwYj^i1D5NcCMPE# z>*?;Ao6BpVWLWX7%}vL<ItK^(_0vFqA1%P7bULkttu0OPa(pai189IM-31<*($glZ zgC(vdbky6^4MbXETIe|1*3yiU(88{cV?D<iYOGuu>+7bbCVjoo-CsH+~|*4tCQ*K z?AX6|_vpwezmQ&72*X1se0ioXrm%Zws(3lPSr~!<ixOf!7@@NJv=m|g_%qM+JXf z@3-Fs!Ai!RO-G=m97Z)^1#iGpowX_}sng<)!Pf)ap2scLJQVG$vvevgCweT;2# zA|5Sy&;VFpTu%)2qXHPSHf0cNYCL-;*38Hxn4BCQRvOJPn5Kq$v;YKJNQPI&gKF?K z{L%K-+5[email protected]...>Lv%3X8fOWNoMJ_?#CctmAO2YUJZt*Mp<3qW<FhH;RRY z1;1h<zw}onE|W~@=ZdiPAyu++GQ}1B_2sv~mfLacD7yflOG}t-PzjQi01b<TjUU> zGc-8h>lbOQJPcWXdv;dus;=6V+Og9<2sOIJAJNiz<{>|y%pap){(q8RSa9YMnFR7a zr03*DX$;#&!n4s1fo}EzH2LZ(<XxK2&xalH-gC|_D+F&a2TEXgXVu)[email protected]...~cyu zKobc>6nCWzhH5*Foei(pl=<C%^7Bh+!8dr|mFAQKMHnJw{4$&+uHQYlBzXovDs z)a=1#LuEf28%cdoGG}sH#~nK$Tm!&z?>CHKr#7wQn-)nFxDHC&Qrv2SbNakeLb$ zef-$!=GC^4C?AeY#fh{fuw*A=yP}}w6VtZYNi&%2A{I^oF>{os*iQE8a9Q-{Z}>h< zB9Hruk!%|RhQnt4TT{#|MC4^X|o7J06gCSm<E%zug7!5fJ6>uKLo?WwFh)i5AL5A zdeU2-pDmWgku%|yn=%(~2;{kGYk^Cy?f98LADLJBb7VFK-+0<7{[email protected]...(%;>- z$Z}$Xc;D}Xi#M8)Ty|H$>k_}Q(NWf|JXorwD6xkQ9jw7#5K27QQj~r<MxHi~c=+b7 zPevX?)KS_lik;^|[email protected]...}?^VPpZ8)[email protected]...#ae0t^{_eLb@>(BQG?k&V-lV z9U$03^M%LGjo}lA=7rcSsCCpe%gSa<Bk;Kbi)?c;2(C*xle1;-+Cq<ybksIFWMDq zYhAcLXpWtDC5bcmbxhf;-0G_OBZuM-g*j}sgEjk<67#$8{HkShE^ubuC%+lsuYHp zeYg}({n?QeyP6(`btl4$)*Egq^AMitD1vZuc!=KINK-p>HRR^PPdu2_DpZFz2VyVW z%;[email protected]...&b7Q#Wu#s&UjGqdCHg&*~ziF$3YtwF7gQg-HA;CQ+c;PyoUGVlh zg4U#~71tnkf_Nx0NJ1j|rliQBVRM8w;T-+6M5ep5LzzkAzANb0B4Q+DB0A)8N__(I z9)@3kDkp4Ho{_1IqF#iqP#3Z&X=x_%ppTA(7p{*4!{[email protected]...@pasL%YYS z^g3x=hcw#mY<hu}[email protected]...+hm2qrGTJ3^B!(Z6Yv)a}vyxSLD!%ij|YP z(h}=eH+n5)g*>$bM{Q9I2~+S%Z4enxu~v^T+}{_%E&G_2Dw%g}jI|983|e3IL+l&f [email protected]...~cU~Lu08<Ss-qRBssa6g%+IYDbMsi4l*vSpUVZ)GpB%|qY*ck;-kwaO4R7vcI zHT?@Bgb>Jbxaf{_Yw7)vIEDdkxR_<6JDId(8{[email protected]...?!oU7e<ig&m-Zbtx_)O$p9! zBvucW(52|ZpTC+nlQWO#D3d;2AIIn!uS|>f2s8Uj>bVB=o}q_xuyY{@vi9WQV7b# z5K7yuX?g3Bf|2;W}[email protected]...#zYW5W9y$|G8*=x|A+OD$sAJ8}o>?*gP>izdOl0 zTCs4!La1c>DP7kg=yc)p%<PLGQxHW9T}6iX$cHjj-PlCIWY^=a?U_;<CF2OMLd|W zq><~WPoidiWEbVB?2#6(xi1q$8<Of$5rFHTh+Foj<>$9}HVq9vURxH1n+%3-3Tw8- z81Cy0FAxnJ=^93|gf1QE>vaIy3f&d33&N~l)Tt9LPM=<<Rbj%[email protected]... zBZ<[email protected]...&cE|cU85q0>1P|[email protected]...*[email protected]...#{)cUI0UwEf0BC`LQT?qZkUj zpMNw<SYR>;PiI3^[email protected]...<gk1Lu=E>7;b$b#*htDx|TsoiY{#_Vbh>!n5ItIak0AU z!2Z3(@j>4%rOFZ(tUps@([email protected]...;@)K#B{[email protected]...*tDUxXE zLC-<(mvPA~pQ62SU6AT>t3WYy%v+zvNqhf2nJYI1AA2Bk<C8fwc~wL#6GaYHDNyUF zx^[email protected]...%o+Z~2GIu{hccitH=HS=oZaB&Pd7ZHskQ|3IASD7zq;+%-lIt([email protected]...+Je zZhl^D8i6H&A*TwmPf99-5eP_2*rn`UOj;N$Jow-}!9;YTLR{3$AR42Or<!U=)Q9iQ zD66EYzqQ5~;#)|e_Cm(X8@^&U5@?a%lh(J8!I0uo{@}$~ygT!3=gBeV(fBmh)l%Pr zD&O1gR5{+G_QhiP$h~gYC}q=ddg&OJ+956l;zx-Tati4>i~b{asQ^xj4#dspAu56w zjo2jgq|~z*8qX8Pf|4FBvqRCHWw<+Dz>{Pc(mwPh<nZ>t#jzP?&y4X5CnI(eQ4p!u zdB|)?X<kM|gzhSfp>mzfOD#[email protected]...+KP<~jJnbVUIoIR_*uKu zEf&z>&tBmvI&!Z=#QE1i4gghM$CR#WS3e%YILR&bO8#PGK}QNR&8?WUF6VkJ#rDX zx(Eea(tVp1%_G$r%mlrPNTFh2#&V5as5ODh*zEx7_NOisY@@}5D?*%->H+sQd_n z8K9&%{z5|t6c593%d#9kp~PGZv5#*Uj7)y}nH+JH>z~M7ez%ccd4#pwn~d5ty3|?7 z244AOVKl(<ynAENA0P5cKcUJY^gnvZV94Gpbx9xCH^%}IPnE_O_3@BCz-679eO9V zgCjc{866pMv$lmgYw1<x(C4&iMB1?eOm%D>?!>r(YTV0oB>tgMD)bJeaGR7M1NV)H zEl7!sVQ?TB^|Sur*[email protected]...&<rXXj$|m*wFO)-$vw6O?7*hz>{|Cj z>EcVCT{<&{6&aYs?tFW&?a%4#g1{3Izw7VHKE#[email protected]...{786&=hB?wTP)!lAXR78am zM;}ic45j*_z6F-2G7J?bcLtcI3HcjXj7H^RkoHIhN3OPJzt%F0vb>5p7MVvJl}U) zO=BqyVnz<[email protected]...%XZG;O6w9n-Sp_ET0<nYj7_|ZQ(4HNOn975<wnTm1nqb0&r zh)nob%zpUSf)EIeT(K$8IGy;1hI1C)FFp}ljAo2M_}<?;>4FAbm&=F5ylKP^#=!OE zt+*kmjBr+vmnFsvsd!JF9>b5<m41sfZljumz9DV9qOx0^$=h;bjqq#d2tmXX35T z_Yyd2cbKFK&TMGY$YG6%wV5YXMeGzo<-v|Pf|G8sVmjFA|+!M45b_lkvC+X>W0h` zb4^1ixu6qszT|$0Me;of274=>Democ%8<rbi*&+Nc*yw9VNHK1#-7LZ;1<utMh?-L zvieDjef&>9Y|[email protected]...!4Ne7Mtf%YcBvpnT_bNUDi>URU*?SUNezbRd^^ozyL5DP zL^y33S;d_@;UX!R2)_j=kr4Ts*blijq_vPbE~!bIf(+Ms<SXW&!pnxqEf*wRX!}A [email protected]...|v?mXJeQW$#[email protected]...{TX!K(m!^>k3ZlHKX{{!s6j(@(WO=-j8GM0c&&|^ zOLZ_r={XD|hyAhI5JXi;3U?j9mx4Nb2hjOowcwGRR^dAAZY<C*570@)ZrYQ%wlm zN(ek|td9?vk{A}oOF8!g5C>y5m08c3XNUrMAulqHjZh9&?-BEG&(ccB#j!kQd%0r zbT0hlW~WY-2h8=8o3n=oV<ceCBsR;ryh!p65);1%EX~IgQ1>[email protected]...)?WZ-;[email protected]... zHCmmo=u&}H(x>Z7j=^s#!jP3>8Wapa{ZK|D2?J9uy35yuZ-Hj1*}Dg33%9uDqY}r zTX^?)~%9Hf}vA#&#))wSgG>j%[email protected]...$#iOWQ3~l=uiDVQ!!Xjxr7?u| z)uVB&1<ol8Veqg2m9HNP!C8I;(Fi}YBXN={WQu_7c)k!)MKH8&n%(Jhk7hZJ?;Z~c zV?Wz4f9-?uDuCw4e>dpkTS%J*inRf!OTYSO{+F-iCDqKYY>8eB5Dc}VWL|2C;{%vM z$RQ2#By1YdmS(wIZgCCF%{KZE_PKmAX{xF(x=tkVQUQT95vL(ci94bd@%`k!lbk(K zt{9pYkpG=2|B5l46Qq^u(#4V(LLS}1Z~$8VnLIPb&SY01rh?0S&HY&p3B9k*_z<40 zc_B82Wd5Q{<tr(!9h>dj??6uCj^r!N9=2k?lwBHalCpeATcV>};-$2s<>ZlhZi46! z4Buteof&+>roo0Vtg_w%8UK2!RCgzemH>[email protected]...#KnV&T36yh*qRE!G~18YOGBKSb)MC z*U?JG?S~QCrO%#(9An~hkFdEh%[email protected]...(HsBpy3N^Qb5YNp4828wjIA3r z5;-(nrjU^kr->T3l#aj+Ou7~VU~h}Uo;Kzkj|zg<BOg_oJw6fQbtIiLj|8*OJX6y zZ)|*_Po$jO2+IW%ITdyoTIr=aw^T6WPtQzarf|VtD4m{6?NErEZxPiJ0MWYsb#v(* zyHu9|[email protected][email protected]...~ZihRj>09%W!>gg^wybq{5!Ui?E2*?cU$U&~dO1~F?m!_vBs [email protected]...zN>mpl)[email protected]...;9F>[email protected]...!dDMf2G0G=U^8W<HZvkE zVPbhNVJa}RXTWwt6Xzg8CTP~uuRn2^y4(La3JQdI{fY=uNWGf%fgU)h|M>jac4<B z|AcuVp30{c;y;^?n{Y*-~qDB;c%Mg1^aBDC7yZv-)[email protected]...&=QuFd%~tBBx<d{g z46#;uVRj8A?o~2|fOa%sgLUm{*@uNNlS<uaJaHE27+<@Q7o#VE;^{NypmTVhZxg z{WWJ~TGI#U*xYa+%zc{37&0PfkpvTcM9lmUib<~K!#iIi*{;sX=LuuP8o8j%^(T* z=@zkg>r?1h$M%z1&>y%b*j!VV?XQimsEpj66*iLs2%=SLgal~}Wh8Gf7|KEnU3458 zOX>VN{#e9sQ!#F0BIrdH+)KrO#^{x%2INZiB*I0SCNkHVrUINbMka}-=^;KAbU{ z(C$cr8z~PLs6O*>_TD{nrNqx~Y9;3}L4y3gqVf=xx*[email protected]...!586ryHE zBPp75-|k(=D)-}x|42f73scK>iqTuDQ;E}P%M1YYNF|m_ttBy(R_7MNrjy~eriBev zd19MCeI?I%BYRilaLE(gQo~u9<-{tnLEJMltwG>[email protected]...{gEeFF zGc%MSE#gTOH-(jJ8nKTR52MPoI1N6XZTGcuGFPvwSLOLaM6Y<g)4^x6%1Dn7Rwz; z1;gcXZspXgV7PLySnfzF7%rD{E2mxs!<B=@az|3ZaJigYIrS<St{g0uJCX{9%jMk4 hsaL^p<zTVgkyJ2TF6UNGy$Xga2aDy7#QdL1{tGA-a#jEU
install-win32/.svnignore deleted +0 -4
@@ -1,4 +0,0 @@ -*.o -Makefile.in -settings -Makefile
install-win32/GetWindowsVersion.nsi deleted +0 -109
109 lines not on this page · raw message
install-win32/Makefile.am deleted +0 -97
97 lines not on this page · raw message
install-win32/build-pkcs11-helper.sh deleted +0 -24
@@ -1,24 +0,0 @@ -F=pkcs11-helper-1.06-beta1 -OPENSSL_DIR=`pwd`/openssl-0.9.8h - -PKCS11_HELPER_DIR=`pwd`/pkcs11-helper -rm -rf $PKCS11_HELPER_DIR -mkdir $PKCS11_HELPER_DIR -tbz=$F.tar.bz2 - -rm -rf $F -tar xfj $tbz - -cd $F -./configure \ - MAN2HTML=true \ - --disable-crypto-engine-gnutls \ - --disable-crypto-engine-nss \ - PKG_CONFIG=true \ - OPENSSL_CFLAGS="-I${OPENSSL_DIR}/include" \ - OPENSSL_LIBS="-L${OPENSSL_DIR}/out -leay32" - -make -make install DESTDIR="${PKCS11_HELPER_DIR}" - -# ./configure doesn't need this any more: ac_cv_type_size_t=no
install-win32/buildinstaller deleted +0 -14
@@ -1,14 +0,0 @@ -#!/bin/sh - -# load version.nsi definitions -. autodefs/defs.sh - -# build the installer -rm -f $GENOUT/*.exe -'/c/Program Files/NSIS/makensis' $GENOUT/nsi/openvpn.nsi &>makensis.log -tail -20 makensis.log - -# sign the installer -if [ -d "$SIGNTOOL" ]; then - python $SIGNTOOL/signapp.py "$(echo $(pwd)/$GENOUT/*.exe)" -fi
install-win32/ddk-common deleted +0 -2
@@ -1,2 +0,0 @@ -# DDKs <= 5600 use "AMD64", later use "x64" -x64_tag=x64
install-win32/doclean deleted +0 -6
@@ -1,6 +0,0 @@ -#!/bin/sh - -# get version.nsi definitions -. autodefs/defs.sh - -[ "$CLEAN" = "yes" ] && rm -rf $GENOUT && KEEPAUTODEFS="yes" ./doclean
install-win32/dosname.pl deleted +0 -9
@@ -1,9 +0,0 @@ -#!/usr/bin/perl - -# convert a unix filename to a DOS filename - -while ($unixname = shift(@ARGV)) { - $unixname =~ s#^/([a-zA-Z])(/|$)#$1:\\#g; - $unixname =~ s#/#\\#g; - print "$unixname\n"; -}
install-win32/getgui deleted +0 -19
@@ -1,19 +0,0 @@ -#!/bin/sh - -# Get and sign the OpenVPN GUI - -# load version.nsi definitions -. autodefs/defs.sh - -GUI="$OPENVPN_GUI_DIR/$OPENVPN_GUI" - -if [ -f "$GUI" ]; then - mkdir -p $GENOUT/bin &>/dev/null - cp $GUI $GENOUT/bin -fi - -if [ -f "$GENOUT/bin/$OPENVPN_GUI" ]; then - echo '!define OPENVPN_GUI_DEFINED' >autodefs/guidefs.nsi -else - cat /dev/null >autodefs/guidefs.nsi -fi
install-win32/getopenssl deleted +0 -19
@@ -1,19 +0,0 @@ -#!/bin/sh - -# get version.nsi definitions -. autodefs/defs.sh - -# Get OpenSSL binaries -if [ -d "$OPENSSL_DIR" ] ; then - mkdir -p $GENOUT/lib &>/dev/null - mkdir -p $GENOUT/bin &>/dev/null - for f in libeay32.dll libssl32.dll out/openssl.exe ; do - cp $OPENSSL_DIR/$f $GENOUT/lib - if [ -z "$NO_STRIP" ]; then - strip $GENOUT/lib/`basename $f` - fi - done - mv $GENOUT/lib/openssl.exe $GENOUT/bin -else - echo OpenSSL DIR $OPENSSL_DIR NOT FOUND -fi
install-win32/getpkcs11helper deleted +0 -17
@@ -1,17 +0,0 @@ -#!/bin/sh - -# get version.nsi definitions -. autodefs/defs.sh - -# Get PKCS11-helper libraries -if [ -d "$PKCS11_HELPER_DIR" ] ; then - mkdir -p $GENOUT/lib &>/dev/null - for f in libpkcs11-helper-1.dll ; do - cp $PKCS11_HELPER_DIR/usr/local/bin/$f $GENOUT/lib - if [ -z "$NO_STRIP" ]; then - strip $GENOUT/lib/$f - fi - done -else - echo PKCS11-helper DIR $PKCS11_HELPER_DIR NOT FOUND -fi
install-win32/getprebuilt deleted +0 -10
@@ -1,10 +0,0 @@ -#!/bin/sh - -# get version.nsi definitions -. autodefs/defs.sh - -# Get PKCS11-helper libraries -if [ -d "$GENOUT_PREBUILT" ] && ! [ -d "$GENOUT" ]; then - echo LOADING prebuilt binaries from $GENOUT_PREBUILT - cp -a $GENOUT_PREBUILT $GENOUT -fi
install-win32/getxgui deleted +0 -28
@@ -1,28 +0,0 @@ -#!/bin/sh - -# Get and sign the OpenVPN XML-based GUI - -# load version.nsi definitions -. autodefs/defs.sh - -if [ -d "$OPENVPN_XGUI_DIR" ]; then - SIGNED_EXES="gui/ovpn-xgui-en.exe sta/ovpn-tray.exe" - UNSIGNED_EXES="xmlserv/ovpn-xmlserv.exe" - EXES="$SIGNED_EXES $UNSIGNED_EXES" - - mkdir -p $GENOUT/bin &>/dev/null - - if [ -z "$NO_STRIP" ]; then - for f in $EXES; do - cp $OPENVPN_XGUI_DIR/$f $GENOUT/bin - strip $GENOUT/bin/`basename $f` - done - fi - - rm -rf $GENOUT/htdocs - cp -a $OPENVPN_XGUI_DIR/ajax/htdocs $GENOUT/htdocs - - echo '!define OPENVPN_XGUI_DEFINED' >autodefs/xguidefs.nsi -else - cat /dev/null >autodefs/xguidefs.nsi -fi
install-win32/ifdef.pl deleted +0 -53
53 lines not on this page · raw message
install-win32/m4todef.pl deleted +0 -15
@@ -1,15 +0,0 @@ -#!/usr/bin/perl - -# used to convert version.m4 to simple -# definition format - -while (<STDIN>) { - chomp; - if (/^\s*$/) { - print "\n"; - } elsif (/^define\((\w+),\[(.*?)\]\)/) { - print "!define $1 \"$2\"\n"; - } elsif (/^dnl(.*)$/) { - print "#$1\n"; - } -}
install-win32/macro.pl deleted +0 -61
61 lines not on this page · raw message
install-win32/makeopenvpn deleted +0 -67
67 lines not on this page · raw message
install-win32/maketap deleted +0 -17
@@ -1,17 +0,0 @@ -#!/bin/sh - -# Get the x86 and x64 versions of the TAP driver - -# get version.nsi definitions -. autodefs/defs.sh - -if [ -d "$TAPBINSRC" ]; then - mkdir -p $GENOUT/driver/i386 &>/dev/null - mkdir -p $GENOUT/driver/amd64 &>/dev/null - for arch in i386 amd64; do - s=$TAPBINSRC/$arch - cp $s/*.sys $s/*.cat $s/*.inf $GENOUT/driver/$arch - done -else - echo Cannot find pre-built tap drivers -fi
install-win32/maketapinstall deleted +0 -15
@@ -1,15 +0,0 @@ -#!/bin/sh - -# Get the x86 and x64 versions of the tapinstall tool - -# get version.nsi definitions -. autodefs/defs.sh - -if [ -d "$TAPBINSRC" ]; then - mkdir -p $GENOUT/tapinstall/i386 &>/dev/null - mkdir -p $GENOUT/tapinstall/amd64 &>/dev/null - cp $TAPBINSRC/i386/tapinstall.exe $GENOUT/tapinstall/i386 - cp $TAPBINSRC/amd64/tapinstall.exe $GENOUT/tapinstall/amd64 -else - echo Cannot find pre-built tapinstall -fi
install-win32/maketext deleted +0 -59
59 lines not on this page · raw message
install-win32/openssl/README.txt deleted +0 -21
@@ -1,21 +0,0 @@ -Rebuild OpenSSL tarball without symbolic links, so -it can be extracted on Windows (run on Unix): - - [download tarball and .asc sig] - gpg --verify openssl-0.9.8k.tar.gz.asc - tar xfz openssl-0.9.8k.tar.gz - tar cfzh openssl-0.9.8k-nolinks.tar.gz openssl-0.9.8k - -To apply patch (in MSYS shell): - - cd /c/src/openssl-0.9.8k - patch -p1 <../21/install-win32/openssl/openssl098.patch - -To build OpenSSL, open a command prompt window, then: - - cd \src\openssl-0.9.8k - ms\mw - -To build a new patch (optional): - - diff -urw openssl-0.9.8k.orig openssl-0.9.8k | grep -v '^Only in' >openssl098.patch
install-win32/openssl/openssl097.patch deleted +0 -68
68 lines not on this page · raw message
install-win32/openssl/openssl098.patch deleted +0 -56
56 lines not on this page · raw message
install-win32/openvpn.nsi deleted +0 -886
886 lines not on this page · raw message
install-win32/sample.ovpn deleted +0 -103
103 lines not on this page · raw message
install-win32/setpath.nsi deleted +0 -231
231 lines not on this page · raw message
install-win32/settings.in deleted +0 -71
71 lines not on this page · raw message
install-win32/trans.pl deleted +0 -97
97 lines not on this page · raw message
install-win32/u2d.c deleted +0 -20
@@ -1,20 +0,0 @@ -#include <stdio.h> - -int -main (int argc,char *argv[]) -{ -int c; -int enable =1 ; - -while ((c =getchar ()) !=EOF ) - { -#if 0 -if (c =='\r' ) - enable =0 ; -if (enable && c =='\n' ) -putchar ('\r' ); -#endif -putchar (c); - } -return 0 ; -}
install-win32/winconfig deleted +0 -18
@@ -1,18 +0,0 @@ -#!/bin/sh - -# prepare files for building on Windows -# run from top directory: install-win32/winconfig - -rm -rf autodefs -mkdir autodefs - -# build multi-grammar definition files -perl install-win32/m4todef.pl <version.m4 >autodefs/version.in -for g in "h" "sh" "nsi" "in" ; do - perl install-win32/trans.pl $g install-win32/settings.in >autodefs/defs.$g -done - -cat /dev/null >autodefs/guidefs.nsi - -echo '#include "autodefs/defs.h"' >autodefs.h -echo '#include "config.h"' >>autodefs.h
Signature · 1 line
1.7.3.4
Re: [Openvpn-devel] [PATCH 11/35] Remove install-win32
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 50 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> --- Makefile.am| 5 +- configure.ac | 3 - images/.svnignore | 2 - images/Makefile.am | 41 -- images/icon.ico | Bin 22486 -> 0 bytes images/install-whirl.bmp | Bin 25820 -> 0 bytes install-win32/.svnignore | 4 - install-win32/GetWindowsVersion.nsi | 109 ---- install-win32/Makefile.am | 97 ---- install-win32/build-pkcs11-helper.sh | 24 - install-win32/buildinstaller | 14 - install-win32/ddk-common | 2 - install-win32/doclean | 6 - install-win32/dosname.pl | 9 - install-win32/getgui | 19 - install-win32/getopenssl | 19 - install-win32/getpkcs11helper | 17 - install-win32/getprebuilt | 10 - install-win32/getxgui | 28 - install-win32/ifdef.pl | 53 -- install-win32/m4todef.pl | 15 - install-win32/macro.pl | 61 --- install-win32/makeopenvpn | 67 --- install-win32/maketap | 17 - install-win32/maketapinstall | 15 - install-win32/maketext | 59 --- install-win32/openssl/README.txt | 21 - install-win32/openssl/openssl097.patch | 68 --- install-win32/openssl/openssl098.patch | 56 -- install-win32/openvpn.nsi | 886 -------------------------------- install-win32/sample.ovpn | 103 ---- install-win32/setpath.nsi | 231 --------- install-win32/settings.in | 71 --- install-win32/trans.pl | 97 ---- install-win32/u2d.c | 20 - install-win32/winconfig | 18 - 36 fileschanged, 1 insertions(+), 2266 deletions(-) delete mode 100644 images/.svnignore delete mode 100644 images/Makefile.am delete mode 100755 images/icon.ico delete mode 100755 images/install-whirl.bmp delete mode 100644 install-win32/.svnignore delete mode 100644 install-win32/GetWindowsVersion.nsi delete mode 100644 install-win32/Makefile.am delete mode 100644
install-win32/build-pkcs11-helper.shdelete mode 100644 install-win32/buildinstaller delete mode 100644 install-win32/ddk-common delete mode 100644 install-win32/doclean delete mode 100644install-win32/dosname.pldelete mode 100644 install-win32/getgui delete mode 100644 install-win32/getopenssl delete mode 100644 install-win32/getpkcs11helper delete mode 100644 install-win32/getprebuilt delete mode 100644 install-win32/getxgui delete mode 100644install-win32/ifdef.pldelete mode 100644install-win32/m4todef.pldelete mode 100644install-win32/macro.pldelete mode 100755 install-win32/makeopenvpn delete mode 100644 install-win32/maketap delete mode 100644 install-win32/maketapinstall delete mode 100644 install-win32/maketext delete mode 100644install-win32/openssl/README.txtdelete mode 100644
Quoted 9 lines
install-win32/openssl/openssl097.patchdelete mode 100644install-win32/openssl/openssl098.patchdelete mode 100755 install-win32/openvpn.nsi delete mode 100755 install-win32/sample.ovpn delete mode 100755 install-win32/setpath.nsi delete mode 100644 install-win32/settings.in delete mode 100644install-win32/trans.pldelete mode 100755install-win32/u2d.cdelete mode 100644 install-win32/winconfig
ACK.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LScAACgkQDC186MBRfro64ACgr7fZ80f+F23iB2JNciD4JMIp nkAAn2h4cQv4VEMrahmUqSe/O9D3vRgu
=dqKf
-----END PGP SIGNATURE-----
PATCH 12/35 Remove easy-rsa
In reply to Alon Bar-Lev--- Makefile.am | 1 - easy-rsa/1.0/README | 161 ------------ easy-rsa/1.0/build-ca | 13 - easy-rsa/1.0/build-dh | 12 - easy-rsa/1.0/build-inter | 19 -- easy-rsa/1.0/build-key | 20 -- easy-rsa/1.0/build-key-pass | 20 -- easy-rsa/1.0/build-key-pkcs12 | 21 -- easy-rsa/1.0/build-key-server | 22 -- easy-rsa/1.0/build-req | 18 -- easy-rsa/1.0/build-req-pass | 18 -- easy-rsa/1.0/clean-all | 19 -- easy-rsa/1.0/list-crl | 18 -- easy-rsa/1.0/make-crl | 18 -- easy-rsa/1.0/openssl.cnf | 255 ------------------- easy-rsa/1.0/revoke-crt | 18 -- easy-rsa/1.0/revoke-full | 29 --- easy-rsa/1.0/sign-req | 18 -- easy-rsa/1.0/vars | 49 ---- easy-rsa/2.0/Makefile | 13 - easy-rsa/2.0/README | 229 ----------------- easy-rsa/2.0/build-ca | 8 - easy-rsa/2.0/build-dh | 11 - easy-rsa/2.0/build-inter | 7 - easy-rsa/2.0/build-key | 7 - easy-rsa/2.0/build-key-pass | 7 - easy-rsa/2.0/build-key-pkcs12 | 8 - easy-rsa/2.0/build-key-server | 10 - easy-rsa/2.0/build-req | 7 - easy-rsa/2.0/build-req-pass | 7 - easy-rsa/2.0/clean-all | 16 -- easy-rsa/2.0/inherit-inter | 39 --- easy-rsa/2.0/list-crl | 13 - easy-rsa/2.0/openssl-0.9.6.cnf | 265 ------------------- easy-rsa/2.0/openssl-0.9.8.cnf | 290 --------------------- easy-rsa/2.0/openssl-1.0.0.cnf | 285 --------------------- easy-rsa/2.0/pkitool | 379 ---------------------------- easy-rsa/2.0/revoke-full | 40 --- easy-rsa/2.0/sign-req | 7 - easy-rsa/2.0/vars | 74 ------ easy-rsa/2.0/whichopensslcnf | 26 -- easy-rsa/Windows/README.txt | 44 ---- easy-rsa/Windows/build-ca-pass.bat | 8 - easy-rsa/Windows/build-ca.bat | 4 - easy-rsa/Windows/build-dh.bat | 4 - easy-rsa/Windows/build-key-pass.bat | 8 - easy-rsa/Windows/build-key-pkcs12.bat | 10 - easy-rsa/Windows/build-key-server-pass.bat | 8 - easy-rsa/Windows/build-key-server.bat | 8 - easy-rsa/Windows/build-key.bat | 8 - easy-rsa/Windows/clean-all.bat | 13 - easy-rsa/Windows/init-config.bat | 1 - easy-rsa/Windows/revoke-full.bat | 13 - easy-rsa/Windows/serial.start | 1 - easy-rsa/Windows/vars.bat.sample | 40 --- 55 files changed, 0 insertions(+), 2667 deletions(-) delete mode 100644 easy-rsa/1.0/README delete mode 100755 easy-rsa/1.0/build-ca delete mode 100755 easy-rsa/1.0/build-dh delete mode 100755 easy-rsa/1.0/build-inter delete mode 100755 easy-rsa/1.0/build-key delete mode 100755 easy-rsa/1.0/build-key-pass delete mode 100755 easy-rsa/1.0/build-key-pkcs12 delete mode 100755 easy-rsa/1.0/build-key-server delete mode 100755 easy-rsa/1.0/build-req delete mode 100755 easy-rsa/1.0/build-req-pass delete mode 100755 easy-rsa/1.0/clean-all delete mode 100644 easy-rsa/1.0/list-crl delete mode 100644 easy-rsa/1.0/make-crl delete mode 100644 easy-rsa/1.0/openssl.cnf delete mode 100644 easy-rsa/1.0/revoke-crt delete mode 100755 easy-rsa/1.0/revoke-full delete mode 100755 easy-rsa/1.0/sign-req delete mode 100644 easy-rsa/1.0/vars delete mode 100644 easy-rsa/2.0/Makefile delete mode 100644 easy-rsa/2.0/README delete mode 100755 easy-rsa/2.0/build-ca delete mode 100755 easy-rsa/2.0/build-dh delete mode 100755 easy-rsa/2.0/build-inter delete mode 100755 easy-rsa/2.0/build-key delete mode 100755 easy-rsa/2.0/build-key-pass delete mode 100755 easy-rsa/2.0/build-key-pkcs12 delete mode 100755 easy-rsa/2.0/build-key-server delete mode 100755 easy-rsa/2.0/build-req delete mode 100755 easy-rsa/2.0/build-req-pass delete mode 100755 easy-rsa/2.0/clean-all delete mode 100755 easy-rsa/2.0/inherit-inter delete mode 100755 easy-rsa/2.0/list-crl delete mode 100755 easy-rsa/2.0/openssl-0.9.6.cnf delete mode 100755 easy-rsa/2.0/openssl-0.9.8.cnf delete mode 100755 easy-rsa/2.0/openssl-1.0.0.cnf delete mode 100755 easy-rsa/2.0/pkitool delete mode 100755 easy-rsa/2.0/revoke-full delete mode 100755 easy-rsa/2.0/sign-req delete mode 100755 easy-rsa/2.0/vars delete mode 100755 easy-rsa/2.0/whichopensslcnf delete mode 100644 easy-rsa/Windows/README.txt delete mode 100644 easy-rsa/Windows/build-ca-pass.bat delete mode 100644 easy-rsa/Windows/build-ca.bat delete mode 100644 easy-rsa/Windows/build-dh.bat delete mode 100644 easy-rsa/Windows/build-key-pass.bat delete mode 100644 easy-rsa/Windows/build-key-pkcs12.bat delete mode 100644 easy-rsa/Windows/build-key-server-pass.bat delete mode 100644 easy-rsa/Windows/build-key-server.bat delete mode 100644 easy-rsa/Windows/build-key.bat delete mode 100644 easy-rsa/Windows/clean-all.bat delete mode 100644 easy-rsa/Windows/index.txt.start delete mode 100755 easy-rsa/Windows/init-config.bat delete mode 100644 easy-rsa/Windows/revoke-full.bat delete mode 100644 easy-rsa/Windows/serial.start delete mode 100644 easy-rsa/Windows/vars.bat.sample
Makefile.am +0 -1
@@ -40,7 +40,6 @@ MAINTAINERCLEANFILES = \ CLEANFILES = openvpn.8.html configure.h EXTRA_DIST = \ - easy-rsa \ sample-config-files \ sample-keys \ sample-scripts \
easy-rsa/1.0/README deleted +0 -161
161 lines not on this page · raw message
easy-rsa/1.0/build-ca deleted +0 -13
@@ -1,13 +0,0 @@ -#!/bin/sh - -# -# Build a root certificate -# - -if test $KEY_DIR; then - cd $KEY_DIR && \ - openssl req -days 3650 -nodes -new -x509 -keyout ca.key -out ca.crt -config $KEY_CONFIG && \ - chmod 0600 ca.key -else - echo you must define KEY_DIR -fi
easy-rsa/1.0/build-dh deleted +0 -12
@@ -1,12 +0,0 @@ -#!/bin/sh - -# -# Build Diffie-Hellman parameters for the server side -# of an SSL/TLS connection. -# - -if test $KEY_DIR; then - openssl dhparam -out ${KEY_DIR}/dh${KEY_SIZE}.pem ${KEY_SIZE} -else - echo you must define KEY_DIR -fi
easy-rsa/1.0/build-inter deleted +0 -19
@@ -1,19 +0,0 @@ -#!/bin/sh - -# -# Make an intermediate CA certificate/private key pair using a locally generated -# root certificate. -# - -if test $# -ne 1; then - echo "usage: build-inter <name>"; - exit 1 -fi - -if test $KEY_DIR; then - cd $KEY_DIR && \ - openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \ - openssl ca -extensions v3_ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG -else - echo you must define KEY_DIR -fi
easy-rsa/1.0/build-key deleted +0 -20
@@ -1,20 +0,0 @@ -#!/bin/sh - -# -# Make a certificate/private key pair using a locally generated -# root certificate. -# - -if test $# -ne 1; then - echo "usage: build-key <name>"; - exit 1 -fi - -if test $KEY_DIR; then - cd $KEY_DIR && \ - openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \ - openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG && \ - chmod 0600 $1.key -else - echo you must define KEY_DIR -fi
easy-rsa/1.0/build-key-pass deleted +0 -20
@@ -1,20 +0,0 @@ -#!/bin/sh - -# -# Similar to build-key, but protect the private key -# with a password. -# - -if test $# -ne 1; then - echo "usage: build-key-pass <name>"; - exit 1 -fi - -if test $KEY_DIR; then - cd $KEY_DIR && \ - openssl req -days 3650 -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \ - openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG && \ - chmod 0600 $1.key -else - echo you must define KEY_DIR -fi
easy-rsa/1.0/build-key-pkcs12 deleted +0 -21
@@ -1,21 +0,0 @@ -#!/bin/sh - -# -# Make a certificate/private key pair using a locally generated -# root certificate and convert it to a PKCS #12 file including the -# the CA certificate as well. - -if test $# -ne 1; then - echo "usage: build-key-pkcs12 <name>"; - exit 1 -fi - -if test $KEY_DIR; then - cd $KEY_DIR && \ - openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \ - openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG && \ - openssl pkcs12 -export -inkey $1.key -in $1.crt -certfile ca.crt -out $1.p12 && \ - chmod 0600 $1.key $1.p12 -else - echo you must define KEY_DIR -fi
easy-rsa/1.0/build-key-server deleted +0 -22
@@ -1,22 +0,0 @@ -#!/bin/sh - -# -# Make a certificate/private key pair using a locally generated -# root certificate. -# -# Explicitly set nsCertType to server using the "server" -# extension in the openssl.cnf file. - -if test $# -ne 1; then - echo "usage: build-key-server <name>"; - exit 1 -fi - -if test $KEY_DIR; then - cd $KEY_DIR && \ - openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -extensions server -config $KEY_CONFIG && \ - openssl ca -days 3650 -out $1.crt -in $1.csr -extensions server -config $KEY_CONFIG && \ - chmod 0600 $1.key -else - echo you must define KEY_DIR -fi
easy-rsa/1.0/build-req deleted +0 -18
@@ -1,18 +0,0 @@ -#!/bin/sh - -# -# Build a certificate signing request and private key. Use this -# when your root certificate and key is not available locally. -# - -if test $# -ne 1; then - echo "usage: build-req <name>"; - exit 1 -fi - -if test $KEY_DIR; then - cd $KEY_DIR && \ - openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -config $KEY_CONFIG -else - echo you must define KEY_DIR -fi
easy-rsa/1.0/build-req-pass deleted +0 -18
@@ -1,18 +0,0 @@ -#!/bin/sh - -# -# Like build-req, but protect your private key -# with a password. -# - -if test $# -ne 1; then - echo "usage: build-req-pass <name>"; - exit 1 -fi - -if test $KEY_DIR; then - cd $KEY_DIR && \ - openssl req -days 3650 -new -keyout $1.key -out $1.csr -config $KEY_CONFIG -else - echo you must define KEY_DIR -fi
easy-rsa/1.0/clean-all deleted +0 -19
@@ -1,19 +0,0 @@ -#!/bin/sh - -# -# Initialize the $KEY_DIR directory. -# Note that this script does a -# rm -rf on $KEY_DIR so be careful! -# - -d=$KEY_DIR - -if test $d; then - rm -rf $d - mkdir $d && \ - chmod go-rwx $d && \ - touch $d/index.txt && \ - echo 01 >$d/serial -else - echo you must define KEY_DIR -fi
easy-rsa/1.0/list-crl deleted +0 -18
@@ -1,18 +0,0 @@ -#!/bin/sh - -# -# list revoked certificates -# -# - -if test $# -ne 1; then - echo "usage: list-crl <crlfile.pem>"; - exit 1 -fi - -if test $KEY_DIR; then - cd $KEY_DIR && \ - openssl crl -text -noout -in $1 -else - echo you must define KEY_DIR -fi
easy-rsa/1.0/make-crl deleted +0 -18
@@ -1,18 +0,0 @@ -#!/bin/sh - -# -# generate a CRL -# -# - -if test $# -ne 1; then - echo "usage: make-crl <crlfile.pem>"; - exit 1 -fi - -if test $KEY_DIR; then - cd $KEY_DIR && \ - openssl ca -gencrl -out $1 -config $KEY_CONFIG -else - echo you must define KEY_DIR -fi
easy-rsa/1.0/openssl.cnf deleted +0 -255
255 lines not on this page · raw message
easy-rsa/1.0/revoke-crt deleted +0 -18
@@ -1,18 +0,0 @@ -#!/bin/sh - -# -# revoke a certificate -# -# - -if test $# -ne 1; then - echo "usage: revoke-crt <file.crt>"; - exit 1 -fi - -if test $KEY_DIR; then - cd $KEY_DIR && \ - openssl ca -revoke $1 -config $KEY_CONFIG -else - echo you must define KEY_DIR -fi
easy-rsa/1.0/revoke-full deleted +0 -29
@@ -1,29 +0,0 @@ -#!/bin/sh - -# revoke a certificate, regenerate CRL, -# and verify revocation - -CRL=crl.pem -RT=revoke-test.pem - -if test $# -ne 1; then - echo "usage: revoke-full <name>"; - exit 1 -fi - -if test $KEY_DIR; then - cd $KEY_DIR - rm -f $RT - - # revoke key and generate a new CRL - openssl ca -revoke $1.crt -config $KEY_CONFIG - - # generate a new CRL - openssl ca -gencrl -out $CRL -config $KEY_CONFIG - cat ca.crt $CRL >$RT - - # verify the revocation - openssl verify -CAfile $RT -crl_check $1.crt -else - echo you must define KEY_DIR -fi
easy-rsa/1.0/sign-req deleted +0 -18
@@ -1,18 +0,0 @@ -#!/bin/sh - -# -# Sign a certificate signing request (a .csr file) -# with a local root certificate and key. -# - -if test $# -ne 1; then - echo "usage: sign-req <name>"; - exit 1 -fi - -if test $KEY_DIR; then - cd $KEY_DIR && \ - openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG -else - echo you must define KEY_DIR -fi
easy-rsa/1.0/vars deleted +0 -49
49 lines not on this page · raw message
easy-rsa/2.0/Makefile deleted +0 -13
@@ -1,13 +0,0 @@ - -DESTDIR= -PREFIX= - -all: - echo "All done." - echo "Run make install DESTDIR=/usr/share/somewhere" - -install: - install -d "${DESTDIR}/${PREFIX}" - install -m 0755 build-* "${DESTDIR}/${PREFIX}" - install -m 0755 clean-all list-crl inherit-inter pkitool revoke-full sign-req whichopensslcnf "${DESTDIR}/${PREFIX}" - install -m 0644 openssl-0.9.6.cnf openssl-0.9.8.cnf openssl-1.0.0.cnf README vars "${DESTDIR}/${PREFIX}"
easy-rsa/2.0/README deleted +0 -229
229 lines not on this page · raw message
easy-rsa/2.0/build-ca deleted +0 -8
@@ -1,8 +0,0 @@ -#!/bin/sh - -# -# Build a root certificate -# - -export EASY_RSA="${EASY_RSA:-.}" -"$EASY_RSA/pkitool" --interact --initca $*
easy-rsa/2.0/build-dh deleted +0 -11
@@ -1,11 +0,0 @@ -#!/bin/sh - -# Build Diffie-Hellman parameters for the server side -# of an SSL/TLS connection. - -if [ -d $KEY_DIR ] && [ $KEY_SIZE ]; then - $OPENSSL dhparam -out ${KEY_DIR}/dh${KEY_SIZE}.pem ${KEY_SIZE} -else - echo 'Please source the vars script first (i.e. "source ./vars")' - echo 'Make sure you have edited it to reflect your configuration.' -fi
easy-rsa/2.0/build-inter deleted +0 -7
@@ -1,7 +0,0 @@ -#!/bin/sh - -# Make an intermediate CA certificate/private key pair using a locally generated -# root certificate. - -export EASY_RSA="${EASY_RSA:-.}" -"$EASY_RSA/pkitool" --interact --inter $*
easy-rsa/2.0/build-key deleted +0 -7
@@ -1,7 +0,0 @@ -#!/bin/sh - -# Make a certificate/private key pair using a locally generated -# root certificate. - -export EASY_RSA="${EASY_RSA:-.}" -"$EASY_RSA/pkitool" --interact $*
easy-rsa/2.0/build-key-pass deleted +0 -7
@@ -1,7 +0,0 @@ -#!/bin/sh - -# Similar to build-key, but protect the private key -# with a password. - -export EASY_RSA="${EASY_RSA:-.}" -"$EASY_RSA/pkitool" --interact --pass $*
easy-rsa/2.0/build-key-pkcs12 deleted +0 -8
@@ -1,8 +0,0 @@ -#!/bin/sh - -# Make a certificate/private key pair using a locally generated -# root certificate and convert it to a PKCS #12 file including the -# the CA certificate as well. - -export EASY_RSA="${EASY_RSA:-.}" -"$EASY_RSA/pkitool" --interact --pkcs12 $*
easy-rsa/2.0/build-key-server deleted +0 -10
@@ -1,10 +0,0 @@ -#!/bin/sh - -# Make a certificate/private key pair using a locally generated -# root certificate. -# -# Explicitly set nsCertType to server using the "server" -# extension in the openssl.cnf file. - -export EASY_RSA="${EASY_RSA:-.}" -"$EASY_RSA/pkitool" --interact --server $*
easy-rsa/2.0/build-req deleted +0 -7
@@ -1,7 +0,0 @@ -#!/bin/sh - -# Build a certificate signing request and private key. Use this -# when your root certificate and key is not available locally. - -export EASY_RSA="${EASY_RSA:-.}" -"$EASY_RSA/pkitool" --interact --csr $*
easy-rsa/2.0/build-req-pass deleted +0 -7
@@ -1,7 +0,0 @@ -#!/bin/sh - -# Like build-req, but protect your private key -# with a password. - -export EASY_RSA="${EASY_RSA:-.}" -"$EASY_RSA/pkitool" --interact --csr --pass $*
easy-rsa/2.0/clean-all deleted +0 -16
@@ -1,16 +0,0 @@ -#!/bin/sh - -# Initialize the $KEY_DIR directory. -# Note that this script does a -# rm -rf on $KEY_DIR so be careful! - -if [ "$KEY_DIR" ]; then - rm -rf "$KEY_DIR" - mkdir "$KEY_DIR" && \ - chmod go-rwx "$KEY_DIR" && \ - touch "$KEY_DIR/index.txt" && \ - echo 01 >"$KEY_DIR/serial" -else - echo 'Please source the vars script first (i.e. "source ./vars")' - echo 'Make sure you have edited it to reflect your configuration.' -fi
easy-rsa/2.0/inherit-inter deleted +0 -39
@@ -1,39 +0,0 @@ -#!/bin/sh - -# Build a new PKI which is rooted on an intermediate certificate generated -# by ./build-inter or ./pkitool --inter from a parent PKI. The new PKI should -# have independent vars settings, and must use a different KEY_DIR directory -# from the parent. This tool can be used to generate arbitrary depth -# certificate chains. -# -# To build an intermediate CA, follow the same steps for a regular PKI but -# replace ./build-key or ./pkitool --initca with this script. - -# The EXPORT_CA file will contain the CA certificate chain and should be -# referenced by the OpenVPN "ca" directive in config files. The ca.crt file -# will only contain the local intermediate CA -- it's needed by the easy-rsa -# scripts but not by OpenVPN directly. -EXPORT_CA="export-ca.crt" - -if [ $# -ne 2 ]; then - echo "usage: $0 <parent-key-dir> <common-name>" - echo "parent-key-dir: the KEY_DIR directory of the parent PKI" - echo "common-name: the common name of the intermediate certificate in the parent PKI" - exit 1; -fi - -if [ "$KEY_DIR" ]; then - cp "$1/$2.crt" "$KEY_DIR/ca.crt" - cp "$1/$2.key" "$KEY_DIR/ca.key" - - if [ -e "$1/$EXPORT_CA" ]; then - PARENT_CA="$1/$EXPORT_CA" - else - PARENT_CA="$1/ca.crt" - fi - cp "$PARENT_CA" "$KEY_DIR/$EXPORT_CA" - cat "$KEY_DIR/ca.crt" >> "$KEY_DIR/$EXPORT_CA" -else - echo 'Please source the vars script first (i.e. "source ./vars")' - echo 'Make sure you have edited it to reflect your configuration.' -fi
easy-rsa/2.0/list-crl deleted +0 -13
@@ -1,13 +0,0 @@ -#!/bin/sh - -# list revoked certificates - -CRL="${1:-crl.pem}" - -if [ "$KEY_DIR" ]; then - cd "$KEY_DIR" && \ - $OPENSSL crl -text -noout -in "$CRL" -else - echo 'Please source the vars script first (i.e. "source ./vars")' - echo 'Make sure you have edited it to reflect your configuration.' -fi
easy-rsa/2.0/openssl-0.9.6.cnf deleted +0 -265
265 lines not on this page · raw message
easy-rsa/2.0/openssl-0.9.8.cnf deleted +0 -290
290 lines not on this page · raw message
easy-rsa/2.0/openssl-1.0.0.cnf deleted +0 -285
285 lines not on this page · raw message
easy-rsa/2.0/pkitool deleted +0 -379
379 lines not on this page · raw message
easy-rsa/2.0/revoke-full deleted +0 -40
@@ -1,40 +0,0 @@ -#!/bin/sh - -# revoke a certificate, regenerate CRL, -# and verify revocation - -CRL="crl.pem" -RT="revoke-test.pem" - -if [ $# -ne 1 ]; then - echo "usage: revoke-full <cert-name-base>"; - exit 1 -fi - -if [ "$KEY_DIR" ]; then - cd "$KEY_DIR" - rm -f "$RT" - - # set defaults - export KEY_CN="" - export KEY_OU="" - export KEY_NAME="" - - # revoke key and generate a new CRL - $OPENSSL ca -revoke "$1.crt" -config "$KEY_CONFIG" - - # generate a new CRL -- try to be compatible with - # intermediate PKIs - $OPENSSL ca -gencrl -out "$CRL" -config "$KEY_CONFIG" - if [ -e export-ca.crt ]; then - cat export-ca.crt "$CRL" >"$RT" - else - cat ca.crt "$CRL" >"$RT" - fi - - # verify the revocation - $OPENSSL verify -CAfile "$RT" -crl_check "$1.crt" -else - echo 'Please source the vars script first (i.e. "source ./vars")' - echo 'Make sure you have edited it to reflect your configuration.' -fi
easy-rsa/2.0/sign-req deleted +0 -7
@@ -1,7 +0,0 @@ -#!/bin/sh - -# Sign a certificate signing request (a .csr file) -# with a local root certificate and key. - -export EASY_RSA="${EASY_RSA:-.}" -"$EASY_RSA/pkitool" --interact --sign $*
easy-rsa/2.0/vars deleted +0 -74
74 lines not on this page · raw message
easy-rsa/2.0/whichopensslcnf deleted +0 -26
@@ -1,26 +0,0 @@ -#!/bin/sh - -cnf="$1/openssl.cnf" - -if [ "$OPENSSL" ]; then - if $OPENSSL version | grep -E "0\.9\.6[[:alnum:]]" > /dev/null; then - cnf="$1/openssl-0.9.6.cnf" - elif $OPENSSL version | grep -E "0\.9\.8[[:alnum:]]" > /dev/null; then - cnf="$1/openssl-0.9.8.cnf" - elif $OPENSSL version | grep -E "1\.0\.([[:digit:]][[:alnum:]])" > /dev/null; then - cnf="$1/openssl-1.0.0.cnf" - else - cnf="$1/openssl.cnf" - fi -fi - -echo $cnf - -if [ ! -r $cnf ]; then - echo "**************************************************************" >&2 - echo " No $cnf file could be found" >&2 - echo " Further invocations will fail" >&2 - echo "**************************************************************" >&2 -fi - -exit 0
easy-rsa/Windows/README.txt deleted +0 -44
44 lines not on this page · raw message
easy-rsa/Windows/build-ca-pass.bat deleted +0 -8
@@ -1,8 +0,0 @@ [email protected]... off -cd %HOME% -rem build a request for a cert that will be valid for ten years -openssl req -days 3650 -new -keyout %KEY_DIR%\%1.key -out %KEY_DIR%\%1.csr -config %KEY_CONFIG% -rem sign the cert request with our ca, creating a cert/key pair -openssl ca -days 3650 -out %KEY_DIR%\%1.crt -in %KEY_DIR%\%1.csr -config %KEY_CONFIG% -rem delete any .old files created in this process, to avoid future file creation errors -del /q %KEY_DIR%\*.old
easy-rsa/Windows/build-ca.bat deleted +0 -4
@@ -1,4 +0,0 @@ [email protected]... off -cd %HOME% -rem build a cert authority valid for ten years, starting now -openssl req -days 3650 -nodes -new -x509 -keyout %KEY_DIR%\ca.key -out %KEY_DIR%\ca.crt -config %KEY_CONFIG%
easy-rsa/Windows/build-dh.bat deleted +0 -4
@@ -1,4 +0,0 @@ [email protected]... off -cd %HOME% -rem build a dh file for the server side -openssl dhparam -out %KEY_DIR%/dh%KEY_SIZE%.pem %KEY_SIZE%
easy-rsa/Windows/build-key-pass.bat deleted +0 -8
@@ -1,8 +0,0 @@ [email protected]... off -cd %HOME% -rem build a request for a cert that will be valid for ten years -openssl req -days 3650 -new -keyout %KEY_DIR%\%1.key -out %KEY_DIR%\%1.csr -config %KEY_CONFIG% -rem sign the cert request with our ca, creating a cert/key pair -openssl ca -days 3650 -out %KEY_DIR%\%1.crt -in %KEY_DIR%\%1.csr -config %KEY_CONFIG% -rem delete any .old files created in this process, to avoid future file creation errors -del /q %KEY_DIR%\*.old
easy-rsa/Windows/build-key-pkcs12.bat deleted +0 -10
@@ -1,10 +0,0 @@ [email protected]... off -cd %HOME% -rem build a request for a cert that will be valid for ten years -openssl req -days 3650 -nodes -new -keyout %KEY_DIR%\%1.key -out %KEY_DIR%\%1.csr -config %KEY_CONFIG% -rem sign the cert request with our ca, creating a cert/key pair -openssl ca -days 3650 -out %KEY_DIR%\%1.crt -in %KEY_DIR%\%1.csr -config %KEY_CONFIG% -rem convert the key/cert and embed the ca cert into a pkcs12 file. -openssl pkcs12 -export -inkey %KEY_DIR%\%1.key -in %KEY_DIR%\%1.crt -certfile %KEY_DIR%\ca.crt -out %KEY_DIR%\%1.p12 -rem delete any .old files created in this process, to avoid future file creation errors -del /q %KEY_DIR%\*.old
easy-rsa/Windows/build-key-server-pass.bat deleted +0 -8
@@ -1,8 +0,0 @@ [email protected]... off -cd %HOME% -rem build a request for a cert that will be valid for ten years -openssl req -days 3650 -new -keyout %KEY_DIR%\%1.key -out %KEY_DIR%\%1.csr -config %KEY_CONFIG% -rem sign the cert request with our ca, creating a cert/key pair -openssl ca -days 3650 -out %KEY_DIR%\%1.crt -in %KEY_DIR%\%1.csr -extensions server -config %KEY_CONFIG% -rem delete any .old files created in this process, to avoid future file creation errors -del /q %KEY_DIR%\*.old
easy-rsa/Windows/build-key-server.bat deleted +0 -8
@@ -1,8 +0,0 @@ [email protected]... off -cd %HOME% -rem build a request for a cert that will be valid for ten years -openssl req -days 3650 -nodes -new -keyout %KEY_DIR%\%1.key -out %KEY_DIR%\%1.csr -config %KEY_CONFIG% -rem sign the cert request with our ca, creating a cert/key pair -openssl ca -days 3650 -out %KEY_DIR%\%1.crt -in %KEY_DIR%\%1.csr -extensions server -config %KEY_CONFIG% -rem delete any .old files created in this process, to avoid future file creation errors -del /q %KEY_DIR%\*.old
easy-rsa/Windows/build-key.bat deleted +0 -8
@@ -1,8 +0,0 @@ [email protected]... off -cd %HOME% -rem build a request for a cert that will be valid for ten years -openssl req -days 3650 -nodes -new -keyout %KEY_DIR%\%1.key -out %KEY_DIR%\%1.csr -config %KEY_CONFIG% -rem sign the cert request with our ca, creating a cert/key pair -openssl ca -days 3650 -out %KEY_DIR%\%1.crt -in %KEY_DIR%\%1.csr -config %KEY_CONFIG% -rem delete any .old files created in this process, to avoid future file creation errors -del /q %KEY_DIR%\*.old
easy-rsa/Windows/clean-all.bat deleted +0 -13
@@ -1,13 +0,0 @@ [email protected]... off -rem move to the HOME directory specified in VARS script -cd %HOME% -rem set a temporary KEY_DIR variable -set d=%KEY_DIR% -rem delete the KEY_DIR and any subdirs quietly -rmdir /s /q %d% -rem make a new KEY_DIR -mkdir %d% -rem copy in a fesh index file so we begin with an empty database -copy index.txt.start %d%\index.txt -rem copy in a fresh serial file so we begin generating keys at index 01 -copy serial.start %d%\serial.
easy-rsa/Windows/index.txt.start deleted +0 -0
easy-rsa/Windows/init-config.bat deleted +0 -1
@@ -1 +0,0 @@ -copy vars.bat.sample vars.bat
easy-rsa/Windows/revoke-full.bat deleted +0 -13
@@ -1,13 +0,0 @@ [email protected]... off -cd %HOME% -rem revoke cert -openssl ca -revoke %KEY_DIR%\%1.crt -config %KEY_CONFIG% -rem generate new crl -openssl ca -gencrl -out %KEY_DIR%\crl.pem -config %KEY_CONFIG% -rem test revocation -rem first concatinate ca cert with newly generated crl -copy %KEY_DIR%\ca.crt+%KEY_DIR%\crl.pem %KEY_DIR%\revoke_test_file.pem -rem now verify the revocation -openssl verify -CAfile %KEY_DIR%\revoke_test_file.pem -crl_check %KEY_DIR%\%1.crt -rem delete temporary test file -del /q %KEY_DIR%\revoke_test_file.pem
easy-rsa/Windows/serial.start deleted +0 -1
@@ -1 +0,0 @@ -01
easy-rsa/Windows/vars.bat.sample deleted +0 -40
@@ -1,40 +0,0 @@ [email protected]... off -rem Edit this variable to point to -rem the openssl.cnf file included -rem with easy-rsa. - -set HOME=%ProgramFiles%\OpenVPN\easy-rsa -set KEY_CONFIG=openssl-1.0.0.cnf - -rem Edit this variable to point to -rem your soon-to-be-created key -rem directory. -rem -rem WARNING: clean-all will do -rem a rm -rf on this directory -rem so make sure you define -rem it correctly! -set KEY_DIR=keys - -rem Increase this to 2048 if you -rem are paranoid. This will slow -rem down TLS negotiation performance -rem as well as the one-time DH parms -rem generation process. -set KEY_SIZE=1024 - -rem These are the default values for fields -rem which will be placed in the certificate. -rem Change these to reflect your site. -rem Don't leave any of these parms blank. - -set KEY_COUNTRY=US -set KEY_PROVINCE=CA -set KEY_CITY=SanFrancisco -set KEY_ORG=OpenVPN -set [email protected]... -set KEY_CN=changeme -set KEY_NAME=changeme -set KEY_OU=changeme -set PKCS11_MODULE_PATH=changeme -set PKCS11_PIN=1234
Signature · 1 line
1.7.3.4
Re: [Openvpn-devel] [PATCH 12/35] Remove easy-rsa
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 91 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> --- Makefile.am| 1 - easy-rsa/1.0/README | 161 ------------ easy-rsa/1.0/build-ca | 13 - easy-rsa/1.0/build-dh | 12 - easy-rsa/1.0/build-inter | 19 -- easy-rsa/1.0/build-key | 20 -- easy-rsa/1.0/build-key-pass | 20 -- easy-rsa/1.0/build-key-pkcs12 | 21 -- easy-rsa/1.0/build-key-server | 22 -- easy-rsa/1.0/build-req | 18 -- easy-rsa/1.0/build-req-pass | 18 -- easy-rsa/1.0/clean-all | 19 -- easy-rsa/1.0/list-crl | 18 -- easy-rsa/1.0/make-crl | 18 -- easy-rsa/1.0/openssl.cnf | 255 ------------------- easy-rsa/1.0/revoke-crt | 18 -- easy-rsa/1.0/revoke-full | 29 --- easy-rsa/1.0/sign-req | 18 -- easy-rsa/1.0/vars | 49 ---- easy-rsa/2.0/Makefile | 13 - easy-rsa/2.0/README | 229 ----------------- easy-rsa/2.0/build-ca | 8 - easy-rsa/2.0/build-dh | 11 - easy-rsa/2.0/build-inter | 7 - easy-rsa/2.0/build-key | 7 - easy-rsa/2.0/build-key-pass | 7 - easy-rsa/2.0/build-key-pkcs12 | 8 - easy-rsa/2.0/build-key-server | 10 - easy-rsa/2.0/build-req | 7 - easy-rsa/2.0/build-req-pass | 7 - easy-rsa/2.0/clean-all | 16 -- easy-rsa/2.0/inherit-inter | 39 --- easy-rsa/2.0/list-crl | 13 - easy-rsa/2.0/openssl-0.9.6.cnf | 265 ------------------- easy-rsa/2.0/openssl-0.9.8.cnf | 290 --------------------- easy-rsa/2.0/openssl-1.0.0.cnf | 285 --------------------- easy-rsa/2.0/pkitool | 379 ---------------------------- easy-rsa/2.0/revoke-full | 40 --- easy-rsa/2.0/sign-req | 7 - easy-rsa/2.0/vars | 74 ------ easy-rsa/2.0/whichopensslcnf | 26 -- easy-rsa/Windows/README.txt | 44 ---- easy-rsa/Windows/build-ca-pass.bat | 8 - easy-rsa/Windows/build-ca.bat | 4 - easy-rsa/Windows/build-dh.bat | 4 - easy-rsa/Windows/build-key-pass.bat | 8 - easy-rsa/Windows/build-key-pkcs12.bat | 10 - easy-rsa/Windows/build-key-server-pass.bat | 8 - easy-rsa/Windows/build-key-server.bat | 8 - easy-rsa/Windows/build-key.bat | 8 - easy-rsa/Windows/clean-all.bat | 13 - easy-rsa/Windows/init-config.bat | 1 - easy-rsa/Windows/revoke-full.bat | 13 - easy-rsa/Windows/serial.start | 1 - easy-rsa/Windows/vars.bat.sample | 40 --- 55 fileschanged, 0 insertions(+), 2667 deletions(-) delete mode 100644 easy-rsa/1.0/README delete mode 100755 easy-rsa/1.0/build-ca delete mode 100755 easy-rsa/1.0/build-dh delete mode 100755 easy-rsa/1.0/build-inter delete mode 100755 easy-rsa/1.0/build-key delete mode 100755 easy-rsa/1.0/build-key-pass delete mode 100755 easy-rsa/1.0/build-key-pkcs12 delete mode 100755 easy-rsa/1.0/build-key-server delete mode 100755 easy-rsa/1.0/build-req delete mode 100755 easy-rsa/1.0/build-req-pass delete mode 100755 easy-rsa/1.0/clean-all delete mode 100644 easy-rsa/1.0/list-crl delete mode 100644 easy-rsa/1.0/make-crl delete mode 100644 easy-rsa/1.0/openssl.cnf delete mode 100644 easy-rsa/1.0/revoke-crt delete mode 100755 easy-rsa/1.0/revoke-full delete mode 100755 easy-rsa/1.0/sign-req delete mode 100644 easy-rsa/1.0/vars delete mode 100644 easy-rsa/2.0/Makefile delete mode 100644 easy-rsa/2.0/README delete mode 100755 easy-rsa/2.0/build-ca delete mode 100755 easy-rsa/2.0/build-dh delete mode 100755 easy-rsa/2.0/build-inter delete mode 100755 easy-rsa/2.0/build-key delete mode 100755 easy-rsa/2.0/build-key-pass delete mode 100755 easy-rsa/2.0/build-key-pkcs12 delete mode 100755 easy-rsa/2.0/build-key-server delete mode 100755 easy-rsa/2.0/build-req delete mode 100755 easy-rsa/2.0/build-req-pass delete mode 100755 easy-rsa/2.0/clean-all delete mode 100755 easy-rsa/2.0/inherit-inter delete mode 100755 easy-rsa/2.0/list-crl delete mode 100755 easy-rsa/2.0/openssl-0.9.6.cnf delete mode 100755 easy-rsa/2.0/openssl-0.9.8.cnf delete mode 100755 easy-rsa/2.0/openssl-1.0.0.cnf delete mode 100755 easy-rsa/2.0/pkitool delete mode 100755 easy-rsa/2.0/revoke-full delete mode 100755 easy-rsa/2.0/sign-req delete mode 100755 easy-rsa/2.0/vars delete mode 100755 easy-rsa/2.0/whichopensslcnf delete mode 100644
easy-rsa/Windows/README.txtdelete mode 100644 easy-rsa/Windows/build-ca-pass.bat delete mode 100644 easy-rsa/Windows/build-ca.bat delete mode 100644 easy-rsa/Windows/build-dh.bat delete mode 100644 easy-rsa/Windows/build-key-pass.bat delete mode 100644 easy-rsa/Windows/build-key-pkcs12.bat delete mode 100644 easy-rsa/Windows/build-key-server-pass.bat delete mode 100644
Quoted 9 lines
easy-rsa/Windows/build-key-server.bat delete mode 100644 easy-rsa/Windows/build-key.bat delete mode 100644 easy-rsa/Windows/clean-all.bat delete mode 100644 easy-rsa/Windows/index.txt.start delete mode 100755 easy-rsa/Windows/init-config.bat delete mode 100644 easy-rsa/Windows/revoke-full.bat delete mode 100644 easy-rsa/Windows/serial.start delete mode 100644 easy-rsa/Windows/vars.bat.sample
ACK. These files will be pulled into a separate git repository, so this makes a lot of sense.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LSgwACgkQDC186MBRfroViQCfR+t1pZJJ6lF6Ge82YtOgeaMB 6s4AoJz+q60torElpk/vNw5Z6846Mqxk
=o2nV
-----END PGP SIGNATURE-----
PATCH 13/35 Remove tap-win32
In reply to Alon Bar-LevIntroduce tap-win32.h which is modified tap-win32/common.h. Except of function rename, it is the same without the tap_id. This file should be provided as part of tap-win32 MSI. For now we hold a copy.
--- Makefile.am | 3 +- configure.ac | 14 +- tap-win32/MAKEFILE | 6 - tap-win32/SOURCES.in | 64 - tap-win32/common.h | 82 -- tap-win32/constants.h | 52 - tap-win32/dhcp.c | 599 -------- tap-win32/dhcp.h | 164 --- tap-win32/endian.h | 35 - tap-win32/error.c | 378 ----- tap-win32/error.h | 88 -- tap-win32/hexdump.c | 69 - tap-win32/hexdump.h | 63 - tap-win32/i386/OemWin2k.inf.in | 195 --- tap-win32/instance.c | 241 --- tap-win32/lock.h | 75 - tap-win32/macinfo.c | 154 -- tap-win32/macinfo.h | 38 - tap-win32/mem.c | 186 --- tap-win32/proto.h | 224 --- tap-win32/prototypes.h | 260 ---- tap-win32/resource.rc | 58 - tap-win32/tapdrvr.c | 3146 ---------------------------------------- tap-win32/types.h | 178 --- tap-windows.h | 68 + tun.h | 2 +- win/autodefs.h.in | 2 +- 27 files changed, 78 insertions(+), 6366 deletions(-) delete mode 100755 tap-win32/MAKEFILE delete mode 100755 tap-win32/SOURCES.in delete mode 100755 tap-win32/common.h delete mode 100755 tap-win32/constants.h delete mode 100755 tap-win32/dhcp.c delete mode 100755 tap-win32/dhcp.h delete mode 100755 tap-win32/endian.h delete mode 100755 tap-win32/error.c delete mode 100755 tap-win32/error.h delete mode 100755 tap-win32/hexdump.c delete mode 100755 tap-win32/hexdump.h delete mode 100755 tap-win32/i386/OemWin2k.inf.in delete mode 100755 tap-win32/instance.c delete mode 100755 tap-win32/lock.h delete mode 100755 tap-win32/macinfo.c delete mode 100755 tap-win32/macinfo.h delete mode 100755 tap-win32/mem.c delete mode 100755 tap-win32/proto.h delete mode 100755 tap-win32/prototypes.h delete mode 100755 tap-win32/resource.rc delete mode 100755 tap-win32/tapdrvr.c delete mode 100755 tap-win32/types.h create mode 100644 tap-windows.h
Makefile.am +1 -2
@@ -44,7 +44,6 @@ EXTRA_DIST = \ sample-keys \ sample-scripts \ suse \ - tap-win32 \ contrib \ debug \ plugins \
@@ -148,7 +147,7 @@ openvpn_SOURCES = \ ssl_verify_polarssl.c ssl_verify_polarssl.h \ status.c status.h \ syshead.h \ - tun.c tun.h \ + tun.c tun.h tap-windows.h \ win32.h win32.c \ cryptoapi.h cryptoapi.c
configure.ac +7 -7
@@ -959,15 +959,15 @@ if test "$SELINUX" = "yes"; then ) fi -TAP_ID="PRODUCT_TAP_ID" +TAP_COMPONENT_ID="PRODUCT_TAP_ID" TAP_WIN32_MIN_MAJOR="PRODUCT_TAP_WIN32_MIN_MAJOR" TAP_WIN32_MIN_MINOR="PRODUCT_TAP_WIN32_MIN_MINOR" -AC_DEFINE_UNQUOTED(TAP_ID, "${TAP_ID}", [The TAP-Win32 id defined in tap-win32/SOURCES]) -AC_DEFINE_UNQUOTED(TAP_WIN32_MIN_MAJOR, ${TAP_WIN32_MIN_MAJOR}, [The TAP-Win32 version number is defined in tap-win32/SOURCES]) -AC_DEFINE_UNQUOTED(TAP_WIN32_MIN_MINOR, ${TAP_WIN32_MIN_MINOR}, [The TAP-Win32 version number is defined in tap-win32/SOURCES]) -AC_SUBST(TAP_ID) -AC_SUBST(TAP_WIN32_MIN_MAJOR) -AC_SUBST(TAP_WIN32_MIN_MINOR) +AC_DEFINE_UNQUOTED([TAP_ID], ["${TAP_ID}"], [The TAP-Win32 id]) +AC_DEFINE_UNQUOTED([TAP_WIN32_MIN_MAJOR], [${TAP_WIN32_MIN_MAJOR}], [The TAP-Win32 version number is defined in tap-win32/SOURCES]) +AC_DEFINE_UNQUOTED([TAP_WIN32_MIN_MINOR], [${TAP_WIN32_MIN_MINOR}], [The TAP-Win32 version number is defined in tap-win32/SOURCES]) +AC_SUBST([TAP_COMPONENT_ID]) +AC_SUBST([TAP_WIN32_MIN_MAJOR]) +AC_SUBST([TAP_WIN32_MIN_MINOR]) win32datadir="\${datadir}/${PACKAGE}-win32" AC_SUBST(win32datadir)
tap-win32/MAKEFILE deleted +0 -6
@@ -1,6 +0,0 @@ -# -# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source -# file to this component. This file merely indirects to the real make file -# that is shared by all the components of NT OS/2 -# -!INCLUDE $(NTMAKEENV)\makefile.def
tap-win32/SOURCES.in deleted +0 -64
64 lines not on this page · raw message
tap-win32/common.h deleted +0 -82
82 lines not on this page · raw message
tap-win32/constants.h deleted +0 -52
52 lines not on this page · raw message
tap-win32/dhcp.c deleted +0 -599
599 lines not on this page · raw message
tap-win32/dhcp.h deleted +0 -164
164 lines not on this page · raw message
tap-win32/endian.h deleted +0 -35
@@ -1,35 +0,0 @@ -/* -* TAP-Win32/TAP-Win64 -- A kernel driver to provide virtual tap -* device functionality on Windows. -* -* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson. -* -* This source code is Copyright (C) 2002-2010 OpenVPN Technologies, Inc., -* and is released under the GPL version 2 (see below). -* -* 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. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program (see the file COPYING included with this -* distribution); if not, write to the Free Software Foundation, Inc., -* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifdef TAP_LITTLE_ENDIAN -#define ntohs (x) RtlUshortByteSwap(x) -#define htons (x) RtlUshortByteSwap(x) -#define ntohl (x) RtlUlongByteSwap(x) -#define htonl (x) RtlUlongByteSwap(x) -#else -#define ntohs (x) ((USHORT)(x)) -#define htons (x) ((USHORT)(x)) -#define ntohl (x) ((ULONG)(x)) -#define htonl (x) ((ULONG)(x)) -#endif
tap-win32/error.c deleted +0 -378
378 lines not on this page · raw message
tap-win32/error.h deleted +0 -88
88 lines not on this page · raw message
tap-win32/hexdump.c deleted +0 -69
69 lines not on this page · raw message
tap-win32/hexdump.h deleted +0 -63
63 lines not on this page · raw message
tap-win32/i386/OemWin2k.inf.in deleted +0 -195
195 lines not on this page · raw message
tap-win32/instance.c deleted +0 -241
241 lines not on this page · raw message
tap-win32/lock.h deleted +0 -75
75 lines not on this page · raw message
tap-win32/macinfo.c deleted +0 -154
154 lines not on this page · raw message
tap-win32/macinfo.h deleted +0 -38
@@ -1,38 +0,0 @@ -/* -* TAP-Win32/TAP-Win64 -- A kernel driver to provide virtual tap -* device functionality on Windows. -* -* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson. -* -* This source code is Copyright (C) 2002-2010 OpenVPN Technologies, Inc., -* and is released under the GPL version 2 (see below). -* -* 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. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program (see the file COPYING included with this -* distribution); if not, write to the Free Software Foundation, Inc., -* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef MacInfoDefined -#define MacInfoDefined - -//=================================================================================== -// Macros -//=================================================================================== -#define IsMacDelimiter (a) (a == ':' || a == '-' || a == '.') -#define IsHexDigit (c) ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f')) - -#define COPY_MAC (dest, src) NdisMoveMemory ((dest), (src), sizeof (MACADDR)) -#define CLEAR_MAC (dest) NdisZeroMemory ((dest), sizeof (MACADDR)) -#define MAC_EQUAL (a,b) (memcmp ((a), (b), sizeof (MACADDR)) == 0) - -#endif
tap-win32/mem.c deleted +0 -186
186 lines not on this page · raw message
tap-win32/proto.h deleted +0 -224
224 lines not on this page · raw message
tap-win32/prototypes.h deleted +0 -260
250 lines not on this page · raw message
tap-win32/resource.rc deleted +0 -58
58 lines not on this page · raw message
tap-win32/tapdrvr.c deleted +0 -3146
3,146 lines not on this page · raw message
tap-win32/types.h deleted +0 -178
178 lines not on this page · raw message
tap-windows.h new file +68 -0
68 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.3.4
Part of the diff is not shown here. View the raw message.
Re: [Openvpn-devel] [PATCH 13/35] Remove tap-win32
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 21 lines · Alon Bar-Lev
Introduce
tap-win32.hwhich is modifiedtap-win32/common.h. Except of function rename, it is the same without thetap_id. This file should be provided as part of tap-win32 MSI. For now we hold a copy.Signed-off-by Alon Bar-Lev <[email protected]...> --- Makefile.am| 3 +- configure.ac | 14 +- tap-win32/MAKEFILE | 6 - tap-win32/SOURCES.in | 64 - tap-win32/common.h | 82 -- tap-win32/constants.h | 52 - tap-win32/dhcp.c | 599 -------- tap-win32/dhcp.h | 164 --- tap-win32/endian.h | 35 - tap-win32/error.c | 378 ----- tap-win32/error.h | 88 -- tap-win32/hexdump.c | 69 - tap-win32/hexdump.h | 63 - tap-win32/i386/OemWin2k.inf.in | 195 --- tap-win32/instance.c | 241 --- tap-win32/lock.h | 75 - tap-win32/macinfo.c | 154 -- tap-win32/macinfo.h | 38 - tap-win32/mem.c | 186 --- tap-win32/proto.h | 224 --- tap-win32/prototypes.h | 260 ---- tap-win32/resource.rc | 58 - tap-win32/tapdrvr.c | 3146 ---------------------------------------- tap-win32/types.h | 178 --- tap-windows.h | 68 + tun.h | 2 +- win/autodefs.h.in | 2 +- 27 files changed,
Quoted 15 lines
78 insertions(+), 6366 deletions(-) delete mode 100755 tap-win32/MAKEFILE delete mode 100755 tap-win32/SOURCES.in delete mode 100755
tap-win32/common.hdelete mode 100755tap-win32/constants.hdelete mode 100755tap-win32/dhcp.cdelete mode 100755tap-win32/dhcp.hdelete mode 100755tap-win32/endian.hdelete mode 100755tap-win32/error.cdelete mode 100755tap-win32/error.hdelete mode 100755tap-win32/hexdump.cdelete mode 100755tap-win32/hexdump.hdelete mode 100755 tap-win32/i386/OemWin2k.inf.in delete mode 100755tap-win32/instance.cdelete mode 100755tap-win32/lock.hdelete mode 100755tap-win32/macinfo.cdelete mode 100755tap-win32/macinfo.hdelete mode 100755tap-win32/mem.cdelete mode 100755tap-win32/proto.hdelete mode 100755tap-win32/prototypes.hdelete mode 100755 tap-win32/resource.rc delete mode 100755tap-win32/tapdrvr.cdelete mode 100755tap-win32/types.hcreate mode 100644tap-windows.h
ACK. The Windows TAP driver will be moved to a separate git repository, so this again makes a lot of sense.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LS0IACgkQDC186MBRfrqvOgCgrk42BkzoFKemGFCW/tXZtdti IwkAn2FiVqsYdK59F1C4hqxq39AfR58T
=ODEe
-----END PGP SIGNATURE-----
PATCH 14/35 cleanup: rename tap-windows function from win32 to win
In reply to Alon Bar-Lev--- configure.ac | 18 +++--- errlevel.h | 2 +- error.c | 6 +- forward.c | 2 +- options.c | 8 +- service-win32/service.h | 2 +- sig.c | 2 +- tap-windows.h | 34 ++++++------ tun.c | 142 +++++++++++++++++++++++----------------------- tun.h | 6 +- version.m4 | 6 +- win/autodefs.h.in | 6 +- win/openvpn.nsi | 8 +- 13 files changed, 121 insertions(+), 121 deletions(-)
configure.ac +9 -9
@@ -959,15 +959,15 @@ if test "$SELINUX" = "yes"; then ) fi -TAP_COMPONENT_ID="PRODUCT_TAP_ID" -TAP_WIN32_MIN_MAJOR="PRODUCT_TAP_WIN32_MIN_MAJOR" -TAP_WIN32_MIN_MINOR="PRODUCT_TAP_WIN32_MIN_MINOR" -AC_DEFINE_UNQUOTED([TAP_ID], ["${TAP_ID}"], [The TAP-Win32 id]) -AC_DEFINE_UNQUOTED([TAP_WIN32_MIN_MAJOR], [${TAP_WIN32_MIN_MAJOR}], [The TAP-Win32 version number is defined in tap-win32/SOURCES]) -AC_DEFINE_UNQUOTED([TAP_WIN32_MIN_MINOR], [${TAP_WIN32_MIN_MINOR}], [The TAP-Win32 version number is defined in tap-win32/SOURCES]) -AC_SUBST([TAP_COMPONENT_ID]) -AC_SUBST([TAP_WIN32_MIN_MAJOR]) -AC_SUBST([TAP_WIN32_MIN_MINOR]) +TAP_WIN_COMPONENT_ID="PRODUCT_TAP_WIN_COMPONENT_ID" +TAP_WIN_MIN_MAJOR="PRODUCT_TAP_WIN_MIN_MAJOR" +TAP_WIN_MIN_MINOR="PRODUCT_TAP_WIN_MIN_MINOR" +AC_DEFINE_UNQUOTED([TAP_WIN_COMPONENT_ID], ["${TAP_WIN_COMPONENT_ID}"], [The tap-windows id]) +AC_DEFINE_UNQUOTED([TAP_WIN_MIN_MAJOR], [${TAP_WIN_MIN_MAJOR}], [The tap-windows version number is required for OpenVPN]) +AC_DEFINE_UNQUOTED([TAP_WIN_MIN_MINOR], [${TAP_WIN_MIN_MINOR}], [The tap-windows version number is required for OpenVPN]) +AC_SUBST([TAP_WIN_COMPONENT_ID]) +AC_SUBST([TAP_WIN_MIN_MAJOR]) +AC_SUBST([TAP_WIN_MIN_MINOR]) win32datadir="\${datadir}/${PACKAGE}-win32" AC_SUBST(win32datadir)
errlevel.h +1 -1
@@ -113,7 +113,7 @@#define D_LINK_RW LOGLEV(6, 69, M_DEBUG)/* show TCP/UDP reads/writes (terse) */ #define D_TUN_RW LOGLEV(6, 69, M_DEBUG)/* show TUN/TAP reads/writes */ -#define D_TAP_WIN32_DEBUG LOGLEV(6, 69, M_DEBUG)/* show TAP-Win32 driver debug info */ +#define D_TAP_WIN_DEBUG LOGLEV(6, 69, M_DEBUG)/* show TAP-Windows driver debug info */ #define D_CLIENT_NAT LOGLEV(6, 69, M_DEBUG)/* show client NAT debug info */ #define D_SHOW_KEYS LOGLEV(7, 70, M_DEBUG)/* show data channel encryption keys */
error.c +3 -3
@@ -614,8 +614,8 @@ x_check_status (int status, } }#elif defined(WIN32) -/* get possible driver error from TAP-Win32 driver */ - extended_msg =tap_win32_getinfo (tt, &gc); +/* get possible driver error from TAP-Windows driver */ + extended_msg =tap_win_getinfo (tt, &gc);#endif if (!ignore_sys_error (my_errno)) {
@@ -741,7 +741,7 @@ strerror_win32 (DWORD errnum, struct gc_arena *gc)#if 1 switch (errnum) {/* -* When the TAP-Win32 driver returns STATUS_UNSUCCESSFUL, this code +* When the TAP-Windows driver returns STATUS_UNSUCCESSFUL, this code * gets returned to user space. */ case ERROR_GEN_FAILURE :
forward.c +1 -1
@@ -1292,7 +1292,7 @@ pre_select (struct context *c) c->c2.timeval.tv_usec =0 ;#if defined(WIN32 ) -if (check_debug_level (D_TAP_WIN32_DEBUG )) +if (check_debug_level (D_TAP_WIN_DEBUG )) { c->c2.timeval.tv_sec =1 ;if (tuntap_defined (c->c1.tuntap))
options.c +4 -4
@@ -657,7 +657,7 @@ static const char usage_message[] ="Windows Specific:\n" "--win-sys path : Pathname of Windows system directory. Default is the pathname\n" " from SystemRoot environment variable.\n" -"--ip-win32 method : When using --ifconfig on Windows, set TAP-Win32 adapter\n" +"--ip-win32 method : When using --ifconfig on Windows, set TAP-Windows adapter\n" " IP address using method = manual, netsh, ipapi,\n" " dynamic, or adaptive (default = adaptive).\n" " Dynamic method allows two optional parameters:\n"
@@ -673,7 +673,7 @@ static const char usage_message[] =" adaptive (default) -- Try ipapi then fall back to exe.\n" " ipapi -- Use IP helper API.\n" " exe -- Call the route.exe shell command.\n" -"--dhcp-option type [parm] : Set extended TAP-Win32 properties, must\n" +"--dhcp-option type [parm] : Set extended TAP-Windows properties, must\n" " be used with --ip-win32 dynamic. For options\n" " which allow multiple addresses,\n" " --dhcp-option must be repeated.\n"
@@ -704,7 +704,7 @@ static const char usage_message[] =" after TAP adapter is up and routes have been added.\n" "Windows Standalone Options:\n" "\n" -"--show-adapters : Show all TAP-Win32 adapters.\n" +"--show-adapters : Show all TAP-Windows adapters.\n" "--show-net : Show " PACKAGE_NAME "'s view of routing table and net adapter list.\n" "--show-valid-subnets : Show valid subnets for --dev tun emulation.\n" "--allow-nonadmin [TAP-adapter] : Allow " PACKAGE_NAME " running without admin privileges\n"
@@ -6046,7 +6046,7 @@ add_option (struct options *options,else if (streq (p[0 ],"show-adapters" )) {VERIFY_PERMISSION (OPT_P_GENERAL ); -show_tap_win32_adapters (M_INFO |M_NOPREFIX ,M_WARN |M_NOPREFIX ); +show_tap_win_adapters (M_INFO |M_NOPREFIX ,M_WARN |M_NOPREFIX );openvpn_exit (OPENVPN_EXIT_STATUS_GOOD );/* exit point */ }else if (streq (p[0 ],"show-net" ))
service-win32/service.h +1 -1
@@ -69,7 +69,7 @@ extern "C" {// displayed name of the service #define SZSERVICEDISPLAYNAME PACKAGE_NAME " Service"// list of service dependencies - "dep1\0dep2\0\0" -#define SZDEPENDENCIES TAP_ID "\0Dhcp\0\0" +#define SZDEPENDENCIES TAP_WIN_COMPONENT_ID "\0Dhcp\0\0"//////////////////////////////////////////////////////////////////////////////
sig.c +1 -1
@@ -268,7 +268,7 @@ print_status (const struct context *c, struct status_output *so)#ifdef WIN32 if (tuntap_defined (c->c1.tuntap))status_printf (so,"TAP-WIN32 driver status,\"%s\"" , -tap_win32_getinfo (c->c1.tuntap, &gc)); +tap_win_getinfo (c->c1.tuntap, &gc));#endif status_printf (so,"END" );
tap-windows.h +17 -17
@@ -1,6 +1,6 @@/* -* TAP-Win32/TAP-Win64 -- A kernel driver to provide virtual tap -* device functionality on Windows. +* TAP-Windows -- A kernel driver to provide virtual tap +* device functionality on Windows. * * This code was inspired by the CIPE-Win32 driver by Damion K. Wilson. *
@@ -21,32 +21,32 @@* distribution); if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __TAP_H -#define __TAP_H +#ifndef __TAP_WIN_H +#define __TAP_WIN_H//============= // TAP IOCTLs //============= -#define TAP_CONTROL_CODE (request,method) \ +#define TAP_WIN_CONTROL_CODE (request,method) \ CTL_CODE (FILE_DEVICE_UNKNOWN, request, method, FILE_ANY_ACCESS)// Present in 8.1 -#define TAP_IOCTL_GET_MAC TAP_CONTROL_CODE (1, METHOD_BUFFERED) -#define TAP_IOCTL_GET_VERSION TAP_CONTROL_CODE (2, METHOD_BUFFERED) -#define TAP_IOCTL_GET_MTU TAP_CONTROL_CODE (3, METHOD_BUFFERED) -#define TAP_IOCTL_GET_INFO TAP_CONTROL_CODE (4, METHOD_BUFFERED) -#define TAP_IOCTL_CONFIG_POINT_TO_POINT TAP_CONTROL_CODE (5, METHOD_BUFFERED) -#define TAP_IOCTL_SET_MEDIA_STATUS TAP_CONTROL_CODE (6, METHOD_BUFFERED) -#define TAP_IOCTL_CONFIG_DHCP_MASQ TAP_CONTROL_CODE (7, METHOD_BUFFERED) -#define TAP_IOCTL_GET_LOG_LINE TAP_CONTROL_CODE (8, METHOD_BUFFERED) -#define TAP_IOCTL_CONFIG_DHCP_SET_OPT TAP_CONTROL_CODE (9, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_GET_MAC TAP_WIN_CONTROL_CODE (1, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_GET_VERSION TAP_WIN_CONTROL_CODE (2, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_GET_MTU TAP_WIN_CONTROL_CODE (3, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_GET_INFO TAP_WIN_CONTROL_CODE (4, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_CONFIG_POINT_TO_POINT TAP_WIN_CONTROL_CODE (5, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_SET_MEDIA_STATUS TAP_WIN_CONTROL_CODE (6, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_CONFIG_DHCP_MASQ TAP_WIN_CONTROL_CODE (7, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_GET_LOG_LINE TAP_WIN_CONTROL_CODE (8, METHOD_BUFFERED) +#define TAP_WIN_IOCTL_CONFIG_DHCP_SET_OPT TAP_WIN_CONTROL_CODE (9, METHOD_BUFFERED)// Added in 8.2 -/* obsoletes TAP_IOCTL_CONFIG_POINT_TO_POINT */ -#define TAP_IOCTL_CONFIG_TUN TAP_CONTROL_CODE (10, METHOD_BUFFERED) +/* obsoletes TAP_WIN_IOCTL_CONFIG_POINT_TO_POINT */ +#define TAP_WIN_IOCTL_CONFIG_TUN TAP_WIN_CONTROL_CODE (10, METHOD_BUFFERED)//================= // Registry keys
@@ -63,6 +63,6 @@#define USERMODEDEVICEDIR "\\\\.\\Global\\"#define SYSDEVICEDIR "\\Device\\"#define USERDEVICEDIR "\\DosDevices\\Global\\" -#define TAPSUFFIX ".tap" +#define TAP_WIN_SUFFIX ".tap"#endif
tun.c +71 -71
448 lines not on this page · raw message
tun.h +3 -3
@@ -164,7 +164,7 @@ struct tuntapULONG ipapi_instance;in_addr_t adapter_netmask; -/* Windows adapter index for TAP-Win32 adapter, +/* Windows adapter index for TAP-Windows adapter, ~0 if undefined */ DWORD adapter_index;
@@ -333,13 +333,13 @@ DWORD adapter_index_of_ip (const IP_ADAPTER_INFO *list,int *count, in_addr_t *netmask); -void show_tap_win32_adapters (int msglev,int warnlev); +void show_tap_win_adapters (int msglev,int warnlev);void show_adapters (int msglev);void tap_allow_nonadmin_access (const char *dev_node);void show_valid_win32_tun_subnets (void ); -const char *tap_win32_getinfo (const struct tuntap *tt,struct gc_arena *gc); +const char *tap_win_getinfo (const struct tuntap *tt,struct gc_arena *gc);void tun_show_debug (struct tuntap *tt);bool dhcp_release_by_adapter_index (const DWORD adapter_index);
version.m4 +3 -3
@@ -1,6 +1,6 @@ dnl define the OpenVPN version define(PRODUCT_VERSION,[2.x-master]) dnl define the TAP version -define(PRODUCT_TAP_ID,[tap0901]) -define(PRODUCT_TAP_WIN32_MIN_MAJOR,[9]) -define(PRODUCT_TAP_WIN32_MIN_MINOR,[9]) +define(PRODUCT_TAP_WIN_COMPONENT_ID,[tap0901]) +define(PRODUCT_TAP_WIN_MIN_MAJOR,[9]) +define(PRODUCT_TAP_WIN_MIN_MINOR,[9])
win/autodefs.h.in +3 -3
@@ -6,9 +6,9 @@ * * The TAP-Win32 version number is defined in tap-win32/SOURCES */ -#define TAP_COMPONENT_ID "@PRODUCT_TAP_ID@" -#define TAP_WIN32_MIN_MAJOR @PRODUCT_TAP_WIN32_MIN_MAJOR@ -#define TAP_WIN32_MIN_MINOR @PRODUCT_TAP_WIN32_MIN_MINOR@ +#define TAP_WIN_COMPONENT_ID "@PRODUCT_TAP_WIN_COMPONENT_ID@" +#define TAP_WIN_MIN_MAJOR @PRODUCT_TAP_WIN_MIN_MAJOR@ +#define TAP_WIN_MIN_MINOR @PRODUCT_TAP_WIN_MIN_MINOR@ /* Friendly name for TAP driver */ #define PRODUCT_TAP_DEVICE_DESCRIPTION "@PRODUCT_TAP_DEVICE_DESCRIPTION@"
win/openvpn.nsi +4 -4
@@ -44,7 +44,7 @@ SetCompressor lzma !define VERSION "${PRODUCT_VERSION}${DBG_POSTFIX}" -!define TAP "${PRODUCT_TAP_ID}" +!define TAP "${PRODUCT_TAP_WIN_COMPONENT_ID}" !define TAPDRV "${TAP}.sys" ; Default service settings
@@ -409,7 +409,7 @@ Section "TAP Virtual Ethernet Adapter" SecTAP File "${GEN}\amd64\${TAPDRV}" # Don't try to install TAP driver signature if it does not exist. - File /nonfatal "${GEN}\amd64\${PRODUCT_TAP_ID}.cat" + File /nonfatal "${GEN}\amd64\${PRODUCT_TAP_COMPONENT_ID}.cat" goto tapend
@@ -425,7 +425,7 @@ tap-32bit: File "${GEN}\i386\${TAPDRV}" # Don't try to install TAP driver signature if it does not exist. - File /nonfatal "${GEN}\i386\${PRODUCT_TAP_ID}.cat" + File /nonfatal "${GEN}\i386\${PRODUCT_TAP_COMPONENT_ID}.cat" tapend:
@@ -778,7 +778,7 @@ Section "Uninstall" Delete "$INSTDIR\log\README.txt" Delete "$INSTDIR\driver\OemWin2k.inf" - Delete "$INSTDIR\driver\${PRODUCT_TAP_ID}.cat" + Delete "$INSTDIR\driver\${PRODUCT_TAP_COMPONENT_ID}.cat" Delete "$INSTDIR\driver\${TAPDRV}" Delete "$INSTDIR\bin\openssl.exe"
Signature · 1 line
1.7.3.4
PATCH 15/35 build: remove windows specific build system
In reply to Alon Bar-LevIt will be completely re-written in future
--- Makefile.am | 8 +- doclean | 73 ----- domake-win | 138 -------- msvc/autodefs.h.in | 20 -- msvc/config.py | 93 ------ msvc/msvc.mak | 52 --- service-win32/msvc.mak | 30 -- win/autodefs.h.in | 31 -- win/build.py | 23 -- win/build_all.py | 69 ---- win/build_ddk.py | 55 ---- win/build_exe.py | 15 - win/config.h.in | 363 --------------------- win/config.py | 21 -- win/config_all.py | 13 - win/config_tap.py | 35 -- win/config_ti.py | 18 - win/js.py | 10 - win/make_dist.py | 107 ------- win/msvc.mak.in | 69 ---- win/openvpn.nsi | 822 ------------------------------------------------ win/setpath.nsi | 231 -------------- win/settings.in | 100 ------ win/show.py | 9 - win/sign.py | 23 -- win/tap_span.py | 129 -------- win/wb.py | 322 ------------------- 27 files changed, 2 insertions(+), 2877 deletions(-) delete mode 100755 doclean delete mode 100644 domake-win delete mode 100644 msvc/autodefs.h.in delete mode 100644 msvc/config.py delete mode 100644 msvc/msvc.mak delete mode 100644 service-win32/msvc.mak delete mode 100644 win/__init__.py delete mode 100644 win/autodefs.h.in delete mode 100644 win/build.py delete mode 100644 win/build_all.py delete mode 100644 win/build_ddk.py delete mode 100644 win/build_exe.py delete mode 100644 win/config.h.in delete mode 100644 win/config.py delete mode 100644 win/config_all.py delete mode 100644 win/config_tap.py delete mode 100644 win/config_ti.py delete mode 100644 win/js.py delete mode 100644 win/make_dist.py delete mode 100644 win/msvc.mak.in delete mode 100755 win/openvpn.nsi delete mode 100755 win/setpath.nsi delete mode 100644 win/settings.in delete mode 100644 win/show.py delete mode 100644 win/sign.py delete mode 100644 win/tap_span.py delete mode 100644 win/wb.py
Makefile.am +2 -6
@@ -46,8 +46,7 @@ EXTRA_DIST = \ suse \ contrib \ debug \ - plugins \ - win + plugins SUBDIRS = service-win32
@@ -59,8 +58,6 @@ dist_doc_DATA = \ management/management-notes.txt dist_noinst_SCRIPTS = \ - doclean \ - domake-win \ $(test_scripts) \ t_cltsrv-down.sh \ configure_h.awk configure_log.awk
@@ -69,8 +66,7 @@ dist_noinst_DATA = \ openvpn.spec \ COPYRIGHT.GPL \ PORTS \ - INSTALL-win32.txt \ - service-win32/msvc.mak + INSTALL-win32.txt openvpn_SOURCES = \ base64.c base64.h \
doclean deleted +0 -73
73 lines not on this page · raw message
domake-win deleted +0 -138
138 lines not on this page · raw message
msvc/autodefs.h.in deleted +0 -20
@@ -1,20 +0,0 @@ -/* - * Minimum TAP-Win32 version number expected by userspace - * - * The TAP-Win32 version number is defined in tap-win32/SOURCES - */ -#define TAP_ID "@PRODUCT_TAP_ID@" -#define TAP_WIN32_MIN_MAJOR @PRODUCT_TAP_WIN32_MIN_MAJOR@ -#define TAP_WIN32_MIN_MINOR @PRODUCT_TAP_WIN32_MIN_MINOR@ - -/* Name of package */ -#define PACKAGE "@PRODUCT_UNIX_NAME@" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "@PRODUCT_NAME@" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "@PRODUCT_UNIX_NAME@" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "@PRODUCT_VERSION@"
msvc/config.py deleted +0 -93
93 lines not on this page · raw message
msvc/msvc.mak deleted +0 -52
52 lines not on this page · raw message
service-win32/msvc.mak deleted +0 -30
@@ -1,30 +0,0 @@ -# This makefile builds the OpenVPN service wrapper for Windows in the -# Visual Studio 2008 environment. - -# Some of these libs may not be needed -LIBS = ws2_32.lib crypt32.lib iphlpapi.lib winmm.lib user32.lib gdi32.lib advapi32.lib wininet.lib -EXE = openvpnserv.exe - -CPP=cl.exe -CPP_ARG_COMMON=/nologo /W3 -DWIN32 -DWIN32_LEAN_AND_MEAN -D_CONSOLE -D_MBCS -D_CRT_SECURE_NO_DEPRECATE /FD /c -I".." -CPP_PROJ=$(CPP_ARG_COMMON) /O2 /MD -DNDEBUG - -LINK32=link.exe -LINK32_FLAGS=/nologo /subsystem:console /incremental:no - -OBJS = \ - openvpnserv.obj \ - service.obj - -openvpnserv : $(OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) "/out:$(EXE)" $(LIBS) $(OBJS) -<< - -clean : - del /Q $(OBJS) $(EXE) *.idb *.pdb - -.c.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<<
win/__init__.py deleted +0 -0
win/autodefs.h.in deleted +0 -31
@@ -1,31 +0,0 @@ -#ifndef AUTODEFS_H -#define AUTODEFS_H - -/* - * Minimum TAP-Win32 version number expected by userspace - * - * The TAP-Win32 version number is defined in tap-win32/SOURCES - */ -#define TAP_WIN_COMPONENT_ID "@PRODUCT_TAP_WIN_COMPONENT_ID@" -#define TAP_WIN_MIN_MAJOR @PRODUCT_TAP_WIN_MIN_MAJOR@ -#define TAP_WIN_MIN_MINOR @PRODUCT_TAP_WIN_MIN_MINOR@ - -/* Friendly name for TAP driver */ -#define PRODUCT_TAP_DEVICE_DESCRIPTION "@PRODUCT_TAP_DEVICE_DESCRIPTION@" - -/* Version number of DDK/WDK used to build TAP driver */ -#define DDKVER_MAJOR @DDKVER_MAJOR@ - -/* Name of package */ -#define PACKAGE "@PRODUCT_UNIX_NAME@" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "@PRODUCT_NAME@" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "@PRODUCT_UNIX_NAME@" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "@PRODUCT_VERSION@" - -#endif
win/build.py deleted +0 -23
@@ -1,23 +0,0 @@ -import os, sys -from wb import system, config, home_fn, cd_home, cd_service_win32, run_in_vs_shell - -def main(): - """Build openvpn.exe and openvpnserv.exe""" - cd_home() - run_in_vs_shell("nmake /f %s" % (home_fn('msvc.mak'),)) - cd_service_win32() - run_in_vs_shell("nmake /f %s" % ('msvc.mak')) - -def clean(): - """Clean up after openvpn.exe and openvpnserv.exe build""" - cd_home() - run_in_vs_shell("nmake /f %s clean" % (home_fn('msvc.mak'),)) - os.chdir("service-win32") - run_in_vs_shell("nmake /f %s clean" % ('msvc.mak')) - -# if we are run directly, and not loaded as a module -if __name__ == "__main__": - if len(sys.argv) == 2 and sys.argv[1] == 'clean': - clean() - else: - main()
win/build_all.py deleted +0 -69
69 lines not on this page · raw message
win/build_ddk.py deleted +0 -55
55 lines not on this page · raw message
win/build_exe.py deleted +0 -15
@@ -1,15 +0,0 @@ -from config import main as config_main -from build import main as build_openvpn -from build_ddk import main as build_ddk -from sign import main as sign -from make_dist import main as make_dist - -def main(config): - config_main(config) - build_openvpn() - make_dist(config, tap=False) - -# if we are run directly, and not loaded as a module -if __name__ == "__main__": - from wb import config - main(config)
win/config.h.in deleted +0 -363
363 lines not on this page · raw message
win/config.py deleted +0 -21
@@ -1,21 +0,0 @@ -from wb import preprocess, autogen, mod_fn, home_fn, build_config_h, build_configure_h, build_version_m4_vars, build_autodefs, make_headers_objs, dict_def - -def main(config): - build_config_h(config) - build_configure_h(config, mod_fn(home_fn('configure.h')), head_comment='/* %s */\n\n' % autogen) - build_version_m4_vars(mod_fn(mod_fn('version_m4_vars.tmp')), head_comment='/* %s */\n\n' % autogen) - build_autodefs(config, mod_fn('autodefs.h.in'), home_fn('autodefs.h')) - ho = make_headers_objs(home_fn('Makefile.am')) - - preprocess(dict_def(config, [('HEADERS_OBJS', ho)]), - in_fn=mod_fn('msvc.mak.in'), - out_fn=home_fn('msvc.mak'), - quote_begin='@', - quote_end='@', - if_prefix='!', - head_comment='# %s\n\n' % autogen) - -# if we are run directly, and not loaded as a module -if __name__ == "__main__": - from wb import config - main(config)
win/config_all.py deleted +0 -13
@@ -1,13 +0,0 @@ -from config import main as config_main -from config_tap import main as config_tap -from config_ti import main as config_ti - -def main(config): - config_main(config) - config_tap(config) - config_ti(config) - -# if we are run directly, and not loaded as a module -if __name__ == "__main__": - from wb import config - main(config)
win/config_tap.py deleted +0 -35
@@ -1,35 +0,0 @@ -import os -from wb import preprocess, home_fn, autogen, dict_def - -def main(config): - preprocess(config, - in_fn=home_fn('tap-win32/SOURCES.in'), - out_fn=home_fn('tap-win32/SOURCES'), - quote_begin='@@', - quote_end='@@', - head_comment='# %s\n\n' % autogen) - - preprocess(config, - in_fn=home_fn('tap-win32/i386/OemWin2k.inf.in'), - out_fn=home_fn('tap-win32/i386/OemWin2k.inf'), - quote_begin='@@', - quote_end='@@', - if_prefix='!', - head_comment='; %s\n\n' % autogen) - - try: - os.mkdir(home_fn('tap-win32/amd64')) - except: - pass - preprocess(dict_def(config, [('AMD64', '1')]), - in_fn=home_fn('tap-win32/i386/OemWin2k.inf.in'), - out_fn=home_fn('tap-win32/amd64/OemWin2k.inf'), - quote_begin='@@', - quote_end='@@', - if_prefix='!', - head_comment='; %s\n\n' % autogen) - -# if we are run directly, and not loaded as a module -if __name__ == "__main__": - from wb import config - main(config)
win/config_ti.py deleted +0 -18
@@ -1,18 +0,0 @@ -import os, shutil -from wb import preprocess, home_fn, autogen - -def main(config): - src = os.path.join(home_fn(config['TISRC']), config['DDKVER_MAJOR']) - dest = home_fn('tapinstall') - shutil.rmtree(dest, ignore_errors=True) - shutil.copytree(src, dest) - preprocess(config, - in_fn=os.path.join(src, 'sources'), - out_fn=os.path.join(dest, 'sources'), - if_prefix='!', - head_comment='# %s\n\n' % autogen) - -# if we are run directly, and not loaded as a module -if __name__ == "__main__": - from wb import config - main(config)
win/js.py deleted +0 -10
@@ -1,10 +0,0 @@ -import json - -# usage: -# print JSON().encode(kv) - -class JSON(json.JSONEncoder): - def __init__(self, **kwargs): - args = dict(sort_keys=True, indent=2) - args.update(kwargs) - json.JSONEncoder.__init__(self, **args)
win/make_dist.py deleted +0 -107
107 lines not on this page · raw message
win/msvc.mak.in deleted +0 -69
69 lines not on this page · raw message
win/openvpn.nsi deleted +0 -822
822 lines not on this page · raw message
win/setpath.nsi deleted +0 -231
231 lines not on this page · raw message
win/settings.in deleted +0 -100
100 lines not on this page · raw message
win/show.py deleted +0 -9
@@ -1,9 +0,0 @@ -from wb import get_config -from js import JSON - -def main(): - print JSON().encode(get_config()) - -# if we are run directly, and not loaded as a module -if __name__ == "__main__": - main()
win/sign.py deleted +0 -23
@@ -1,23 +0,0 @@ -import sys -from wb import config, choose_arch, home_fn - -if 'SIGNTOOL' in config: - sys.path.append(home_fn(config['SIGNTOOL'])) - -def main(conf, arch, tap_dir): - from signtool import SignTool - st = SignTool(conf, tap_dir) - for x64 in choose_arch(arch): - st.sign_verify(x64=x64) - -# if we are run directly, and not loaded as a module -if __name__ == "__main__": - if len(sys.argv) >= 2: - if len(sys.argv) >= 3: - tap_dir = home_fn(sys.argv[2]) - else: - tap_dir = None - main(config, sys.argv[1], tap_dir) - else: - print "usage: sign <x64|x86|all> [tap-dir]" - sys.exit(2)
win/tap_span.py deleted +0 -129
129 lines not on this page · raw message
win/wb.py deleted +0 -322
322 lines not on this page · raw message
Signature · 1 line
1.7.3.4
PATCH 16/35 build: split acinclude.m4 into m4/*
In reply to Alon Bar-Levax_emptyarray.m4 ax_openvpn_lib.m4 ax_socklen_t.m4 ax_varargs.m4
--- Makefile.am | 1 + acinclude.m4 | 131 -------------------------------------------------- configure.ac | 1 + m4/ax_emptyarray.m4 | 27 ++++++++++ m4/ax_openvpn_lib.m4 | 4 ++ m4/ax_socklen_t.m4 | 50 +++++++++++++++++++ m4/ax_varargs.m4 | 43 ++++++++++++++++ 7 files changed, 126 insertions(+), 131 deletions(-) delete mode 100644 acinclude.m4 create mode 100644 m4/.keep create mode 100644 m4/ax_emptyarray.m4 create mode 100644 m4/ax_openvpn_lib.m4 create mode 100644 m4/ax_socklen_t.m4 create mode 100644 m4/ax_varargs.m4
Makefile.am +1 -0
@@ -28,6 +28,7 @@ LDADD = @LIBOBJS@ # This option prevents autoreconf from overriding our COPYING and # INSTALL targets: AUTOMAKE_OPTIONS = foreign +ACLOCAL_AMFLAGS = -I m4 MAINTAINERCLEANFILES = \ config.log config.status \
acinclude.m4 deleted +0 -131
131 lines not on this page · raw message
configure.ac +1 -0
@@ -32,6 +32,7 @@ AC_CONFIG_SRCDIR(syshead.h) dnl Guess host type. AC_CANONICAL_HOST +AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE(openvpn, [$PACKAGE_VERSION]) AC_ARG_WITH(cygwin-native,
m4/.keep new file +0 -0
m4/ax_emptyarray.m4 new file +27 -0
@@ -0,0 +1,27 @@ +dnl @synopsis AX_EMPTY_ARRAY +dnl +dnl Define EMPTY_ARRAY_SIZE to be either "0" +dnl or "" depending on which syntax the compiler +dnl prefers for empty arrays in structs. +dnl +dnl @version +dnl @author James Yonan <[email protected]...> +AC_DEFUN([AX_EMPTY_ARRAY], [ + AC_MSG_RESULT([checking for C compiler empty array support]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE( + [ + struct { int foo; int bar[[0]]; } mystruct; + ])], [ + AC_DEFINE_UNQUOTED(EMPTY_ARRAY_SIZE, 0, [Dimension to use for empty array declaration]) + ], [ + AC_COMPILE_IFELSE([AC_LANG_SOURCE( + [ + struct { int foo; int bar[[]]; } mystruct; + ])], [ + AC_DEFINE_UNQUOTED(EMPTY_ARRAY_SIZE,, [Dimension to use for empty array declaration]) + ], [ + AC_MSG_ERROR([C compiler is unable to creaty empty arrays]) + ]) + ]) + ] +)
m4/ax_openvpn_lib.m4 new file +4 -0
@@ -0,0 +1,4 @@ +dnl OPENVPN_ADD_LIBS(LIB) +AC_DEFUN([OPENVPN_ADD_LIBS], [ + LIBS="$1 $LIBS" +])
m4/ax_socklen_t.m4 new file +50 -0
50 lines not on this page · raw message
m4/ax_varargs.m4 new file +43 -0
43 lines not on this page · raw message
Signature · 1 line
1.7.3.4
PATCH 17/35 build: m4/ax_varargs.m4: cleanup
In reply to Alon Bar-Lev--- m4/ax_varargs.m4 | 78 ++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 55 insertions(+), 23 deletions(-)
m4/ax_varargs.m4 +55 -23
@@ -6,18 +6,34 @@ dnl dnl @version dnl @author James Yonan <[email protected]...>, Matthias Andree <[email protected]...> AC_DEFUN([AX_CPP_VARARG_MACRO_GCC], [dnl - AS_VAR_PUSHDEF([VAR],[ax_cv_cpp_vararg_macro_gcc])dnl - AC_CACHE_CHECK([for GNU GCC vararg macro support], VAR, [dnl - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - #define macro(a, b...) func(a, b) - int func(int a, int b, int c); - int test() { return macro(1, 2, 3); } - ])], [ VAR=yes ], [VAR=no])]) - if test $VAR = yes ; then - AC_DEFINE([HAVE_CPP_VARARG_MACRO_GCC], 1, - [Define to 1 if your compiler supports GNU GCC-style variadic macros]) - fi - AS_VAR_POPDEF([VAR])dnl + AS_VAR_PUSHDEF([VAR], [ax_cv_cpp_vararg_macro_gcc])dnl + AC_CACHE_CHECK( + [for GNU GCC vararg macro support], + [VAR], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + , + [[ +#define macro(a, b...) func(a, b) +int func(int a, int b, int c); +int test() { return macro(1, 2, 3); } + ]] + )], + [VAR=yes], + [VAR=no] + )] + )dnl + + AS_VAR_IF( + [VAR], + [yes], + [AC_DEFINE( + [HAVE_CPP_VARARG_MACRO_GCC], + [1], + [Define to 1 if your compiler supports GNU GCC-style variadic macros] + )] + )dnl + AS_VAR_POPDEF([VAR])dnl ]) dnl @synopsis AX_CPP_VARARG_MACRO_ISO
@@ -28,16 +44,32 @@ dnl dnl @version dnl @author James Yonan <[email protected]...>, Matthias Andree <[email protected]...> AC_DEFUN([AX_CPP_VARARG_MACRO_ISO], [dnl - AS_VAR_PUSHDEF([VAR],[ax_cv_cpp_vararg_macro_iso])dnl - AC_CACHE_CHECK([for ISO C 1999 vararg macro support], VAR, [dnl - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + AS_VAR_PUSHDEF([VAR],[ax_cv_cpp_vararg_macro_iso])dnl + AC_CACHE_CHECK( + [for ISO C 1999 vararg macro support], + [VAR], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + , + [[ #define macro(a, ...) func(a, __VA_ARGS__) - int func(int a, int b, int c); - int test() { return macro(1, 2, 3); } - ])], [ VAR=yes ], [VAR=no])]) - if test $VAR = yes ; then - AC_DEFINE([HAVE_CPP_VARARG_MACRO_ISO], 1, - [Define to 1 if your compiler supports ISO C99 variadic macros]) - fi - AS_VAR_POPDEF([VAR])dnl +int func(int a, int b, int c); +int test() { return macro(1, 2, 3); } + ]] + )], + [VAR=yes], + [VAR=no] + )] + )dnl + + AS_VAR_IF( + [VAR], + [yes], + [AC_DEFINE( + [HAVE_CPP_VARARG_MACRO_ISO], + [1], + [Define to 1 if your compiler supports ISO C99 variadic macros] + )] + )dnl + AS_VAR_POPDEF([VAR])dnl ])
Signature · 1 line
1.7.3.4
PATCH 18/35 build: m4/ax_emptyarray.m4: cleanup
In reply to Alon Bar-Lev--- m4/ax_emptyarray.m4 | 49 +++++++++++++++++++++++++++++++------------------ 1 files changed, 31 insertions(+), 18 deletions(-)
m4/ax_emptyarray.m4 +31 -18
@@ -7,21 +7,34 @@ dnl dnl @version dnl @author James Yonan <[email protected]...> AC_DEFUN([AX_EMPTY_ARRAY], [ - AC_MSG_RESULT([checking for C compiler empty array support]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE( - [ - struct { int foo; int bar[[0]]; } mystruct; - ])], [ - AC_DEFINE_UNQUOTED(EMPTY_ARRAY_SIZE, 0, [Dimension to use for empty array declaration]) - ], [ - AC_COMPILE_IFELSE([AC_LANG_SOURCE( - [ - struct { int foo; int bar[[]]; } mystruct; - ])], [ - AC_DEFINE_UNQUOTED(EMPTY_ARRAY_SIZE,, [Dimension to use for empty array declaration]) - ], [ - AC_MSG_ERROR([C compiler is unable to creaty empty arrays]) - ]) - ]) - ] -) + AS_VAR_PUSHDEF([VAR],[ax_cv_c_empty_array])dnl + AC_CACHE_CHECK( + [for C compiler empty array size], + [VAR], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + , + [[ +struct { int foo; int bar[0]; } mystruct; + ]] + )], + [VAR=0], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + , + [[ +struct { int foo; int bar[]; } mystruct; + ]] + )], + [VAR=], + [AC_MSG_ERROR([C compiler is unable to creaty empty arrays])] + )] + )] + )dnl + AC_DEFINE_UNQUOTED( + [EMPTY_ARRAY_SIZE], + [$VAR], + [Dimension to use for empty array declaration] + )dnl + AS_VAR_POPDEF([VAR])dnl +])
Signature · 1 line
1.7.3.4
PATCH 19/35 build: m4/ax_socklen_t.m4: cleanup
In reply to Alon Bar-Lev--- configure.ac | 2 +- m4/ax_socklen_t.m4 | 95 +++++++++++++++++++++++++++++---------------------- 2 files changed, 55 insertions(+), 42 deletions(-)
configure.ac +1 -1
@@ -381,10 +381,10 @@ AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_UID_T -TYPE_SOCKLEN_T AC_HEADER_TIME AX_CPP_VARARG_MACRO_ISO AX_CPP_VARARG_MACRO_GCC +AX_TYPE_SOCKLEN_T AX_EMPTY_ARRAY dnl Check for more header files.
m4/ax_socklen_t.m4 +54 -41
104 lines not on this page · raw message
Signature · 1 line
1.7.3.4
PATCH 20/35 build: autotools: first pass of trivial autotools changes
In reply to Alon Bar-Lev--- Makefile.am | 12 +- configure.ac | 1227 +++++++++++++++++++++++++++------------------------------- lladdr.c | 2 +- misc.c | 2 +- misc.h | 2 +- options.c | 12 +- route.c | 18 +- socket.c | 2 +- syshead.h | 39 +-- tun.c | 6 +- version.m4 | 11 +- win32.h | 11 - 12 files changed, 624 insertions(+), 720 deletions(-)
Makefile.am +5 -7
@@ -23,11 +23,9 @@ # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -LDADD = @LIBOBJS@ - # This option prevents autoreconf from overriding our COPYING and # INSTALL targets: -AUTOMAKE_OPTIONS = foreign +AUTOMAKE_OPTIONS = foreign 1.10 ACLOCAL_AMFLAGS = -I m4 MAINTAINERCLEANFILES = \
@@ -64,10 +62,13 @@ dist_noinst_SCRIPTS = \ configure_h.awk configure_log.awk dist_noinst_DATA = \ + .gitignore \ openvpn.spec \ COPYRIGHT.GPL \ PORTS \ - INSTALL-win32.txt + INSTALL-win32.txt \ + README.IPv6 TODO.IPv6 \ + README.polarssl \ openvpn_SOURCES = \ base64.c base64.h \
@@ -155,9 +156,6 @@ configure.h: Makefile awk -f $(srcdir)/configure_h.awk config.h > $@ awk -f $(srcdir)/configure_log.awk config.log >> $@ -dist-hook: - cd $(distdir) && for i in $(EXTRA_DIST) $(SUBDIRS) ; do find $$i -name .svn -type d -prune -exec rm -rf '{}' ';' ; rm -f `find $$i -type f | grep -E '(^|\/)\.?\#|\~$$|\.s?o$$'` ; done - if WIN32 dist_noinst_DATA += openvpn.8 nodist_html_DATA = openvpn.8.html
configure.ac +576 -651
1,446 lines not on this page · raw message
lladdr.c +1 -1
@@ -16,7 +16,7 @@ int set_lladdr(const char *ifname, const char *lladdr,return -1 ;#if defined(TARGET_LINUX ) -#ifdef CONFIG_FEATURE_IPROUTE +#ifdef ENABLE_IPROUTE argv_printf (&argv,"%s link set addr %s dev %s" , iproute_path, lladdr, ifname);
misc.c +1 -1
@@ -39,7 +39,7 @@#include "memdbg.h" -#ifdef CONFIG_FEATURE_IPROUTE +#ifdef ENABLE_IPROUTE const char *iproute_path =IPROUTE_PATH ;/* GLOBAL */ #endif
misc.h +1 -1
@@ -396,7 +396,7 @@ void get_user_pass_auto_userid (struct user_pass *up, const char *tag);/* * /sbin/ip path, may be overridden */ -#ifdef CONFIG_FEATURE_IPROUTE +#ifdef ENABLE_IPROUTE extern const char *iproute_path;#endif
options.c +6 -6
@@ -181,7 +181,7 @@ static const char usage_message[] = "--lladdr hw : Set the link layer address of the tap device.\n" "--topology t : Set --dev tun topology: 'net30', 'p2p', or 'subnet'.\n" "--tun-ipv6 : Build tun link capable of forwarding IPv6 traffic.\n" -#ifdef CONFIG_FEATURE_IPROUTE +#ifdef ENABLE_IPROUTE "--iproute cmd : Use this command instead of default " IPROUTE_PATH ".\n" #endif"--ifconfig l rn : TUN: configure device to use IP address l as a local\n"
@@ -292,7 +292,7 @@ static const char usage_message[] =" or --fragment max value, whichever is lower.\n" "--sndbuf size : Set the TCP/UDP send buffer size.\n" "--rcvbuf size : Set the TCP/UDP receive buffer size.\n" -#if defined(TARGET_LINUX ) && defined(HAVE_SO_MARK ) +#if defined(TARGET_LINUX ) && defined(HAVE_DECL_SO_MARK )"--mark value : Mark encrypted packets being sent with value. The mark value\n" " can be matched in policy routing and packetfilter rules.\n"#endif
@@ -1506,7 +1506,7 @@ show_settings (const struct options *o)#endif SHOW_INT (rcvbuf);SHOW_INT (sndbuf); -#if defined(TARGET_LINUX ) && defined(HAVE_SO_MARK ) +#if defined(TARGET_LINUX ) && defined(HAVE_DECL_SO_MARK )SHOW_INT (mark);#endif SHOW_INT (sockflags);
@@ -3188,7 +3188,7 @@ options_cmp_equal_safe (char *actual, const char *expected, size_t actual_n)if (actual_n >0 ) { actual[actual_n -1 ] =0 ; -#ifndef STRICT_OPTIONS_CHECK +#ifndef ENABLE_STRICT_OPTIONS_CHECK if (strncmp (actual, expected,2 )) {msg (D_SHOW_OCC ,"NOTE: Options consistency check may be skewed by version differences" );
@@ -4307,7 +4307,7 @@ add_option (struct options *options,VERIFY_PERMISSION (OPT_P_UP ); options->tun_ipv6 = true; } -#ifdef CONFIG_FEATURE_IPROUTE +#ifdef ENABLE_IPROUTE else if (streq (p[0], "iproute") && p[1]) {VERIFY_PERMISSION (OPT_P_GENERAL );
@@ -4798,7 +4798,7 @@ add_option (struct options *options, }else if (streq (p[0 ],"mark" ) && p[1 ]) { -#if defined(TARGET_LINUX ) && defined(HAVE_SO_MARK ) +#if defined(TARGET_LINUX ) && defined(HAVE_DECL_SO_MARK )VERIFY_PERMISSION (OPT_P_GENERAL ); options->mark =atoi (p[1 ]);#endif
route.c +9 -9
@@ -1308,8 +1308,8 @@ add_route (struct route *r, goto done;#if defined(TARGET_LINUX ) -#ifdef CONFIG_FEATURE_IPROUTE -/* FIXME -- add on-link support for CONFIG_FEATURE_IPROUTE */ +#ifdef ENABLE_IPROUTE +/* FIXME -- add on-link support for ENABLE_IPROUTE */ argv_printf (&argv, "%s route add %s/%d via %s", iproute_path, network,
@@ -1330,7 +1330,7 @@ add_route (struct route *r, else argv_printf_cat (&argv, "gw %s", gateway); -#endif /*CONFIG_FEATURE_IPROUTE*/ +#endif /*ENABLE_IPROUTE*/ argv_msg (D_ROUTE , &argv); status =openvpn_execve_check (&argv, es,0 ,"ERROR: Linux route add command failed" );
@@ -1566,7 +1566,7 @@ add_route_ipv6 (struct route_ipv6 *r6, const struct tuntap *tt, unsigned int fla*/ #if defined(TARGET_LINUX ) -#ifdef CONFIG_FEATURE_IPROUTE +#ifdef ENABLE_IPROUTE argv_printf (&argv, "%s -6 route add %s/%d dev %s", iproute_path, network,
@@ -1583,7 +1583,7 @@ add_route_ipv6 (struct route_ipv6 *r6, const struct tuntap *tt, unsigned int fla device);if (r6->metric_defined)argv_printf_cat (&argv," metric %d" , r6->metric); -#endif /*CONFIG_FEATURE_IPROUTE*/ +#endif /*ENABLE_IPROUTE*/ argv_msg (D_ROUTE , &argv); status =openvpn_execve_check (&argv, es,0 ,"ERROR: Linux route -6/-A inet6 add command failed" );
@@ -1717,7 +1717,7 @@ delete_route (struct route *r, goto done;#if defined(TARGET_LINUX ) -#ifdef CONFIG_FEATURE_IPROUTE +#ifdef ENABLE_IPROUTE argv_printf (&argv, "%s route del %s/%d", iproute_path, network,
@@ -1727,7 +1727,7 @@ delete_route (struct route *r,ROUTE_PATH , network, netmask); -#endif /*CONFIG_FEATURE_IPROUTE*/ +#endif /*ENABLE_IPROUTE*/ if (r->flags &RT_METRIC_DEFINED )argv_printf_cat (&argv,"metric %d" , r->metric);argv_msg (D_ROUTE , &argv);
@@ -1876,7 +1876,7 @@ delete_route_ipv6 (const struct route_ipv6 *r6, const struct tuntap *tt, unsignemsg (M_INFO ,"delete_route_ipv6(%s/%d)" , network, r6->netbits );#if defined(TARGET_LINUX ) -#ifdef CONFIG_FEATURE_IPROUTE +#ifdef ENABLE_IPROUTE argv_printf (&argv, "%s -6 route del %s/%d dev %s", iproute_path, network,
@@ -1888,7 +1888,7 @@ delete_route_ipv6 (const struct route_ipv6 *r6, const struct tuntap *tt, unsigne network, r6->netbits, device); -#endif /*CONFIG_FEATURE_IPROUTE*/ +#endif /*ENABLE_IPROUTE*/ argv_msg (D_ROUTE , &argv);openvpn_execve_check (&argv, es,0 ,"ERROR: Linux route -6/-A inet6 del command failed" );
socket.c +1 -1
@@ -782,7 +782,7 @@ socket_set_tcp_nodelay (int sd, int state)static inline void socket_set_mark (int sd,int mark) { -#if defined(TARGET_LINUX ) && defined(HAVE_SO_MARK ) +#if defined(TARGET_LINUX ) && defined(HAVE_DECL_SO_MARK )if (mark &&setsockopt (sd,SOL_SOCKET ,SO_MARK , &mark,sizeof (mark)) !=0 )msg (M_WARN ,"NOTE: setsockopt SO_MARK=%d failed" , mark);#endif
syshead.h +14 -25
@@ -43,10 +43,6 @@# define unlikely (x) (x)#endif -#if defined(_WIN32) && !defined(WIN32 ) -#define WIN32 -#endif -#ifdef WIN32 #include <windows.h> #include <winsock2.h>
@@ -78,22 +74,15 @@#endif #endif -#ifdef TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else -# ifdef HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif + +#ifdef HAVE_TIME_H +#include <time.h> #endif #ifdef HAVE_SYS_SOCKET_H -# if defined(TARGET_LINUX ) && !defined(_GNU_SOURCE) -/* needed for peercred support on glibc-2.8 */ -# define _GNU_SOURCE -# endif #include <sys/socket.h> #endif
@@ -525,14 +514,14 @@ socket_defined (const socket_descriptor_t sd)/* * Enable deferred authentication? */ -#if defined(CONFIGURE_DEF_AUTH ) &&P2MP_SERVER && defined(ENABLE_PLUGIN ) +#if defined(ENABLE_DEF_AUTH ) &&P2MP_SERVER && defined(ENABLE_PLUGIN )#define PLUGIN_DEF_AUTH #endif -#if defined(CONFIGURE_DEF_AUTH ) &&P2MP_SERVER && defined(ENABLE_MANAGEMENT ) +#if defined(ENABLE_DEF_AUTH ) &&P2MP_SERVER && defined(ENABLE_MANAGEMENT )#define MANAGEMENT_DEF_AUTH #endif -#if defined(PLUGIN_DEF_AUTH ) || defined(MANAGEMENT_DEF_AUTH ) -#define ENABLE_DEF_AUTH +#if !defined(PLUGIN_DEF_AUTH ) && !defined(MANAGEMENT_DEF_AUTH ) +#undef ENABLE_DEF_AUTH#endif /*
@@ -553,14 +542,14 @@ socket_defined (const socket_descriptor_t sd)/* * Enable packet filter? */ -#if defined(CONFIGURE_PF ) &&P2MP_SERVER && defined(ENABLE_PLUGIN ) && defined(HAVE_STAT ) +#if defined(ENABLE_PF ) &&P2MP_SERVER && defined(ENABLE_PLUGIN ) && defined(HAVE_STAT )#define PLUGIN_PF #endif -#if defined(CONFIGURE_PF ) &&P2MP_SERVER && defined(MANAGEMENT_DEF_AUTH ) +#if defined(ENABLE_PF ) &&P2MP_SERVER && defined(MANAGEMENT_DEF_AUTH )#define MANAGEMENT_PF #endif -#if defined(PLUGIN_PF ) || defined(MANAGEMENT_PF ) -#define ENABLE_PF +#if !defined(PLUGIN_PF ) && !defined(MANAGEMENT_PF ) +#undef ENABLE_PF#endif /*
tun.c +3 -3
@@ -673,7 +673,7 @@ do_ifconfig (struct tuntap *tt,#if defined(TARGET_LINUX ) -#ifdef CONFIG_FEATURE_IPROUTE +#ifdef ENABLE_IPROUTE /* * Set the MTU for the device */
@@ -761,7 +761,7 @@ do_ifconfig (struct tuntap *tt, } tt->did_ifconfig = true; -#endif /*CONFIG_FEATURE_IPROUTE*/ +#endif /*ENABLE_IPROUTE*/ #elif defined(TARGET_SOLARIS)/* Solaris 2.6 (and 7?) cannot set all parameters in one go...
@@ -1574,7 +1574,7 @@ close_tun (struct tuntap *tt)struct gc_arena gc =gc_new ();argv_init (&argv); -#ifdef CONFIG_FEATURE_IPROUTE +#ifdef ENABLE_IPROUTE if (is_tun_p2p (tt)) { argv_printf (&argv,
version.m4 +7 -4
@@ -1,6 +1,9 @@ dnl define the OpenVPN version -define(PRODUCT_VERSION,[2.x-master]) +define([PRODUCT_NAME], [OpenVPN]) +define([PRODUCT_TARNAME], [openvpn]) +define([PRODUCT_VERSION], [2.x-master]) +define([PRODUCT_BUGREPORT], [[email protected]]) dnl define the TAP version -define(PRODUCT_TAP_WIN_COMPONENT_ID,[tap0901]) -define(PRODUCT_TAP_WIN_MIN_MAJOR,[9]) -define(PRODUCT_TAP_WIN_MIN_MINOR,[9]) +define([PRODUCT_TAP_WIN_COMPONENT_ID], [tap0901]) +define([PRODUCT_TAP_WIN_MIN_MAJOR], [9]) +define([PRODUCT_TAP_WIN_MIN_MINOR], [9])
win32.h +0 -11
@@ -51,17 +51,6 @@ void uninit_win32 (void);void set_pause_exit_win32 (void ); -/* -* Use keyboard input or events -* to simulate incoming signals -*/ - -#define SIGUSR1 1 -#define SIGUSR2 2 -#define SIGHUP 3 -#define SIGTERM 4 -#define SIGINT 5 -struct security_attributes {SECURITY_ATTRIBUTES sa;
Signature · 1 line
1.7.3.4
PATCH 21/35 build: autoconf: remove OPENVPN_ADD_LIBS useless macro
In reply to Alon Bar-Lev--- configure.ac | 26 ++++++++++---------------- m4/ax_openvpn_lib.m4 | 4 ---- 2 files changed, 10 insertions(+), 20 deletions(-) delete mode 100644 m4/ax_openvpn_lib.m4
configure.ac +10 -16
@@ -339,13 +339,7 @@ case "$host" in AC_DEFINE([TARGET_WIN32], [1], [Are we running WIN32?]) CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN -D_POSIX -DWINVER=0x0501" WIN32=yes - OPENVPN_ADD_LIBS(-lgdi32) - OPENVPN_ADD_LIBS(-lws2_32) - OPENVPN_ADD_LIBS(-lwininet) - OPENVPN_ADD_LIBS(-lcrypt32) - OPENVPN_ADD_LIBS(-liphlpapi) - OPENVPN_ADD_LIBS(-lwinmm) - OPENVPN_ADD_LIBS(-lshell32) + LIBS="${LIBS} -lgdi32 -lws2_32 -lwininet -lcrypt32 -liphlpapi -lwinmm -lshell32" ;; *-*-dragonfly*) AC_DEFINE([TARGET_DRAGONFLY], [1], [Are we running on DragonFlyBSD?])
@@ -626,7 +620,7 @@ case "${with_mem_check}" in [dmalloc], [malloc], [ - OPENVPN_ADD_LIBS(-ldmalloc) + LIBS="${LIBS} -ldmalloc" AC_DEFINE( [DMALLOC], [1],
@@ -668,7 +662,7 @@ if test "${WIN32}" != "yes" -a "${enable_plugins}" = "yes"; then [dl], [dlopen], [ - OPENVPN_ADD_LIBS(-ldl) + LIBS="${LIBS} -ldl" AC_DEFINE(USE_LIBDL, 1, [Use libdl for dynamic library loading]) ], [AC_MSG_RESULT([libdl library not found.])]
@@ -707,7 +701,7 @@ if test "${enable_lzo}" = "yes" && test "${enable_lzo_stub}" = "no"; then if test $havelzolib = 1 ; then break ; fi AC_CHECK_LIB($i, lzo1x_1_15_compress, [ - OPENVPN_ADD_LIBS(-l$i) + LIBS="${LIBS} -l$i" AC_DEFINE(USE_LZO, 1, [Use LZO compression library]) AC_DEFINE_UNQUOTED(LZO_VERSION_NUM, "$LZO_H", [LZO version number]) havelzolib=1
@@ -738,7 +732,7 @@ if test "${enable_pkcs11}" = "yes"; then [AC_CHECK_LIB(pkcs11-helper, pkcs11h_initialize, [ AC_DEFINE(USE_PKCS11, 1, [Enable PKCS11 capability]) - OPENVPN_ADD_LIBS(-lpkcs11-helper) + LIBS="${LIBS} -lpkcs11-helper" ], [AC_MSG_RESULT([pkcs11-helper library not found.])] )],
@@ -759,7 +753,7 @@ if test "${enable_crypto}" = "yes"; then AC_CHECK_LIB($lib, EVP_CIPHER_CTX_init, [ cryptofound=1 - OPENVPN_ADD_LIBS(-l$lib) + LIBS="${LIBS} -l$lib" ] ) done
@@ -793,7 +787,7 @@ if test "${enable_crypto}" = "yes"; then AC_CHECK_HEADER(polarssl/aes.h, [AC_CHECK_LIB(polarssl, aes_crypt_cbc, [ - OPENVPN_ADD_LIBS(-lpolarssl) + LIBS="${LIBS} -lpolarssl" AC_DEFINE(USE_CRYPTO, 1, [Use crypto library]) AC_DEFINE(USE_POLARSSL, 1, [Use PolarSSL library]) ],
@@ -817,7 +811,7 @@ if test "${enable_crypto}" = "yes"; then AC_CHECK_LIB($lib, SSL_CTX_new, [ sslfound=1 - OPENVPN_ADD_LIBS(-l$lib) + LIBS="${LIBS} -l$lib" ] ) done
@@ -831,7 +825,7 @@ if test "${enable_crypto}" = "yes"; then AC_CHECK_HEADER(polarssl/ssl.h, [AC_CHECK_LIB(polarssl, ssl_init, [ - OPENVPN_ADD_LIBS(-lpolarssl) + LIBS="${LIBS} -lpolarssl" AC_DEFINE(USE_SSL, 1, [Use SSL library]) AC_DEFINE(USE_POLARSSL, 1, [Use PolarSSL library]) ],
@@ -853,7 +847,7 @@ if test "${enable_selinux}" = "yes"; then [selinux], [setcon], [ - OPENVPN_ADD_LIBS(-lselinux) + LIBS="${LIBS} -lselinux" AC_DEFINE(HAVE_SETCON, 1, [SELinux support]) ], [AC_MSG_RESULT([SELinux library not found.])]
m4/ax_openvpn_lib.m4 deleted +0 -4
@@ -1,4 +0,0 @@ -dnl OPENVPN_ADD_LIBS(LIB) -AC_DEFUN([OPENVPN_ADD_LIBS], [ - LIBS="$1 $LIBS" -])
Signature · 1 line
1.7.3.4
PATCH 22/35 build: remove awk and non-standard autoconf output processing
In reply to Alon Bar-LevReplace with simpler environment solution.
--- Makefile.am | 12 ++---------- configure.ac | 3 +++ configure_h.awk | 39 --------------------------------------- configure_log.awk | 33 --------------------------------- options.c | 4 ---- 5 files changed, 5 insertions(+), 86 deletions(-) delete mode 100644 configure_h.awk delete mode 100644 configure_log.awk
Makefile.am +2 -10
@@ -36,7 +36,7 @@ MAINTAINERCLEANFILES = \ $(srcdir)/depcomp $(srcdir)/aclocal.m4 \ $(srcdir)/config.guess $(srcdir)/config.sub \ $(srcdir)/openvpn.spec -CLEANFILES = openvpn.8.html configure.h +CLEANFILES = openvpn.8.html EXTRA_DIST = \ sample-config-files \
@@ -58,8 +58,7 @@ dist_doc_DATA = \ dist_noinst_SCRIPTS = \ $(test_scripts) \ - t_cltsrv-down.sh \ - configure_h.awk configure_log.awk + t_cltsrv-down.sh dist_noinst_DATA = \ .gitignore \
@@ -149,13 +148,6 @@ openvpn_SOURCES = \ win32.h win32.c \ cryptoapi.h cryptoapi.c -nodist_openvpn_SOURCES = configure.h -options.$(OBJEXT): configure.h - -configure.h: Makefile - awk -f $(srcdir)/configure_h.awk config.h > $@ - awk -f $(srcdir)/configure_log.awk config.log >> $@ - if WIN32 dist_noinst_DATA += openvpn.8 nodist_html_DATA = openvpn.8.html
configure.ac +3 -0
@@ -891,6 +891,9 @@ if test "${enable_strict}" = "yes"; then CFLAGS="${CFLAGS} -Wall -Wno-unused-parameter -Wno-unused-function" fi +CONFIGURE_DEFINES="`set | grep '^enable_.*=' ; set | grep '^with_.*='`" +AC_DEFINE_UNQUOTED([CONFIGURE_DEFINES], ["`echo ${CONFIGURE_DEFINES}`"], [Configuration settings]) + TAP_WIN_COMPONENT_ID="PRODUCT_TAP_WIN_COMPONENT_ID" TAP_WIN_MIN_MAJOR="PRODUCT_TAP_WIN_MIN_MAJOR" TAP_WIN_MIN_MINOR="PRODUCT_TAP_WIN_MIN_MINOR"
configure_h.awk deleted +0 -39
@@ -1,39 +0,0 @@ -# -# OpenVPN -- An application to securely tunnel IP networks -# over a single UDP port, with support for SSL/TLS-based -# session authentication and key exchange, -# packet encryption, packet authentication, and -# packet compression. -# -# Copyright (C) 2010 David Sommerseth <[email protected]...> -# -# 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. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program (see the file COPYING included with this -# distribution); if not, write to the Free Software Foundation, Inc., -# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# -# This script will build up a line which can be included into a C program. -# The line will contain all interesting #define statements from f.ex. ./config.h -# - -BEGIN { - printf ("#define CONFIGURE_DEFINES \"") -} - -/^#define (ENABLE|DISABLE|DEPRECATED|USE)_/ { - printf (" %s", $2) -} - -END { - printf ("\"\n") -}
configure_log.awk deleted +0 -33
@@ -1,33 +0,0 @@ -# -# OpenVPN -- An application to securely tunnel IP networks -# over a single UDP port, with support for SSL/TLS-based -# session authentication and key exchange, -# packet encryption, packet authentication, and -# packet compression. -# -# Copyright (C) 2010 David Sommerseth <[email protected]...> -# -# 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. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program (see the file COPYING included with this -# distribution); if not, write to the Free Software Foundation, Inc., -# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# -# This script will build up a line which can be included into a C program. -# The line will only contain the first entry of the ./configure line from -# ./config.log. -# - -/\$ (.*)\/configure/ { - printf ("#define CONFIGURE_CALL \"%s\"\n", $0) - exit 0 -}
options.c +0 -4
@@ -49,7 +49,6 @@#include "helper.h" #include "manage.h" #include "forward.h" -#include "configure.h" #include <ctype.h> #include "memdbg.h"
@@ -3403,9 +3402,6 @@ usage_version (void)msg (M_INFO |M_NOPREFIX ,"Originally developed by James Yonan" );msg (M_INFO |M_NOPREFIX ,"Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <[email protected]...>" );#ifndef ENABLE_SMALL -#ifdef CONFIGURE_CALL -msg (M_INFO |M_NOPREFIX ,"\n%s\n" ,CONFIGURE_CALL ); -#endif #ifdef CONFIGURE_DEFINES msg (M_INFO |M_NOPREFIX ,"Compile time defines: %s" ,CONFIGURE_DEFINES );#endif
Signature · 1 line
1.7.3.4
PATCH 24/35 build: add libtool + windows resources for executables
In reply to Alon Bar-Lev--- .gitignore | 6 ++++ Makefile.am | 2 +- build/Makefile.am | 15 +++++++++++ build/ltrc.inc | 23 ++++++++++++++++ configure.ac | 20 ++++++++++++++- src/openvpn/Makefile.am | 6 ++++ src/openvpn/openvpn_win32_resources.rc | 41 ++++++++++++++++++++++++++++++ src/openvpnserv/Makefile.am | 5 +++- src/openvpnserv/openvpnserv_resources.rc | 41 ++++++++++++++++++++++++++++++ version.m4 | 1 + 10 files changed, 157 insertions(+), 3 deletions(-) create mode 100644 build/Makefile.am create mode 100644 build/ltrc.inc create mode 100644 src/openvpn/openvpn_win32_resources.rc create mode 100644 src/openvpnserv/openvpnserv_resources.rc
.gitignore +6 -0
@@ -26,6 +26,12 @@ depcomp stamp-h1 install-sh missing +ltmain.sh +m4/libtool.m4 +m4/ltoptions.m4 +m4/ltsugar.m4 +m4/ltversion.m4 +m4/lt~obsolete.m4 doc/openvpn.8.html distro/rpm/openvpn.spec
Makefile.am +1 -1
@@ -41,7 +41,7 @@ EXTRA_DIST = \ contrib \ debug -SUBDIRS = distro include src sample doc tests +SUBDIRS = build distro include src sample doc tests dist_noinst_DATA = \ .gitignore \
build/Makefile.am new file +15 -0
@@ -0,0 +1,15 @@ +# +# OpenVPN -- An application to securely tunnel IP networks +# over a single UDP port, with support for SSL/TLS-based +# session authentication and key exchange, +# packet encryption, packet authentication, and +# packet compression. +# +# Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <[email protected]...> +# + +MAINTAINERCLEANFILES = \ + $(srcdir)/Makefile.in + +EXTRA_DIST = \ + ltrc.inc
build/ltrc.inc new file +23 -0
@@ -0,0 +1,23 @@ +# +# OpenVPN -- An application to securely tunnel IP networks +# over a single UDP port, with support for SSL/TLS-based +# session authentication and key exchange, +# packet encryption, packet authentication, and +# packet compression. +# +# Copyright (C) 2008-2012 Alon Bar-Lev <[email protected]...> +# +# Required to build Windows resource file + +RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) +LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE) + +.rc.lo: + $(LTRCCOMPILE) -i "$<" -o "$@" + +.rc.o: + $(RCCOMPILE) -i "$<" -o "$@" + +.mc.rc: + $(WINDMC) "$<"
configure.ac +19 -1
@@ -28,6 +28,8 @@ AC_PREREQ(2.60) m4_include(version.m4) AC_INIT([PRODUCT_NAME], [PRODUCT_VERSION], [PRODUCT_BUGREPORT], [PRODUCT_TARNAME]) +AC_DEFINE([OPENVPN_VERSION_RESOURCE], [PRODUCT_VERSION_RESOURCE], [Version in windows resource format]) + AC_CONFIG_AUX_DIR([.]) AM_CONFIG_HEADER([config.h]) AC_CONFIG_SRCDIR([src/openvpn/syshead.h])
@@ -339,7 +341,6 @@ case "$host" in AC_DEFINE([TARGET_WIN32], [1], [Are we running WIN32?]) CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN -D_POSIX -DWINVER=0x0501" WIN32=yes - LIBS="${LIBS} -lgdi32 -lws2_32 -lwininet -lcrypt32 -liphlpapi -lwinmm -lshell32" ;; *-*-dragonfly*) AC_DEFINE([TARGET_DRAGONFLY], [1], [Are we running on DragonFlyBSD?])
@@ -354,6 +355,22 @@ AC_PROG_MKDIR_P AC_PROG_SED AC_PROG_MAKE_SET +# +# Libtool +# +ifdef( + [LT_INIT], + [ + LT_INIT([win32-dll]) + LT_LANG([Windows Resource]) + ], + [ + AC_LIBTOOL_WIN32_DLL + AC_LIBTOOL_RC + AC_PROG_LIBTOOL + ] +) + if test "${WIN32}" = "yes"; then AC_ARG_VAR([MAN2HTML], [man2html utility]) AC_CHECK_PROGS([MAN2HTML], [man2html])
@@ -908,6 +925,7 @@ AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"]) AC_CONFIG_FILES([ Makefile + build/Makefile distro/Makefile distro/rpm/Makefile distro/rpm/openvpn.spec
src/openvpn/Makefile.am +6 -0
@@ -9,6 +9,8 @@ # Copyright (C) 2008-2012 Alon Bar-Lev <[email protected]...> # +include $(top_srcdir)/build/ltrc.inc + MAINTAINERCLEANFILES = \ $(srcdir)/Makefile.in
@@ -93,3 +95,7 @@ openvpn_SOURCES = \ tun.c tun.h \ win32.h win32.c \ cryptoapi.h cryptoapi.c +if WIN32 +openvpn_SOURCES += openvpn_win32_resources.rc +openvpn_LDADD = -lgdi32 -lws2_32 -lwininet -lcrypt32 -liphlpapi -lwinmm -lshell32 +endif
src/openvpn/openvpn_win32_resources.rc new file +41 -0
41 lines not on this page · raw message
src/openvpnserv/Makefile.am +4 -1
@@ -9,6 +9,8 @@ # Copyright (C) 2008-2012 Alon Bar-Lev <[email protected]...> # +include $(top_srcdir)/build/ltrc.inc + MAINTAINERCLEANFILES = $(srcdir)/Makefile.in if WIN32
@@ -17,4 +19,5 @@ endif openvpnserv_SOURCES = \ openvpnserv.c \ - service.h service.c + service.h service.c \ + openvpnserv_resources.rc
src/openvpnserv/openvpnserv_resources.rc new file +41 -0
41 lines not on this page · raw message
version.m4 +1 -0
@@ -3,6 +3,7 @@ define([PRODUCT_NAME], [OpenVPN]) define([PRODUCT_TARNAME], [openvpn]) define([PRODUCT_VERSION], [2.x-master]) define([PRODUCT_BUGREPORT], [[email protected]]) +define([PRODUCT_VERSION_RESOURCE], [2,2,0,0]) dnl define the TAP version define([PRODUCT_TAP_WIN_COMPONENT_ID], [tap0901]) define([PRODUCT_TAP_WIN_MIN_MAJOR], [9])
Signature · 1 line
1.7.3.4
PATCH 25/35 build: autoconf: commands as environment
In reply to Alon Bar-Lev--- configure.ac | 66 ++++++++++++++++++++++++--------------------------------- 1 files changed, 28 insertions(+), 38 deletions(-)
configure.ac +28 -38
@@ -266,37 +266,6 @@ AC_ARG_WITH( ) AC_ARG_WITH( - [ifconfig-path], - [AS_HELP_STRING([--with-ifconfig-path=PATH], [Path to ifconfig tool])], - [IFCONFIG="$withval"], - [AC_PATH_PROG([IFCONFIG], [ifconfig], [ifconfig], [$PATH:/usr/local/sbin:/usr/sbin:/sbin])] -) -AC_DEFINE_UNQUOTED([IFCONFIG_PATH], ["$IFCONFIG"], [Path to ifconfig tool]) - -AC_ARG_WITH( - [iproute-path], - [AS_HELP_STRING([--with-iproute-path=PATH], [Path to iproute tool])], - [IPROUTE="$withval"], - [AC_PATH_PROG([IPROUTE], [ip], [ip], [$PATH:/usr/local/sbin:/usr/sbin:/sbin])] -) -AC_DEFINE_UNQUOTED([IPROUTE_PATH], ["$IPROUTE"], [Path to iproute tool]) - -AC_ARG_WITH([route-path], - [AS_HELP_STRING([--with-route-path=PATH], [Path to route tool])], - [ROUTE="$withval"], - [AC_PATH_PROG([ROUTE], [route], [route], [$PATH:/usr/local/sbin:/usr/sbin:/sbin])] -) -AC_DEFINE_UNQUOTED([ROUTE_PATH], ["$ROUTE"], [Path to route tool]) - -AC_ARG_WITH( - [netstat-path], - [AS_HELP_STRING([--with-netstat-path=PATH], [Path to netstat tool])], - [NETSTAT="$withval"], - [AC_PATH_PROG([NETSTAT], [netstat], [netstat], [$PATH:/usr/local/sbin:/usr/sbin:/sbin:/etc])] -) -AC_DEFINE_UNQUOTED([NETSTAT_PATH], ["$NETSTAT"], [Path to netstat tool]) - -AC_ARG_WITH( [mem-check], [AS_HELP_STRING([--with-mem-check=TYPE], [build with debug memory checking, TYPE=dmalloc|valgrind|ssl])], ,
@@ -355,6 +324,20 @@ AC_PROG_MKDIR_P AC_PROG_SED AC_PROG_MAKE_SET +AC_ARG_VAR([IFCONFIG], [path to ipconfig utility]) +AC_ARG_VAR([ROUTE], [path to route utility]) +AC_ARG_VAR([IPROUTE], [path to ip utility]) +AC_ARG_VAR([NETSTAT], [path to netstat utility]) # tests +AC_ARG_VAR([MAN2HTML], [path to man2html utility]) +AC_PATH_PROGS([IFCONFIG], [ifconfig],, [$PATH:/usr/local/sbin:/usr/sbin:/sbin]) +AC_PATH_PROGS([ROUTE], [route],, [$PATH:/usr/local/sbin:/usr/sbin:/sbin]) +AC_PATH_PROGS([IPROUTE], [ip],, [$PATH:/usr/local/sbin:/usr/sbin:/sbin]) +AC_CHECK_PROGS([NETSTAT], [netstat], [netstat], [$PATH:/usr/local/sbin:/usr/sbin:/sbin:/etc]) # tests +AC_CHECK_PROGS([MAN2HTML], [man2html]) +AC_DEFINE_UNQUOTED([IFCONFIG_PATH], ["$IFCONFIG"], [Path to ifconfig tool]) +AC_DEFINE_UNQUOTED([IPROUTE_PATH], ["$IPROUTE"], [Path to iproute tool]) +AC_DEFINE_UNQUOTED([ROUTE_PATH], ["$ROUTE"], [Path to route tool]) + # # Libtool #
@@ -371,12 +354,6 @@ ifdef( ] ) -if test "${WIN32}" = "yes"; then - AC_ARG_VAR([MAN2HTML], [man2html utility]) - AC_CHECK_PROGS([MAN2HTML], [man2html]) - test -z "${MAN2HTML}" && AC_MSG_ERROR([man2html is required for win32]) -fi - AC_C_CONST AC_C_INLINE AC_C_VOLATILE
@@ -898,7 +875,16 @@ test "${enable_pf}" = "yes" && AC_DEFINE([ENABLE_PF], [1], [Enable internal pack test "${enable_strict_options}" = "yes" && AC_DEFINE([ENABLE_STRICT_OPTIONS_CHECK], [1], [Enable strict options check between peers]) test "${enable_password_save}" = "yes" && AC_DEFINE([ENABLE_PASSWORD_SAVE], [1], [Allow --askpass and --auth-user-pass passwords to be read from a file]) test "${enable_systemd}" = "yes" && AC_DEFINE([ENABLE_SYSTEMD], [1], [Enable systemd support]) -test "${enable_iproute2}" = "yes" && AC_DEFINE([ENABLE_IPROUTE], [1], [enable iproute2 support]) + +if test "${enable_iproute2}" = "yes"; then + test -z "${IPROUTE}" && AC_MSG_ERROR([ip utility is required but missing]) + AC_DEFINE([ENABLE_IPROUTE], [1], [enable iproute2 support]) +else + if test "${WIN32}" != "yes"; then + test -z "${ROUTE}" && AC_MSG_ERROR([route utility is required but missing]) + test -z "${IFCONFIG}" && AC_MSG_ERROR([ifconfig utility is required but missing]) + fi +fi if test "${enable_pedantic}" = "yes"; then enable_strict="yes"
@@ -908,6 +894,10 @@ if test "${enable_strict}" = "yes"; then CFLAGS="${CFLAGS} -Wall -Wno-unused-parameter -Wno-unused-function" fi +if test "${WIN32}" = "yes"; then + test -z "${MAN2HTML}" && AC_MSG_ERROR([man2html is required for win32]) +fi + CONFIGURE_DEFINES="`set | grep '^enable_.*=' ; set | grep '^with_.*='`" AC_DEFINE_UNQUOTED([CONFIGURE_DEFINES], ["`echo ${CONFIGURE_DEFINES}`"], [Configuration settings])
Signature · 1 line
1.7.3.4
PATCH 26/35 build: libdl usage
In reply to Alon Bar-Lev1. properly detect.
2. Link only required components.
3. No way we don't have LoadLibrary on Windows.
4. ENABLE_PLUGIN should be controlled in autoconf.
--- configure.ac | 50 ++++++++++++++++------------------------------- src/openvpn/Makefile.am | 2 + src/openvpn/plugin.c | 16 +++++++++----- src/openvpn/plugin.h | 4 +- src/openvpn/syshead.h | 11 ---------- 5 files changed, 31 insertions(+), 52 deletions(-)
configure.ac +17 -33
@@ -381,7 +381,7 @@ AC_CHECK_HEADERS([ \ stdio.h stdarg.h \ time.h errno.h fcntl.h io.h direct.h \ ctype.h sys/types.h sys/socket.h \ - signal.h unistd.h \ + signal.h unistd.h dlfcn.h \ netinet/in.h netinet/in_systm.h \ netinet/tcp.h arpa/inet.h netdb.h \ windows.h winsock2.h ws2tcpip.h \
@@ -592,6 +592,13 @@ else AC_CHECK_FUNCS(SOCKET_OPT_FUNCS) fi +AC_CHECK_LIB( + [dl], + [dlopen], + [DL_LIBS="-ldl"] +) +AC_SUBST([DL_LIBS]) + case "${with_mem_check}" in valgrind) AC_CHECK_HEADER(
@@ -644,38 +651,6 @@ case "${with_mem_check}" in esac dnl -dnl Check for dlopen -- first try libc then libdl. -dnl -if test "${WIN32}" != "yes" -a "${enable_plugins}" = "yes"; then - AC_CHECK_HEADER( - [dlfcn.h], - [AC_CHECK_FUNC( - [dlopen], - [AC_DEFINE(USE_LIBDL, 1, [Use libdl for dynamic library loading])], - [AC_CHECK_LIB( - [dl], - [dlopen], - [ - LIBS="${LIBS} -ldl" - AC_DEFINE(USE_LIBDL, 1, [Use libdl for dynamic library loading]) - ], - [AC_MSG_RESULT([libdl library not found.])] - )], - )], - ) - if test "${enable_eurephia}" = "yes"; then - AC_DEFINE([ENABLE_EUREPHIA], [1], [Enable support for the eurephia plug-in]) - fi -fi - -dnl -dnl Check if LoadLibrary exists on Windows -dnl -if test "${WIN32}" = "yes"; then - AC_DEFINE(USE_LOAD_LIBRARY, 1, [Use LoadLibrary to load DLLs on Windows]) -fi - -dnl dnl check for LZO library dnl if test "${enable_lzo}" = "yes" && test "${enable_lzo_stub}" = "no"; then
@@ -876,6 +851,13 @@ test "${enable_strict_options}" = "yes" && AC_DEFINE([ENABLE_STRICT_OPTIONS_CHEC test "${enable_password_save}" = "yes" && AC_DEFINE([ENABLE_PASSWORD_SAVE], [1], [Allow --askpass and --auth-user-pass passwords to be read from a file]) test "${enable_systemd}" = "yes" && AC_DEFINE([ENABLE_SYSTEMD], [1], [Enable systemd support]) +if test "${enable_plugins}" = "yes"; then + test "${WIN32}" != "yes" -a -z "${DL_LIBS}" && AC_MSG_ERROR([libdl is required for plugins]) + OPTIONAL_DL_LIBS="${DL_LIBS}" + AC_DEFINE([ENABLE_PLUGIN], [1], [Enable systemd support]) + test "${enable_eurephia}" = "yes" && AC_DEFINE([ENABLE_EUREPHIA], [1], [Enable support for the eurephia plug-in]) +fi + if test "${enable_iproute2}" = "yes"; then test -z "${IPROUTE}" && AC_MSG_ERROR([ip utility is required but missing]) AC_DEFINE([ENABLE_IPROUTE], [1], [enable iproute2 support])
@@ -911,6 +893,8 @@ AC_SUBST([TAP_WIN_COMPONENT_ID]) AC_SUBST([TAP_WIN_MIN_MAJOR]) AC_SUBST([TAP_WIN_MIN_MINOR]) +AC_SUBST([OPTIONAL_DL_LIBS]) + AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"]) AC_CONFIG_FILES([
src/openvpn/Makefile.am +2 -0
@@ -95,6 +95,8 @@ openvpn_SOURCES = \ tun.c tun.h \ win32.h win32.c \ cryptoapi.h cryptoapi.c +openvpn_LDADD = \ + $(OPTIONAL_DL_LIBS) if WIN32 openvpn_SOURCES += openvpn_win32_resources.rc openvpn_LDADD = -lgdi32 -lws2_32 -lwininet -lcrypt32 -liphlpapi -lwinmm -lshell32
src/openvpn/plugin.c +10 -6
@@ -26,6 +26,10 @@#ifdef ENABLE_PLUGIN +#ifdef HAVE_DLFCN_H +#include <dlfcn.h> +#endif +#include "buffer.h" #include "error.h" #include "misc.h"
@@ -160,7 +164,7 @@ plugin_option_list_print (const struct plugin_option_list *list, int msglevel) }#endif -#if defined(USE_LIBDL ) +#ifndef WIN32 static void libdl_resolve_symbol (void *handle,void **dest,const char *symbol,const char *plugin_name,const unsigned int flags)
@@ -170,7 +174,7 @@ libdl_resolve_symbol (void *handle, void **dest, const char *symbol, const char msg (M_FATAL, "PLUGIN: could not find required symbol '%s' in plugin shared object %s: %s", symbol, plugin_name, dlerror()); } -#elif defined(USE_LOAD_LIBRARY) +#else static void dll_resolve_symbol (HMODULE module,void **dest,const char *symbol,const char *plugin_name,const unsigned int flags)
@@ -191,7 +195,7 @@ plugin_init_item (struct plugin *p, const struct plugin_option *o) p->so_pathname = o->so_pathname; p->plugin_type_mask =plugin_supported_types (); -#if defined(USE_LIBDL ) +#ifndef WIN32 p->handle =NULL ;#if defined(PLUGIN_LIBDIR )
@@ -220,7 +224,7 @@ plugin_init_item (struct plugin *p, const struct plugin_option *o)# define PLUGIN_SYM (var, name, flags) libdl_resolve_symbol (p->handle, (void*)&p->var, name, p->so_pathname, flags) -#elif defined(USE_LOAD_LIBRARY ) +#else rel = !absolute_pathname (p->so_pathname); p->module =LoadLibraryW (wide_string (p->so_pathname, &gc));
@@ -427,10 +431,10 @@ plugin_close_item (struct plugin *p)if (p->plugin_handle) (*p->close)(p->plugin_handle); -#if defined(USE_LIBDL ) +#ifndef WIN32 if (dlclose (p->handle))msg (M_WARN ,"PLUGIN_CLOSE: dlclose() failed on plugin: %s" , p->so_pathname); -#elif defined(USE_LOAD_LIBRARY ) +#elif defined(WIN32 )if (!FreeLibrary (p->module))msg (M_WARN ,"PLUGIN_CLOSE: FreeLibrary() failed on plugin: %s" , p->so_pathname);#endif
src/openvpn/plugin.h +2 -2
@@ -59,9 +59,9 @@ struct plugin {unsigned int plugin_type_mask;int requested_initialization_point; -#if defined(USE_LIBDL ) +#ifndef WIN32 void *handle; -#elif defined(USE_LOAD_LIBRARY ) +#else HMODULE module;#endif
src/openvpn/syshead.h +0 -11
@@ -154,10 +154,6 @@#include <grp.h> #endif -#ifdef USE_LIBDL -#include <dlfcn.h> -#endif -#ifdef HAVE_NETDB_H #include <netdb.h> #endif
@@ -505,13 +501,6 @@ socket_defined (const socket_descriptor_t sd)#endif /* -* Do we have a plug-in capability? -*/ -#if defined(USE_LIBDL ) || defined(USE_LOAD_LIBRARY ) -#define ENABLE_PLUGIN -#endif - -/* * Enable deferred authentication? */ #if defined(ENABLE_DEF_AUTH ) &&P2MP_SERVER && defined(ENABLE_PLUGIN )
Signature · 1 line
1.7.3.4
PATCH 27/35 build: properly detect and use socket libs
In reply to Alon Bar-Lev--- configure.ac | 27 +++++++++++++++++---------- src/openvpn/Makefile.am | 3 ++- 2 files changed, 19 insertions(+), 11 deletions(-)
configure.ac +17 -10
@@ -428,16 +428,6 @@ if test "${WIN32}" != "yes"; then [[${SOCKET_INCLUDES}]] ) - AC_CHECK_DECLS( - [SO_MARK], - , - , - [[${SOCKET_INCLUDES}]] - ) - - AC_SEARCH_LIBS([socket], [socket]) - AC_SEARCH_LIBS([inet_ntoa], [nsl]) - AC_SEARCH_LIBS([gethostbyname], [resolv nsl]) AC_FUNC_FORK fi
@@ -599,6 +589,23 @@ AC_CHECK_LIB( ) AC_SUBST([DL_LIBS]) +AC_CHECK_LIB( + [nsl], + [inet_ntoa], + [SOCKETS_LIBS="${SOCKETS_LIBS} -lnsl"] +) +AC_CHECK_LIB( + [socket], + [socket], + [SOCKETS_LIBS="${SOCKETS_LIBS} -lsocket"] +) +AC_CHECK_LIB( + [resolv], + [gethostbyname], + [SOCKETS_LIBS="${SOCKETS_LIBS} -lresolv"] +) +AC_SUBST([SOCKETS_LIBS]) + case "${with_mem_check}" in valgrind) AC_CHECK_HEADER(
src/openvpn/Makefile.am +2 -1
@@ -96,8 +96,9 @@ openvpn_SOURCES = \ win32.h win32.c \ cryptoapi.h cryptoapi.c openvpn_LDADD = \ + $(SOCKETS_LIBS) \ $(OPTIONAL_DL_LIBS) if WIN32 openvpn_SOURCES += openvpn_win32_resources.rc -openvpn_LDADD = -lgdi32 -lws2_32 -lwininet -lcrypt32 -liphlpapi -lwinmm -lshell32 +openvpn_LDADD += -lgdi32 -lws2_32 -lwininet -lcrypt32 -liphlpapi -lwinmm -lshell32 endif
Signature · 1 line
1.7.3.4
PATCH 28/35 build: autoconf: minor cleanups
In reply to Alon Bar-Lev--- configure.ac | 145 +++++++++++++++++++++++++++++----------------------------- 1 files changed, 72 insertions(+), 73 deletions(-)
configure.ac +72 -73
@@ -386,6 +386,16 @@ AC_CHECK_HEADERS([ \ netinet/tcp.h arpa/inet.h netdb.h \ windows.h winsock2.h ws2tcpip.h \ ]) +AC_CHECK_HEADERS([ \ + sys/time.h sys/un.h sys/ioctl.h sys/stat.h \ + sys/mman.h sys/file.h \ + unistd.h signal.h \ + syslog.h pwd.h grp.h \ + net/if_tun.h net/tun/if_tun.h stropts.h \ + sys/sockio.h \ + sys/uio.h linux/if_tun.h linux/sockios.h \ + linux/types.h sys/poll.h sys/epoll.h err.h \ +]) SOCKET_INCLUDES=" #ifdef HAVE_STDLIB_H
@@ -411,76 +421,11 @@ SOCKET_INCLUDES=" #endif " -if test "${WIN32}" != "yes"; then - AC_CHECK_HEADERS([ \ - sys/time.h sys/un.h sys/ioctl.h sys/stat.h \ - sys/mman.h sys/file.h \ - syslog.h pwd.h grp.h \ - net/if_tun.h net/tun/if_tun.h stropts.h \ - sys/sockio.h \ - sys/uio.h linux/if_tun.h linux/sockios.h \ - linux/types.h sys/poll.h sys/epoll.h err.h \ - ]) - AC_CHECK_HEADERS( - [net/if.h netinet/ip.h netinet/if_ether.h resolv.h], - , - , - [[${SOCKET_INCLUDES}]] - ) - - AC_FUNC_FORK -fi - -dnl We emulate signals in Windows -AC_CHECK_DECLS( - [SIGHUP], - , - [AC_DEFINE([SIGHUP], [1], [SIGHUP replacement])], - [[ - #ifdef HAVE_SIGNAL_H - #include <signal.h> - #endif - ]] -) -AC_CHECK_DECLS( - [SIGINT], - , - [AC_DEFINE([SIGINT], [2], [SIGINT replacement])], - [[ - #ifdef HAVE_SIGNAL_H - #include <signal.h> - #endif - ]] -) -AC_CHECK_DECLS( - [SIGUSR1], +AC_CHECK_HEADERS( + [net/if.h netinet/ip.h netinet/if_ether.h resolv.h], , - [AC_DEFINE([SIGUSR1], [10], [SIGUSR1 replacement])], - [[ - #ifdef HAVE_SIGNAL_H - #include <signal.h> - #endif - ]] -) -AC_CHECK_DECLS( - [SIGUSR2], , - [AC_DEFINE([SIGUSR2], [12], [SIGUSR2 replacement])], - [[ - #ifdef HAVE_SIGNAL_H - #include <signal.h> - #endif - ]] -) -AC_CHECK_DECLS( - [SIGTERM], - , - [AC_DEFINE([SIGTERM], [15], [SIGTERM replacement])], - [[ - #ifdef HAVE_SIGNAL_H - #include <signal.h> - #endif - ]] + [[${SOCKET_INCLUDES}]] ) AC_CHECK_TYPES(
@@ -489,8 +434,6 @@ AC_CHECK_TYPES( [AC_DEFINE([in_addr_t], [uint32_t], [Workaround missing in_addr_t])], [[${SOCKET_INCLUDES}]] ) - -dnl check for IPv6 types AC_CHECK_TYPE( [struct tun_pi], [AC_DEFINE(HAVE_TUN_PI, 1, [struct tun_pi needed for IPv6 support])],
@@ -533,16 +476,72 @@ AC_CHECK_TYPE( [AC_MSG_ERROR([struct sockaddr_in6 not found, needed for ipv6 transport support.])], [[${SOCKET_INCLUDES}]] ) +AC_CHECK_DECLS( + [SO_MARK], + , + , + [[${SOCKET_INCLUDES}]] +) -AC_CHECK_FUNCS( - [ctime memset vsnprintf strdup], +dnl We emulate signals in Windows +AC_CHECK_DECLS( + [SIGHUP], , - [AC_MSG_ERROR([Required library function not found])] + [AC_DEFINE([SIGHUP], [1], [SIGHUP replacement])], + [[ + #ifdef HAVE_SIGNAL_H + #include <signal.h> + #endif + ]] ) +AC_CHECK_DECLS( + [SIGINT], + , + [AC_DEFINE([SIGINT], [2], [SIGINT replacement])], + [[ + #ifdef HAVE_SIGNAL_H + #include <signal.h> + #endif + ]] +) +AC_CHECK_DECLS( + [SIGUSR1], + , + [AC_DEFINE([SIGUSR1], [10], [SIGUSR1 replacement])], + [[ + #ifdef HAVE_SIGNAL_H + #include <signal.h> + #endif + ]] +) +AC_CHECK_DECLS( + [SIGUSR2], + , + [AC_DEFINE([SIGUSR2], [12], [SIGUSR2 replacement])], + [[ + #ifdef HAVE_SIGNAL_H + #include <signal.h> + #endif + ]] +) +AC_CHECK_DECLS( + [SIGTERM], + , + [AC_DEFINE([SIGTERM], [15], [SIGTERM replacement])], + [[ + #ifdef HAVE_SIGNAL_H + #include <signal.h> + #endif + ]] +) + +AC_FUNC_FORK + AC_CHECK_FUNCS([ \ daemon chroot getpwnam setuid nice system getpid dup dup2 \ getpass strerror syslog openlog mlockall getgrnam setgid \ setgroups stat flock readv writev time gettimeofday \ + ctime memset vsnprintf strdup \ setsid chdir putenv getpeername unlink \ chsize ftruncate execve getpeereid umask basename dirname access \ epoll_create \
Signature · 1 line
1.7.3.4
PATCH 29/35 build: proper selinux detection and usage
In reply to Alon Bar-Lev--- configure.ac | 35 +++++++++++++++-------------------- src/openvpn/Makefile.am | 1 + src/openvpn/init.c | 4 ++-- src/openvpn/options.c | 6 +++--- src/openvpn/options.h | 2 +- src/openvpn/syshead.h | 2 +- 6 files changed, 23 insertions(+), 27 deletions(-)
configure.ac +15 -20
@@ -214,7 +214,7 @@ AC_ARG_ENABLE( AC_ARG_ENABLE( [selinux], - [AS_HELP_STRING([--disable-selinux], [disable SELinux support])], + [AS_HELP_STRING([--enable-selinux], [enable SELinux support])], , [enable_selinux="no"] )
@@ -605,6 +605,13 @@ AC_CHECK_LIB( ) AC_SUBST([SOCKETS_LIBS]) +AC_CHECK_LIB( + [selinux], + [setcon], + [SELINUX_LIBS="-lselinux"] +) +AC_SUBST([SELINUX_LIBS]) + case "${with_mem_check}" in valgrind) AC_CHECK_HEADER(
@@ -812,25 +819,6 @@ if test "${enable_crypto}" = "yes"; then fi fi -dnl -dnl check for SELinux library and headers -dnl -if test "${enable_selinux}" = "yes"; then - AC_CHECK_HEADER( - [selinux/selinux.h], - [AC_CHECK_LIB( - [selinux], - [setcon], - [ - LIBS="${LIBS} -lselinux" - AC_DEFINE(HAVE_SETCON, 1, [SELinux support]) - ], - [AC_MSG_RESULT([SELinux library not found.])] - )], - [AC_MSG_ERROR([SELinux headers not found.])] - ) -fi - dnl enable --x509-username-field feature if requested if test "${enable_x509_alt_username}" = "yes"; then if test "${with_ssl_type}" = "polarssl" ; then
@@ -874,6 +862,12 @@ else fi fi +if test "${enable_selinux}" = "yes"; then + test -z "${SELINUX_LIBS}" && AC_MSG_ERROR([libselinux required but missing]) + OPTIONAL_SELINUX_LIBS="${SELINUX_LIBS}" + AC_DEFINE([ENABLE_SELINUX], [1], [SELinux support]) +fi + if test "${enable_pedantic}" = "yes"; then enable_strict="yes" CFLAGS="${CFLAGS} -ansi -pedantic"
@@ -900,6 +894,7 @@ AC_SUBST([TAP_WIN_MIN_MAJOR]) AC_SUBST([TAP_WIN_MIN_MINOR]) AC_SUBST([OPTIONAL_DL_LIBS]) +AC_SUBST([OPTIONAL_SELINUX_LIBS]) AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
src/openvpn/Makefile.am +1 -0
@@ -97,6 +97,7 @@ openvpn_SOURCES = \ cryptoapi.h cryptoapi.c openvpn_LDADD = \ $(SOCKETS_LIBS) \ + $(OPTIONAL_SELINUX_LIBS) \ $(OPTIONAL_DL_LIBS) if WIN32 openvpn_SOURCES += openvpn_win32_resources.rc
src/openvpn/init.c +2 -2
@@ -1038,7 +1038,7 @@ do_uid_gid_chroot (struct context *c, bool no_delay)mstats_open (c->options.memstats_fn);#endif -#ifdef HAVE_SETCON +#ifdef ENABLE_SELINUX /* Apply a SELinux context in order to restrict what OpenVPN can do * to _only_ what it is supposed to do after initialization is complete * (basically just network I/O operations). Doing it after chroot
@@ -2463,7 +2463,7 @@ do_option_warnings (struct context *c)msg (M_WARN ,"WARNING: --ping should normally be used with --ping-restart or --ping-exit" );if (o->username || o->groupname || o->chroot_dir -#ifdef HAVE_SETCON +#ifdef ENABLE_SELINUX || o->selinux_context #endif )
src/openvpn/options.c +3 -3
@@ -316,7 +316,7 @@ static const char usage_message[] = "--user user : Set UID to user after initialization.\n" "--group group : Set GID to group after initialization.\n" "--chroot dir : Chroot to this directory after initialization.\n" -#ifdef HAVE_SETCON +#ifdef ENABLE_SELINUX "--setcon context: Apply this SELinux context after initialization.\n" #endif"--cd dir : Change to this directory before initialization.\n"
@@ -1477,7 +1477,7 @@ show_settings (const struct options *o)SHOW_STR (groupname);SHOW_STR (chroot_dir);SHOW_STR (cd_dir); -#ifdef HAVE_SETCON +#ifdef ENABLE_SELINUX SHOW_STR (selinux_context);#endif SHOW_STR (writepid);
@@ -4525,7 +4525,7 @@ add_option (struct options *options, } options->cd_dir = p[1 ]; } -#ifdef HAVE_SETCON +#ifdef ENABLE_SELINUX else if (streq (p[0], "setcon") && p[1]) {VERIFY_PERMISSION (OPT_P_GENERAL );
src/openvpn/options.h +1 -1
@@ -310,7 +310,7 @@ struct optionsconst char *groupname;const char *chroot_dir;const char *cd_dir; -#ifdef HAVE_SETCON +#ifdef ENABLE_SELINUX char *selinux_context;#endif const char *writepid;
src/openvpn/syshead.h +1 -1
@@ -174,7 +174,7 @@#include <sys/epoll.h> #endif -#ifdef HAVE_SETCON +#ifdef ENABLE_SELINUX #include <selinux/selinux.h> #endif
Signature · 1 line
1.7.3.4
PATCH 30/35 build: proper pkcs11-helper detection and usage
In reply to Alon Bar-Lev--- configure.ac | 48 ++++++++++++++++------------------------------ src/openvpn/Makefile.am | 4 +++ src/openvpn/ssl.c | 2 +- src/openvpn/syshead.h | 7 ------ 4 files changed, 22 insertions(+), 39 deletions(-)
configure.ac +17 -31
@@ -110,9 +110,9 @@ AC_ARG_ENABLE( AC_ARG_ENABLE( [pkcs11], - [AS_HELP_STRING([--disable-pkcs11], [disable pkcs11 support])], + [AS_HELP_STRING([--enable-pkcs11], [enable pkcs11 support])], , - [enable_pkcs11="yes"] + [enable_pkcs11="no"] ) AC_ARG_ENABLE(
@@ -253,19 +253,6 @@ AC_ARG_WITH( ) AC_ARG_WITH( - [pkcs11-helper-headers], - [AS_HELP_STRING([--with-pkcs11-helper-headers=DIR], [pkcs11-helper Include files location])], - [PKCS11_HELPER_HDR_DIR="$withval"] - [CPPFLAGS="$CPPFLAGS -I$withval"] -) - -AC_ARG_WITH( - [pkcs11-helper-lib], - [AS_HELP_STRING([--with-pkcs11-helper-lib=DIR], [pkcs11-helper Library location])], - [LDFLAGS="$LDFLAGS -L$withval"] -) - -AC_ARG_WITH( [mem-check], [AS_HELP_STRING([--with-mem-check=TYPE], [build with debug memory checking, TYPE=dmalloc|valgrind|ssl])], ,
@@ -705,22 +692,11 @@ if test "${enable_lzo_stub}" = "yes"; then AC_DEFINE([LZO_STUB], [1], [Enable LZO stub capability]) fi -dnl -dnl enable pkcs11 capability -dnl -if test "${enable_pkcs11}" = "yes"; then - AC_CHECKING([for pkcs11-helper Library and Header files]) - AC_CHECK_HEADER(pkcs11-helper-1.0/pkcs11h-core.h, - [AC_CHECK_LIB(pkcs11-helper, pkcs11h_initialize, - [ - AC_DEFINE(USE_PKCS11, 1, [Enable PKCS11 capability]) - LIBS="${LIBS} -lpkcs11-helper" - ], - [AC_MSG_RESULT([pkcs11-helper library not found.])] - )], - [AC_MSG_RESULT([pkcs11-helper headers not found.])] - ) -fi +PKG_CHECK_MODULES( + [PKCS11_HELPER], + [libpkcs11-helper-1 >= 1.02], + [have_pkcs11_helper="yes"] +) dnl dnl check for SSL-crypto library
@@ -868,6 +844,14 @@ if test "${enable_selinux}" = "yes"; then AC_DEFINE([ENABLE_SELINUX], [1], [SELinux support]) fi +if test "${enable_pkcs11}" = "yes"; then + test "${have_pkcs11_helper}" != "yes" && AC_MSG_ERROR([PKCS11 enabled but libpkcs11-helper is missing]) + test "${enable_ssl}" != "yes" && AC_MSG_ERROR([PKCS11 can be enabled only if SSL is enabled]) + OPTIONAL_PKCS11_HELPER_CFLAGS="${PKCS11_HELPER_CFLAGS}" + OPTIONAL_PKCS11_HELPER_LIBS="${PKCS11_HELPER_LIBS}" + AC_DEFINE([ENABLE_PKCS11], [1], [Enable PKCS11]) +fi + if test "${enable_pedantic}" = "yes"; then enable_strict="yes" CFLAGS="${CFLAGS} -ansi -pedantic"
@@ -895,6 +879,8 @@ AC_SUBST([TAP_WIN_MIN_MINOR]) AC_SUBST([OPTIONAL_DL_LIBS]) AC_SUBST([OPTIONAL_SELINUX_LIBS]) +AC_SUBST([OPTIONAL_PKCS11_HELPER_CFLAGS]) +AC_SUBST([OPTIONAL_PKCS11_HELPER_LIBS]) AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
src/openvpn/Makefile.am +4 -0
@@ -16,6 +16,9 @@ MAINTAINERCLEANFILES = \ INCLUDES = -I$(top_srcdir)/include +AM_CFLAGS = \ + $(OPTIONAL_PKCS11_HELPER_CFLAGS) + sbin_PROGRAMS = openvpn openvpn_SOURCES = \
@@ -97,6 +100,7 @@ openvpn_SOURCES = \ cryptoapi.h cryptoapi.c openvpn_LDADD = \ $(SOCKETS_LIBS) \ + $(OPTIONAL_PKCS11_HELPER_LIBS) \ $(OPTIONAL_SELINUX_LIBS) \ $(OPTIONAL_DL_LIBS) if WIN32
src/openvpn/ssl.c +1 -1
@@ -264,7 +264,7 @@ ssl_purge_auth (const bool auth_user_pass_only) {if (!auth_user_pass_only) { -#ifdef USE_PKCS11 +#ifdef ENABLE_PKCS11 pkcs11_logout ();#endif purge_user_pass (&passbuf, true);
src/openvpn/syshead.h +0 -7
@@ -588,13 +588,6 @@ socket_defined (const socket_descriptor_t sd)#endif /* -* Do we have PKCS11 capability? -*/ -#if defined(USE_PKCS11 ) && defined(USE_CRYPTO ) && defined(USE_SSL ) -#define ENABLE_PKCS11 -#endif - -/* * Do we have CryptoAPI capability? */ #if defined(WIN32 ) && defined(USE_CRYPTO ) && defined(USE_SSL ) && defined(USE_OPENSSL )
Signature · 1 line
1.7.3.4
PATCH 31/35 build: properly process lzo-stub
In reply to Alon Bar-Lev--- configure.ac | 12 +++++++----- src/openvpn/lzo.c | 20 ++++++++++---------- src/openvpn/lzo.h | 20 ++++++++++---------- src/openvpn/ssl.c | 2 +- src/openvpn/syshead.h | 12 ------------ 5 files changed, 28 insertions(+), 38 deletions(-)
configure.ac +7 -5
@@ -687,11 +687,6 @@ if test "${enable_lzo}" = "yes" && test "${enable_lzo_stub}" = "no"; then fi fi -dnl enable multi-client mode -if test "${enable_lzo_stub}" = "yes"; then - AC_DEFINE([LZO_STUB], [1], [Enable LZO stub capability]) -fi - PKG_CHECK_MODULES( [PKCS11_HELPER], [libpkcs11-helper-1 >= 1.02],
@@ -844,6 +839,13 @@ if test "${enable_selinux}" = "yes"; then AC_DEFINE([ENABLE_SELINUX], [1], [SELinux support]) fi +if test "${enable_lzo_stub}" = "yes"; then + test "${enable_lzo}" = "yes" && AC_MSG_ERROR([Cannot have both lzo stub and lzo enabled]) + AC_DEFINE([ENABLE_LZO_STUB], [1], [Enable LZO stub capability]) + AC_DEFINE([USE_LZO], [1], [Enable LZO compression library]) + AC_DEFINE([LZO_VERSION_NUM], ["STUB"], [LZO version number]) +fi + if test "${enable_pkcs11}" = "yes"; then test "${have_pkcs11_helper}" != "yes" && AC_MSG_ERROR([PKCS11 enabled but libpkcs11-helper is missing]) test "${enable_ssl}" != "yes" && AC_MSG_ERROR([PKCS11 can be enabled only if SSL is enabled])
src/openvpn/lzo.c +10 -10
@@ -36,7 +36,7 @@#include "memdbg.h" -#ifndef LZO_STUB +#ifndef ENABLE_LZO_STUB /** * Perform adaptive compression housekeeping. *
@@ -91,7 +91,7 @@ lzo_adaptive_compress_data (struct lzo_adaptive_compress *ac, int n_total, int n ac->n_comp += n_comp; } -#endif /* LZO_STUB */ +#endif /* ENABLE_LZO_STUB */ void lzo_adjust_frame_parameters (struct frame *frame) {
@@ -109,7 +109,7 @@ lzo_compress_init (struct lzo_compress_workspace *lzowork, unsigned int flags)CLEAR (*lzowork); lzowork->flags = flags; -#ifndef LZO_STUB +#ifndef ENABLE_LZO_STUB lzowork->wmem_size =LZO_WORKSPACE ;if (lzo_init () !=LZO_E_OK )
@@ -129,7 +129,7 @@ lzo_compress_uninit (struct lzo_compress_workspace *lzowork)if (lzowork) {ASSERT (lzowork->defined); -#ifndef LZO_STUB +#ifndef ENABLE_LZO_STUB lzo_free (lzowork->wmem); lzowork->wmem =NULL ;#endif
@@ -140,7 +140,7 @@ lzo_compress_uninit (struct lzo_compress_workspace *lzowork)static inline bool lzo_compression_enabled (struct lzo_compress_workspace *lzowork) { -#ifndef LZO_STUB +#ifndef ENABLE_LZO_STUB if ((lzowork->flags & (LZO_SELECTED |LZO_ON )) == (LZO_SELECTED |LZO_ON )) {if (lzowork->flags &LZO_ADAPTIVE )
@@ -157,7 +157,7 @@ lzo_compress (struct buffer *buf, struct buffer work,struct lzo_compress_workspace *lzowork, const struct frame* frame) { -#ifndef LZO_STUB +#ifndef ENABLE_LZO_STUB lzo_uint zlen = 0;int err;bool compressed = false;
@@ -168,7 +168,7 @@ lzo_compress (struct buffer *buf, struct buffer work,if (buf->len <=0 )return ; -#ifndef LZO_STUB +#ifndef ENABLE_LZO_STUB /* * In order to attempt compression, length must be at least COMPRESS_THRESHOLD, * and our adaptive level must give the OK.
@@ -226,7 +226,7 @@ lzo_decompress (struct buffer *buf, struct buffer work,struct lzo_compress_workspace *lzowork, const struct frame* frame) { -#ifndef LZO_STUB +#ifndef ENABLE_LZO_STUB lzo_uint zlen = EXPANDED_SIZE (frame);int err;#endif
@@ -244,7 +244,7 @@ lzo_decompress (struct buffer *buf, struct buffer work,if (c ==YES_COMPRESS )/* packet was compressed */ { -#ifndef LZO_STUB +#ifndef ENABLE_LZO_STUB ASSERT (buf_safe (&work, zlen)); err =LZO_DECOMPRESS (BPTR (buf),BLEN (buf),BPTR (&work), &zlen, lzowork->wmem);
@@ -291,7 +291,7 @@ void lzo_print_stats (const struct lzo_compress_workspace *lzo_compwork, struct {ASSERT (lzo_compwork->defined); -#ifndef LZO_STUB +#ifndef ENABLE_LZO_STUB status_printf (so,"pre-compress bytes," counter_format, lzo_compwork->pre_compress);status_printf (so,"post-compress bytes," counter_format, lzo_compwork->post_compress);status_printf (so,"pre-decompress bytes," counter_format, lzo_compwork->pre_decompress);
src/openvpn/lzo.h +10 -10
@@ -39,7 +39,7 @@* @{ */ -#ifndef LZO_STUB +#ifndef ENABLE_LZO_STUB #ifdef LZO_HEADER_DIR #include "lzo/lzoutil.h" #include "lzo/lzo1x.h"
@@ -68,7 +68,7 @@/**************************************************************************/ /** @name LZO library interface defines *//** @{ *//***********************/ -#ifndef LZO_STUB +#ifndef ENABLE_LZO_STUB #define LZO_COMPRESS lzo1x_1_15_compress/**< LZO library compression function. *
@@ -90,7 +90,7 @@* verify the integrity of incoming * packets, you might want to consider * using the non-safe version. */ -#endif /* LZO_STUB */ +#endif /* ENABLE_LZO_STUB */ /** @} name LZO library interface *//**************************************/
@@ -98,10 +98,10 @@/** @name Miscellaneous compression defines *//** @{ *//*******************/ #define LZO_EXTRA_BUFFER (len) ((len)/8 + 128 + 3)/**< LZO 2.0 worst-case size expansion. */ -#ifndef LZO_STUB +#ifndef ENABLE_LZO_STUB #define COMPRESS_THRESHOLD 100/**< Minimum packet size to attempt * compression. */ -#endif /* LZO_STUB */ +#endif /* ENABLE_LZO_STUB */ /** @} name Miscellaneous compression defines *//**************************/
@@ -119,7 +119,7 @@/**************************************************************************/ /** @name Adaptive compression defines *//** @{ *//************************/ -#ifndef LZO_STUB +#ifndef ENABLE_LZO_STUB #define AC_SAMP_SEC 2/**< Number of seconds in a sample period. */ #define AC_MIN_BYTES 1000/**< Minimum number of bytes a sample * period must contain for it to be
@@ -129,10 +129,10 @@* turned off. */ #define AC_OFF_SEC 60/**< Seconds to wait after compression has * been turned off before retesting. */ -#endif /* LZO_STUB */ +#endif /* ENABLE_LZO_STUB */ /** @} name Adaptive compression defines *//*******************************/ -#ifndef LZO_STUB +#ifndef ENABLE_LZO_STUB /** * Adaptive compression state.
@@ -144,7 +144,7 @@ struct lzo_adaptive_compress { int n_comp; }; -#endif /* LZO_STUB */ +#endif /* ENABLE_LZO_STUB */ /**
@@ -161,7 +161,7 @@ struct lzo_compress_workspace {bool defined;unsigned int flags; -#ifndef LZO_STUB +#ifndef ENABLE_LZO_STUB lzo_voidp wmem;int wmem_size;struct lzo_adaptive_compress ac;
src/openvpn/ssl.c +1 -1
@@ -1652,7 +1652,7 @@ push_peer_info(struct buffer *buf, struct tls_session *session) }/* push LZO status */ -#ifdef LZO_STUB +#ifdef ENABLE_LZO_STUB buf_printf (&out,"IV_LZO_STUB=1\n" );#endif
src/openvpn/syshead.h +0 -12
@@ -698,18 +698,6 @@ socket_defined (const socket_descriptor_t sd)#define ENABLE_CLIENT_NAT /* -* Support LZO as a stub in client? (LZO lib not included, but we -* we still support LZO protocol changes that allow us to -* communicate with an LZO-enabled server) -*/ -#ifdef LZO_STUB -#undef USE_LZO -#undef LZO_VERSION_NUM -#define USE_LZO 1 -#define LZO_VERSION_NUM "STUB" -#endif - -/* * Enable --memstats option */ #ifdef TARGET_LINUX
Signature · 1 line
1.7.3.4
PATCH 32/35 build: proper lzo detection and usage
In reply to Alon Bar-Lev--- configure.ac | 101 ++++++++++++++++++++--------------------- doc/doxygen/doc_compression.h | 2 +- src/openvpn/Makefile.am | 2 + src/openvpn/forward.c | 4 +- src/openvpn/init.c | 14 +++--- src/openvpn/lzo.c | 4 +- src/openvpn/lzo.h | 13 +++-- src/openvpn/openvpn.h | 4 +- src/openvpn/options.c | 18 +++++--- src/openvpn/options.h | 2 +- src/openvpn/sig.c | 2 +- 11 files changed, 86 insertions(+), 80 deletions(-)
configure.ac +49 -52
@@ -40,9 +40,9 @@ AC_USE_SYSTEM_EXTENSIONS AC_ARG_ENABLE( [lzo], - [AS_HELP_STRING([--disable-lzo], [disable LZO compression support])], + [AS_HELP_STRING([--enable-lzo], [enable LZO compression support])], , - [enable_lzo="yes"] + [enable_lzo="no"] ) AC_ARG_ENABLE(
@@ -240,19 +240,6 @@ AC_ARG_WITH( ) AC_ARG_WITH( - [lzo-headers], - [AS_HELP_STRING([--with-lzo-headers=DIR], [LZO Include files location])], - [LZO_HDR_DIR="$withval"] - [CPPFLAGS="$CPPFLAGS -I$withval"] -) - -AC_ARG_WITH( - [lzo-lib], - [AS_HELP_STRING([--with-lzo-lib=DIR], [LZO Library location])], - [LDFLAGS="$LDFLAGS -L$withval"] -) - -AC_ARG_WITH( [mem-check], [AS_HELP_STRING([--with-mem-check=TYPE], [build with debug memory checking, TYPE=dmalloc|valgrind|ssl])], ,
@@ -650,41 +637,44 @@ case "${with_mem_check}" in ;; esac -dnl -dnl check for LZO library -dnl -if test "${enable_lzo}" = "yes" && test "${enable_lzo_stub}" = "no"; then - LZO_H="" - AC_CHECKING([for LZO Library and Header files]) - AC_CHECK_HEADER(lzo/lzo1x.h, - [ LZO_H="2" - lzolibs="lzo2 lzo" - AC_DEFINE(LZO_HEADER_DIR, 1, [Use lzo/ directory prefix for LZO header files (for LZO 2.0)]) - ], - [ AC_CHECK_HEADER(lzo1x.h, [ LZO_H="1" ; lzolibs=lzo ]) ] - ) - - if test -n "$LZO_H"; then - havelzolib=0 - for i in $lzolibs ; do - if test $havelzolib = 1 ; then break ; fi - AC_CHECK_LIB($i, lzo1x_1_15_compress, - [ - LIBS="${LIBS} -l$i" - AC_DEFINE(USE_LZO, 1, [Use LZO compression library]) - AC_DEFINE_UNQUOTED(LZO_VERSION_NUM, "$LZO_H", [LZO version number]) - havelzolib=1 - ] - ) - done - if test $havelzolib = 0 ; then - AC_MSG_ERROR([LZO headers were found but LZO library was not found]) - fi - else - AC_MSG_RESULT([LZO headers were not found]) - AC_MSG_RESULT([LZO library available from http://www.oberhumer.com/opensource/lzo/]) - AC_MSG_ERROR([Or try ./configure --disable-lzo OR ./configure --enable-lzo-stub]) - fi +AC_ARG_VAR([LZO_CFLAGS], [C compiler flags for lzo]) +AC_ARG_VAR([LZO_LIBS], [linker flags for lzo]) +have_lzo="yes" +if test -z "${LZO_LIBS}"; then + AC_CHECK_LIB( + [lzo2], + [lzo1x_1_15_compress], + [LZO_LIBS="-llzo2"], + [AC_CHECK_LIB( + [lzo], + [lzo1x_1_15_compress], + [LZO_LIBS="-llzo"], + [have_lzo="no"] + )] + ) +fi +if test "${have_lzo}" = "yes"; then + saved_CFLAGS="${CFLAGS}" + CFLAGS="${CFLAGS} ${LZO_CFLAGS}" + AC_CHECK_HEADERS( + [lzo/lzoutil.h], + , + [AC_CHECK_HEADERS( + [lzoutil.h], + , + [AC_MSG_ERROR([lzoutil.h is missing])] + )] + ) + AC_CHECK_HEADERS( + [lzo/lzo1x.h], + , + [AC_CHECK_HEADERS( + [lzo1x.h], + , + [AC_MSG_ERROR([lzo1x.h is missing])] + )] + ) + CFLAGS="${saved_CFLAGS}" fi PKG_CHECK_MODULES(
@@ -839,11 +829,16 @@ if test "${enable_selinux}" = "yes"; then AC_DEFINE([ENABLE_SELINUX], [1], [SELinux support]) fi +if test "${enable_lzo}" = "yes"; then + test "${have_lzo}" != "yes" && AC_MSG_ERROR([lzo enabled but missing]) + OPTIONAL_LZO_CFLAGS="${LZO_CFLAGS}" + OPTIONAL_LZO_LIBS="${LZO_LIBS}" + AC_DEFINE([ENABLE_LZO], [1], [Enable LZO compression library]) +fi if test "${enable_lzo_stub}" = "yes"; then test "${enable_lzo}" = "yes" && AC_MSG_ERROR([Cannot have both lzo stub and lzo enabled]) AC_DEFINE([ENABLE_LZO_STUB], [1], [Enable LZO stub capability]) - AC_DEFINE([USE_LZO], [1], [Enable LZO compression library]) - AC_DEFINE([LZO_VERSION_NUM], ["STUB"], [LZO version number]) + AC_DEFINE([ENABLE_LZO], [1], [Enable LZO compression library]) fi if test "${enable_pkcs11}" = "yes"; then
@@ -881,6 +876,8 @@ AC_SUBST([TAP_WIN_MIN_MINOR]) AC_SUBST([OPTIONAL_DL_LIBS]) AC_SUBST([OPTIONAL_SELINUX_LIBS]) +AC_SUBST([OPTIONAL_LZO_CFLAGS]) +AC_SUBST([OPTIONAL_LZO_LIBS]) AC_SUBST([OPTIONAL_PKCS11_HELPER_CFLAGS]) AC_SUBST([OPTIONAL_PKCS11_HELPER_LIBS])
doc/doxygen/doc_compression.h +1 -1
@@ -68,7 +68,7 @@* * @par Settings that control this module's activity * Whether or not the Data Channel Compression module is active depends on -* the compile-time \c USE_LZO preprocessor macro and the runtime flags +* the compile-time \c ENABLE_LZO preprocessor macro and the runtime flags * stored in \c lzo_compress_workspace.flags of the associated VPN tunnel. * The latter are initialized from \c options.lzo, which gets its value * from the process's configuration sources, such as its configuration
src/openvpn/Makefile.am +2 -0
@@ -17,6 +17,7 @@ MAINTAINERCLEANFILES = \ INCLUDES = -I$(top_srcdir)/include AM_CFLAGS = \ + $(OPTIONAL_LZO_CFLAGS) \ $(OPTIONAL_PKCS11_HELPER_CFLAGS) sbin_PROGRAMS = openvpn
@@ -100,6 +101,7 @@ openvpn_SOURCES = \ cryptoapi.h cryptoapi.c openvpn_LDADD = \ $(SOCKETS_LIBS) \ + $(OPTIONAL_LZO_LIBS) \ $(OPTIONAL_PKCS11_HELPER_LIBS) \ $(OPTIONAL_SELINUX_LIBS) \ $(OPTIONAL_DL_LIBS)
src/openvpn/forward.c +2 -2
@@ -438,7 +438,7 @@ encrypt_sign (struct context *c, bool comp_frag)if (comp_frag) { -#ifdef USE_LZO +#ifdef ENABLE_LZO /* Compress the packet. */ if (lzo_defined (&c->c2.lzo_compwork))lzo_compress (&c->c2.buf, b->lzo_compress_buf, &c->c2.lzo_compwork, &c->c2.frame);
@@ -840,7 +840,7 @@ process_incoming_link (struct context *c)fragment_incoming (c->c2.fragment, &c->c2.buf, &c->c2.frame_fragment);#endif -#ifdef USE_LZO +#ifdef ENABLE_LZO /* decompress the incoming packet */ if (lzo_defined (&c->c2.lzo_compwork))lzo_decompress (&c->c2.buf, c->c2.buffers->lzo_decompress_buf, &c->c2.lzo_compwork, &c->c2.frame);
src/openvpn/init.c +7 -7
@@ -1789,7 +1789,7 @@ do_deferred_options (struct context *c, const unsigned int found) }#endif -#ifdef USE_LZO +#ifdef ENABLE_LZO if (found &OPT_P_COMP ) {if (lzo_defined (&c->c2.lzo_compwork))
@@ -2368,7 +2368,7 @@ do_init_crypto (struct context *c, const unsigned int flags)static void do_init_frame (struct context *c) { -#ifdef USE_LZO +#ifdef ENABLE_LZO /* * Initialize LZO compression library. */
@@ -2391,7 +2391,7 @@ do_init_frame (struct context *c)lzo_adjust_frame_parameters (&c->c2.frame_fragment_omit);/* omit LZO frame delta from final frame_fragment */ #endif } -#endif /* USE_LZO */ +#endif /* ENABLE_LZO */ #ifdef ENABLE_SOCKS /*
@@ -2562,7 +2562,7 @@ init_context_buffers (const struct frame *frame) b->decrypt_buf =alloc_buf (BUF_SIZE (frame));#endif -#ifdef USE_LZO +#ifdef ENABLE_LZO b->lzo_compress_buf =alloc_buf (BUF_SIZE (frame)); b->lzo_decompress_buf =alloc_buf (BUF_SIZE (frame));#endif
@@ -2579,7 +2579,7 @@ free_context_buffers (struct context_buffers *b)free_buf (&b->read_tun_buf);free_buf (&b->aux_buf); -#ifdef USE_LZO +#ifdef ENABLE_LZO free_buf (&b->lzo_compress_buf);free_buf (&b->lzo_decompress_buf);#endif
@@ -3417,7 +3417,7 @@ init_instance (struct context *c, const struct env_set *env, const unsigned int goto sig; } -#ifdef USE_LZO +#ifdef ENABLE_LZO /* initialize LZO compression library. */ if ((options->lzo &LZO_SELECTED ) && (c->mode ==CM_P2P || child))lzo_compress_init (&c->c2.lzo_compwork, options->lzo);
@@ -3534,7 +3534,7 @@ close_instance (struct context *c)/* if xinetd/inetd mode, don't allow restart */ do_close_check_if_restart_permitted (c); -#ifdef USE_LZO +#ifdef ENABLE_LZO if (lzo_defined (&c->c2.lzo_compwork))lzo_compress_uninit (&c->c2.lzo_compwork);#endif
src/openvpn/lzo.c +2 -2
@@ -28,7 +28,7 @@#include "syshead.h" -#ifdef USE_LZO +#ifdef ENABLE_LZO #include "lzo.h" #include "error.h"
@@ -301,4 +301,4 @@ void lzo_print_stats (const struct lzo_compress_workspace *lzo_compwork, struct#else static void dummy (void ) {} -#endif /* USE_LZO */ +#endif /* ENABLE_LZO */
src/openvpn/lzo.h +8 -5
@@ -32,7 +32,7 @@*/ -#ifdef USE_LZO +#ifdef ENABLE_LZO /** * @addtogroup compression
@@ -40,11 +40,14 @@*/ #ifndef ENABLE_LZO_STUB -#ifdef LZO_HEADER_DIR +#if defined(HAVE_LZO_LZOUTIL_H )#include "lzo/lzoutil.h" -#include "lzo/lzo1x.h" -#else +#elif defined(HAVE_LZOUTIL_H )#include "lzoutil.h" +#endif +#if defined(HAVE_LZO_LZO1X_H ) +#include "lzo/lzo1x.h" +#elif defined(HAVE_LZO1X_H )#include "lzo1x.h" #endif #endif
@@ -340,5 +343,5 @@ lzo_defined (const struct lzo_compress_workspace *lzowork)/** @} addtogroup compression */ -#endif /* USE_LZO */ +#endif /* ENABLE_LZO */ #endif
src/openvpn/openvpn.h +2 -2
@@ -105,7 +105,7 @@ struct context_buffers#endif /* workspace buffers for LZO compression */ -#ifdef USE_LZO +#ifdef ENABLE_LZO struct buffer lzo_compress_buf;struct buffer lzo_decompress_buf;#endif
@@ -372,7 +372,7 @@ struct context_2#endif /* USE_CRYPTO */ -#ifdef USE_LZO +#ifdef ENABLE_LZO struct lzo_compress_workspace lzo_compwork;/**< Compression workspace used by the * \link compression Data Channel
src/openvpn/options.c +11 -7
@@ -75,8 +75,12 @@ const char title_string[] =#endif /* defined(USE_POLARSSL) */ #endif /* USE_SSL */ #endif /* USE_CRYPTO */ -#ifdef USE_LZO - " [LZO" LZO_VERSION_NUM "]" +#ifdef ENABLE_LZO +#ifdef ENABLE_LZO_STUB +" [LZO (STUB)]" +#else + " [LZO]" +#endif #endif #if EPOLL " [EPOLL]"
@@ -354,7 +358,7 @@ static const char usage_message[] =#ifdef ENABLE_DEBUG "--gremlin mask : Special stress testing mode (for debugging only).\n"#endif -#ifdef USE_LZO +#ifdef ENABLE_LZO "--comp-lzo : Use fast LZO compression -- may add up to 1 byte per\n" " packet for uncompressible data.\n" "--comp-noadapt : Don't use adaptive compression when --comp-lzo\n"
@@ -1512,7 +1516,7 @@ show_settings (const struct options *o)SHOW_BOOL (fast_io); -#ifdef USE_LZO +#ifdef ENABLE_LZO SHOW_INT (lzo);#endif
@@ -2954,7 +2958,7 @@ options_string (const struct options *o, tt =NULL ; } -#ifdef USE_LZO +#ifdef ENABLE_LZO if (o->lzo &LZO_SELECTED )buf_printf (&out,",comp-lzo" );#endif
@@ -6180,7 +6184,7 @@ add_option (struct options *options, options->passtos = true; }#endif -#ifdef USE_LZO +#ifdef ENABLE_LZO else if (streq (p[0], "comp-lzo")) {VERIFY_PERMISSION (OPT_P_COMP );
@@ -6206,7 +6210,7 @@ add_option (struct options *options,VERIFY_PERMISSION (OPT_P_COMP ); options->lzo &= ~LZO_ADAPTIVE ; } -#endif /* USE_LZO */ +#endif /* ENABLE_LZO */ #ifdef USE_CRYPTO else if (streq (p[0], "show-ciphers")) {
src/openvpn/options.h +1 -1
@@ -343,7 +343,7 @@ struct options/* optimize TUN/TAP/UDP writes */ bool fast_io; -#ifdef USE_LZO +#ifdef ENABLE_LZO /* LZO_x flags from lzo.h */ unsigned int lzo;#endif
src/openvpn/sig.c +1 -1
@@ -255,7 +255,7 @@ print_status (const struct context *c, struct status_output *so)status_printf (so,"TCP/UDP read bytes," counter_format, c->c2.link_read_bytes);status_printf (so,"TCP/UDP write bytes," counter_format, c->c2.link_write_bytes);status_printf (so,"Auth read bytes," counter_format, c->c2.link_read_bytes_auth); -#ifdef USE_LZO +#ifdef ENABLE_LZO if (lzo_defined (&c->c2.lzo_compwork))lzo_print_stats (&c->c2.lzo_compwork, so);#endif
Signature · 1 line
1.7.3.4
PATCH 33/35 build: proper crypto detection and usage
In reply to Alon Bar-Lev--- configure.ac | 224 ++++++++++++++++++------------------- doc/doxygen/doc_data_crypto.h | 2 +- include/openvpn-plugin.h | 31 ++++-- src/openvpn/Makefile.am | 2 + src/openvpn/crypto.c | 10 +- src/openvpn/crypto.h | 8 +- src/openvpn/crypto_backend.h | 4 +- src/openvpn/crypto_openssl.c | 26 +--- src/openvpn/crypto_polarssl.c | 4 +- src/openvpn/error.c | 8 +- src/openvpn/error.h | 2 +- src/openvpn/forward-inline.h | 6 +- src/openvpn/forward.c | 24 ++-- src/openvpn/init.c | 84 +++++++------- src/openvpn/manage.c | 4 +- src/openvpn/misc.c | 2 +- src/openvpn/misc.h | 6 +- src/openvpn/openvpn.h | 26 ++-- src/openvpn/options.c | 140 ++++++++++++------------ src/openvpn/options.h | 14 +- src/openvpn/packet_id.c | 4 +- src/openvpn/packet_id.h | 4 +- src/openvpn/pkcs11_openssl.c | 2 +- src/openvpn/pkcs11_polarssl.c | 4 +- src/openvpn/plugin.c | 12 +- src/openvpn/plugin.h | 14 +- src/openvpn/reliable.c | 4 +- src/openvpn/reliable.h | 4 +- src/openvpn/session_id.c | 4 +- src/openvpn/session_id.h | 4 +- src/openvpn/ssl.c | 6 +- src/openvpn/ssl.h | 4 +- src/openvpn/ssl_backend.h | 10 +- src/openvpn/ssl_openssl.c | 8 +- src/openvpn/ssl_polarssl.c | 10 +- src/openvpn/ssl_verify.c | 22 ++-- src/openvpn/ssl_verify.h | 4 +- src/openvpn/ssl_verify_backend.h | 26 ++-- src/openvpn/ssl_verify_openssl.c | 10 +- src/openvpn/ssl_verify_openssl.h | 6 +- src/openvpn/ssl_verify_polarssl.c | 6 +- src/openvpn/ssl_verify_polarssl.h | 5 +- src/openvpn/syshead.h | 14 +- src/plugins/examples/log_v3.c | 4 +- 44 files changed, 408 insertions(+), 410 deletions(-)
configure.ac +109 -115
@@ -227,19 +227,6 @@ AC_ARG_ENABLE( ) AC_ARG_WITH( - [ssl-headers], - [AS_HELP_STRING([--with-ssl-headers=DIR], [Crypto/SSL Include files location])], - [CS_HDR_DIR="$withval"] - [CPPFLAGS="$CPPFLAGS -I$withval"] -) - -AC_ARG_WITH( - [ssl-lib], - [AS_HELP_STRING([--with-ssl-lib=DIR], [Crypto/SSL Library location])], - [LDFLAGS="$LDFLAGS -L$withval"] -) - -AC_ARG_WITH( [mem-check], [AS_HELP_STRING([--with-mem-check=TYPE], [build with debug memory checking, TYPE=dmalloc|valgrind|ssl])], ,
@@ -247,15 +234,15 @@ AC_ARG_WITH( ) AC_ARG_WITH( - [ssl-type], - [AS_HELP_STRING([--with-ssl-type=TYPE], [build with the given SSL library, TYPE = openssl or polarssl])], + [crypto-library], + [AS_HELP_STRING([--with-crypto-library=library], [build with the given crypto library, TYPE=openssl|polarssl @<:@default=openssl@:>@])], [ case "${withval}" in openssl|polarssl) ;; - *) AC_MSG_ERROR([bad value ${withval} for --with-ssl-type]) ;; + *) AC_MSG_ERROR([bad value ${withval} for --with-crypto-library]) ;; esac ], - [with_ssl_type="openssl"] + [with_crypto_library="openssl"] ) AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${host}", [A string representing our host])
@@ -637,6 +624,72 @@ case "${with_mem_check}" in ;; esac +have_openssl_crypto="yes" +PKG_CHECK_MODULES( + [OPENSSL_CRYPTO], + [libcrypto >= 0.9.6], + , + [AC_CHECK_LIB( + [crypto], + [RSA_new], + [OPENSSL_CRYPTO_LIBS="-lcrypto"], + [have_openssl_crypto="no"] + )] +) +have_openssl_ssl="yes" +PKG_CHECK_MODULES( + [OPENSSL_SSL], + [libssl >= 0.9.6], + , + [AC_CHECK_LIB( + [ssl], + [SSL_CTX_new], + [OPENSSL_SSL_LIBS="-lssl"], + [have_openssl_ssl="no"] + )] +) +if test "${have_openssl_crypto}" = "yes"; then + saved_CFLAGS="${CFLAGS}" + saved_LIBS="${LIBS}" + CFLAGS="${CFLAGS} ${OPENSSL_CRYPTO_CFLAGS}" + LIBS="${LIBS} ${OPENSSL_CRYPTO_LIBS}" + AC_CHECK_FUNCS([EVP_CIPHER_CTX_set_key_length]) + have_openssl_engine="yes" + AC_CHECK_FUNCS( + [ \ + ENGINE_load_builtin_engines \ + ENGINE_register_all_complete \ + ENGINE_cleanup \ + ], + , + [have_openssl_engine="no"; break] + ) + + CFLAGS="${saved_CFLAGS}" + LIBS="${saved_LIBS}" +fi + +AC_ARG_VAR([POLARSSL_CFLAGS], [C compiler flags for polarssl]) +AC_ARG_VAR([POLARSSL_LIBS], [linker flags for polarssl]) +have_polarssl_ssl="yes" +have_polarssl_crypto="yes" +if test -z "${POLARSSL_LIBS}"; then + AC_CHECK_LIB( + [polarssl], + [ssl_init], + [POLARSSL_LIBS="-lpolarssl"], + [ + have_polarssl_ssl="no" + AC_CHECK_LIB( + [polarssl], + [aes_crypt_cbc], + , + [have_polarssl_crypto="no"] + ) + ] + ) +fi + AC_ARG_VAR([LZO_CFLAGS], [C compiler flags for lzo]) AC_ARG_VAR([LZO_LIBS], [linker flags for lzo]) have_lzo="yes"
@@ -683,106 +736,9 @@ PKG_CHECK_MODULES( [have_pkcs11_helper="yes"] ) -dnl -dnl check for SSL-crypto library -dnl -if test "${enable_crypto}" = "yes"; then - if test "${with_ssl_type}" = "openssl"; then - AC_CHECKING([for OpenSSL Crypto Library and Header files]) - AC_CHECK_HEADER(openssl/evp.h,, - [AC_MSG_ERROR([OpenSSL Crypto headers not found.])]) - - for lib in crypto eay32; do - AC_CHECK_LIB($lib, EVP_CIPHER_CTX_init, - [ - cryptofound=1 - LIBS="${LIBS} -l$lib" - ] - ) - done - test -n "$cryptofound" || AC_MSG_ERROR([OpenSSL Crypto library not found.]) - - AC_MSG_CHECKING([that OpenSSL Library is at least version 0.9.6]) - AC_EGREP_CPP(yes, - [ - #include <openssl/evp.h> - #if SSLEAY_VERSION_NUMBER >= 0x00906000L - yes - #endif - ], - [ - AC_MSG_RESULT([yes]) - AC_DEFINE(USE_CRYPTO, 1, [Use crypto library]) - AC_DEFINE(USE_OPENSSL, 1, [Use OpenSSL library]) - AC_CHECK_FUNCS(EVP_CIPHER_CTX_set_key_length) - - dnl check for OpenSSL crypto acceleration capability - AC_CHECK_HEADERS(openssl/engine.h) - AC_CHECK_FUNCS(ENGINE_load_builtin_engines) - AC_CHECK_FUNCS(ENGINE_register_all_complete) - AC_CHECK_FUNCS(ENGINE_cleanup) - ], - [AC_MSG_ERROR([OpenSSL crypto Library is too old.])] - ) - fi - if test "${with_ssl_type}" = "polarssl"; then - AC_CHECKING([for PolarSSL Crypto Library and Header files]) - AC_CHECK_HEADER(polarssl/aes.h, - [AC_CHECK_LIB(polarssl, aes_crypt_cbc, - [ - LIBS="${LIBS} -lpolarssl" - AC_DEFINE(USE_CRYPTO, 1, [Use crypto library]) - AC_DEFINE(USE_POLARSSL, 1, [Use PolarSSL library]) - ], - [AC_MSG_ERROR([PolarSSL Crypto library not found.])] - )], - [AC_MSG_ERROR([PolarSSL Crypto headers not found.])] - ) - fi - dnl - dnl check for OpenSSL-SSL library - dnl - - if test "${enable_ssl}" = "yes"; then - if test "${with_ssl_type}" = "openssl"; then - AC_CHECKING([for OpenSSL SSL Library and Header files]) - AC_CHECK_HEADER(openssl/ssl.h,, - [AC_MSG_ERROR([OpenSSL SSL headers not found.])] - ) - - for lib in ssl ssl32; do - AC_CHECK_LIB($lib, SSL_CTX_new, - [ - sslfound=1 - LIBS="${LIBS} -l$lib" - ] - ) - done - - test -n "${sslfound}" || AC_MSG_ERROR([OpenSSL SSL library not found.]) - - AC_DEFINE(USE_SSL, 1, [Use OpenSSL SSL library]) - fi - if test "${with_ssl_type}" = "polarssl"; then - AC_CHECKING([for PolarSSL SSL Library and Header files]) - AC_CHECK_HEADER(polarssl/ssl.h, - [AC_CHECK_LIB(polarssl, ssl_init, - [ - LIBS="${LIBS} -lpolarssl" - AC_DEFINE(USE_SSL, 1, [Use SSL library]) - AC_DEFINE(USE_POLARSSL, 1, [Use PolarSSL library]) - ], - [AC_MSG_ERROR([PolarSSL SSL library not found.])] - )], - [AC_MSG_ERROR([PolarSSL SSL headers not found.])] - ) - fi - fi -fi - dnl enable --x509-username-field feature if requested if test "${enable_x509_alt_username}" = "yes"; then - if test "${with_ssl_type}" = "polarssl" ; then + if test "${with_crypto_library}" = "polarssl" ; then AC_MSG_ERROR([PolarSSL does not support the --x509-username-field feature]) fi
@@ -806,6 +762,42 @@ test "${enable_strict_options}" = "yes" && AC_DEFINE([ENABLE_STRICT_OPTIONS_CHEC test "${enable_password_save}" = "yes" && AC_DEFINE([ENABLE_PASSWORD_SAVE], [1], [Allow --askpass and --auth-user-pass passwords to be read from a file]) test "${enable_systemd}" = "yes" && AC_DEFINE([ENABLE_SYSTEMD], [1], [Enable systemd support]) +case "${with_crypto_library}" in + openssl) + have_crypto_crypto="${have_openssl_crypto}" + have_crypto_ssl="${have_openssl_ssl}" + CRYPTO_CRYPTO_CFLAGS="${OPENSSL_CRYPTO_CFLAGS}" + CRYPTO_CRYPTO_LIBS="${OPENSSL_CRYPTO_LIBS}" + CRYPTO_SSL_CFLAGS="${OPENSSL_SSL_CFLAGS}" + CRYPTO_SSL_LIBS="${OPENSSL_SSL_LIBS}" + AC_DEFINE([ENABLE_CRYPTO_OPENSSL], [1], [Use OpenSSL library]) + test "${have_openssl_engine}" = "yes" && AC_DEFINE([HAVE_OPENSSL_ENGINE], [1], [Use crypto library]) + ;; + polarssl) + have_crypto_crypto="${have_polarssl_crypto}" + have_crypto_ssl="${have_polarssl_ssl}" + CRYPTO_CRYPTO_CFLAGS="${POLARSSL_CRYPTO_CFLAGS}" + CRYPTO_CRYPTO_LIBS="${POLARSSL_LIBS}" + AC_DEFINE([ENABLE_CRYPTO_POLARSSL], [1], [Use PolarSSL library]) + ;; +esac + +if test "${enable_crypto}" = "yes"; then + test "${have_crypto_crypto}" != "yes" && AC_MSG_ERROR([${with_crypto_library} crytpo is required but missing]) + OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${CRYPTO_CRYPTO_CFLAGS}" + OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_CRYPTO_LIBS}" + AC_DEFINE([ENABLE_CRYPTO], [1], [Enable crypto library]) +fi + + +if test "${enable_ssl}" = "yes"; then + test "${enable_crypto}" != "yes" && AC_MSG_ERROR([crypto must be enabled for ssl]) + test "${have_crypto_ssl}" != "yes" && AC_MSG_ERROR([${with_ssl_library} ssl is required but missing]) + OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${CRYPTO_SSL_CFLAGS}" + OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_SSL_LIBS}" + AC_DEFINE([ENABLE_SSL], [1], [Enable ssl library]) +fi + if test "${enable_plugins}" = "yes"; then test "${WIN32}" != "yes" -a -z "${DL_LIBS}" && AC_MSG_ERROR([libdl is required for plugins]) OPTIONAL_DL_LIBS="${DL_LIBS}"
@@ -876,6 +868,8 @@ AC_SUBST([TAP_WIN_MIN_MINOR]) AC_SUBST([OPTIONAL_DL_LIBS]) AC_SUBST([OPTIONAL_SELINUX_LIBS]) +AC_SUBST([OPTIONAL_CRYPTO_CFLAGS]) +AC_SUBST([OPTIONAL_CRYPTO_LIBS]) AC_SUBST([OPTIONAL_LZO_CFLAGS]) AC_SUBST([OPTIONAL_LZO_LIBS]) AC_SUBST([OPTIONAL_PKCS11_HELPER_CFLAGS])
doc/doxygen/doc_data_crypto.h +1 -1
@@ -60,7 +60,7 @@* * @par Settings that control this module's activity * Whether or not the Data Channel Crypto module is active depends on the -* compile-time \c USE_CRYPTO and \c USE_SSL preprocessor macros. How it +* compile-time \c ENABLE_CRYPTO and \c ENABLE_SSL preprocessor macros. How it * processes packets received from the \link data_control Data Channel * Control module\endlink at runtime depends on the associated \c * crypto_options structure. To perform cryptographic operations, the \c
include/openvpn-plugin.h +20 -11
@@ -24,16 +24,25 @@#ifndef OPENVPN_PLUGIN_H_ #define OPENVPN_PLUGIN_H_ -#ifdef USE_SSL -# if defined(SSL_VERIFY_OPENSSL_H_ ) || defined(SSL_VERIFY_POLARSSL_H_ ) -# define ENABLE_SSL_PLUGIN -# else -# warning "Neither OpenSSL or PoLarSSL headers included, disabling plugin's SSL support" -# endif -#endif /*USE_SSL*/ #define OPENVPN_PLUGIN_VERSION 3 +#ifdef ENABLE_SSL +#ifdef ENABLE_CRYPTO_POLARSSL +#include <polarssl/x509.h> +#ifndef __OPENVPN_X509_CERT_T_DECLARED +#define __OPENVPN_X509_CERT_T_DECLARED +typedef x509_cert openvpn_x509_cert_t ; +#endif +#else +#include <openssl/x509.h> +#ifndef __OPENVPN_X509_CERT_T_DECLARED +#define __OPENVPN_X509_CERT_T_DECLARED +typedef X509 openvpn_x509_cert_t ; +#endif +#endif +#endif +/* * Plug-in types. These types correspond to the set of script callbacks * supported by OpenVPN.
@@ -268,9 +277,9 @@ struct openvpn_plugin_args_open_return* *per_client_context : the per-client context pointer which was returned by * openvpn_plugin_client_constructor_v1, if defined. * -* current_cert_depth : Certificate depth of the certificate being passed over (only if compiled with USE_SSL defined) +* current_cert_depth : Certificate depth of the certificate being passed over (only if compiled with ENABLE_SSL defined) * -* *current_cert : X509 Certificate object received from the client (only if compiled with USE_SSL defined) +* *current_cert : X509 Certificate object received from the client (only if compiled with ENABLE_SSL defined) * */ struct openvpn_plugin_args_func_in
@@ -280,9 +289,9 @@ struct openvpn_plugin_args_func_inconst char **const envp;openvpn_plugin_handle_t handle;void *per_client_context; -#ifdef ENABLE_SSL_PLUGIN +#ifdef ENABLE_SSL int current_cert_depth; -x509_cert_t *current_cert; +openvpn_x509_cert_t *current_cert;#else int __current_cert_depth_disabled;/* Unused, for compatibility purposes only */ void *__current_cert_disabled;/* Unused, for compatibility purposes only */
src/openvpn/Makefile.am +2 -0
@@ -17,6 +17,7 @@ MAINTAINERCLEANFILES = \ INCLUDES = -I$(top_srcdir)/include AM_CFLAGS = \ + $(OPTIONAL_CRYPTO_CFLAGS) \ $(OPTIONAL_LZO_CFLAGS) \ $(OPTIONAL_PKCS11_HELPER_CFLAGS)
@@ -103,6 +104,7 @@ openvpn_LDADD = \ $(SOCKETS_LIBS) \ $(OPTIONAL_LZO_LIBS) \ $(OPTIONAL_PKCS11_HELPER_LIBS) \ + $(OPTIONAL_CRYPTO_LIBS) \ $(OPTIONAL_SELINUX_LIBS) \ $(OPTIONAL_DL_LIBS) if WIN32
src/openvpn/crypto.c +5 -5
@@ -25,7 +25,7 @@#include "syshead.h" -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #include "crypto.h" #include "error.h"
@@ -712,7 +712,7 @@ test_crypto (const struct crypto_options *co, struct frame* frame)gc_free (&gc); } -#ifdef USE_SSL +#ifdef ENABLE_SSL void get_tls_handshake_key (const struct key_type *key_type,
@@ -1373,7 +1373,7 @@ get_random()return l; } -#ifndef USE_SSL +#ifndef ENABLE_SSL void init_ssl_lib (void )
@@ -1392,7 +1392,7 @@ free_ssl_lib (void) ERR_free_strings (); } -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ /* * md5 functions
@@ -1452,4 +1452,4 @@ md5_digest_equal (const struct md5_digest *d1, const struct md5_digest *d2) return memcmp(d1->digest, d2->digest, MD5_DIGEST_LENGTH) == 0; } -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */
src/openvpn/crypto.h +4 -4
@@ -30,7 +30,7 @@#ifndef CRYPTO_H #define CRYPTO_H -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #define ALLOW_NON_CBC_CIPHERS
@@ -347,7 +347,7 @@ void key2_print (const struct key2* k,const char * prefix0, const char* prefix1); -#ifdef USE_SSL +#ifdef ENABLE_SSL #define GHK_INLINE (1<<0) void get_tls_handshake_key (const struct key_type *key_type,
@@ -361,7 +361,7 @@ void get_tls_handshake_key (const struct key_type *key_type,void init_ssl_lib (void );void free_ssl_lib (void ); -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ /* * md5 functions
@@ -394,5 +394,5 @@ key_ctx_bi_defined(const struct key_ctx_bi* key) } -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ #endif /* CRYPTO_H */
src/openvpn/crypto_backend.h +2 -2
@@ -32,10 +32,10 @@#include "config.h" -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL #include "crypto_openssl.h" #endif -#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL #include "crypto_polarssl.h" #endif #include "basic.h"
src/openvpn/crypto_openssl.c +7 -19
@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_OPENSSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_CRYPTO_OPENSSL )#include "basic.h" #include "buffer.h"
@@ -104,19 +104,7 @@ cipher_ok (const char* name)#define EVP_MD_name (e) OBJ_nid2sn(EVP_MD_type(e))#endif -/* -* -* OpenSSL engine support. Allows loading/unloading of engines. -* -*/ - -#if defined(HAVE_OPENSSL_ENGINE_H ) && defined(HAVE_ENGINE_LOAD_BUILTIN_ENGINES ) && defined(HAVE_ENGINE_REGISTER_ALL_COMPLETE ) && defined(HAVE_ENGINE_CLEANUP ) -#define CRYPTO_ENGINE 1 -#else -#define CRYPTO_ENGINE 0 -#endif - -#if CRYPTO_ENGINE +#if HAVE_OPENSSL_ENGINE #include <openssl/engine.h> static bool engine_initialized = false;/* GLOBAL */
@@ -173,12 +161,12 @@ setup_engine (const char *engine)return e; } -#endif /* CRYPTO_ENGINE */ +#endif /* HAVE_OPENSSL_ENGINE */ void crypto_init_lib_engine (const char *engine_name) { -#if CRYPTO_ENGINE +#if HAVE_OPENSSL_ENGINE if (!engine_initialized) {ASSERT (engine_name);
@@ -220,7 +208,7 @@ crypto_uninit_lib (void)fclose (fp);#endif -#if CRYPTO_ENGINE +#if HAVE_OPENSSL_ENGINE if (engine_initialized) {ENGINE_cleanup ();
@@ -335,7 +323,7 @@ show_available_digests ()void show_available_engines () { -#if CRYPTO_ENGINE /* Only defined for OpenSSL */ +#if HAVE_OPENSSL_ENGINE /* Only defined for OpenSSL */ ENGINE *e;printf ("OpenSSL Crypto Engines\n\n" );
@@ -741,4 +729,4 @@ hmac_ctx_final (HMAC_CTX *ctx, uint8_t *dst) HMAC_Final (ctx, dst, &in_hmac_len); } -#endif /* USE_CRYPTO && USE_OPENSSL */ +#endif /* ENABLE_CRYPTO && ENABLE_CRYPTO_OPENSSL */
src/openvpn/crypto_polarssl.c +2 -2
@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_POLARSSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_CRYPTO_POLARSSL )#include "errlevel.h" #include "basic.h"
@@ -557,4 +557,4 @@ hmac_ctx_final (md_context_t *ctx, uint8_t *dst) ASSERT(0 == md_hmac_finish(ctx, dst)); } -#endif /* USE_CRYPTO && USE_POLARSSL */ +#endif /* ENABLE_CRYPTO && ENABLE_CRYPTO_POLARSSL */
src/openvpn/error.c +4 -4
@@ -37,8 +37,8 @@#include "ps.h" #include "mstats.h" -#ifdef USE_CRYPTO -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_CRYPTO_OPENSSL #include <openssl/err.h> #endif #endif
@@ -246,8 +246,8 @@ void x_msg (const unsigned int flags, const char *format, ...)SWAP ; } -#ifdef USE_CRYPTO -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_CRYPTO_OPENSSL if (flags & M_SSL) { int nerrs = 0;
src/openvpn/error.h +1 -1
@@ -96,7 +96,7 @@ extern int x_msg_line_num;#define M_ERRNO (1<<8)/* show errno description */ #define M_ERRNO_SOCK (1<<9)/* show socket errno description */ -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL # define M_SSL (1<<10)/* show SSL error */ #endif
src/openvpn/forward-inline.h +3 -3
@@ -35,7 +35,7 @@static inline void check_tls (struct context *c) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )void check_tls_dowork (struct context *c);if (c->c2.tls_multi)check_tls_dowork (c);
@@ -49,7 +49,7 @@ check_tls (struct context *c)static inline void check_tls_errors (struct context *c) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )void check_tls_errors_co (struct context *c);void check_tls_errors_nco (struct context *c);if (c->c2.tls_multi && c->c2.tls_exit_signal)
@@ -189,7 +189,7 @@ check_push_request (struct context *c)#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* * Should we persist our anti-replay packet ID state to disk? */
src/openvpn/forward.c +12 -12
@@ -81,7 +81,7 @@ show_wait_status (struct context *c)* traffic on the control-channel. * */ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )void check_tls_dowork (struct context *c) {
@@ -112,7 +112,7 @@ check_tls_dowork (struct context *c) }#endif -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )void check_tls_errors_co (struct context *c)
@@ -232,7 +232,7 @@ check_connection_established_dowork (struct context *c)bool send_control_channel_string (struct context *c,const char *str,int msglevel) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )if (c->c2.tls_multi) {struct gc_arena gc =gc_new ();bool stat;
@@ -449,8 +449,8 @@ encrypt_sign (struct context *c, bool comp_frag)#endif } -#ifdef USE_CRYPTO -#ifdef USE_SSL +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_SSL /* * If TLS mode, get the key we will use to encrypt * the packet.
@@ -472,8 +472,8 @@ encrypt_sign (struct context *c, bool comp_frag)*/ link_socket_get_outgoing_addr (&c->c2.buf,get_link_socket_info (c), &c->c2.to_link_addr); -#ifdef USE_CRYPTO -#ifdef USE_SSL +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_SSL /* * In TLS mode, prepend the appropriate one-byte opcode * to the packet which identifies it as a data channel
@@ -498,7 +498,7 @@ encrypt_sign (struct context *c, bool comp_frag)static void process_coarse_timers (struct context *c) { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* flush current packet-id to file once per 60 seconds if --replay-persist was specified */ check_packet_id_persist_flush (c);
@@ -789,8 +789,8 @@ process_incoming_link (struct context *c)if (!link_socket_verify_incoming_addr (&c->c2.buf, lsi, &c->c2.from))link_socket_bad_incoming_addr (&c->c2.buf, lsi, &c->c2.from); -#ifdef USE_CRYPTO -#ifdef USE_SSL +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_SSL if (c->c2.tls_multi) { /*
@@ -820,7 +820,7 @@ process_incoming_link (struct context *c)if (c->c2.context_auth !=CAS_SUCCEEDED ) c->c2.buf.len =0 ;#endif -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ /* authenticate and decrypt the incoming packet */ decrypt_status =openvpn_decrypt (&c->c2.buf, c->c2.buffers->decrypt_buf, &c->c2.crypto_options, &c->c2.frame);
@@ -833,7 +833,7 @@ process_incoming_link (struct context *c) goto done; } -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_FRAGMENT if (c->c2.fragment)
src/openvpn/init.c +42 -42
284 lines not on this page · raw message
src/openvpn/manage.c +2 -2
@@ -699,7 +699,7 @@ man_query_need_str (struct management *man, const char *type, const char *actionstatic void man_forget_passwords (struct management *man) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )ssl_purge_auth (false);msg (M_CLIENT ,"SUCCESS: Passwords were forgotten" );#endif
@@ -1714,7 +1714,7 @@ man_reset_client_socket (struct management *man, const bool exiting) }if (!exiting) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )if (man->settings.flags &MF_FORGET_DISCONNECT )ssl_purge_auth (false);#endif
src/openvpn/misc.c +1 -1
@@ -1243,7 +1243,7 @@ test_file (const char *filename)return ret; } -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* create a temporary filename in directory */ const char *
src/openvpn/misc.h +3 -3
@@ -194,7 +194,7 @@ int openvpn_chdir (const char* dir);extern int inetd_socket_descriptor;void save_inetd_socket_descriptor (void ); -/* init random() function, only used as source for weak random numbers, when !USE_CRYPTO */ +/* init random() function, only used as source for weak random numbers, when !ENABLE_CRYPTO */ void init_random_seed (void );/* set/delete environmental variable */
@@ -252,7 +252,7 @@ void sleep_milliseconds (unsigned int n);void sleep_until_signal (void );/* an analogue to the random() function, but use OpenSSL functions if available */ -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO long int get_random (void );#else #define get_random random
@@ -273,7 +273,7 @@ bool delete_file (const char *filename);/* return true if pathname is absolute */ bool absolute_pathname (const char *pathname); -/* prepend a random prefix to hostname (need USE_CRYPTO) */ +/* prepend a random prefix to hostname (need ENABLE_CRYPTO) */ const char *hostname_randomize (const char *hostname,struct gc_arena *gc);/*
src/openvpn/openvpn.h +13 -13
@@ -55,24 +55,24 @@struct key_schedule { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* which cipher, HMAC digest, and key sizes are we using? */ struct key_type key_type;/* pre-shared static key, read from a file */ struct key_ctx_bi static_key; -#ifdef USE_SSL +#ifdef ENABLE_SSL /* our global SSL context */ struct tls_root_ctx ssl_ctx;/* optional authentication HMAC key for TLS control channel */ struct key_ctx_bi tls_auth_key; -#endif /* USE_SSL */ -#else /* USE_CRYPTO */ +#endif /* ENABLE_SSL */ +#else /* ENABLE_CRYPTO */ int dummy; -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ };/*
@@ -99,7 +99,7 @@ struct context_buffersstruct buffer aux_buf;/* workspace buffers used by crypto routines */ -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO struct buffer encrypt_buf;struct buffer decrypt_buf;#endif
@@ -331,12 +331,12 @@ struct context_2int occ_mtu_load_n_tries;#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* * TLS-mode crypto objects. */ -#ifdef USE_SSL +#ifdef ENABLE_SSL struct tls_multi *tls_multi;/**< TLS state structure for this VPN * tunnel. */
@@ -358,7 +358,7 @@ struct context_2/* throw this signal on TLS errors */ int tls_exit_signal; -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ struct crypto_options crypto_options;/**< Security parameters and crypto state
@@ -370,7 +370,7 @@ struct context_2struct packet_id packet_id;struct event_timeout packet_id_persist_interval; -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_LZO struct lzo_compress_workspace lzo_compwork;
@@ -566,7 +566,7 @@ struct context* have been compiled in. */ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#define TLS_MODE (c) ((c)->c2.tls_multi != NULL)#define PROTO_DUMP_FLAGS (check_debug_level (D_LINK_RW_VERBOSE) ? (PD_SHOW_DATA|PD_VERBOSE) : 0)#define PROTO_DUMP (buf, gc) protocol_dump((buf), \
@@ -579,13 +579,13 @@ struct context#define PROTO_DUMP (buf, gc) format_hex (BPTR (buf), BLEN (buf), 80, gc)#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #define MD5SUM (buf, len, gc) md5sum((buf), (len), 0, (gc))#else #define MD5SUM (buf, len, gc) "[unavailable]"#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #define CIPHER_ENABLED (c) (c->c1.ks.key_type.cipher != NULL)#else #define CIPHER_ENABLED (c) (false)
src/openvpn/options.c +70 -70
450 lines not on this page · raw message
src/openvpn/options.h +7 -7
@@ -80,7 +80,7 @@ struct options_pre_pull };#endif -#if defined(USE_CRYPTO ) && !defined(USE_OPENSSL ) && !defined(USE_POLARSSL ) +#if defined(ENABLE_CRYPTO ) && !defined(ENABLE_CRYPTO_OPENSSL ) && !defined(ENABLE_CRYPTO_POLARSSL )# error "At least one of OpenSSL or PolarSSL needs to be defined."#endif
@@ -211,12 +211,12 @@ struct optionsbool persist_config;int persist_mode; -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO const char *key_pass_file;bool show_ciphers;bool show_digests;bool show_engines; -#ifdef USE_SSL +#ifdef ENABLE_SSL bool show_tls_ciphers;#endif bool genkey;
@@ -498,7 +498,7 @@ struct options#endif #endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* Cipher parms */ const char *shared_secret_file;#if ENABLE_INLINE_FILES
@@ -521,7 +521,7 @@ struct optionsbool use_iv;bool test_crypto; -#ifdef USE_SSL +#ifdef ENABLE_SSL /* TLS (control channel) parms */ bool tls_server;bool tls_client;
@@ -605,8 +605,8 @@ struct optionsbool tls_exit; -#endif /* USE_SSL */ -#endif /* USE_CRYPTO */ +#endif /* ENABLE_SSL */ +#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_X509_TRACK const struct x509_track *x509_track;
src/openvpn/packet_id.c +2 -2
@@ -33,7 +33,7 @@#include "syshead.h" -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #include "packet_id.h" #include "misc.h"
@@ -593,4 +593,4 @@ packet_id_interactive_test () }#endif -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */
src/openvpn/packet_id.h +2 -2
@@ -28,7 +28,7 @@* attempts to replay them back later. */ -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #ifndef PACKET_ID_H #define PACKET_ID_H
@@ -335,4 +335,4 @@ packet_id_reap_test (struct packet_id_rec *p) }#endif /* PACKET_ID_H */ -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */
src/openvpn/pkcs11_openssl.c +1 -1
@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(ENABLE_PKCS11 ) && defined(USE_OPENSSL ) +#if defined(ENABLE_PKCS11 ) && defined(ENABLE_CRYPTO_OPENSSL )#include "errlevel.h" #include "pkcs11_backend.h"
src/openvpn/pkcs11_polarssl.c +2 -2
@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(ENABLE_PKCS11 ) && defined(USE_POLARSSL ) +#if defined(ENABLE_PKCS11 ) && defined(ENABLE_CRYPTO_POLARSSL )#include "errlevel.h" #include "pkcs11_backend.h"
@@ -117,4 +117,4 @@ cleanup: return ret; } -#endif /* defined(ENABLE_PKCS11) && defined(USE_POLARSSL) */ +#endif /* defined(ENABLE_PKCS11) && defined(ENABLE_CRYPTO_POLARSSL) */
src/openvpn/plugin.c +6 -6
@@ -351,9 +351,9 @@ plugin_call_item (const struct plugin *p,const struct argv *av, struct openvpn_plugin_string_list **retlist, const char **envp -#ifdef USE_SSL +#ifdef ENABLE_SSL , int certdepth, - x509_cert_t *current_cert + openvpn_x509_cert_t *current_cert #endif ) {
@@ -380,7 +380,7 @@ plugin_call_item (const struct plugin *p, (const char **const ) envp, p->plugin_handle, per_client_context, -#ifdef USE_SSL +#ifdef ENABLE_SSL (current_cert ? certdepth :-1 ), current_cert #else
@@ -590,9 +590,9 @@ plugin_call_ssl (const struct plugin_list *pl,const struct argv *av, struct plugin_return *pr, struct env_set *es -#ifdef USE_SSL +#ifdef ENABLE_SSL , int certdepth, - x509_cert_t *current_cert + openvpn_x509_cert_t *current_cert #endif ) {
@@ -620,7 +620,7 @@ plugin_call_ssl (const struct plugin_list *pl, av, pr ? &pr->list[i] :NULL , envp -#ifdef USE_SSL +#ifdef ENABLE_SSL ,certdepth, current_cert #endif
src/openvpn/plugin.h +7 -7
@@ -29,10 +29,10 @@#ifndef OPENVPN_PLUGIN_H #define OPENVPN_PLUGIN_H -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL #include "ssl_verify_openssl.h" #endif -#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL #include "ssl_verify_polarssl.h" #endif #include "openvpn-plugin.h"
@@ -127,9 +127,9 @@ int plugin_call_ssl (const struct plugin_list *pl,const struct argv *av, struct plugin_return *pr, struct env_set *es -#ifdef USE_SSL +#ifdef ENABLE_SSL , int current_cert_depth, - x509_cert_t *current_cert + openvpn_x509_cert_t *current_cert #endif );
@@ -183,9 +183,9 @@ plugin_call_ssl (const struct plugin_list *pl,const struct argv *av, struct plugin_return *pr, struct env_set *es -#ifdef USE_SSL +#ifdef ENABLE_SSL , int current_cert_depth, - x509_cert_t *current_cert + openvpn_x509_cert_t *current_cert #endif ) {
@@ -202,7 +202,7 @@ plugin_call(const struct plugin_list *pl, struct env_set *es) {return plugin_call_ssl (pl, type, av, pr, es -#ifdef USE_SSL +#ifdef ENABLE_SSL ,-1 ,NULL #endif );
src/openvpn/reliable.c +2 -2
@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#include "buffer.h" #include "error.h"
@@ -748,4 +748,4 @@ reliable_debug_print (const struct reliable *rel, char *desc)#else static void dummy (void ) {} -#endif /* USE_CRYPTO && USE_SSL*/ +#endif /* ENABLE_CRYPTO && ENABLE_SSL*/
src/openvpn/reliable.h +2 -2
@@ -29,7 +29,7 @@*/ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#ifndef RELIABLE_H #define RELIABLE_H
@@ -477,4 +477,4 @@ void reliable_ack_debug_print (const struct reliable_ack *ack, char *desc);#endif /* RELIABLE_H */ -#endif /* USE_CRYPTO && USE_SSL */ +#endif /* ENABLE_CRYPTO && ENABLE_SSL */
src/openvpn/session_id.c +2 -2
@@ -33,7 +33,7 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#include "error.h" #include "common.h"
@@ -58,4 +58,4 @@ session_id_print (const struct session_id *sid, struct gc_arena *gc)#else static void dummy (void ) {} -#endif /* USE_CRYPTO && USE_SSL*/ +#endif /* ENABLE_CRYPTO && ENABLE_SSL*/
src/openvpn/session_id.h +2 -2
@@ -30,7 +30,7 @@* negotiated). */ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#ifndef SESSION_ID_H #define SESSION_ID_H
@@ -83,4 +83,4 @@ void session_id_random (struct session_id *sid);const char *session_id_print (const struct session_id *sid,struct gc_arena *gc);#endif /* SESSION_ID_H */ -#endif /* USE_CRYPTO && USE_SSL */ +#endif /* ENABLE_CRYPTO && ENABLE_SSL */
src/openvpn/ssl.c +3 -3
@@ -41,7 +41,7 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#include "error.h" #include "common.h"
@@ -342,7 +342,7 @@ init_ssl (const struct options *options, struct tls_root_ctx *new_ctx)#ifdef MANAGMENT_EXTERNAL_KEY else if ((options->management_flags & MF_EXTERNAL_KEY) && options->cert_file) { -x509_cert_t *my_cert =NULL ; +openvpn_x509_cert_t *my_cert =NULL ;tls_ctx_load_cert_file (new_ctx, options->cert_file, options->cert_file_inline, &my_cert);tls_ctx_use_external_private_key (new_ctx, my_cert);
@@ -3370,4 +3370,4 @@ done:#else static void dummy (void ) {} -#endif /* USE_CRYPTO && USE_SSL*/ +#endif /* ENABLE_CRYPTO && ENABLE_SSL*/
src/openvpn/ssl.h +2 -2
@@ -30,7 +30,7 @@#ifndef OPENVPN_SSL_H #define OPENVPN_SSL_H -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#include "basic.h" #include "common.h"
@@ -502,6 +502,6 @@ void show_tls_performance_stats(void);/*#define EXTRACT_X509_FIELD_TEST*/ void extract_x509_field_test (void ); -#endif /* USE_CRYPTO && USE_SSL */ +#endif /* ENABLE_CRYPTO && ENABLE_SSL */ #endif
src/openvpn/ssl_backend.h +5 -5
@@ -33,11 +33,11 @@#include "buffer.h" -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL #include "ssl_openssl.h" #include "ssl_verify_openssl.h" #endif -#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL #include "ssl_polarssl.h" #include "ssl_verify_polarssl.h" #endif
@@ -193,7 +193,7 @@ void tls_ctx_load_cert_file (struct tls_root_ctx *ctx, const char *cert_file,#if ENABLE_INLINE_FILES const char *cert_file_inline,#endif -x509_cert_t **x509 +openvpn_x509_cert_t **x509 );/**
@@ -201,7 +201,7 @@ void tls_ctx_load_cert_file (struct tls_root_ctx *ctx, const char *cert_file,* * @param x509 certificate to free */ -void tls_ctx_free_cert_file (x509_cert_t *x509); +void tls_ctx_free_cert_file (openvpn_x509_cert_t *x509);/** * Load private key file into the given TLS context.
@@ -233,7 +233,7 @@ int tls_ctx_load_priv_file (struct tls_root_ctx *ctx, const char *priv_key_file* @return 1 if an error occurred, 0 if parsing was * successful. */ -int tls_ctx_use_external_private_key (struct tls_root_ctx *ctx,x509_cert_t *cert); +int tls_ctx_use_external_private_key (struct tls_root_ctx *ctx,openvpn_x509_cert_t *cert);#endif
src/openvpn/ssl_openssl.c +4 -4
@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_SSL ) && defined(USE_OPENSSL ) +#if defined(ENABLE_SSL ) && defined(ENABLE_CRYPTO_OPENSSL )#include "errlevel.h" #include "buffer.h"
@@ -1020,13 +1020,13 @@ key_state_write_plaintext (struct key_state_ssl *ks_ssl, struct buffer *buf)int ret =0 ;perf_push (PERF_BIO_WRITE_PLAINTEXT ); -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL ASSERT (NULL != ks_ssl); ret =bio_write (ks_ssl->ssl_bio,BPTR (buf),BLEN (buf),"tls_write_plaintext" );bio_write_post (ret, buf); -#endif /* USE_OPENSSL */ +#endif /* ENABLE_CRYPTO_OPENSSL */ perf_pop ();return ret;
@@ -1187,4 +1187,4 @@ get_highest_preference_tls_cipher (char *buf, int size) SSL_CTX_free (ctx); } -#endif /* defined(USE_SSL) && defined(USE_OPENSSL) */ +#endif /* defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_OPENSSL) */
src/openvpn/ssl_polarssl.c +5 -5
@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_SSL ) && defined(USE_POLARSSL ) +#if defined(ENABLE_SSL ) && defined(ENABLE_CRYPTO_POLARSSL )#include "errlevel.h" #include "ssl_backend.h"
@@ -243,7 +243,7 @@ tls_ctx_load_cert_file (struct tls_root_ctx *ctx, const char *cert_file,#if ENABLE_INLINE_FILES const char *cert_file_inline,#endif -x509_cert_t **x509 +openvpn_x509_cert_t **x509 ) {ASSERT (NULL != ctx);
@@ -270,7 +270,7 @@ tls_ctx_load_cert_file (struct tls_root_ctx *ctx, const char *cert_file, }void -tls_ctx_free_cert_file (x509_cert_t *x509) +tls_ctx_free_cert_file (openvpn_x509_cert_t *x509) {x509_free (x509); }
@@ -332,7 +332,7 @@ tls_ctx_load_priv_file (struct tls_root_ctx *ctx, const char *priv_key_file#ifdef MANAGMENT_EXTERNAL_KEY int -tls_ctx_use_external_private_key (struct tls_root_ctx *ctx,x509_cert_t *cert) +tls_ctx_use_external_private_key (struct tls_root_ctx *ctx,openvpn_x509_cert_t *cert) {msg (M_FATAL ,"Use of management external keys not yet supported for PolarSSL." );return false;
@@ -863,4 +863,4 @@ get_highest_preference_tls_cipher (char *buf, int size) strncpynt (buf, cipher_name, size); } -#endif /* defined(USE_SSL) && defined(USE_POLARSSL) */ +#endif /* defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_POLARSSL) */
src/openvpn/ssl_verify.c +11 -11
@@ -29,14 +29,14 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#include "misc.h" #include "manage.h" #include "ssl_verify.h" #include "ssl_verify_backend.h" -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL #include "ssl_verify_openssl.h" #endif
@@ -296,7 +296,7 @@ print_nsCertType (int type)* @param subject the peer's extracted common name */ static result_t -verify_peer_cert (const struct tls_options *opt,x509_cert_t *peer_cert, +verify_peer_cert (const struct tls_options *opt,openvpn_x509_cert_t *peer_cert,const char *subject,const char *common_name) {/* verify certificate nsCertType */
@@ -315,7 +315,7 @@ verify_peer_cert(const struct tls_options *opt, x509_cert_t *peer_cert, } } -#if OPENSSL_VERSION_NUMBER >=0x00907000L ||USE_POLARSSL +#if OPENSSL_VERSION_NUMBER >=0x00907000L ||ENABLE_CRYPTO_POLARSSL /* verify certificate ku */ if (opt->remote_cert_ku[0 ] !=0 )
@@ -369,7 +369,7 @@ verify_peer_cert(const struct tls_options *opt, x509_cert_t *peer_cert,* environment for later verification by scripts and plugins. */ static void -verify_cert_set_env (struct env_set *es,x509_cert_t *peer_cert,int cert_depth, +verify_cert_set_env (struct env_set *es,openvpn_x509_cert_t *peer_cert,int cert_depth,const char *subject,const char *common_name #ifdef ENABLE_X509_TRACK , const struct x509_track *x509_track
@@ -425,7 +425,7 @@ verify_cert_set_env(struct env_set *es, x509_cert_t *peer_cert, int cert_depth,*/ static result_t verify_cert_call_plugin (const struct plugin_list *plugins,struct env_set *es, -int cert_depth,x509_cert_t *cert,char *subject) +int cert_depth,openvpn_x509_cert_t *cert,char *subject) {if (plugin_defined (plugins,OPENVPN_PLUGIN_TLS_VERIFY )) {
@@ -454,7 +454,7 @@ verify_cert_call_plugin(const struct plugin_list *plugins, struct env_set *es, }static const char * -verify_cert_export_cert (x509_cert_t *peercert,const char *tmp_dir,struct gc_arena *gc) +verify_cert_export_cert (openvpn_x509_cert_t *peercert,const char *tmp_dir,struct gc_arena *gc) {FILE *peercert_file;const char *peercert_filename="" ;
@@ -486,7 +486,7 @@ verify_cert_export_cert(x509_cert_t *peercert, const char *tmp_dir, struct gc_ar*/ static result_t verify_cert_call_command (const char *verify_command,struct env_set *es, -int cert_depth,x509_cert_t *cert,char *subject,const char *verify_export_cert) +int cert_depth,openvpn_x509_cert_t *cert,char *subject,const char *verify_export_cert) {const char *tmp_file =NULL ;int ret;
@@ -533,7 +533,7 @@ verify_cert_call_command(const char *verify_command, struct env_set *es,* check peer cert against CRL directory */ static result_t -verify_check_crl_dir (const char *crl_dir,x509_cert_t *cert) +verify_check_crl_dir (const char *crl_dir,openvpn_x509_cert_t *cert) {char fn[256 ];int fd;
@@ -560,7 +560,7 @@ verify_check_crl_dir(const char *crl_dir, x509_cert_t *cert) }result_t -verify_cert (struct tls_session *session,x509_cert_t *cert,int cert_depth) +verify_cert (struct tls_session *session,openvpn_x509_cert_t *cert,int cert_depth) {char *subject =NULL ;char common_name[TLS_USERNAME_LEN ] = {0 };
@@ -1215,4 +1215,4 @@ verify_final_auth_checks(struct tls_multi *multi, struct tls_session *session) gc_free (&gc); } } -#endif /* defined(USE_CRYPTO) && defined(USE_SSL) */ +#endif /* defined(ENABLE_CRYPTO) && defined(ENABLE_SSL) */
src/openvpn/ssl_verify.h +2 -2
@@ -36,10 +36,10 @@#include "ssl_common.h" /* Include OpenSSL-specific code */ -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL #include "ssl_verify_openssl.h" #endif -#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL #include "ssl_verify_polarssl.h" #endif
src/openvpn/ssl_verify_backend.h +13 -13
@@ -55,7 +55,7 @@ typedef enum { SUCCESS=0, FAILURE=1 } result_t;* * @return \c SUCCESS if verification was successful, \c FAILURE on failure. */ -result_t verify_cert (struct tls_session *session,x509_cert_t *cert,int cert_depth); +result_t verify_cert (struct tls_session *session,openvpn_x509_cert_t *cert,int cert_depth);/* * Remember the given certificate hash, allowing the certificate chain to be
@@ -86,7 +86,7 @@ void cert_hash_remember (struct tls_session *session, const int cert_depth,* * @return a string containing the subject */ -char *x509_get_subject (x509_cert_t *cert); +char *x509_get_subject (openvpn_x509_cert_t *cert);/* * Free a subject string as returned by \c verify_get_subject()
@@ -103,7 +103,7 @@ void x509_free_subject (char *subject);* * @return a string containing the SHA1 hash of the certificate */ -unsigned char *x509_get_sha1_hash (x509_cert_t *cert); +unsigned char *x509_get_sha1_hash (openvpn_x509_cert_t *cert);/* * Free a hash as returned by \c verify_get_hash()
@@ -126,7 +126,7 @@ void x509_free_sha1_hash (unsigned char *hash);* @return \c FAILURE, \c or SUCCESS */ result_t x509_get_username (char *common_name,int cn_len, -char * x509_username_field,x509_cert_t *peer_cert); +char * x509_username_field,openvpn_x509_cert_t *peer_cert);/* * Return the certificate's serial number.
@@ -138,7 +138,7 @@ result_t x509_get_username (char *common_name, int cn_len,* * @return The certificate's serial number. */ -char *x509_get_serial (x509_cert_t *cert); +char *x509_get_serial (openvpn_x509_cert_t *cert);/* * Free a serial number string as returned by \c verify_get_serial()
@@ -156,7 +156,7 @@ void x509_free_serial (char *serial);* @param cert_depth Depth of the certificate * @param cert Certificate to set the environment for */ -void x509_setenv (struct env_set *es,int cert_depth,x509_cert_t *cert); +void x509_setenv (struct env_set *es,int cert_depth,openvpn_x509_cert_t *cert);#ifdef ENABLE_X509_TRACK
@@ -195,7 +195,7 @@ void x509_track_add (const struct x509_track **ll_head, const char *name,* @param cert Certificate to set the environment for */ void x509_setenv_track (const struct x509_track *xt,struct env_set *es, -const int depth,x509_cert_t *x509); +const int depth,openvpn_x509_cert_t *x509);#endif
@@ -210,9 +210,9 @@ void x509_setenv_track (const struct x509_track *xt, struct env_set *es,* the expected bit set. \c FAILURE if the certificate does * not have NS cert type verification or the wrong bit set. */ -result_t x509_verify_ns_cert_type (const x509_cert_t *cert,const int usage); +result_t x509_verify_ns_cert_type (const openvpn_x509_cert_t *cert,const int usage); -#if OPENSSL_VERSION_NUMBER >=0x00907000L ||USE_POLARSSL +#if OPENSSL_VERSION_NUMBER >=0x00907000L ||ENABLE_CRYPTO_POLARSSL /* * Verify X.509 key usage extension field.
@@ -224,7 +224,7 @@ result_t x509_verify_ns_cert_type(const x509_cert_t *cert, const int usage);* @return \c SUCCESS if one of the key usage values matches, \c FAILURE * if key usage is not enabled, or the values do not match. */ -result_t x509_verify_cert_ku (x509_cert_t *x509,const unsigned *const expected_ku, +result_t x509_verify_cert_ku (openvpn_x509_cert_t *x509,const unsigned *const expected_ku,int expected_len);/*
@@ -240,7 +240,7 @@ result_t x509_verify_cert_ku (x509_cert_t *x509, const unsigned * const expected* extended key usage fields, \c FAILURE if extended key * usage is not enabled, or the values do not match. */ -result_t x509_verify_cert_eku (x509_cert_t *x509,const char *const expected_oid); +result_t x509_verify_cert_eku (openvpn_x509_cert_t *x509,const char *const expected_oid);#endif
@@ -253,7 +253,7 @@ result_t x509_verify_cert_eku (x509_cert_t *x509, const char * const expected_oi* * */ -result_t x509_write_pem (FILE *peercert_file,x509_cert_t *peercert); +result_t x509_write_pem (FILE *peercert_file,openvpn_x509_cert_t *peercert);/* * Check the certificate against a CRL file.
@@ -266,7 +266,7 @@ result_t x509_write_pem(FILE *peercert_file, x509_cert_t *peercert);* certificate or does not contain an entry for it. * \c FAILURE otherwise. */ -result_t x509_verify_crl (const char *crl_file,x509_cert_t *cert, +result_t x509_verify_crl (const char *crl_file,openvpn_x509_cert_t *cert,const char *subject);#endif /* SSL_VERIFY_BACKEND_H_ */
src/openvpn/ssl_verify_openssl.c +5 -5
@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_SSL ) && defined(USE_OPENSSL ) +#if defined(ENABLE_SSL ) && defined(ENABLE_CRYPTO_OPENSSL )#include "ssl_verify.h" #include "ssl_verify_backend.h"
@@ -210,7 +210,7 @@ x509_get_username (char *common_name, int cn_len, }char * -x509_get_serial (x509_cert_t *cert) +x509_get_serial (openvpn_x509_cert_t *cert) {ASN1_INTEGER *asn1_i;BIGNUM *bignum;
@@ -401,7 +401,7 @@ x509_setenv_track (const struct x509_track *xt, struct env_set *es, const int de* X509_{cert_depth}_{name}={value} */ void -x509_setenv (struct env_set *es,int cert_depth,x509_cert_t *peer_cert) +x509_setenv (struct env_set *es,int cert_depth,openvpn_x509_cert_t *peer_cert) {int i, n;int fn_nid;
@@ -449,7 +449,7 @@ x509_setenv (struct env_set *es, int cert_depth, x509_cert_t *peer_cert) }result_t -x509_verify_ns_cert_type (const x509_cert_t *peer_cert,const int usage) +x509_verify_ns_cert_type (const openvpn_x509_cert_t *peer_cert,const int usage) {if (usage ==NS_CERT_CHECK_NONE )return SUCCESS ;
@@ -623,4 +623,4 @@ end: return retval; } -#endif /* defined(USE_SSL) && defined(USE_OPENSSL) */ +#endif /* defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_OPENSSL) */
src/openvpn/ssl_verify_openssl.h +5 -1
@@ -32,7 +32,11 @@#define SSL_VERIFY_OPENSSL_H_ #include <openssl/x509.h> -typedef X509 x509_cert_t ; + +#ifndef __OPENVPN_X509_CERT_T_DECLARED +#define __OPENVPN_X509_CERT_T_DECLARED +typedef X509 openvpn_x509_cert_t ; +#endif /** @name Function for authenticating a new connection from a remote OpenVPN peer * @{ */
src/openvpn/ssl_verify_polarssl.c +3 -3
@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_SSL ) && defined(USE_POLARSSL ) +#if defined(ENABLE_SSL ) && defined(ENABLE_CRYPTO_POLARSSL )#include "ssl_verify.h" #include <polarssl/sha1.h>
@@ -189,7 +189,7 @@ x509_free_subject (char *subject)* X509_{cert_depth}_{name}={value} */ void -x509_setenv (struct env_set *es,int cert_depth,x509_cert_t *cert) +x509_setenv (struct env_set *es,int cert_depth,openvpn_x509_cert_t *cert) {int i;unsigned char c;
@@ -422,4 +422,4 @@ end: return retval; } -#endif /* #if defined(USE_SSL) && defined(USE_POLARSSL) */ +#endif /* #if defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_POLARSSL) */
src/openvpn/ssl_verify_polarssl.h +4 -1
@@ -35,7 +35,10 @@#include "manage.h" #include <polarssl/x509.h> -typedef x509_cert x509_cert_t ; +#ifndef __OPENVPN_X509_CERT_T_DECLARED +#define __OPENVPN_X509_CERT_T_DECLARED +typedef x509_cert openvpn_x509_cert_t ; +#endif /** @name Function for authenticating a new connection from a remote OpenVPN peer * @{ */
src/openvpn/syshead.h +7 -7
@@ -479,7 +479,7 @@ socket_defined (const socket_descriptor_t sd)* Do we have point-to-multipoint capability? */ -#if defined(ENABLE_CLIENT_SERVER ) && defined(USE_CRYPTO ) && defined(USE_SSL ) && defined(HAVE_GETTIMEOFDAY ) +#if defined(ENABLE_CLIENT_SERVER ) && defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL ) && defined(HAVE_GETTIMEOFDAY )#define P2MP 1#else #define P2MP 0
@@ -516,7 +516,7 @@ socket_defined (const socket_descriptor_t sd)/* * Enable external private key */ -#if defined(ENABLE_MANAGEMENT ) && defined(USE_SSL ) && !defined(USE_POLARSSL ) +#if defined(ENABLE_MANAGEMENT ) && defined(ENABLE_SSL ) && !defined(ENABLE_CRYPTO_POLARSSL )#define MANAGMENT_EXTERNAL_KEY #endif
@@ -565,7 +565,7 @@ socket_defined (const socket_descriptor_t sd)/* * Should we include NTLM proxy functionality */ -#if defined(USE_CRYPTO ) && defined(ENABLE_HTTP_PROXY ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_HTTP_PROXY )#define NTLM 1#else #define NTLM 0
@@ -574,7 +574,7 @@ socket_defined (const socket_descriptor_t sd)/* * Should we include proxy digest auth functionality */ -#if defined(USE_CRYPTO ) && defined(ENABLE_HTTP_PROXY ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_HTTP_PROXY )#define PROXY_DIGEST_AUTH 1#else #define PROXY_DIGEST_AUTH 0
@@ -590,14 +590,14 @@ socket_defined (const socket_descriptor_t sd)/* * Do we have CryptoAPI capability? */ -#if defined(WIN32 ) && defined(USE_CRYPTO ) && defined(USE_SSL ) && defined(USE_OPENSSL ) +#if defined(WIN32 ) && defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL ) && defined(ENABLE_CRYPTO_OPENSSL )#define ENABLE_CRYPTOAPI #endif /* * Enable x509-track feature? */ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) && defined (USE_OPENSSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL ) && defined (ENABLE_CRYPTO_OPENSSL )#define ENABLE_X509_TRACK #endif
@@ -688,7 +688,7 @@ socket_defined (const socket_descriptor_t sd)/* * Do we support pushing peer info? */ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#define ENABLE_PUSH_PEER_INFO #endif
src/plugins/examples/log_v3.c +1 -3
@@ -36,9 +36,7 @@#include <string.h> #include <stdlib.h> -#define USE_SSL -#define USE_OPENSSL -#include "ssl_verify_openssl.h" +#define ENABLE_SSL #include "openvpn-plugin.h"
Signature · 1 line
1.7.3.4
Re: [Openvpn-devel] [PATCH 33/35] build: proper crypto detection and usage
I need to delve into this one a little further once I have time. At first glance, a minor nack: OpenSSL 0.9.6 isn't supported anymore, so the autoconf statement and any >= 0.9.7 statements can go.
Adriaan
Quoted 2,898 lines
-----Original Message-----
From: Alon Bar-Lev [mailto:[email protected]...]
Sent: dinsdag 21 februari 2012 2:23
To: [email protected]
Cc: Alon Bar-Lev
Subject: [Openvpn-devel] [PATCH 33/35] build: proper crypto detection and usageSigned-off-by Alon Bar-Lev <[email protected]...>--- configure.ac | 224 ++++++++++++++++++----------- -------- doc/doxygen/doc_data_crypto.h | 2 +- include/openvpn-plugin.h | 31 ++++-- src/openvpn/Makefile.am | 2 + src/openvpn/crypto.c | 10 +- src/openvpn/crypto.h | 8 +- src/openvpn/crypto_backend.h | 4 +- src/openvpn/crypto_openssl.c | 26 +--- src/openvpn/crypto_polarssl.c | 4 +- src/openvpn/error.c | 8 +- src/openvpn/error.h | 2 +- src/openvpn/forward-inline.h | 6 +- src/openvpn/forward.c | 24 ++-- src/openvpn/init.c | 84 +++++++------- src/openvpn/manage.c | 4 +- src/openvpn/misc.c | 2 +- src/openvpn/misc.h | 6 +- src/openvpn/openvpn.h | 26 ++-- src/openvpn/options.c | 140 ++++++++++++------------ src/openvpn/options.h | 14 +- src/openvpn/packet_id.c | 4 +- src/openvpn/packet_id.h | 4 +- src/openvpn/pkcs11_openssl.c | 2 +- src/openvpn/pkcs11_polarssl.c | 4 +- src/openvpn/plugin.c | 12 +- src/openvpn/plugin.h | 14 +- src/openvpn/reliable.c | 4 +- src/openvpn/reliable.h | 4 +- src/openvpn/session_id.c | 4 +- src/openvpn/session_id.h | 4 +- src/openvpn/ssl.c | 6 +- src/openvpn/ssl.h | 4 +- src/openvpn/ssl_backend.h | 10 +- src/openvpn/ssl_openssl.c | 8 +- src/openvpn/ssl_polarssl.c | 10 +- src/openvpn/ssl_verify.c | 22 ++-- src/openvpn/ssl_verify.h | 4 +- src/openvpn/ssl_verify_backend.h | 26 ++-- src/openvpn/ssl_verify_openssl.c | 10 +- src/openvpn/ssl_verify_openssl.h | 6 +- src/openvpn/ssl_verify_polarssl.c | 6 +- src/openvpn/ssl_verify_polarssl.h | 5 +- src/openvpn/syshead.h | 14 +- src/plugins/examples/log_v3.c | 4 +- 44 files changed, 408 insertions(+), 410 deletions(-)configure.ac +0
-13@@ -227,19 +227,6 @@ AC_ARG_ENABLE( ) AC_ARG_WITH( - [ssl-headers], - [AS_HELP_STRING([--with-ssl-headers=DIR], [Crypto/SSL Include files location])], - [CS_HDR_DIR="$withval"] - [CPPFLAGS="$CPPFLAGS -I$withval"] -) - -AC_ARG_WITH( - [ssl-lib], - [AS_HELP_STRING([--with-ssl-lib=DIR], [Crypto/SSL Library location])], - [LDFLAGS="$LDFLAGS -L$withval"] -) - -AC_ARG_WITH( [mem-check],[AS_HELP_STRING([--with-mem-check=TYPE], [build with debug memory
checking, TYPE=dmalloc|valgrind|ssl])],,configure.ac +4
-4@@ -247,15 +234,15 @@ AC_ARG_WITH( ) AC_ARG_WITH( - [ssl-type], - [AS_HELP_STRING([--with-ssl-type=TYPE], [build with the given SSL library, TYPE = openssl or polarssl])], + [crypto-library], + [AS_HELP_STRING([--with-crypto-library=library], [build with the given crypto library, TYPE=openssl|polarssl @<:@default=openssl@:>@])], [ case "${withval}" in openssl|polarssl) ;; - *) AC_MSG_ERROR([bad value ${withval} for --with-ssl- type]) ;; + *) AC_MSG_ERROR([bad value ${withval} for --with- crypto-library]) ;; esac ], - [with_ssl_type="openssl"] + [with_crypto_library="openssl"] ) AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${host}", [A string representing ourhost])
configure.ac +67
-98@@ -637,6 +624,72 @@ case "${with_mem_check}" in ;; esac +have_openssl_crypto="yes" +PKG_CHECK_MODULES( + [OPENSSL_CRYPTO], + [libcrypto >= 0.9.6], + , + [AC_CHECK_LIB( + [crypto], + [RSA_new], + [OPENSSL_CRYPTO_LIBS="-lcrypto"], + [have_openssl_crypto="no"] + )] +) +have_openssl_ssl="yes" +PKG_CHECK_MODULES( + [OPENSSL_SSL], + [libssl >= 0.9.6], + , + [AC_CHECK_LIB( + [ssl], + [SSL_CTX_new], + [OPENSSL_SSL_LIBS="-lssl"], + [have_openssl_ssl="no"] + )] +) +if test "${have_openssl_crypto}" = "yes"; then + saved_CFLAGS="${CFLAGS}" + saved_LIBS="${LIBS}" + CFLAGS="${CFLAGS} ${OPENSSL_CRYPTO_CFLAGS}" + LIBS="${LIBS} ${OPENSSL_CRYPTO_LIBS}" + AC_CHECK_FUNCS([EVP_CIPHER_CTX_set_key_length]) + have_openssl_engine="yes" + AC_CHECK_FUNCS( + [ \ + ENGINE_load_builtin_engines \ + ENGINE_register_all_complete \ + ENGINE_cleanup \ + ], + , + [have_openssl_engine="no"; break] + ) + + CFLAGS="${saved_CFLAGS}" + LIBS="${saved_LIBS}" +fi + +AC_ARG_VAR([POLARSSL_CFLAGS], [C compiler flags for polarssl]) +AC_ARG_VAR([POLARSSL_LIBS], [linker flags for polarssl]) +have_polarssl_ssl="yes" +have_polarssl_crypto="yes" +if test -z "${POLARSSL_LIBS}"; then + AC_CHECK_LIB( + [polarssl], + [ssl_init], + [POLARSSL_LIBS="-lpolarssl"], + [ + have_polarssl_ssl="no" + AC_CHECK_LIB( + [polarssl], + [aes_crypt_cbc], + , + [have_polarssl_crypto="no"] + ) + ] + ) +fi + AC_ARG_VAR([LZO_CFLAGS], [C compiler flags for lzo]) AC_ARG_VAR([LZO_LIBS], [linker flags for lzo]) have_lzo="yes"@@ -683,106 +736,9 @@ PKG_CHECK_MODULES( [have_pkcs11_helper="yes"] ) -dnl -dnl check for SSL-crypto library -dnl -if test "${enable_crypto}" = "yes"; then - if test "${with_ssl_type}" = "openssl"; then - AC_CHECKING([for OpenSSL Crypto Library and Header files]) - AC_CHECK_HEADER(openssl/evp.h,, - [AC_MSG_ERROR([OpenSSL Crypto headers not found.])]) - - for lib in crypto eay32; do - AC_CHECK_LIB($lib, EVP_CIPHER_CTX_init, - [ - cryptofound=1 - LIBS="${LIBS} -l$lib" - ] - ) - done - test -n "$cryptofound" || AC_MSG_ERROR([OpenSSL Crypto library not found.]) - - AC_MSG_CHECKING([that OpenSSL Library is at least version 0.9.6]) - AC_EGREP_CPP(yes, - [ - #include <openssl/evp.h> - #if SSLEAY_VERSION_NUMBER >= 0x00906000L - yes - #endif - ], - [ - AC_MSG_RESULT([yes]) - AC_DEFINE(USE_CRYPTO, 1, [Use crypto library]) - AC_DEFINE(USE_OPENSSL, 1, [Use OpenSSL library]) - AC_CHECK_FUNCS(EVP_CIPHER_CTX_set_key_length) - - dnl check for OpenSSL crypto acceleration capability - AC_CHECK_HEADERS(openssl/engine.h) - AC_CHECK_FUNCS(ENGINE_load_builtin_engines) - AC_CHECK_FUNCS(ENGINE_register_all_complete) - AC_CHECK_FUNCS(ENGINE_cleanup) - ], - [AC_MSG_ERROR([OpenSSL crypto Library is too old.])] - ) - fi - if test "${with_ssl_type}" = "polarssl"; then - AC_CHECKING([for PolarSSL Crypto Library and Header files]) - AC_CHECK_HEADER(polarssl/aes.h, - [AC_CHECK_LIB(polarssl, aes_crypt_cbc, - [ - LIBS="${LIBS} -lpolarssl" - AC_DEFINE(USE_CRYPTO, 1, [Use crypto library]) - AC_DEFINE(USE_POLARSSL, 1, [Use PolarSSL library]) - ], - [AC_MSG_ERROR([PolarSSL Crypto library not found.])] - )], - [AC_MSG_ERROR([PolarSSL Crypto headers not found.])] - ) - fi - dnl - dnl check for OpenSSL-SSL library - dnl - - if test "${enable_ssl}" = "yes"; then - if test "${with_ssl_type}" = "openssl"; then - AC_CHECKING([for OpenSSL SSL Library and Header files]) - AC_CHECK_HEADER(openssl/ssl.h,, - [AC_MSG_ERROR([OpenSSL SSL headers not found.])] - ) - - for lib in ssl ssl32; do - AC_CHECK_LIB($lib, SSL_CTX_new, - [ - sslfound=1 - LIBS="${LIBS} -l$lib" - ] - ) - done - - test -n "${sslfound}" || AC_MSG_ERROR([OpenSSL SSL library not found.]) - - AC_DEFINE(USE_SSL, 1, [Use OpenSSL SSL library]) - fi - if test "${with_ssl_type}" = "polarssl"; then - AC_CHECKING([for PolarSSL SSL Library and Header files]) - AC_CHECK_HEADER(polarssl/ssl.h, - [AC_CHECK_LIB(polarssl, ssl_init, - [ - LIBS="${LIBS} -lpolarssl" - AC_DEFINE(USE_SSL, 1, [Use SSL library]) - AC_DEFINE(USE_POLARSSL, 1, [Use PolarSSL library]) - ], - [AC_MSG_ERROR([PolarSSL SSL library not found.])] - )], - [AC_MSG_ERROR([PolarSSL SSL headers not found.])] - ) - fi - fi -fi - dnl enable --x509-username-field feature if requested if test "${enable_x509_alt_username}" = "yes"; then - if test "${with_ssl_type}" = "polarssl" ; then + if test "${with_crypto_library}" = "polarssl" ; thenAC_MSG_ERROR([PolarSSL does not support the --x509-username-field feature])
ficonfigure.ac +0
-0@@ -806,6 +762,42 @@ test "${enable_strict_options}" = "yes" &&AC_DEFINE([ENABLE_STRICT_OPTIONS_CHEC
test "${enable_password_save}" = "yes" &&
AC_DEFINE([ENABLE_PASSWORD_SAVE], [1], [Allow --askpass and --auth- user-pass passwords to be read from a file])
test "${enable_systemd}" = "yes" && AC_DEFINE([ENABLE_SYSTEMD], [1],
[Enable systemd support])configure.ac +9
-0+case "${with_crypto_library}" in + openssl) + have_crypto_crypto="${have_openssl_crypto}" + have_crypto_ssl="${have_openssl_ssl}" + CRYPTO_CRYPTO_CFLAGS="${OPENSSL_CRYPTO_CFLAGS}" + CRYPTO_CRYPTO_LIBS="${OPENSSL_CRYPTO_LIBS}" + CRYPTO_SSL_CFLAGS="${OPENSSL_SSL_CFLAGS}" + CRYPTO_SSL_LIBS="${OPENSSL_SSL_LIBS}" + AC_DEFINE([ENABLE_CRYPTO_OPENSSL], [1], [Use OpenSSLlibrary])
+ test "${have_openssl_engine}" = "yes" &&AC_DEFINE([HAVE_OPENSSL_ENGINE], [1], [Use crypto library])configure.ac +7
-0+ ;; + polarssl) + have_crypto_crypto="${have_polarssl_crypto}" + have_crypto_ssl="${have_polarssl_ssl}" + CRYPTO_CRYPTO_CFLAGS="${POLARSSL_CRYPTO_CFLAGS}" + CRYPTO_CRYPTO_LIBS="${POLARSSL_LIBS}" + AC_DEFINE([ENABLE_CRYPTO_POLARSSL], [1], [Use PolarSSLlibrary])
configure.ac +5
-0+ ;; +esac + +if test "${enable_crypto}" = "yes"; then + test "${have_crypto_crypto}" != "yes" &&
AC_MSG_ERROR([${with_crypto_library} crytpo is required but missing])
+ OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS}
${CRYPTO_CRYPTO_CFLAGS}"
+ OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS}
${CRYPTO_CRYPTO_LIBS}"configure.ac +6
-0+ AC_DEFINE([ENABLE_CRYPTO], [1], [Enable crypto library]) +fi + + +if test "${enable_ssl}" = "yes"; then + test "${enable_crypto}" != "yes" && AC_MSG_ERROR([crypto must beenabled for ssl])
+ test "${have_crypto_ssl}" != "yes" &&AC_MSG_ERROR([${with_ssl_library} ssl is required but missing])
+ OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS}
${CRYPTO_SSL_CFLAGS}"configure.ac +4
-0+ OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_SSL_LIBS}" + AC_DEFINE([ENABLE_SSL], [1], [Enable ssl library]) +fi + if test "${enable_plugins}" = "yes"; then test "${WIN32}" != "yes" -a -z "${DL_LIBS}" &&
AC_MSG_ERROR([libdl is required for plugins])OPTIONAL_DL_LIBS="${DL_LIBS}"configure.ac +2
-0@@ -876,6 +868,8 @@ AC_SUBST([TAP_WIN_MIN_MINOR]) AC_SUBST([OPTIONAL_DL_LIBS]) AC_SUBST([OPTIONAL_SELINUX_LIBS]) +AC_SUBST([OPTIONAL_CRYPTO_CFLAGS]) +AC_SUBST([OPTIONAL_CRYPTO_LIBS]) AC_SUBST([OPTIONAL_LZO_CFLAGS]) AC_SUBST([OPTIONAL_LZO_LIBS]) AC_SUBST([OPTIONAL_PKCS11_HELPER_CFLAGS])doc/doxygen/doc_data_crypto.h +0
-0@@ -60,7 +60,7 @@* * @par Settings that control this module's activity * Whether or not the Data Channel Crypto module is active depends on the
- * compile-time \cUSE_CRYPTOand \cUSE_SSLpreprocessor macros. How it
+ * compile-time \cENABLE_CRYPTOand \cENABLE_SSLpreprocessor macros. How it
* processes packets received from the \linkdata_controlData Channel
* Control module\endlink at runtime depends on the associated \c
*crypto_optionsstructure. To perform cryptographic operations, the
\cinclude/openvpn-plugin.h +0
-5@@ -24,16 +24,25 @@#ifndef OPENVPN_PLUGIN_H_ #define OPENVPN_PLUGIN_H_ -#ifdef USE_SSL -# if defined(SSL_VERIFY_OPENSSL_H_ ) ||defined (SSL_VERIFY_POLARSSL_H_ ) -# define ENABLE_SSL_PLUGIN -# else -# warning "Neither OpenSSL or PoLarSSL headers included, disablingplugin's SSL support"
include/openvpn-plugin.h +16
-2-# endif -#endif /*USE_SSL*/ #define OPENVPN_PLUGIN_VERSION 3 +#ifdef ENABLE_SSL +#ifdef ENABLE_CRYPTO_POLARSSL +#include <polarssl/x509.h> +#ifndef __OPENVPN_X509_CERT_T_DECLARED +#define __OPENVPN_X509_CERT_T_DECLARED +typedef x509_cert openvpn_x509_cert_t ; +#endif +#else +#include <openssl/x509.h> +#ifndef __OPENVPN_X509_CERT_T_DECLARED +#define __OPENVPN_X509_CERT_T_DECLARED +typedef X509 openvpn_x509_cert_t ; +#endif +#endif +#endif +/* * Plug-in types. These types correspond to the set of script callbacks
* supported by OpenVPN.include/openvpn-plugin.h +0
-0@@ -268,9 +277,9 @@ struct openvpn_plugin_args_open_return* *per_client_context : the per-client context pointer which was returned by
*openvpn_plugin_client_constructor_v1, if defined.
*
- *current_cert_depth: Certificate depth of the certificate being passed over (only if compiled withUSE_SSLdefined)
+ *current_cert_depth: Certificate depth of the certificate being passed over (only if compiled withENABLE_SSLdefined)
*
- **current_cert: X509 Certificate object received from the client (only if compiled withUSE_SSLdefined)
+ **current_cert: X509 Certificate object received from the client (only if compiled withENABLE_SSLdefined)
*
*/
structopenvpn_plugin_args_func_ininclude/openvpn-plugin.h +2
-2@@ -280,9 +289,9 @@ struct openvpn_plugin_args_func_inconst char **const envp;openvpn_plugin_handle_t handle;void *per_client_context; -#ifdef ENABLE_SSL_PLUGIN +#ifdef ENABLE_SSL int current_cert_depth; -x509_cert_t *current_cert; +openvpn_x509_cert_t *current_cert;#else int __current_cert_depth_disabled;/* Unused, for compatibility purposes only */
void*__current_cert_disabled; /* Unused, for compatibility purposes
only */src/openvpn/Makefile.am +2
-0@@ -17,6 +17,7 @@ MAINTAINERCLEANFILES = \ INCLUDES = -I$(top_srcdir)/include AM_CFLAGS = \ + $(OPTIONAL_CRYPTO_CFLAGS) \ $(OPTIONAL_LZO_CFLAGS) \ $(OPTIONAL_PKCS11_HELPER_CFLAGS)@@ -103,6 +104,7 @@ openvpn_LDADD = \ $(SOCKETS_LIBS) \ $(OPTIONAL_LZO_LIBS) \ $(OPTIONAL_PKCS11_HELPER_LIBS) \ + $(OPTIONAL_CRYPTO_LIBS) \ $(OPTIONAL_SELINUX_LIBS) \ $(OPTIONAL_DL_LIBS) if WIN32src/openvpn/crypto.c +2
-2@@ -25,7 +25,7 @@#include "syshead.h" -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #include "crypto.h" #include "error.h" @@ -712,7 +712,7 @@ test_crypto (const struct crypto_options *co, struct frame* frame) gc_free (&gc); } -#ifdef USE_SSL +#ifdef ENABLE_SSL void
get_tls_handshake_key(const structkey_type*key_type,src/openvpn/crypto.c +3
-3@@ -1373,7 +1373,7 @@ get_random()return l; } -#ifndef USE_SSL +#ifndef ENABLE_SSL void init_ssl_lib (void )@@ -1392,7 +1392,7 @@ free_ssl_lib (void) ERR_free_strings (); } -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ /* * md5 functions @@ -1452,4 +1452,4 @@ md5_digest_equal (const struct md5_digest *d1, const struct md5_digest *d2) return memcmp(d1->digest, d2->digest, MD5_DIGEST_LENGTH) == 0; } -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ src/openvpn/crypto.h +3
-3@@ -30,7 +30,7 @@#ifndef CRYPTO_H #define CRYPTO_H -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #define ALLOW_NON_CBC_CIPHERS @@ -347,7 +347,7 @@ void key2_print (const struct key2* k,const char * prefix0, const char* prefix1); -#ifdef USE_SSL +#ifdef ENABLE_SSL #define GHK_INLINE (1<<0) void get_tls_handshake_key (const struct key_type *key_type,@@ -361,7 +361,7 @@ void get_tls_handshake_key (const struct key_type *key_type, void init_ssl_lib (void);void free_ssl_lib (void ); -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ /* * md5 functions
src/openvpn/crypto.h +1
-1@@ -394,5 +394,5 @@ key_ctx_bi_defined(const struct key_ctx_bi* key) } -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ #endif /* CRYPTO_H */ src/openvpn/crypto_backend.h +2
-2@@ -32,10 +32,10 @@#include "config.h" -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL #include "crypto_openssl.h" #endif -#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL #include "crypto_polarssl.h" #endif #include "basic.h" src/openvpn/crypto_openssl.c +1
-8@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_OPENSSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_CRYPTO_OPENSSL )#include "basic.h" #include "buffer.h" @@ -104,19 +104,7 @@ cipher_ok (const char* name)#define EVP_MD_name (e) OBJ_nid2sn(EVP_MD_type(e))#endif -/* -* -* OpenSSL engine support. Allows loading/unloading of engines. -* -*/ - -#if defined(HAVE_OPENSSL_ENGINE_H) &&
defined(HAVE_ENGINE_LOAD_BUILTIN_ENGINES)&&defined(HAVE_ENGINE_REGISTER_ALL_COMPLETE)&&defined(HAVE_ENGINE_CLEANUP)src/openvpn/crypto_openssl.c +6
-11-#define CRYPTO_ENGINE 1 -#else -#define CRYPTO_ENGINE 0 -#endif - -#if CRYPTO_ENGINE +#if HAVE_OPENSSL_ENGINE #include <openssl/engine.h> static bool engine_initialized = false;/* GLOBAL */ @@ -173,12 +161,12 @@ setup_engine (const char *engine)return e; } -#endif /* CRYPTO_ENGINE */ +#endif /* HAVE_OPENSSL_ENGINE */ void crypto_init_lib_engine (const char *engine_name) { -#if CRYPTO_ENGINE +#if HAVE_OPENSSL_ENGINE if (!engine_initialized) {ASSERT (engine_name);@@ -220,7 +208,7 @@ crypto_uninit_lib (void)fclose (fp);#endif -#if CRYPTO_ENGINE +#if HAVE_OPENSSL_ENGINE if (engine_initialized) {ENGINE_cleanup ();@@ -335,7 +323,7 @@ show_available_digests ()void show_available_engines () { -#if CRYPTO_ENGINE /* Only defined for OpenSSL */ +#if HAVE_OPENSSL_ENGINE /* Only defined for OpenSSL */ ENGINE *e;printf ("OpenSSL Crypto Engines\n\n" );@@ -741,4 +729,4 @@ hmac_ctx_final (HMAC_CTX *ctx, uint8_t *dst) HMAC_Final (ctx, dst, &in_hmac_len); } -#endif /* USE_CRYPTO && USE_OPENSSL */ +#endif /* ENABLE_CRYPTO && ENABLE_CRYPTO_OPENSSL */ src/openvpn/crypto_polarssl.c +2
-2@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_POLARSSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_CRYPTO_POLARSSL )#include "errlevel.h" #include "basic.h" @@ -557,4 +557,4 @@ hmac_ctx_final (md_context_t *ctx, uint8_t *dst) ASSERT(0 == md_hmac_finish(ctx, dst)); } -#endif /* USE_CRYPTO && USE_POLARSSL */ +#endif /* ENABLE_CRYPTO && ENABLE_CRYPTO_POLARSSL */ src/openvpn/error.c +4
-4@@ -37,8 +37,8 @@#include "ps.h" #include "mstats.h" -#ifdef USE_CRYPTO -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_CRYPTO_OPENSSL #include <openssl/err.h> #endif #endif @@ -246,8 +246,8 @@ void x_msg (const unsigned int flags, const char *format, ...)SWAP ; } -#ifdef USE_CRYPTO -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_CRYPTO_OPENSSL if (flags & M_SSL) {int nerrs = 0;src/openvpn/error.h +1
-1@@ -96,7 +96,7 @@ extern int x_msg_line_num;#define M_ERRNO (1<<8)/* show errno description */ #define M_ERRNO_SOCK (1<<9)/* show socket errno description */ -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL # define M_SSL (1<<10)/* show SSL error */ #endif src/openvpn/forward- renamed from src/openvpn/forward-inline.h +0
-0
inline.h
index 64ca941..5853ce2 100644src/openvpn/forward-inline.h +3
-3@@ -35,7 +35,7 @@static inline void check_tls (struct context *c) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )void check_tls_dowork (struct context *c);if (c->c2.tls_multi)check_tls_dowork (c);@@ -49,7 +49,7 @@ check_tls (struct context *c)static inline void check_tls_errors (struct context *c) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )void check_tls_errors_co (struct context *c);void check_tls_errors_nco (struct context *c);if (c->c2.tls_multi && c->c2.tls_exit_signal)@@ -189,7 +189,7 @@ check_push_request (struct context *c)#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* * Should we persist our anti-replay packet ID state to disk? */ src/openvpn/forward.c +3
-3@@ -81,7 +81,7 @@ show_wait_status (struct context *c)* traffic on the control-channel. * */ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )void check_tls_dowork (struct context *c) {@@ -112,7 +112,7 @@ check_tls_dowork (struct context *c) }#endif -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )void check_tls_errors_co (struct context *c)@@ -232,7 +232,7 @@ check_connection_established_dowork (struct context *c)bool send_control_channel_string (struct context *c,const char *str,int msglevel) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )if (c->c2.tls_multi) {struct gc_arena gc = gc_new (); bool stat;src/openvpn/forward.c +7
-7@@ -449,8 +449,8 @@ encrypt_sign (struct context *c, bool comp_frag)#endif } -#ifdef USE_CRYPTO -#ifdef USE_SSL +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_SSL /* * If TLS mode, get the key we will use to encrypt * the packet. @@ -472,8 +472,8 @@ encrypt_sign (struct context *c, bool comp_frag)*/ link_socket_get_outgoing_addr (&c->c2.buf,get_link_socket_info (c), &c->c2.to_link_addr); -#ifdef USE_CRYPTO -#ifdef USE_SSL +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_SSL /* * In TLS mode, prepend the appropriate one-byte opcode * to the packet which identifies it as a data channel @@ -498,7 +498,7 @@ encrypt_sign (struct context *c, bool comp_frag)static void process_coarse_timers (struct context *c) { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* flush current packet-id to file once per 60 seconds if --replay-persist was specified */ check_packet_id_persist_flush (c);@@ -789,8 +789,8 @@ process_incoming_link (struct context *c)if (!link_socket_verify_incoming_addr (&c->c2.buf, lsi, &c- >c2.from))link_socket_bad_incoming_addr (&c->c2.buf, lsi, &c->c2.from); -#ifdef USE_CRYPTO -#ifdef USE_SSL +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_SSL if (c->c2.tls_multi) {/*src/openvpn/forward.c +1
-1@@ -820,7 +820,7 @@ process_incoming_link (struct context *c)if (c->c2.context_auth !=CAS_SUCCEEDED ) c->c2.buf.len =0 ;#endif -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ /* authenticate and decrypt the incoming packet */ decrypt_status = openvpn_decrypt (&c->c2.buf, c->c2.buffers-Quoted 1 line
decrypt_buf,&c->c2.crypto_options,&c->c2.frame);src/openvpn/forward.c +1
-1@@ -833,7 +833,7 @@ process_incoming_link (struct context *c) goto done; } -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_FRAGMENT if (c->c2.fragment)src/openvpn/init.c +5
-5@@ -428,7 +428,7 @@ next_connection_entry (struct context *c)static void init_query_passwords (struct context *c) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )/* Certificate password input */ if (c->options.key_pass_file)pem_password_setup (c->options.key_pass_file);@@ -629,7 +629,7 @@ init_static (void) {/* configure_path (); */ -#if defined(USE_CRYPTO ) && defined(DMALLOC ) +#if defined(ENABLE_CRYPTO ) && defined(DMALLOC )crypto_init_dmalloc ();#endif @@ -652,7 +652,7 @@ init_static (void)update_time (); -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO init_ssl_lib ();/* init PRNG used for IV generation */ @@ -838,7 +838,7 @@ init_static (void)void uninit_static (void ) { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO free_ssl_lib ();#endif @@ -850,7 +850,7 @@ uninit_static (void)close_port_share ();#endif -#if defined(MEASURE_TLS_HANDSHAKE_STATS ) && defined(USE_CRYPTO ) && defined(USE_SSL) +#if defined(MEASURE_TLS_HANDSHAKE_STATS ) && defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )show_tls_performance_stats ();#endif
}src/openvpn/init.c +1
-1@@ -891,9 +891,9 @@ print_openssl_info (const struct options *options)/* * OpenSSL info print mode? */ -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO if (options->show_ciphers || options->show_digests || options-Quoted 1 line
show_enginessrc/openvpn/init.c +6
-6-#ifdef USE_SSL +#ifdef ENABLE_SSL || options->show_tls_ciphers#endif )@@ -904,7 +904,7 @@ print_openssl_info (const struct options *options)show_available_digests ();if (options->show_engines)show_available_engines (); -#ifdef USE_SSL +#ifdef ENABLE_SSL if (options->show_tls_ciphers)show_available_tls_ciphers ();#endif @@ -920,7 +920,7 @@ print_openssl_info (const struct options *options)bool do_genkey (const struct options * options) { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO if (options->genkey) {int nbits_written;@@ -955,9 +955,9 @@ do_persist_tuntap (const struct options *options)notnull (options->dev,"TUN/TAP device (--dev)" ); if (options->ce.remote || options->ifconfig_local || options->ifconfig_remote_netmask -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO || options->shared_secret_file -#ifdef USE_SSL +#ifdef ENABLE_SSL || options->tls_server || options->tls_client #endif #endif@@ -1068,7 +1068,7 @@ const char * format_common_name (struct context *c, struct gc_arena *gc) { struct buffer out = alloc_buf_gc (256, gc); -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )if (c->c2.tls_multi) { buf_printf (&out, "[%s] ", tls_common_name (c->c2.tls_multi,false));
src/openvpn/init.c +2
-2@@ -1155,12 +1155,12 @@ do_init_timers (struct context *c, bool deferred)#endif /* initialize packet_id persistence timer */ -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO if (c->options.packet_id_file)event_timeout_init (&c->c2.packet_id_persist_interval,60 , now);#endif -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )/* initialize tmp_int optimization that limits the number of times we call
tls_multi_processin the main event loop */interval_init(&c->c2.tmp_int,TLS_MULTI_HORIZON,TLS_MULTI_REFRESH);src/openvpn/init.c +5
-5@@ -1967,20 +1967,20 @@ frame_finalize_options (struct context *c, const struct options *o)static void key_schedule_free (struct key_schedule *ks,bool free_ssl_ctx) { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO free_key_ctx_bi (&ks->static_key); -#ifdef USE_SSL +#ifdef ENABLE_SSL if (tls_ctx_initialised (&ks->ssl_ctx) && free_ssl_ctx) {tls_ctx_free (&ks->ssl_ctx);free_key_ctx_bi (&ks->tls_auth_key); } -#endif /* USE_SSL */ -#endif /* USE_CRYPTO */ +#endif /* ENABLE_SSL */ +#endif /* ENABLE_CRYPTO */ CLEAR (*ks); } -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO static void
init_crypto_pre(struct context *c, const unsigned int flags)src/openvpn/init.c +1
-1@@ -2091,7 +2091,7 @@ do_init_crypto_static (struct context *c, const unsigned int flags) options->use_iv); } -#ifdef USE_SSL +#ifdef ENABLE_SSL /* * Initialize the persistent component of OpenVPN's TLS mode,
src/openvpn/init.c +7
-7@@ -2330,10 +2330,10 @@ do_init_finalize_tls_frame (struct context *c) } } -#endif /* USE_SSL */ -#endif /* USE_CRYPTO */ +#endif /* ENABLE_SSL */ +#endif /* ENABLE_CRYPTO */ -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* * No encryption or authentication. */ @@ -2349,20 +2349,20 @@ do_init_crypto_none (const struct context *c)static void do_init_crypto (struct context *c,const unsigned int flags) { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO if (c->options.shared_secret_file)do_init_crypto_static (c, flags); -#ifdef USE_SSL +#ifdef ENABLE_SSL else if (c->options.tls_server || c->options.tls_client) do_init_crypto_tls (c, flags);#endif else /* no encryption or authentication. */do_init_crypto_none (c ); -#else /* USE_CRYPTO */ +#else /* ENABLE_CRYPTO */ msg (M_WARN ,"******* WARNING *******: " PACKAGE_NAME " built without OpenSSL -- encryption and authentication features disabled -- all data will be tunnelled as cleartext"); -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ }static void
src/openvpn/init.c +2
-2@@ -2501,13 +2501,13 @@ do_option_warnings (struct context *c)#endif #endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO if (!o->replay) msg (M_WARN, "WARNING: You have disabled Replay Protection (--no- replay) which may make " PACKAGE_NAME " less secure"); if (!o->use_iv) msg (M_WARN, "WARNING: You have disabled Crypto IVs (--no-iv) which may make " PACKAGE_NAME " less secure"); -#ifdef USE_SSL +#ifdef ENABLE_SSL if (o->tls_server)warn_on_use_of_common_subnets ();if (
o->tls_clientsrc/openvpn/init.c +12
-12@@ -2540,7 +2540,7 @@ do_option_warnings (struct context *c)static void do_init_frame_tls (struct context *c) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )do_init_finalize_tls_frame (c);#endif }@@ -2557,7 +2557,7 @@ init_context_buffers (const struct frame *frame) b->aux_buf =alloc_buf (BUF_SIZE (frame)); -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO b->encrypt_buf =alloc_buf (BUF_SIZE (frame)); b->decrypt_buf =alloc_buf (BUF_SIZE (frame));#endif @@ -2584,7 +2584,7 @@ free_context_buffers (struct context_buffers *b)free_buf (&b->lzo_decompress_buf);#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO free_buf (&b->encrypt_buf);free_buf (&b->decrypt_buf);#endif @@ -2733,7 +2733,7 @@ do_compute_occ_strings (struct context *c)msg (D_SHOW_OCC ,"Expected Remote Options String: '%s'" , c->c2.options_string_remote); -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO msg (D_SHOW_OCC_HASH, "Local Options hash (VER=%s): '%s'", options_string_version (c->c2.options_string_local, &gc), md5sum ((uint8_t*)c->c2.options_string_local,@@ -2744,7 +2744,7 @@ do_compute_occ_strings (struct context *c) strlen (c->c2.options_string_remote), 9, &gc));#endif -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )if (c->c2.tls_multi) tls_multi_init_set_options (c->c2.tls_multi, c->c2.options_string_local,@@ -2830,7 +2830,7 @@ do_close_free_buf (struct context *c)static void do_close_tls (struct context *c) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )if (c->c2.tls_multi) {tls_multi_free (c->c2.tls_multi, true);@@ -2886,7 +2886,7 @@ do_close_link_socket (struct context *c)static void do_close_packet_id (struct context *c) { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO packet_id_free (&c->c2.packet_id);packet_id_persist_save (&c->c1.pid_persist);if (!(c->sig->signal_received ==SIGUSR1 ))@@ -3064,7 +3064,7 @@ do_setup_fast_io (struct context *c)static void do_signal_on_tls_errors (struct context *c) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )if (c->options.tls_exit) c->c2.tls_exit_signal =SIGTERM ;else @@ -3609,9 +3609,9 @@ inherit_context_child (struct context *dest,/* c1 init */ packet_id_persist_init (&dest->c1.pid_persist); -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO dest->c1.ks.key_type = src->c1.ks.key_type; -#ifdef USE_SSL +#ifdef ENABLE_SSL /* inherit SSL context */ dest->c1.ks.ssl_ctx = src->c1.ks.ssl_ctx; dest->c1.ks.tls_auth_key = src->c1.ks.tls_auth_key;@@ -3688,7 +3688,7 @@ inherit_context_top (struct context *dest,/* detach plugins */ dest->plugins_owned = false; -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL ) dest->c2.tls_multi =NULL ;#endif @@ -3733,7 +3733,7 @@ close_context (struct context *c, int sig, unsigned int flags)context_gc_free (c ); } -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* * Do a loopback test
src/openvpn/init.c +1
-1@@ -3766,7 +3766,7 @@ test_crypto_thread (void *arg)bool do_test_crypto (const struct options *o) { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO if (o->test_crypto) {struct context c;src/openvpn/manage.c +0
-0@@ -699,7 +699,7 @@ man_query_need_str (struct management *man, constchar *type, const char *action
static void
man_forget_passwords(struct management *man)
{src/openvpn/manage.c +2
-2-#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )ssl_purge_auth (false);msg (M_CLIENT ,"SUCCESS: Passwords were forgotten" );#endif @@ -1714,7 +1714,7 @@ man_reset_client_socket (struct management *man, const bool exiting) }if (!exiting) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )if (man->settings.flags &MF_FORGET_DISCONNECT )ssl_purge_auth (false);#endif
src/openvpn/misc.c +1
-1@@ -1243,7 +1243,7 @@ test_file (const char *filename)return ret; } -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* create a temporary filename in directory */ const char *src/openvpn/misc.h +0
-1@@ -194,7 +194,7 @@ int openvpn_chdir (const char* dir);extern int inetd_socket_descriptor;void save_inetd_socket_descriptor (void ); -/* init random() function, only used as source for weak random numbers, when !USE_CRYPTO */
+/* initrandom()function, only used as source for weak random numbers, when !ENABLE_CRYPTO */
voidinit_random_seed(void);/* set/delete environmental variable */
src/openvpn/misc.h +0
-0@@ -252,7 +252,7 @@ void sleep_milliseconds (unsigned int n);void sleep_until_signal (void );/* an analogue to the random() function, but use OpenSSL functions if available */
src/openvpn/misc.h +2
-2-#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO long int get_random (void );#else #define get_random random@@ -273,7 +273,7 @@ bool delete_file (const char *filename);/* return true if pathname is absolute */ bool absolute_pathname (const char *pathname); -/* prepend a random prefix to hostname (need USE_CRYPTO) */ +/* prepend a random prefix to hostname (need ENABLE_CRYPTO) */ const char *hostname_randomize (const char *hostname,struct gc_arena *gc);/*
src/openvpn/openvpn.h +9
-9@@ -55,24 +55,24 @@struct key_schedule { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* which cipher, HMAC digest, and key sizes are we using? */ struct key_type key_type;/* pre-shared static key, read from a file */ struct key_ctx_bi static_key; -#ifdef USE_SSL +#ifdef ENABLE_SSL /* our global SSL context */ struct tls_root_ctx ssl_ctx;/* optional authentication HMAC key for TLS control channel */ struct key_ctx_bi tls_auth_key; -#endif /* USE_SSL */ -#else /* USE_CRYPTO */ +#endif /* ENABLE_SSL */ +#else /* ENABLE_CRYPTO */ int dummy; -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ };/* @@ -99,7 +99,7 @@ struct context_buffersstruct buffer aux_buf;/* workspace buffers used by crypto routines */ -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO struct buffer encrypt_buf;struct buffer decrypt_buf;#endif @@ -331,12 +331,12 @@ struct context_2int occ_mtu_load_n_tries;#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* * TLS-mode crypto objects. */ -#ifdef USE_SSL +#ifdef ENABLE_SSL struct tls_multi *tls_multi;/**< TLS state structure for this VPN * tunnel. */ @@ -358,7 +358,7 @@ struct context_2/* throw this signal on TLS errors */ int tls_exit_signal; -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ struct crypto_options crypto_options;/**< Security parameters and crypto state
src/openvpn/openvpn.h +2
-2@@ -370,7 +370,7 @@ struct context_2struct packet_id packet_id;struct event_timeout packet_id_persist_interval; -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_LZO struct lzo_compress_workspace lzo_compwork;@@ -566,7 +566,7 @@ struct context* have been compiled in. */ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#define TLS_MODE (c) ((c)->c2.tls_multi != NULL)#define PROTO_DUMP_FLAGS (check_debug_level (D_LINK_RW_VERBOSE) ? (PD_SHOW_DATA|PD_VERBOSE) : 0)#define
PROTO_DUMP(buf, gc)protocol_dump((buf), \src/openvpn/openvpn.h +2
-2@@ -579,13 +579,13 @@ struct context#define PROTO_DUMP (buf, gc) format_hex (BPTR (buf), BLEN (buf), 80, gc)#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #define MD5SUM (buf, len, gc) md5sum((buf), (len), 0, (gc))#else #define MD5SUM (buf, len, gc) "[unavailable]"#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #define CIPHER_ENABLED (c) (c->c1.ks.key_type.cipher != NULL)#else #define
CIPHER_ENABLED(c)(false)src/openvpn/options.c +11
-11@@ -56,25 +56,25 @@const char title_string[] =PACKAGE_STRING " " TARGET_ALIAS -#ifdef USE_CRYPTO -#ifdef USE_SSL -#if defined(USE_POLARSSL ) +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_SSL +#if defined(ENABLE_CRYPTO_POLARSSL ) " [SSL (PolarSSL)]" -#elif defined(USE_OPENSSL ) +#elif defined(ENABLE_CRYPTO_OPENSSL )" [SSL (OpenSSL)]" #else " [SSL]" -#endif /* defined(USE_POLARSSL) */ -#else /* ! USE_SSL */ -#if defined(USE_POLARSSL ) +#endif /* defined(ENABLE_CRYPTO_POLARSSL) */ +#else /* ! ENABLE_SSL */ +#if defined(ENABLE_CRYPTO_POLARSSL ) " [CRYPTO (PolarSSL)]" -#elif defined(USE_OPENSSL ) +#elif defined(ENABLE_CRYPTO_OPENSSL )" [CRYPTO (OpenSSL)]" #else " [CRYPTO]" -#endif /* defined(USE_POLARSSL) */ -#endif /* USE_SSL */ -#endif /* USE_CRYPTO */ +#endif /* defined(ENABLE_CRYPTO_POLARSSL) */ +#endif /* ENABLE_SSL */ +#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_LZO #ifdef ENABLE_LZO_STUB " [LZO (STUB)]" @@ -503,7 +503,7 @@ static const char usage_message[] = "--explicit-exit-notify [n] : On exit/restart, send exit signalto\n"
" server/remote. n = # of retries, default=1.\n"
#endifsrc/openvpn/options.c +1
-1-#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO "\n" "Data Channel Encryption Options (must be compatible betweenpeers):\n"
"(These options are meaningful for both Static Key & TLS-mode)\n"src/openvpn/options.c +0
-0@@ -526,7 +526,7 @@ static const char usage_message[] ="--keysize n : Size of cipher key in bits (optional).\n" " If unspecified, defaults to cipher-specificdefault.\n"
#endifsrc/openvpn/options.c +1
-1-#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL "--engine [name] : Enable OpenSSL hardware crypto enginefunctionality.\n"
#endif
"--no-replay : Disable replay protection.\n"src/openvpn/options.c +1
-1@@ -539,7 +539,7 @@ static const char usage_message[] =" using file.\n" "--test-crypto : Run a self-test of crypto features enabled.\n" " For debugging only.\n" -#ifdef USE_SSL +#ifdef ENABLE_SSL"\n" "TLS Key Negotiation Options:\n" "(These options are meaningful only for TLS-mode)\n" @@ -549,7 +549,7 @@ static const char usage_message[] =" number, such as 1 (default), 2, etc.\n" "--ca file : Certificate authority file in .pem formatcontaining\n"
" root certificate.\n"src/openvpn/options.c +1
-1-#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL "--capath dir : A directory of trusted certificates (CAs"#if OPENSSL_VERSION_NUMBER >=0x00907000L " and CRLs).\n" @@ -557,7 +557,7 @@ static const char usage_message[] =").\n" " WARNING: no support of CRL available with thisversion.\n"
#endif /*OPENSSL_VERSION_NUMBER>=0x00907000L*/src/openvpn/options.c +1
-1-#endif /* USE_POLARSSL */ +#endif /* ENABLE_CRYPTO_POLARSSL */ "--dh file : File containing Diffie Hellman parameters\n" " in .pem format (for --tls-server only).\n" " Use \"openssl dhparam -out dh1024.pem 1024\" togenerate.\n"
src/openvpn/options.c +0
-0@@ -565,7 +565,7 @@ static const char usage_message[] =" by a Certificate Authority in --ca file.\n" "--extra-certs file : one or more PEM certs that complete the certchain.\n"
"--key file : Local private key in .pem format.\n"src/openvpn/options.c +1
-1-#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL "--pkcs12 file : PKCS#12 file containing local private key, localcertificate\n"
" and optionally the root CA certificate.\n"
#endifsrc/openvpn/options.c +0
-0@@ -616,7 +616,7 @@ static const char usage_message[] = "--x509-track x : Save peer X509 attribute x in environment for useby\n"
" plugins and management interface.\n"
#endifsrc/openvpn/options.c +1
-1-#if OPENSSL_VERSION_NUMBER >=0x00907000L ||USE_POLARSSL +#if OPENSSL_VERSION_NUMBER >=0x00907000L ||ENABLE_CRYPTO_POLARSSL "--remote-cert-ku v ... : Require that the peer certificate wassigned with\n"
" explicit key usage, you can specify more than one
value.\n"
" value should be given in hex format.\n"src/openvpn/options.c +0
-0@@ -626,8 +626,8 @@ static const char usage_message[] = "--remote-cert-tls t: Require that peer certificate was signed withexplicit\n"
" key usage and extended key usage based on RFC3280
TLS rules.\n"
" t = 'client' | 'server'.\n"
-#endif /*OPENSSL_VERSION_NUMBER||USE_POLARSSL
*/src/openvpn/options.c +1
-1-#endif /* USE_SSL */ +#endif /* OPENSSL_VERSION_NUMBER ||
ENABLE_CRYPTO_POLARSSL*/src/openvpn/options.c +1
-0+#endif /* ENABLE_SSL */ #ifdef ENABLE_PKCS11 "\n" "PKCS#11 Options:\n" @@ -652,7 +652,7 @@ static const char usage_message[] = "--show-ciphers : Show cipher algorithms to use with --cipheroption.\n"
"--show-digests : Show message digest algorithms to use with --auth
option.\n"
"--show-engines : Show hardware crypto accelerator engines (if
available).\n"src/openvpn/options.c +1
-1-#ifdef USE_SSL +#ifdef ENABLE_SSL "--show-tls : Show all TLS ciphers (TLS used only as a controlchannel).\n"
#endif
#ifdef WIN32src/openvpn/options.c +0
-0@@ -718,7 +718,7 @@ static const char usage_message[] = "--genkey : Generate a random key to be used as a sharedsecret,\n"
" for use with the --secret option.\n"
"--secret file : Write key to file.\n"src/openvpn/options.c +2
-2-#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ #ifdef TUNSETPERSIST "\n" "Tun/tap config mode (available with linux 2.4+):\n" @@ -819,7 +819,7 @@ init_options (struct options *o, const bool init_gc) o->scheduled_exit_interval = 5; o->server_poll_timeout =0 ;#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO o->ciphername ="BF-CBC" ; o->ciphername_defined = true;o->authname = "SHA1";src/openvpn/options.c +1
-1@@ -831,7 +831,7 @@ init_options (struct options *o, const bool init_gc) o->replay_time = DEFAULT_TIME_BACKTRACK; o->use_iv = true; o->key_direction =KEY_DIRECTION_BIDIRECTIONAL ; -#ifdef USE_SSL +#ifdef ENABLE_SSL o->key_method =2 ; o->tls_timeout =2 ;o->renegotiate_seconds = 3600;src/openvpn/options.c +2
-2@@ -840,8 +840,8 @@ init_options (struct options *o, const bool init_gc)#ifdef ENABLE_X509ALTUSERNAME o->x509_username_field =X509_USERNAME_FIELD_DEFAULT ;#endif -#endif /* USE_SSL */ -#endif /* USE_CRYPTO */ +#endif /* ENABLE_SSL */ +#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_PKCS11 o->pkcs11_pin_cache_period =-1 ;#endif /*
ENABLE_PKCS11*/src/openvpn/options.c +1
-1@@ -1050,7 +1050,7 @@ is_stateful_restart (const struct options *o)return is_persist_option (o) ||connection_list_defined (o); } -#ifdef USE_SSL +#ifdef ENABLE_SSL static uint8_t *parse_hash_fingerprint (const char *str,int nbytes,int msglevel,struct gc_arena *gc){
src/openvpn/options.c +7
-7@@ -1419,12 +1419,12 @@ show_settings (const struct options *o)SHOW_INT (persist_mode);#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO SHOW_BOOL (show_ciphers);SHOW_BOOL (show_digests);SHOW_BOOL (show_engines);SHOW_BOOL (genkey); -#ifdef USE_SSL +#ifdef ENABLE_SSL SHOW_STR (key_pass_file);SHOW_BOOL (show_tls_ciphers);#endif @@ -1555,7 +1555,7 @@ show_settings (const struct options *o)plugin_option_list_print (o->plugin_list,D_SHOW_PARMS );#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO SHOW_STR (shared_secret_file);SHOW_INT (key_direction);SHOW_BOOL (ciphername_defined);@@ -1565,9 +1565,9 @@ show_settings (const struct options *o)SHOW_STR (prng_hash);SHOW_INT (prng_nonce_secret_len);SHOW_INT (keysize); -#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL SHOW_BOOL (engine); -#endif /* USE_POLARSSL */ +#endif /* ENABLE_CRYPTO_POLARSSL */ SHOW_BOOL (replay);SHOW_BOOL (mute_replay_warnings);SHOW_INT (replay_window);@@ -1576,7 +1576,7 @@ show_settings (const struct options *o)SHOW_BOOL (use_iv);SHOW_BOOL (test_crypto); -#ifdef USE_SSL +#ifdef ENABLE_SSL SHOW_BOOL (tls_server);SHOW_BOOL (tls_client);SHOW_INT (key_method);@@ -1585,7 +1585,7 @@ show_settings (const struct options *o)SHOW_STR (dh_file);SHOW_STR (cert_file);SHOW_STR (priv_key_file); -#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL SHOW_STR (pkcs12_file);#endif #ifdef ENABLE_CRYPTOAPI @@ -1892,7 +1892,7 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
init_options (&defaults, true);src/openvpn/options.c +1
-1-#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO if (options->test_crypto) {notnull (options->shared_secret_file,"key file (--secret)" );@@ -1930,7 +1930,7 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
msg (M_USAGE, "--inetd nowait can only be used with --proto tcp-
server");if (options->inetd == INETD_NOWAITsrc/openvpn/options.c +1
-1-#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL ) && !(options->tls_server || options->tls_client) #endif )@@ -2218,7 +2218,7 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
}#endif /*
P2MP_SERVER*/src/openvpn/options.c +1
-1-#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* * Check consistency of replay options @@ -2237,7 +2237,7 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
* SSL/TLS mode sanity checks.
*/src/openvpn/options.c +1
-2-#ifdef USE_SSL +#ifdef ENABLE_SSL if (options->tls_server + options->tls_client + (options->shared_secret_file !=NULL ) >1 ) msg (M_USAGE, "specify only one of --tls-server, --tls-client, or --secret");@@ -2286,7 +2286,7 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
#endif if (options->pkcs12_file) {src/openvpn/options.c +1
-1-#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL msg(M_USAGE, "Parameter --pkcs12 cannot be used with thePolarSSL version version of OpenVPN.");
#else if (options->ca_path)src/openvpn/options.c +0
-0@@ -2299,7 +2299,7 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
} else {src/openvpn/options.c +1
-1-#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL if (!(options->ca_file))msg (M_USAGE ,"You must define CA file (--ca)" );if (options->ca_path)@@ -2348,7 +2348,7 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
MUST_BE_UNDEF (dh_file); MUST_BE_UNDEF (cert_file); MUST_BE_UNDEF (priv_key_file);src/openvpn/options.c +1
-1-#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL MUST_BE_UNDEF (pkcs12_file);#endif MUST_BE_UNDEF (cipher_list);@@ -2383,8 +2383,8 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
msg (M_USAGE, err, "--pull"); }#undef
MUST_BE_UNDEFsrc/openvpn/options.c +3
-3-#endif /* USE_CRYPTO */ -#endif /* USE_SSL */ +#endif /* ENABLE_CRYPTO */ +#endif /* ENABLE_SSL */ #if P2MP if (options->auth_user_pass_file && !options->pull)@@ -2667,7 +2667,7 @@ options_postprocess_filechecks (struct options *options)bool errs = false;/* ** SSL/TLS/crypto related files ** */ -#ifdef USE_SSL +#ifdef ENABLE_SSL errs |=check_file_access (CHKACC_FILE |CHKACC_INLINE , options- >dh_file, R_OK, "--dh");errs |= check_file_access (CHKACC_FILE|CHKACC_INLINE, options-Quoted 1 line
ca_file,R_OK, "--ca");errs |=
check_file_access(CHKACC_FILE,options->ca_path,R_OK, "--
capath");src/openvpn/options.c +4
-4@@ -2688,20 +2688,20 @@ options_postprocess_filechecks (struct options *options) errs |= check_file_access (CHKACC_FILE|CHKACC_INLINE, options- >tls_auth_file, R_OK, "--tls-auth"); -#endif /* USE_SSL */ -#ifdef USE_CRYPTO +#endif /* ENABLE_SSL */ +#ifdef ENABLE_CRYPTO errs |= check_file_access (CHKACC_FILE|CHKACC_INLINE, options- >shared_secret_file, R_OK, "--secret"); errs |= check_file_access (CHKACC_DIRPATH|CHKACC_FILEXSTWR, options->packet_id_file, R_OK|W_OK, "-- replay-persist"); -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ /* ** Password files ** */ -#ifdef USE_SSL +#ifdef ENABLE_SSL errs |= check_file_access (CHKACC_FILE, options->key_pass_file, R_OK,"--askpass");src/openvpn/options.c +3
-3-#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ #ifdef ENABLE_MANAGEMENT errs |= check_file_access (CHKACC_FILE|CHKACC_ACPTSTDIN, options->management_user_pass, R_OK,@@ -2726,10 +2726,10 @@ options_postprocess_filechecks (struct options *options) R_OK|W_OK, "--status");/* ** Config related ** */ -#ifdef USE_SSL +#ifdef ENABLE_SSL errs |=check_file_access (CHKACC_FILE , options->tls_export_cert,R_OK |W_OK |X_OK ,"--tls-export-cert" ); -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ #if P2MP_SERVER errs |= check_file_access (CHKACC_FILE, options->client_config_dir,R_OK|X_OK, "--client-config-dir");src/openvpn/options.c +16
-16@@ -2968,9 +2968,9 @@ options_string (const struct options *o,buf_printf (&out,",mtu-dynamic" );#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO -#ifdef USE_SSL +#ifdef ENABLE_SSL #define TLS_CLIENT (o->tls_client)#define TLS_SERVER (o->tls_server)#else @@ -3014,7 +3014,7 @@ options_string (const struct options *o,buf_printf (&out,",no-iv" ); } -#ifdef USE_SSL +#ifdef ENABLE_SSL /* * SSL Options */ @@ -3043,12 +3043,12 @@ options_string (const struct options *o,buf_printf (&out,",tls-server" ); } } -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ #undef TLS_CLIENT#undef TLS_SERVER -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ return BSTR (&out); }@@ -3357,7 +3357,7 @@ usage (void)struct options o;init_options (&o, true); -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL ) fprintf (fp, usage_message, title_string, o.ce.connect_retry_seconds,@@ -3368,7 +3368,7 @@ usage (void) o.replay_window, o.replay_time, o.tls_timeout, o.renegotiate_seconds, o.handshake_window, o.transition_window); -#elif defined(USE_CRYPTO ) +#elif defined(ENABLE_CRYPTO ) fprintf (fp, usage_message, title_string, o.ce.connect_retry_seconds,@@ -6211,7 +6211,7 @@ add_option (struct options *options, options->lzo &= ~LZO_ADAPTIVE ; }#endif /* ENABLE_LZO */ -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO else if (streq (p[0], "show-ciphers")) {VERIFY_PERMISSION (OPT_P_GENERAL );@@ -6383,7 +6383,7 @@ add_option (struct options *options,VERIFY_PERMISSION (OPT_P_GENERAL ); options->test_crypto = true; } -#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL else if (streq (p[0], "engine")) {VERIFY_PERMISSION (OPT_P_GENERAL );@@ -6394,7 +6394,7 @@ add_option (struct options *options, else options->engine = "auto"; } -#endif /* USE_POLARSSL */ +#endif /* ENABLE_CRYPTO_POLARSSL */ #ifdef HAVE_EVP_CIPHER_CTX_SET_KEY_LENGTH else if (streq (p[0], "keysize") && p[1]) {@@ -6410,7 +6410,7 @@ add_option (struct options *options, options->keysize = keysize; }#endif -#ifdef USE_SSL +#ifdef ENABLE_SSL else if (streq (p[0], "show-tls")) {VERIFY_PERMISSION (OPT_P_GENERAL );@@ -6437,13 +6437,13 @@ add_option (struct options *options, }#endif } -#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL else if (streq (p[0], "capath") && p[1]) {VERIFY_PERMISSION (OPT_P_GENERAL ); options->ca_path = p[1 ]; } -#endif /* USE_POLARSSL */ +#endif /* ENABLE_CRYPTO_POLARSSL */ else if (streq (p[0], "dh") && p[1]) {VERIFY_PERMISSION (OPT_P_GENERAL );@@ -6500,7 +6500,7 @@ add_option (struct options *options, }#endif } -#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL else if (streq (p[0], "pkcs12") && p[1]) {VERIFY_PERMISSION (OPT_P_GENERAL );@@ -6512,7 +6512,7 @@ add_option (struct options *options, }#endif } -#endif /* USE_POLARSSL */ +#endif /* ENABLE_CRYPTO_POLARSSL */ else if (streq (p[0], "askpass")) {VERIFY_PERMISSION (OPT_P_GENERAL );@@ -6574,7 +6574,7 @@ add_option (struct options *options,warn_multiple_script (options->tls_verify,"tls-verify" ); options->tls_verify =string_substitute (p[1 ],',' ,' ' , &options->gc); } -#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL else if (streq (p[0], "tls-export-cert") && p[1]) {VERIFY_PERMISSION (OPT_P_GENERAL);src/openvpn/options.c +3
-3@@ -6599,7 +6599,7 @@ add_option (struct options *options, goto err; } } -#if OPENSSL_VERSION_NUMBER >=0x00907000L ||USE_POLARSSL +#if OPENSSL_VERSION_NUMBER >=0x00907000L ||ENABLE_CRYPTO_POLARSSL else if (streq (p[0], "remote-cert-ku")) {int j;@@ -6716,8 +6716,8 @@ add_option (struct options *options, options->x509_username_field = p[1 ]; }#endif /* ENABLE_X509ALTUSERNAME */ -#endif /* USE_SSL */ -#endif /* USE_CRYPTO */ +#endif /* ENABLE_SSL */ +#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_PKCS11 else if (streq (p[0], "show-pkcs11-ids") && p[1]) {src/openvpn/options.h +1
-1@@ -80,7 +80,7 @@ struct options_pre_pull };#endif -#if defined(USE_CRYPTO ) && !defined(USE_OPENSSL ) && !defined(USE_POLARSSL) +#if defined(ENABLE_CRYPTO ) && !defined(ENABLE_CRYPTO_OPENSSL ) && !defined(ENABLE_CRYPTO_POLARSSL )# error "At least one of OpenSSL or PolarSSL needs to be defined."#endif
src/openvpn/options.h +6
-6@@ -211,12 +211,12 @@ struct optionsbool persist_config;int persist_mode; -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO const char *key_pass_file;bool show_ciphers;bool show_digests;bool show_engines; -#ifdef USE_SSL +#ifdef ENABLE_SSL bool show_tls_ciphers;#endif bool genkey;@@ -498,7 +498,7 @@ struct options#endif #endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* Cipher parms */ const char *shared_secret_file;#if ENABLE_INLINE_FILES @@ -521,7 +521,7 @@ struct optionsbool use_iv;bool test_crypto; -#ifdef USE_SSL +#ifdef ENABLE_SSL /* TLS (control channel) parms */ bool tls_server;bool tls_client;@@ -605,8 +605,8 @@ struct optionsbool tls_exit; -#endif /* USE_SSL */ -#endif /* USE_CRYPTO */ +#endif /* ENABLE_SSL */ +#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_X509_TRACK const struct x509_track *x509_track;src/openvpn/packet_id.c +2
-2@@ -33,7 +33,7 @@#include "syshead.h" -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #include "packet_id.h" #include "misc.h" @@ -593,4 +593,4 @@ packet_id_interactive_test () }#endif -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ src/openvpn/packet_id.h +2
-2@@ -28,7 +28,7 @@* attempts to replay them back later. */ -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #ifndef PACKET_ID_H #define PACKET_ID_H @@ -335,4 +335,4 @@ packet_id_reap_test (struct packet_id_rec *p) }#endif /* PACKET_ID_H */ -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ src/openvpn/pkcs11_openssl.c +1
-1@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(ENABLE_PKCS11 ) && defined(USE_OPENSSL ) +#if defined(ENABLE_PKCS11 ) && defined(ENABLE_CRYPTO_OPENSSL )#include "errlevel.h" #include "pkcs11_backend.h" src/openvpn/pkcs11_polarssl.c +2
-2@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(ENABLE_PKCS11 ) && defined(USE_POLARSSL ) +#if defined(ENABLE_PKCS11 ) && defined(ENABLE_CRYPTO_POLARSSL )#include "errlevel.h" #include "pkcs11_backend.h" @@ -117,4 +117,4 @@ cleanup: return ret; } -#endif /* defined(ENABLE_PKCS11) && defined(USE_POLARSSL) */ +#endif /* defined(ENABLE_PKCS11) && defined(ENABLE_CRYPTO_POLARSSL) */ src/openvpn/plugin.c +3
-3@@ -351,9 +351,9 @@ plugin_call_item (const struct plugin *p,const struct argv *av, struct openvpn_plugin_string_list **retlist, const char **envp -#ifdef USE_SSL +#ifdef ENABLE_SSL , int certdepth, - x509_cert_t *current_cert + openvpn_x509_cert_t *current_cert #endif ) {@@ -380,7 +380,7 @@ plugin_call_item (const struct plugin *p, (const char **const ) envp, p->plugin_handle, per_client_context, -#ifdef USE_SSL +#ifdef ENABLE_SSL (current_cert ? certdepth : -1),
current_cert
#elsesrc/openvpn/plugin.c +3
-3@@ -590,9 +590,9 @@ plugin_call_ssl (const struct plugin_list *pl,const struct argv *av, struct plugin_return *pr, struct env_set *es -#ifdef USE_SSL +#ifdef ENABLE_SSL , int certdepth, - x509_cert_t *current_cert + openvpn_x509_cert_t *current_cert #endif ) {@@ -620,7 +620,7 @@ plugin_call_ssl (const struct plugin_list *pl, av, pr ? &pr->list[i] :NULL , envp -#ifdef USE_SSL +#ifdef ENABLE_SSL ,certdepth, current_cert #endifsrc/openvpn/plugin.h +7
-7@@ -29,10 +29,10 @@#ifndef OPENVPN_PLUGIN_H #define OPENVPN_PLUGIN_H -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL #include "ssl_verify_openssl.h" #endif -#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL #include "ssl_verify_polarssl.h" #endif #include "openvpn-plugin.h" @@ -127,9 +127,9 @@ int plugin_call_ssl (const struct plugin_list *pl,const struct argv *av, struct plugin_return *pr, struct env_set *es -#ifdef USE_SSL +#ifdef ENABLE_SSL , int current_cert_depth, - x509_cert_t *current_cert + openvpn_x509_cert_t *current_cert #endif );@@ -183,9 +183,9 @@ plugin_call_ssl (const struct plugin_list *pl,const struct argv *av, struct plugin_return *pr, struct env_set *es -#ifdef USE_SSL +#ifdef ENABLE_SSL , int current_cert_depth, - x509_cert_t *current_cert + openvpn_x509_cert_t *current_cert #endif ) {@@ -202,7 +202,7 @@ plugin_call(const struct plugin_list *pl, struct env_set *es) {return plugin_call_ssl (pl, type, av, pr, es -#ifdef USE_SSL +#ifdef ENABLE_SSL ,-1 ,NULL #endif );src/openvpn/reliable.c +2
-2@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#include "buffer.h" #include "error.h" @@ -748,4 +748,4 @@ reliable_debug_print (const struct reliable *rel, char *desc)#else static void dummy (void ) {} -#endif /* USE_CRYPTO && USE_SSL*/ +#endif /* ENABLE_CRYPTO && ENABLE_SSL*/ src/openvpn/reliable.h +2
-2@@ -29,7 +29,7 @@*/ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#ifndef RELIABLE_H #define RELIABLE_H @@ -477,4 +477,4 @@ void reliable_ack_debug_print (const struct reliable_ack *ack, char *desc);#endif /* RELIABLE_H */ -#endif /* USE_CRYPTO && USE_SSL */ +#endif /* ENABLE_CRYPTO && ENABLE_SSL */ src/openvpn/session_id.c +2
-2@@ -33,7 +33,7 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#include "error.h" #include "common.h" @@ -58,4 +58,4 @@ session_id_print (const struct session_id *sid, struct gc_arena *gc)#else static void dummy (void ) {} -#endif /* USE_CRYPTO && USE_SSL*/ +#endif /* ENABLE_CRYPTO && ENABLE_SSL*/ src/openvpn/session_id.h +2
-2@@ -30,7 +30,7 @@* negotiated). */ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#ifndef SESSION_ID_H #define SESSION_ID_H @@ -83,4 +83,4 @@ void session_id_random (struct session_id *sid);const char *session_id_print (const struct session_id *sid,struct gc_arena *gc);#endif /* SESSION_ID_H */ -#endif /* USE_CRYPTO && USE_SSL */ +#endif /* ENABLE_CRYPTO && ENABLE_SSL */ src/openvpn/ssl.c +2
-2@@ -41,7 +41,7 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#include "error.h" #include "common.h" @@ -342,7 +342,7 @@ init_ssl (const struct options *options, struct tls_root_ctx *new_ctx)#ifdef MANAGMENT_EXTERNAL_KEY else if ((options->management_flags & MF_EXTERNAL_KEY) && options- >cert_file) { -x509_cert_t *my_cert =NULL ; +openvpn_x509_cert_t *my_cert =NULL ; tls_ctx_load_cert_file(new_ctx, options->cert_file, options-Quoted 1 line
cert_file_inline,&my_cert); tls_ctx_use_external_private_key(new_ctx, my_cert);src/openvpn/ssl.c +1
-1@@ -3370,4 +3370,4 @@ done:#else static void dummy (void ) {} -#endif /* USE_CRYPTO && USE_SSL*/ +#endif /* ENABLE_CRYPTO && ENABLE_SSL*/ src/openvpn/ssl.h +2
-2@@ -30,7 +30,7 @@#ifndef OPENVPN_SSL_H #define OPENVPN_SSL_H -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#include "basic.h" #include "common.h" @@ -502,6 +502,6 @@ void show_tls_performance_stats(void);/*#define EXTRACT_X509_FIELD_TEST*/ void extract_x509_field_test (void ); -#endif /* USE_CRYPTO && USE_SSL */ +#endif /* ENABLE_CRYPTO && ENABLE_SSL */ #endif src/openvpn/ssl_backend.h +3
-3@@ -33,11 +33,11 @@#include "buffer.h" -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL #include "ssl_openssl.h" #include "ssl_verify_openssl.h" #endif -#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL #include "ssl_polarssl.h" #include "ssl_verify_polarssl.h" #endif @@ -193,7 +193,7 @@ void tls_ctx_load_cert_file (struct tls_root_ctx *ctx, const char *cert_file,#if ENABLE_INLINE_FILES const char *cert_file_inline,#endif -x509_cert_t **x509 +openvpn_x509_cert_t **x509 );/**
src/openvpn/ssl_backend.h +1
-1@@ -201,7 +201,7 @@ void tls_ctx_load_cert_file (struct tls_root_ctx*ctx, const char *cert_file, * * @param x509 certificate to free */ -void tls_ctx_free_cert_file (x509_cert_t *x509); +void tls_ctx_free_cert_file (openvpn_x509_cert_t *x509);/** * Load private key file into the given TLS context.
src/openvpn/ssl_backend.h +1
-1@@ -233,7 +233,7 @@ int tls_ctx_load_priv_file (struct tls_root_ctx*ctx, const char *priv_key_file * @return 1 if an error occurred, 0 if parsing was * successful. */ -int tls_ctx_use_external_private_key (struct tls_root_ctx *ctx, x509_cert_t *cert); +int tls_ctx_use_external_private_key (struct tls_root_ctx *ctx,openvpn_x509_cert_t *cert);#endif
src/openvpn/ssl_openssl.c +3
-3@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_SSL ) && defined(USE_OPENSSL ) +#if defined(ENABLE_SSL ) && defined(ENABLE_CRYPTO_OPENSSL )#include "errlevel.h" #include "buffer.h" @@ -1020,13 +1020,13 @@ key_state_write_plaintext (struct key_state_ssl *ks_ssl, struct buffer *buf)int ret =0 ;perf_push (PERF_BIO_WRITE_PLAINTEXT ); -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL ASSERT (NULL != ks_ssl); ret =bio_write (ks_ssl->ssl_bio,BPTR (buf),BLEN (buf),"tls_write_plaintext" );bio_write_post (ret, buf); -#endif /* USE_OPENSSL */ +#endif /* ENABLE_CRYPTO_OPENSSL */ perf_pop ();return ret;src/openvpn/ssl_openssl.c +1
-1@@ -1187,4 +1187,4 @@ get_highest_preference_tls_cipher (char *buf, int size) SSL_CTX_free (ctx); } -#endif /* defined(USE_SSL) && defined(USE_OPENSSL) */ +#endif /* defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_OPENSSL) */ src/openvpn/ssl_polarssl.c +2
-2@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_SSL ) && defined(USE_POLARSSL ) +#if defined(ENABLE_SSL ) && defined(ENABLE_CRYPTO_POLARSSL )#include "errlevel.h" #include "ssl_backend.h" @@ -243,7 +243,7 @@ tls_ctx_load_cert_file (struct tls_root_ctx *ctx, const char *cert_file,#if ENABLE_INLINE_FILES const char *cert_file_inline,#endif -x509_cert_t **x509 +openvpn_x509_cert_t **x509 ) {ASSERT(NULL != ctx);src/openvpn/ssl_polarssl.c +1
-1@@ -270,7 +270,7 @@ tls_ctx_load_cert_file (struct tls_root_ctx *ctx,const char *cert_file, } void -tls_ctx_free_cert_file (x509_cert_t *x509) +tls_ctx_free_cert_file (openvpn_x509_cert_t *x509) {x509_free (x509 );}
src/openvpn/ssl_polarssl.c +0
-0@@ -332,7 +332,7 @@ tls_ctx_load_priv_file (struct tls_root_ctx *ctx,const char
*priv_key_file
#ifdefMANAGMENT_EXTERNAL_KEYint
-tls_ctx_use_external_private_key (structtls_root_ctx*ctx,x509_cert_t*cert)
+tls_ctx_use_external_private_key (structtls_root_ctx*ctx,openvpn_x509_cert_t*cert)
{
msg(M_FATAL, "Use of management external keys not yet supported forPolarSSL."); return false;src/openvpn/ssl_polarssl.c +1
-1@@ -863,4 +863,4 @@ get_highest_preference_tls_cipher (char *buf, int size) strncpynt (buf, cipher_name, size); } -#endif /* defined(USE_SSL) && defined(USE_POLARSSL) */ +#endif /* defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_POLARSSL) */ src/openvpn/ssl_verify.c +3
-3@@ -29,14 +29,14 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#include "misc.h" #include "manage.h" #include "ssl_verify.h" #include "ssl_verify_backend.h" -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL #include "ssl_verify_openssl.h" #endif @@ -296,7 +296,7 @@ print_nsCertType (int type)* @param subject the peer's extracted common name */ static result_t -verify_peer_cert (const struct tls_options *opt,x509_cert_t *peer_cert, +verify_peer_cert (const struct tls_options *opt,openvpn_x509_cert_t *peer_cert,const char *subject,const char *common_name){ /* verify certificate nsCertType */src/openvpn/ssl_verify.c +1
-1@@ -315,7 +315,7 @@ verify_peer_cert(const struct tls_options *opt, x509_cert_t *peer_cert, } } -#if OPENSSL_VERSION_NUMBER >=0x00907000L ||USE_POLARSSL +#if OPENSSL_VERSION_NUMBER >=0x00907000L ||ENABLE_CRYPTO_POLARSSL /* verify certificate ku */ if (opt->remote_cert_ku[0] != 0)src/openvpn/ssl_verify.c +1
-1@@ -369,7 +369,7 @@ verify_peer_cert(const struct tls_options *opt,x509_cert_t *peer_cert, * environment for later verification by scripts and plugins. */ static void -verify_cert_set_env(struct env_set *es, x509_cert_t *peer_cert, int cert_depth, +verify_cert_set_env(struct env_set *es, openvpn_x509_cert_t *peer_cert, int cert_depth,const char *subject, const char
*common_name#ifdef ENABLE_X509_TRACK , const struct x509_track *x509_tracksrc/openvpn/ssl_verify.c +1
-1@@ -425,7 +425,7 @@ verify_cert_set_env(struct env_set *es, x509_cert_t*peer_cert, int cert_depth, */ static result_t verify_cert_call_plugin (const struct plugin_list *plugins,struct env_set *es, -int cert_depth,x509_cert_t *cert,char *subject) +int cert_depth,openvpn_x509_cert_t *cert,char *subject) {if (plugin_defined (plugins, OPENVPN_PLUGIN_TLS_VERIFY)) {src/openvpn/ssl_verify.c +1
-1@@ -454,7 +454,7 @@ verify_cert_call_plugin(const struct plugin_list *plugins, struct env_set *es, }static const char * -verify_cert_export_cert (x509_cert_t *peercert,const char *tmp_dir, struct gc_arena *gc) +verify_cert_export_cert (openvpn_x509_cert_t *peercert,const char *tmp_dir,struct gc_arena *gc){ FILE *peercert_file; const char *peercert_filename="";src/openvpn/ssl_verify.c +0
-0@@ -486,7 +486,7 @@ verify_cert_export_cert(x509_cert_t *peercert,const char
*tmp_dir, structgc_ar
*/
staticresult_t
verify_cert_call_command(const char*verify_command, structenv_set
*es,
- intcert_depth,x509_cert_t*cert, char *subject, const char*verify_export_cert)
+ intcert_depth,openvpn_x509_cert_t*cert, char *subject, const
char*verify_export_cert){ const char *tmp_file = NULL; int ret;src/openvpn/ssl_verify.c +1
-1@@ -533,7 +533,7 @@ verify_cert_call_command(const char*verify_command, struct env_set *es, * check peer cert against CRL directory */ static result_t -verify_check_crl_dir (const char *crl_dir,x509_cert_t *cert) +verify_check_crl_dir (const char *crl_dir,openvpn_x509_cert_t *cert) {char fn[256 ];int fd;src/openvpn/ssl_verify.c +1
-1@@ -560,7 +560,7 @@ verify_check_crl_dir(const char *crl_dir, x509_cert_t *cert) }result_t -verify_cert(struct tls_session *session, x509_cert_t *cert, int cert_depth) +verify_cert (struct tls_session *session,openvpn_x509_cert_t *cert,int cert_depth){ char *subject = NULL; char common_name[TLS_USERNAME_LEN] = {0};src/openvpn/ssl_verify.c +1
-1@@ -1215,4 +1215,4 @@ verify_final_auth_checks(struct tls_multi *multi, struct tls_session *session) gc_free (&gc); } } -#endif /* defined(USE_CRYPTO) && defined(USE_SSL) */ +#endif /* defined(ENABLE_CRYPTO) && defined(ENABLE_SSL) */ src/openvpn/ssl_verify.h +2
-2@@ -36,10 +36,10 @@#include "ssl_common.h" /* Include OpenSSL-specific code */ -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL #include "ssl_verify_openssl.h" #endif -#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL #include "ssl_verify_polarssl.h" #endif src/openvpn/ssl_verify_backend.h +0
-0@@ -55,7 +55,7 @@ typedef enum { SUCCESS=0, FAILURE=1 } result_t;* * @return \c SUCCESS if verification was successful, \c FAILURE on failure.
*/
-result_tverify_cert(struct tls_session *session, x509_cert_t *cert, int cert_depth);
+result_tverify_cert(struct tls_session *session, openvpn_x509_cert_t *cert, int cert_depth);/*
* Remember the given certificate hash, allowing the certificate chain
to besrc/openvpn/ssl_verify_backend.h +1
-1@@ -86,7 +86,7 @@ void cert_hash_remember (struct tls_session *session,const int cert_depth, * * @return a string containing the subject */ -char *x509_get_subject (x509_cert_t *cert); +char *x509_get_subject (openvpn_x509_cert_t *cert);/* * Free a subject string as returned by \c
verify_get_subject()src/openvpn/ssl_verify_backend.h +0
-0@@ -103,7 +103,7 @@ void x509_free_subject (char *subject);* * @return a string containing the SHA1 hash of the certificate
*/src/openvpn/ssl_verify_backend.h +3
-3-unsigned char *x509_get_sha1_hash (x509_cert_t *cert); +unsigned char *x509_get_sha1_hash (openvpn_x509_cert_t *cert);/* * Free a hash as returned by \c verify_get_hash() @@ -126,7 +126,7 @@ void x509_free_sha1_hash (unsigned char *hash);* @return \c FAILURE, \c or SUCCESS */ result_t x509_get_username (char *common_name,int cn_len, -char * x509_username_field,x509_cert_t *peer_cert); +char * x509_username_field,openvpn_x509_cert_t *peer_cert);/* * Return the certificate's serial number. @@ -138,7 +138,7 @@ result_t x509_get_username (char *common_name, intcn_len, * * @return The certificate's serial number. */ -char *x509_get_serial (x509_cert_t *cert); +char *x509_get_serial (openvpn_x509_cert_t *cert);/* * Free a serial number string as returned by \c
verify_get_serial()src/openvpn/ssl_verify_backend.h +1
-1@@ -156,7 +156,7 @@ void x509_free_serial (char *serial);* @param cert_depth Depth of the certificate * @param cert Certificate to set the environment for */ -void x509_setenv (struct env_set *es,int cert_depth,x509_cert_t *cert); +void x509_setenv (struct env_set *es,int cert_depth,openvpn_x509_cert_t *cert);#ifdef
ENABLE_X509_TRACKsrc/openvpn/ssl_verify_backend.h +1
-1@@ -195,7 +195,7 @@ void x509_track_add (const struct x509_track**ll_head, const char *name, * @param cert Certificate to set the environment for */ void x509_setenv_track (const struct x509_track *xt,struct env_set *es, -const int depth,x509_cert_t *x509); +const int depth,openvpn_x509_cert_t *x509);#endif
src/openvpn/ssl_verify_backend.h +0
-0@@ -210,9 +210,9 @@ void x509_setenv_track (const struct x509_track *xt, struct env_set *es, * the expected bit set. \c FAILURE if the certificatedoes
* not have NS cert type verification or the wrong bit
set.
*/
-result_tx509_verify_ns_cert_type(const x509_cert_t *cert, const int usage);
+result_tx509_verify_ns_cert_type(const openvpn_x509_cert_t *cert, const int usage);src/openvpn/ssl_verify_backend.h +1
-1-#if OPENSSL_VERSION_NUMBER >=0x00907000L ||USE_POLARSSL +#if OPENSSL_VERSION_NUMBER >=0x00907000L ||ENABLE_CRYPTO_POLARSSL /* * Verify X.509 key usage extension field. @@ -224,7 +224,7 @@ result_t x509_verify_ns_cert_type(const x509_cert_t *cert, const int usage); * @return \c SUCCESS if one of the key usage valuesmatches, \c FAILURE
* if key usage is not enabled, or the values do not
match.
*/
-result_tx509_verify_cert_ku(x509_cert_t*x509, const unsigned * constexpected_ku,
+result_tx509_verify_cert_ku(openvpn_x509_cert_t*x509, const unsigned * constexpected_ku,int expected_len);/*
src/openvpn/ssl_verify_backend.h +0
-0@@ -240,7 +240,7 @@ result_t x509_verify_cert_ku (x509_cert_t *x509,const unsigned * const expected
* extended key usage fields, \c FAILURE if extended key
* usage is not enabled, or the values do not match.
*/
-result_tx509_verify_cert_eku(x509_cert_t*x509, const char * constexpected_oid);
+result_tx509_verify_cert_eku(openvpn_x509_cert_t*x509, const char * constexpected_oid);#endif
src/openvpn/ssl_verify_backend.h +0
-0@@ -253,7 +253,7 @@ result_t x509_verify_cert_eku (x509_cert_t *x509,const char * const
expected_oi
*
*
*/src/openvpn/ssl_verify_backend.h +1
-1-result_t x509_write_pem (FILE *peercert_file,x509_cert_t *peercert); +result_t x509_write_pem(FILE *peercert_file, openvpn_x509_cert_t*peercert);
/*
* Check the certificate against a CRL file.src/openvpn/ssl_verify_backend.h +1
-1@@ -266,7 +266,7 @@ result_t x509_write_pem(FILE *peercert_file,x509_cert_t *peercert); * certificate or does not contain an entry for it. * \c FAILURE otherwise. */ -result_t x509_verify_crl (const char *crl_file,x509_cert_t *cert, +result_t x509_verify_crl (const char *crl_file,openvpn_x509_cert_t *cert,const char *subject);#endif /*
SSL_VERIFY_BACKEND_H_*/src/openvpn/ssl_verify_openssl.c +2
-2@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_SSL ) && defined(USE_OPENSSL ) +#if defined(ENABLE_SSL ) && defined(ENABLE_CRYPTO_OPENSSL )#include "ssl_verify.h" #include "ssl_verify_backend.h" @@ -210,7 +210,7 @@ x509_get_username (char *common_name, int cn_len, }char * -x509_get_serial (x509_cert_t *cert) +x509_get_serial (openvpn_x509_cert_t *cert) {ASN1_INTEGER *asn1_i;BIGNUM *bignum;@@ -401,7 +401,7 @@ x509_setenv_track (const struct x509_track *xt,struct
env_set*es, const int de
* X509_{cert_depth}_{name}={value}
*/
void
-x509_setenv (structenv_set*es, intcert_depth,x509_cert_t*peer_cert)
+x509_setenv (structenv_set*es, intcert_depth,openvpn_x509_cert_t*peer_cert){ int i, n; int fn_nid;src/openvpn/ssl_verify_openssl.c +1
-1@@ -449,7 +449,7 @@ x509_setenv (struct env_set *es, int cert_depth, x509_cert_t *peer_cert) }result_t -x509_verify_ns_cert_type(const x509_cert_t *peer_cert, const int usage) +x509_verify_ns_cert_type (const openvpn_x509_cert_t *peer_cert,const int usage){ if (usage == NS_CERT_CHECK_NONE) return SUCCESS;src/openvpn/ssl_verify_openssl.c +1
-1@@ -623,4 +623,4 @@ end: return retval; } -#endif /* defined(USE_SSL) && defined(USE_OPENSSL) */ +#endif /* defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_OPENSSL) */ src/openvpn/ssl_verify_openssl.h +5
-1@@ -32,7 +32,11 @@#define SSL_VERIFY_OPENSSL_H_ #include <openssl/x509.h> -typedef X509 x509_cert_t ; + +#ifndef __OPENVPN_X509_CERT_T_DECLARED +#define __OPENVPN_X509_CERT_T_DECLARED +typedef X509 openvpn_x509_cert_t ; +#endif /** @name Function for authenticating a new connection from a remote OpenVPN peer
* @{ */src/openvpn/ssl_verify_polarssl.c +2
-2@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_SSL ) && defined(USE_POLARSSL ) +#if defined(ENABLE_SSL ) && defined(ENABLE_CRYPTO_POLARSSL )#include "ssl_verify.h" #include <polarssl/sha1.h> @@ -189,7 +189,7 @@ x509_free_subject (char *subject)* X509_{cert_depth}_{name}={value} */ void -x509_setenv (struct env_set *es,int cert_depth,x509_cert_t *cert) +x509_setenv (struct env_set *es,int cert_depth,openvpn_x509_cert_t *cert) {int i;unsigned char c;src/openvpn/ssl_verify_polarssl.c +1
-1@@ -422,4 +422,4 @@ end: return retval; } -#endif /* #if defined(USE_SSL) && defined(USE_POLARSSL) */ +#endif /* #if defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_POLARSSL) */
src/openvpn/ssl_verify_polarssl.h +4
-1@@ -35,7 +35,10 @@#include "manage.h" #include <polarssl/x509.h> -typedef x509_cert x509_cert_t ; +#ifndef __OPENVPN_X509_CERT_T_DECLARED +#define __OPENVPN_X509_CERT_T_DECLARED +typedef x509_cert openvpn_x509_cert_t ; +#endif /** @name Function for authenticating a new connection from a remote OpenVPN peer
* @{ */src/openvpn/syshead.h +1
-1@@ -479,7 +479,7 @@ socket_defined (const socket_descriptor_t sd)* Do we have point-to-multipoint capability? */ -#if defined(ENABLE_CLIENT_SERVER ) && defined(USE_CRYPTO ) && defined(USE_SSL) && defined(HAVE_GETTIMEOFDAY) +#if defined(ENABLE_CLIENT_SERVER ) && defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL ) && defined(HAVE_GETTIMEOFDAY )#define P2MP 1#else
#define P2MP 0src/openvpn/syshead.h +1
-1@@ -516,7 +516,7 @@ socket_defined (const socket_descriptor_t sd)/* * Enable external private key */ -#if defined(ENABLE_MANAGEMENT ) && defined(USE_SSL ) && !defined(USE_POLARSSL) +#if defined(ENABLE_MANAGEMENT ) && defined(ENABLE_SSL ) && !defined(ENABLE_CRYPTO_POLARSSL )#define MANAGMENT_EXTERNAL_KEY #endif
src/openvpn/syshead.h +4
-4@@ -565,7 +565,7 @@ socket_defined (const socket_descriptor_t sd)/* * Should we include NTLM proxy functionality */ -#if defined(USE_CRYPTO ) && defined(ENABLE_HTTP_PROXY ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_HTTP_PROXY )#define NTLM 1#else #define NTLM 0@@ -574,7 +574,7 @@ socket_defined (const socket_descriptor_t sd)/* * Should we include proxy digest auth functionality */ -#if defined(USE_CRYPTO ) && defined(ENABLE_HTTP_PROXY ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_HTTP_PROXY )#define PROXY_DIGEST_AUTH 1#else #define PROXY_DIGEST_AUTH 0@@ -590,14 +590,14 @@ socket_defined (const socket_descriptor_t sd)/* * Do we have CryptoAPI capability? */ -#if defined(WIN32 ) && defined(USE_CRYPTO ) && defined(USE_SSL ) && defined(USE_OPENSSL) +#if defined(WIN32 ) && defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL ) && defined(ENABLE_CRYPTO_OPENSSL )#define ENABLE_CRYPTOAPI #endif /* * Enable x509-track feature? */ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) && defined (USE_OPENSSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL ) && defined (ENABLE_CRYPTO_OPENSSL )#define
ENABLE_X509_TRACK
#endifsrc/openvpn/syshead.h +1
-1@@ -688,7 +688,7 @@ socket_defined (const socket_descriptor_t sd)/* * Do we support pushing peer info? */ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#define ENABLE_PUSH_PEER_INFO #endif src/plugins/examples/log_v3.c +1
-4@@ -36,9 +36,7 @@#include <string.h> #include <stdlib.h> -#define USE_SSL -#define USE_OPENSSL -#include "ssl_verify_openssl.h" +#define ENABLE_SSL #include "openvpn-plugin.h" --1.7.3.4
-----------------------------------------------------------------------
-------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
PATCH 34/35 build: win-msvc: msbuild format
In reply to Alon Bar-Lev--- .gitignore | 10 +- Makefile.am | 10 +- build/Makefile.am | 2 + build/msvc/Makefile.am | 15 + build/msvc/msvc-generate/Makefile.am | 18 + build/msvc/msvc-generate/Makefile.mak | 13 + build/msvc/msvc-generate/msvc-generate.js | 59 ++ build/msvc/msvc-generate/msvc-generate.vcproj | 74 +++ config-msvc-version.h.in | 10 + config-msvc.h | 117 ++++ configure.ac | 2 + msvc-build.bat | 34 ++ msvc-dev.bat | 9 + msvc-env.bat | 21 + openvpn.sln | 45 ++ src/openvpn/Makefile.am | 3 + src/openvpn/compat.h | 2 - src/openvpn/crypto_backend.h | 2 - src/openvpn/openvpn.vcproj | 769 +++++++++++++++++++++++++ src/openvpn/openvpn_win32_resources.rc | 2 +- src/openvpn/syshead.h | 14 +- src/openvpn/tun.c | 2 +- src/openvpn/win32.c | 2 +- src/openvpnserv/Makefile.am | 3 + src/openvpnserv/openvpnserv.c | 16 +- src/openvpnserv/openvpnserv.vcproj | 209 +++++++ src/openvpnserv/openvpnserv_resources.rc | 2 +- src/openvpnserv/service.c | 5 + src/openvpnserv/service.h | 2 - 29 files changed, 1452 insertions(+), 20 deletions(-) create mode 100644 build/msvc/Makefile.am create mode 100644 build/msvc/msvc-generate/Makefile.am create mode 100755 build/msvc/msvc-generate/Makefile.mak create mode 100644 build/msvc/msvc-generate/msvc-generate.js create mode 100644 build/msvc/msvc-generate/msvc-generate.vcproj create mode 100644 config-msvc-version.h.in create mode 100644 config-msvc.h create mode 100644 msvc-build.bat create mode 100644 msvc-dev.bat create mode 100644 msvc-env.bat create mode 100644 openvpn.sln create mode 100644 src/openvpn/openvpn.vcproj create mode 100644 src/openvpnserv/openvpnserv.vcproj
.gitignore +9 -1
@@ -2,12 +2,18 @@ *.dll *.exe *.exe.* -*.mak *.obj *.pyc *.so *~ *.idb +*.suo +*.ncb +*.vcproj.* +*.log +Release +Debug +Win32-Output .deps Makefile Makefile.in
@@ -33,6 +39,8 @@ m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 +msvc-build-local.bat +config-msvc-version.h doc/openvpn.8.html distro/rpm/openvpn.spec tests/t_client.sh
Makefile.am +9 -1
@@ -49,4 +49,12 @@ dist_noinst_DATA = \ PORTS \ INSTALL-win32.txt \ README.IPv6 TODO.IPv6 \ - README.polarssl + README.polarssl \ + openvpn.sln \ + msvc-env.bat \ + msvc-dev.bat \ + msvc-build.bat + +dist_noinst_HEADERS = \ + config-msvc.h \ + config-msvc-version.h.in
build/Makefile.am +2 -0
@@ -13,3 +13,5 @@ MAINTAINERCLEANFILES = \ EXTRA_DIST = \ ltrc.inc + +SUBDIRS = msvc
build/msvc/Makefile.am new file +15 -0
@@ -0,0 +1,15 @@ +# +# OpenVPN -- An application to securely tunnel IP networks +# over a single UDP port, with support for SSL/TLS-based +# session authentication and key exchange, +# packet encryption, packet authentication, and +# packet compression. +# +# Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <[email protected]...> +# Copyright (C) 2008-2012 Alon Bar-Lev <[email protected]...> +# + +MAINTAINERCLEANFILES = \ + $(srcdir)/Makefile.in + +SUBDIRS = msvc-generate
build/msvc/msvc-generate/Makefile.am new file +18 -0
@@ -0,0 +1,18 @@ +# +# OpenVPN -- An application to securely tunnel IP networks +# over a single UDP port, with support for SSL/TLS-based +# session authentication and key exchange, +# packet encryption, packet authentication, and +# packet compression. +# +# Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <[email protected]...> +# Copyright (C) 2008-2012 Alon Bar-Lev <[email protected]...> +# + +MAINTAINERCLEANFILES = \ + $(srcdir)/Makefile.in + +dist_noinst_DATA = \ + msvc-generate.vcproj \ + Makefile.mak \ + msvc-generate.js
build/msvc/msvc-generate/Makefile.mak new file +13 -0
@@ -0,0 +1,13 @@ +# Copyright (C) 2008-2012 Alon Bar-Lev <[email protected]...> + +CONFIG=$(SOURCEBASE)/version.m4 +INPUT=$(SOURCEBASE)/config-msvc-version.h.in +OUTPUT=$(SOURCEBASE)/config-msvc-version.h + +all: $(OUTPUT) + +$(OUTPUT): $(INPUT) $(CONFIG) + cscript //nologo msvc-generate.js --config="$(CONFIG)" --input="$(INPUT)" --output="$(OUTPUT)" + +clean: + -del "$(OUTPUT)"
build/msvc/msvc-generate/msvc-generate.js new file +59 -0
59 lines not on this page · raw message
build/msvc/msvc-generate/msvc-generate.vcproj new file +74 -0
74 lines not on this page · raw message
config-msvc-version.h.in new file +10 -0
@@ -0,0 +1,10 @@ +#define PACKAGE_NAME "@PRODUCT_NAME@" +#define PACKAGE_STRING "@PRODUCT_NAME@ @PRODUCT_VERSION@" +#define PACKAGE_TARNAME "@PRODUCT_TARNAME@" +#define PACKAGE "@PRODUCT_TARNAME@" +#define PACKAGE_VERSION "@PRODUCT_VERSION@" +#define PRODUCT_BUGREPORT "@PRODUCT_BUGREPORT@" +#define OPENVPN_VERSION_RESOURCE @PRODUCT_VERSION_RESOURCE@ +#define TAP_WIN_COMPONENT_ID "@PRODUCT_TAP_WIN_COMPONENT_ID@" +#define TAP_WIN_MIN_MAJOR @PRODUCT_TAP_WIN_MIN_MAJOR@ +#define TAP_WIN_MIN_MINOR @PRODUCT_TAP_WIN_MIN_MINOR@
config-msvc.h new file +117 -0
117 lines not on this page · raw message
configure.ac +2 -0
@@ -880,6 +880,8 @@ AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"]) AC_CONFIG_FILES([ Makefile build/Makefile + build/msvc/Makefile + build/msvc/msvc-generate/Makefile distro/Makefile distro/rpm/Makefile distro/rpm/openvpn.spec
msvc-build.bat new file +34 -0
@@ -0,0 +1,34 @@ +@echo off + +rem Copyright (C) 2008-2012 Alon Bar-Lev <[email protected]...> + +call msvc-env.bat + +@rem this stupid command needed for SetEnv.cmd to operate +setlocal ENABLEDELAYEDEXPANSION + +SET PLATFORMS=Win32 +SET CONFIGURATIONS=Debug,Release + +call "%VCHOME%\bin\vcvars32.bat" + +for %%p in (%PLATFORMS%) do ( + for %%c in (%CONFIGURATIONS%) do ( + rmdir /q /s %SOURCEBASE%\%%p\%%c > nul 2>&1 + + vcbuild /errfile:error.log /showenv %SOLUTION% /rebuild /platform:%%p "%%c|%%p" + for %%f in (error.log) do if %%~zf GTR 0 goto error + ) +) + +exit /b 0 +goto end + +:error +if "%1" NEQ "batch" pause +exit /b 1 +goto end + +:end + +endlocal
msvc-dev.bat new file +9 -0
@@ -0,0 +1,9 @@ +@echo off + +setlocal +cd %0\.. +call msvc-env.bat + +start "" "%VSHOME%\Common7\IDE\devenv.exe" %SOLUTION% + +endlocal
msvc-env.bat new file +21 -0
@@ -0,0 +1,21 @@ +@echo off + +cd %0\.. + +rem Put your own settings at msvc-env-local.bat +if exist msvc-env-local.bat call msvc-env-local.bat + +if "%ProgramFiles(x86)%"=="" SET ProgramFiles(x86)=%ProgramFiles% +if "%VS90COMNTOOLS%"=="" SET VS90COMNTOOLS=%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\Common7\Tools\ +if "%VSHOME%"=="" SET VSHOME=%VS90COMNTOOLS%..\.. +if "%VCHOME%"=="" SET VCHOME=%VSHOME%\VC + +SET SOURCEBASE=%cd% +SET SOLUTION=openvpn.sln +SET CFLAGS=_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;WINVER=0x0501;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T + +IF "%OPENVPN_DEPROOT%" == "" SET OPENVPN_DEPROOT=c:\Temp\openvpn-deps +IF "%OPENSSL_HOME%" == "" SET OPENSSL_HOME=%OPENVPN_DEPROOT% +IF "%LZO_HOME%" == "" SET LZO_HOME=%OPENVPN_DEPROOT% +IF "%PKCS11H_HOME%" == "" SET PKCS11H_HOME=%OPENVPN_DEPROOT% +
openvpn.sln new file +45 -0
45 lines not on this page · raw message
src/openvpn/Makefile.am +3 -0
@@ -14,6 +14,9 @@ include $(top_srcdir)/build/ltrc.inc MAINTAINERCLEANFILES = \ $(srcdir)/Makefile.in +EXTRA_DIST = \ + openvpn.vcproj + INCLUDES = -I$(top_srcdir)/include AM_CFLAGS = \
src/openvpn/compat.h +0 -2
@@ -25,8 +25,6 @@#ifndef COMPAT_H #define COMPAT_H -#include "config.h" -#if defined(HAVE_BASENAME ) || defined(HAVE_DIRNAME )#include <libgen.h> #endif
src/openvpn/crypto_backend.h +0 -2
@@ -30,8 +30,6 @@#ifndef CRYPTO_BACKEND_H_ #define CRYPTO_BACKEND_H_ -#include "config.h" -#ifdef ENABLE_CRYPTO_OPENSSL #include "crypto_openssl.h" #endif
src/openvpn/openvpn.vcproj new file +769 -0
769 lines not on this page · raw message
src/openvpn/openvpn_win32_resources.rc +1 -1
@@ -1,7 +1,7 @@ #ifdef HAVE_CONFIG_H #include <config.h> #else -#include <config-msc-version.h> +#include <config-msvc-version.h> #endif #include <winresrc.h>
src/openvpn/syshead.h +12 -2
@@ -28,11 +28,13 @@/* * Only include if not during configure */ -#ifndef PACKAGE_NAME +#ifdef HAVE_CONFIG_H #include "config.h" -#include "compat.h" +#elif defined(_MSC_VER) +#include "config-msvc.h" #endif +#include "compat.h" /* branch prediction hints */ #if defined(__GNUC__)
@@ -102,6 +104,14 @@#include <fcntl.h> #endif +#ifdef HAVE_DIRECT_H +#include <direct.h> +#endif + +#ifdef HAVE_IO_H +#include <io.h> +#endif +#ifdef HAVE_SYS_FILE_H #include <sys/file.h> #endif
src/openvpn/tun.c +1 -1
@@ -3624,7 +3624,7 @@ get_adapter_index_method_1 (const char *guid)ULONG index = ~0 ;DWORD status;wchar_t wbuf[256 ]; -snwprintf (wbuf,SIZE (wbuf),L"\\DEVICE\\TCPIP_%S" , guid); +_snwprintf (wbuf,SIZE (wbuf),L"\\DEVICE\\TCPIP_%S" , guid); wbuf [SIZE (wbuf) -1 ] =0 ;if ((status =GetAdapterIndex (wbuf, &index)) !=NO_ERROR ) index = ~0 ;
src/openvpn/win32.c +1 -1
@@ -611,7 +611,7 @@ window_title_generate (const char *title)struct buffer out =alloc_buf_gc (256 , &gc);if (!title) title ="" ; -buf_printf (&out,"[%s] " PACKAGE_NAME " " VERSION " F4:EXIT F1:USR1 F2:USR2 F3:HUP" , title); +buf_printf (&out,"[%s] " PACKAGE_NAME " " PACKAGE_VERSION " F4:EXIT F1:USR1 F2:USR2 F3:HUP" , title);SetConsoleTitle (BSTR (&out));gc_free (&gc); }
src/openvpnserv/Makefile.am +3 -0
@@ -13,6 +13,9 @@ include $(top_srcdir)/build/ltrc.inc MAINTAINERCLEANFILES = $(srcdir)/Makefile.in +EXTRA_DIST = \ + openvpnserv.vcproj + if WIN32 sbin_PROGRAMS = openvpnserv endif
src/openvpnserv/openvpnserv.c +10 -6
@@ -33,7 +33,11 @@* This code is designed to be built with the mingw compiler. */ +#ifdef HAVE_CONFIG_H #include "config.h" +#elif defined(_MSC_VER) +#include "config-msvc.h" +#endif #include <windows.h> #include <stdlib.h> #include <stdio.h>
@@ -196,7 +200,7 @@ match (const WIN32_FIND_DATA *find, const char *ext)if (i <1 )return false; -return find->cFileName[i] =='.' && !strcasecmp (find->cFileName + i +1 , ext); +return find->cFileName[i] =='.' && !_stricmp (find->cFileName + i +1 , ext); }/*
@@ -331,15 +335,15 @@ VOID ServiceStart (DWORD dwArgc, LPTSTR *lpszArgv)/* set process priority */ priority =NORMAL_PRIORITY_CLASS ; -if (!strcasecmp (priority_string,"IDLE_PRIORITY_CLASS" )) +if (!_stricmp (priority_string,"IDLE_PRIORITY_CLASS" )) priority =IDLE_PRIORITY_CLASS ; -else if (!strcasecmp (priority_string,"BELOW_NORMAL_PRIORITY_CLASS" )) +else if (!_stricmp (priority_string,"BELOW_NORMAL_PRIORITY_CLASS" )) priority =BELOW_NORMAL_PRIORITY_CLASS ; -else if (!strcasecmp (priority_string,"NORMAL_PRIORITY_CLASS" )) +else if (!_stricmp (priority_string,"NORMAL_PRIORITY_CLASS" )) priority =NORMAL_PRIORITY_CLASS ; -else if (!strcasecmp (priority_string,"ABOVE_NORMAL_PRIORITY_CLASS" )) +else if (!_stricmp (priority_string,"ABOVE_NORMAL_PRIORITY_CLASS" )) priority =ABOVE_NORMAL_PRIORITY_CLASS ; -else if (!strcasecmp (priority_string,"HIGH_PRIORITY_CLASS" )) +else if (!_stricmp (priority_string,"HIGH_PRIORITY_CLASS" )) priority =HIGH_PRIORITY_CLASS ;else {
src/openvpnserv/openvpnserv.vcproj new file +209 -0
209 lines not on this page · raw message
src/openvpnserv/openvpnserv_resources.rc +1 -1
@@ -1,7 +1,7 @@ #ifdef HAVE_CONFIG_H #include <config.h> #else -#include <config-msc-version.h> +#include <config-msvc-version.h> #endif #include <winresrc.h>
src/openvpnserv/service.c +5 -0
@@ -23,6 +23,11 @@ FUNCTIONS:---------------------------------------------------------------------------*/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#elif defined(_MSC_VER) +#include "config-msvc.h" +#endif #include <windows.h> #include <stdio.h> #include <stdlib.h>
src/openvpnserv/service.h +0 -2
@@ -57,8 +57,6 @@ Copyright (C) 1993 - 2000. Microsoft Corporation. All rights reserved.extern "C" {#endif -#include "config.h" -////////////////////////////////////////////////////////////////////////////// //// todo: change to desired strings ////
Signature · 1 line
1.7.3.4