build revolution
PATCH 48/52 cleanup: move console related function into its own module
In reply to Alon Bar-Lev--- src/openvpn/Makefile.am | 1 + src/openvpn/console.c | 238 ++++++++++++++++++++++++++++++++++++++++++++ src/openvpn/console.h | 33 ++++++ src/openvpn/misc.c | 125 +----------------------- src/openvpn/misc.h | 3 +- src/openvpn/openvpn.vcproj | 8 ++ src/openvpn/pkcs11.c | 1 + src/openvpn/win32.c | 87 +---------------- src/openvpn/win32.h | 5 +- 9 files changed, 286 insertions(+), 215 deletions(-) create mode 100644 src/openvpn/console.c create mode 100644 src/openvpn/console.h
src/openvpn/Makefile.am +1 -0
@@ -58,6 +58,7 @@ openvpn_SOURCES = \ mbuf.c mbuf.h \ memdbg.h \ misc.c misc.h \ + console.c console.h \ mroute.c mroute.h \ mss.c mss.h \ mstats.c mstats.h \
src/openvpn/console.c new file +238 -0
238 lines not on this page · raw message
src/openvpn/console.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* 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]...> +* +* 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 CONSOLE_H +#define CONSOLE_H + +#include "basic.h" + +bool +get_console_input (const char *prompt,const bool echo,char *input,const int capacity); + +#endif
src/openvpn/misc.c +1 -124
137 lines not on this page · raw message
src/openvpn/misc.h +1 -2
@@ -128,6 +128,7 @@ bool system_executed (int stat);const char *system_error_message (int ,struct gc_arena *gc);/* wrapper around the execve() call */ +int openvpn_popen (const struct argv *a,const struct env_set *es);int openvpn_execve (const struct argv *a,const struct env_set *es,const unsigned int flags);bool openvpn_execve_check (const struct argv *a,const struct env_set *es,const unsigned int flags,const char *error_message);bool openvpn_execve_allowed (const unsigned int flags);
@@ -322,8 +323,6 @@ struct auth_challenge_info {};struct static_challenge_info {};#endif -bool get_console_input (const char *prompt,const bool echo,char *input,const int capacity); -/* * Flags for get_user_pass and management_query_user_pass */
src/openvpn/openvpn.vcproj +8 -0
@@ -191,6 +191,10 @@ > </File> <File + RelativePath=".\console.c" + > + </File> + <File RelativePath=".\crypto.c" > </File>
@@ -457,6 +461,10 @@ > </File> <File + RelativePath=".\console.h" + > + </File> + <File RelativePath=".\crypto.h" > </File>
src/openvpn/pkcs11.c +1 -0
@@ -40,6 +40,7 @@#include "pkcs11.h" #include "misc.h" #include "otime.h" +#include "console.h" #include "pkcs11_backend.h" static
src/openvpn/win32.c +1 -86
99 lines not on this page · raw message
src/openvpn/win32.h +2 -3
@@ -166,6 +166,8 @@ int win32_signal_get (struct win32_signal *ws);void win32_pause (struct win32_signal *ws); +bool win32_service_interrupt (struct win32_signal *ws); +/* * Set the text on the window title bar */
@@ -246,9 +248,6 @@ void netcmd_semaphore_close (void);void netcmd_semaphore_lock (void );void netcmd_semaphore_release (void ); -bool get_console_input_win32 (const char *prompt,const bool echo,char *input,const int capacity); -char *getpass (const char *prompt); -/* Set Win32 security attributes structure to allow all access */ bool init_security_attributes_allow_all (struct security_attributes *obj);
Signature · 1 line
1.7.3.4
PATCH 49/52 build: move wrappers into platform module
In reply to Alon Bar-Lev+ Some fixups within the platform.c functions.
- need to check environment set on Windows.
--- src/openvpn/Makefile.am | 1 + src/openvpn/buffer.c | 2 +- src/openvpn/crypto.c | 6 +- src/openvpn/error.c | 2 +- src/openvpn/init.c | 18 +- src/openvpn/manage.c | 16 +- src/openvpn/misc.c | 295 ++---------------------------------- src/openvpn/misc.h | 106 +------------- src/openvpn/mstats.c | 2 +- src/openvpn/multi.c | 2 +- src/openvpn/openvpn.h | 4 +- src/openvpn/openvpn.vcproj | 8 + src/openvpn/options.c | 14 +- src/openvpn/packet_id.c | 2 +- src/openvpn/pf.c | 6 +- src/openvpn/platform.c | 369 ++++++++++++++++++++++++++++++++++++++++++++ src/openvpn/platform.h | 142 +++++++++++++++++ src/openvpn/ps.c | 2 +- src/openvpn/ssl_openssl.c | 2 +- src/openvpn/ssl_verify.c | 8 +- src/openvpn/status.c | 6 +- src/openvpn/tun.c | 12 +- src/openvpn/win32.c | 27 ---- 23 files changed, 584 insertions(+), 468 deletions(-) create mode 100644 src/openvpn/platform.c create mode 100644 src/openvpn/platform.h
src/openvpn/Makefile.am +1 -0
@@ -58,6 +58,7 @@ openvpn_SOURCES = \ mbuf.c mbuf.h \ memdbg.h \ misc.c misc.h \ + platform.c platform.h \ console.c console.h \ mroute.c mroute.h \ mss.c mss.h \
src/openvpn/buffer.c +1 -1
@@ -1080,7 +1080,7 @@ buffer_list_advance (struct buffer_list *ol, int n)struct buffer_list *buffer_list_file (const char *fn,int max_line_len) { -FILE *fp =openvpn_fopen (fn,"r" ); +FILE *fp =platform_fopen (fn,"r" );struct buffer_list *bl =NULL ;if (fp)
src/openvpn/crypto.c +3 -3
@@ -868,7 +868,7 @@ read_key_file (struct key2 *key2, const char *file, const unsigned int flags)#endif { in =alloc_buf_gc (2048 , &gc); - fd =openvpn_open (file,O_RDONLY ,0 ); + fd =platform_open (file,O_RDONLY ,0 );if (fd ==-1 )msg (M_ERR ,"Cannot open file key file '%s'" , file); size =read (fd, in.data, in.capacity);
@@ -1029,7 +1029,7 @@ read_passphrase_hash (const char *passphrase_file,const int min_passphrase_size =8 ;uint8_t buf[64 ];int total_size =0 ; -int fd =openvpn_open (passphrase_file,O_RDONLY ,0 ); +int fd =platform_open (passphrase_file,O_RDONLY ,0 );if (fd ==-1 )msg (M_ERR ,"Cannot open passphrase file: '%s'" , passphrase_file);
@@ -1079,7 +1079,7 @@ write_key_file (const int nkeys, const char *filename)const int bytes_per_line =16 ;/* open key file */ - fd =openvpn_open (filename,O_CREAT |O_TRUNC |O_WRONLY ,S_IRUSR |S_IWUSR ); + fd =platform_open (filename,O_CREAT |O_TRUNC |O_WRONLY ,S_IRUSR |S_IWUSR );if (fd ==-1 )msg (M_ERR ,"Cannot open shared secret file '%s' for write" , filename);
src/openvpn/error.c +1 -1
@@ -640,7 +640,7 @@ x_check_status (int status, my_errno);if (x_cs_err_delay_ms) -sleep_milliseconds (x_cs_err_delay_ms); +platform_sleep_milliseconds (x_cs_err_delay_ms); }gc_free (&gc); }
src/openvpn/init.c +9 -9
@@ -935,7 +935,7 @@ do_genkey (const struct options * options) "shared secret output file (--secret)");if (options->mlock)/* should we disable paging? */ -do_mlockall (true); +platform_mlockall (true); nbits_written =write_key_file (2 , options->shared_secret_file);
@@ -1022,7 +1022,7 @@ do_uid_gid_chroot (struct context *c, bool no_delay)if (c->options.chroot_dir) {if (no_delay) -do_chroot (c->options.chroot_dir); +platform_chroot (c->options.chroot_dir);else msg (M_INFO ,"NOTE: chroot %s" , why_not); }
@@ -1030,8 +1030,8 @@ do_uid_gid_chroot (struct context *c, bool no_delay)/* set user and/or group that we want to setuid/setgid to */ if (no_delay) { -set_group (&c0->group_state); -set_user (&c0->user_state); +platform_group_set (&c0->platform_state_group); +platform_user_set (&c0->platform_state_user); c0->uid_gid_set = true; }else if (c0->uid_gid_specified)
@@ -2780,8 +2780,8 @@ do_init_first_time (struct context *c)/* get user and/or group that we want to setuid/setgid to */ c0->uid_gid_specified = -get_group (c->options.groupname, &c0->group_state) | -get_user (c->options.username, &c0->user_state); +platform_group_get (c->options.groupname, &c0->platform_state_group) | +platform_user_get (c->options.username, &c0->platform_state_user);/* get --writepid file descriptor */ get_pid_file (c->options.writepid, &c0->pid_state);
@@ -2791,13 +2791,13 @@ do_init_first_time (struct context *c)/* should we disable paging? */ if (c->options.mlock && c->did_we_daemonize) -do_mlockall (true);/* call again in case we daemonized */ +platform_mlockall (true);/* call again in case we daemonized */ /* save process ID in a file */ write_pid (&c0->pid_state);/* should we change scheduling priority? */ -set_nice (c->options.nice); +platform_nice (c->options.nice); } }
@@ -3342,7 +3342,7 @@ init_instance (struct context *c, const struct env_set *env, const unsigned int/* should we disable paging? */ if (c->first_time && options->mlock) -do_mlockall (true); +platform_mlockall (true);#if P2MP /* get passwords if undefined */
src/openvpn/manage.c +8 -8
@@ -1146,7 +1146,7 @@ man_dispatch_command (struct management *man, struct status_output *so, const ch }else if (streq (p[0 ],"pid" )) { -msg (M_CLIENT ,"SUCCESS: pid=%d" ,openvpn_getpid ()); +msg (M_CLIENT ,"SUCCESS: pid=%d" ,platform_getpid ()); }#ifdef MANAGEMENT_DEF_AUTH else if (streq (p[0], "nclients"))
@@ -1429,7 +1429,7 @@ man_record_peer_info (struct management *man) {const in_addr_t a =ntohl (addr.sin_addr.s_addr);const int p =ntohs (addr.sin_port); -FILE *fp =openvpn_fopen (man->settings.write_peer_info_file,"w" ); +FILE *fp =platform_fopen (man->settings.write_peer_info_file,"w" );if (fp) {fprintf (fp,"%s\n%d\n" ,print_in_addr_t (a,0 , &gc), p);
@@ -2013,17 +2013,17 @@ man_settings_init (struct man_settings *ms,*/ if (client_user) { -struct user_state s; -get_user (client_user, &s); - ms->client_uid =user_state_uid (&s); +struct platform_state_user s; +platform_user_get (client_user, &s); + ms->client_uid =platform_state_user_uid (&s);msg (D_MANAGEMENT ,"MANAGEMENT: client_uid=%d" , ms->client_uid);ASSERT (ms->client_uid >=0 ); }if (client_group) { -struct group_state s; -get_group (client_group, &s); - ms->client_gid =group_state_gid (&s); +struct platform_state_group s; +platform_group_get (client_group, &s); + ms->client_gid =platform_state_group_gid (&s);msg (D_MANAGEMENT ,"MANAGEMENT: client_gid=%d" , ms->client_gid);ASSERT (ms->client_gid >=0 ); }
src/openvpn/misc.c +11 -284
399 lines not on this page · raw message
src/openvpn/misc.h +1 -105
164 lines not on this page · raw message
src/openvpn/mstats.c +1 -1
@@ -114,7 +114,7 @@ mstats_close(void) mmap_stats->state =MSTATS_EXPIRED ;if (munmap ((void *)mmap_stats,sizeof (struct mmap_stats )))msg (M_WARN |M_ERRNO ,"mstats_close: munmap error" ); -delete_file (mmap_fn); +platform_unlink (mmap_fn); mmap_stats =NULL ; } }
src/openvpn/multi.c +1 -1
@@ -1452,7 +1452,7 @@ multi_client_connect_post (struct multi_context *m, option_types_found, mi->context.c2.es); -if (!delete_file (dc_file)) +if (!platform_unlink (dc_file))msg (D_MULTI_ERRORS ,"MULTI: problem deleting temporary file: %s" , dc_file);
src/openvpn/openvpn.h +2 -2
@@ -143,8 +143,8 @@ struct context_0/* workspace for --user/--group */ bool uid_gid_specified;bool uid_gid_set; -struct user_state user_state; -struct group_state group_state; +struct platform_state_user platform_state_user; +struct platform_state_group platform_state_group; };
src/openvpn/openvpn.vcproj +8 -0
@@ -347,6 +347,10 @@ > </File> <File + RelativePath=".\platform.c" + > + </File> + <File RelativePath=".\plugin.c" > </File>
@@ -649,6 +653,10 @@ > </File> <File + RelativePath=".\platform.h" + > + </File> + <File RelativePath=".\plugin.h" > </File>
src/openvpn/options.c +7 -7
@@ -920,7 +920,7 @@ setenv_settings (struct env_set *es, const struct options *o)setenv_int (es,"daemon" , o->daemon);setenv_int (es,"daemon_log_redirect" , o->log);setenv_unsigned (es,"daemon_start_time" ,time (NULL )); -setenv_int (es,"daemon_pid" ,openvpn_getpid ()); +setenv_int (es,"daemon_pid" ,platform_getpid ());#ifdef ENABLE_CONNECTION if (o->connection_list)
@@ -2640,18 +2640,18 @@ check_file_access(const int type, const char *file, const int mode, const char *char *fullpath =strdup (file);/* POSIX dirname() implementaion may modify its arguments */ char *dirpath =dirname (fullpath); -if (openvpn_access (dirpath, mode|X_OK ) !=0 ) +if (platform_access (dirpath, mode|X_OK ) !=0 ) errcode = errno;free (fullpath); }/* Is the file itself accessible? */ -if (!errcode && (type &CHKACC_FILE ) && (openvpn_access (file, mode) !=0 ) ) +if (!errcode && (type &CHKACC_FILE ) && (platform_access (file, mode) !=0 ) ) errcode = errno;/* If the file exists and is accessible, is it writable? */ -if (!errcode && (type &CHKACC_FILEXSTWR ) && (openvpn_access (file,F_OK ) ==0 ) ) -if (openvpn_access (file,W_OK ) !=0 ) +if (!errcode && (type &CHKACC_FILEXSTWR ) && (platform_access (file,F_OK ) ==0 ) ) +if (platform_access (file,W_OK ) !=0 ) errcode = errno;/* Scream if an error is found */
@@ -3755,7 +3755,7 @@ read_config_file (struct options *options,if (streq (file,"stdin" )) fp = stdin;else - fp =openvpn_fopen (file,"r" ); + fp =platform_fopen (file,"r" );if (fp) { line_num =0 ;
@@ -4528,7 +4528,7 @@ add_option (struct options *options,else if (streq (p[0 ],"cd" ) && p[1 ]) {VERIFY_PERMISSION (OPT_P_GENERAL ); -if (openvpn_chdir (p[1 ])) +if (platform_chdir (p[1 ])) {msg (M_ERR ,"cd to '%s' failed" , p[1 ]); goto err;
src/openvpn/packet_id.c +1 -1
@@ -368,7 +368,7 @@ packet_id_persist_load (struct packet_id_persist *p, const char *filename)if (!packet_id_persist_enabled (p)) {/* open packet-id persist file for both read and write */ - p->fd =openvpn_open (filename, + p->fd =platform_open (filename,O_CREAT |O_RDWR |O_BINARY ,S_IRUSR |S_IWUSR );if (p->fd ==-1 )
src/openvpn/pf.c +3 -3
@@ -504,8 +504,8 @@ pf_check_reload (struct context *c) && c->c2.pf.filename && event_timeout_trigger (&c->c2.pf.reload, &c->c2.timeval, ETT_DEFAULT)) { -openvpn_stat_t s; -if (!openvpn_stat (c->c2.pf.filename, &s)) +platform_stat_t s; +if (!platform_stat (c->c2.pf.filename, &s)) {if (s.st_mtime > c->c2.pf.file_last_mod) {
@@ -605,7 +605,7 @@ pf_destroy_context (struct pf_context *pfc)#ifdef PLUGIN_PF if (pfc->filename) { -delete_file (pfc->filename); +platform_unlink (pfc->filename);free (pfc->filename); }#endif
src/openvpn/platform.c new file +369 -0
369 lines not on this page · raw message
src/openvpn/platform.h new file +142 -0
142 lines not on this page · raw message
src/openvpn/ps.c +1 -1
@@ -337,7 +337,7 @@ journal_add (const char *journal_dir, struct proxy_connection *pc, struct proxy_check_malloc_return (jfn);openvpn_snprintf (jfn, fnlen,"%s/%s" , journal_dir, t);dmsg (D_PS_PROXY_DEBUG ,"PORT SHARE PROXY: client origin %s -> %s" , jfn, f); - fd =openvpn_open (jfn,O_CREAT |O_TRUNC |O_WRONLY ,S_IRUSR |S_IWUSR |S_IRGRP ); + fd =platform_open (jfn,O_CREAT |O_TRUNC |O_WRONLY ,S_IRUSR |S_IWUSR |S_IRGRP );if (fd !=-1 ) {write (fd, f,strlen (f));
src/openvpn/ssl_openssl.c +1 -1
@@ -280,7 +280,7 @@ tls_ctx_load_pkcs12(struct tls_root_ctx *ctx, const char *pkcs12_file,#endif {/* Load the PKCS #12 file */ -if (!(fp =openvpn_fopen (pkcs12_file,"rb" ))) +if (!(fp =platform_fopen (pkcs12_file,"rb" )))msg (M_SSLERR ,"Error opening file %s" , pkcs12_file); p12 =d2i_PKCS12_fp (fp,NULL );fclose (fp);
src/openvpn/ssl_verify.c +4 -4
@@ -517,7 +517,7 @@ verify_cert_call_command(const char *verify_command, struct env_set *es,if (verify_export_cert) {if (tmp_file) -delete_file (tmp_file); +platform_unlink (tmp_file); }gc_free (&gc);
@@ -551,7 +551,7 @@ verify_check_crl_dir(const char *crl_dir, openvpn_x509_cert_t *cert)x509_free_serial (serial);return FAILURE ; } - fd =openvpn_open (fn,O_RDONLY ,0 ); + fd =platform_open (fn,O_RDONLY ,0 );if (fd >=0 ) {msg (D_HANDSHAKE ,"VERIFY CRL: certificate serial number %s is revoked" , serial);
@@ -735,7 +735,7 @@ key_state_rm_auth_control_file (struct key_state *ks) {if (ks && ks->auth_control_file) { -delete_file (ks->auth_control_file); +platform_unlink (ks->auth_control_file);free (ks->auth_control_file); ks->auth_control_file =NULL ; }
@@ -987,7 +987,7 @@ verify_user_pass_script (struct tls_session *session, const struct user_pass *up done:if (tmp_file &&strlen (tmp_file) >0 ) -delete_file (tmp_file); +platform_unlink (tmp_file);argv_reset (&argv);gc_free (&gc);
src/openvpn/status.c +3 -3
@@ -78,17 +78,17 @@ status_open (const char *filename,switch (so->flags) {case STATUS_OUTPUT_WRITE : - so->fd =openvpn_open (filename, + so->fd =platform_open (filename,O_CREAT |O_TRUNC |O_WRONLY ,S_IRUSR |S_IWUSR );break ;case STATUS_OUTPUT_READ : - so->fd =openvpn_open (filename, + so->fd =platform_open (filename,O_RDONLY ,S_IRUSR |S_IWUSR );break ;case STATUS_OUTPUT_READ |STATUS_OUTPUT_WRITE : - so->fd =openvpn_open (filename, + so->fd =platform_open (filename,O_CREAT |O_RDWR ,S_IRUSR |S_IWUSR );break ;
src/openvpn/tun.c +6 -6
@@ -1545,22 +1545,22 @@ tuncfg (const char *dev, const char *dev_type, const char *dev_node, int persistmsg (M_ERR ,"Cannot ioctl TUNSETPERSIST(%d) %s" , persist_mode, dev);if (username !=NULL ) { -struct user_state user_state; +struct platform_state_user platform_state_user; -if (!get_user (username, &user_state)) +if (!platform_user_get (username, &platform_state_user))msg (M_ERR ,"Cannot get user entry for %s" , username);else -if (ioctl (tt->fd,TUNSETOWNER , user_state.pw->pw_uid) <0 ) +if (ioctl (tt->fd,TUNSETOWNER , platform_state_user.pw->pw_uid) <0 )msg (M_ERR ,"Cannot ioctl TUNSETOWNER(%s) %s" , username, dev); }if (groupname !=NULL ) { -struct group_state group_state; +struct platform_state_group platform_state_group; -if (!get_group (groupname, &group_state)) +if (!platform_group_get (groupname, &platform_state_group))msg (M_ERR ,"Cannot get group entry for %s" , groupname);else -if (ioctl (tt->fd,TUNSETGROUP , group_state.gr->gr_gid) <0 ) +if (ioctl (tt->fd,TUNSETGROUP , platform_state_group.gr->gr_gid) <0 )msg (M_ERR ,"Cannot ioctl TUNSETOWNER(%s) %s" , groupname, dev); }close_tun (tt);
src/openvpn/win32.c +0 -27
@@ -976,33 +976,6 @@ wide_string (const char* utf8, struct gc_arena *gc)return ucs16; } -FILE * -openvpn_fopen (const char *path,const char *mode) -{ -struct gc_arena gc =gc_new (); -FILE *f =_wfopen (wide_string (path, &gc),wide_string (mode, &gc)); -gc_free (&gc); -return f; -} - -int -openvpn_open (const char *path,int flags,int mode) -{ -struct gc_arena gc =gc_new (); -int fd =_wopen (wide_string (path, &gc), flags, mode); -gc_free (&gc); -return fd; -} - -int -openvpn_stat (const char *path,openvpn_stat_t *buf) -{ -struct gc_arena gc =gc_new (); -int res =_wstat (wide_string (path, &gc), buf); -gc_free (&gc); -return res; -} -/* * call ourself in another process */
Signature · 1 line
1.7.3.4
PATCH 50/52 build: windows: install version.sh to allow installer read version
In reply to Alon Bar-Lev--- .gitignore | 1 + Makefile.am | 5 +++++ configure.ac | 1 + version.sh.in | 4 ++++ 4 files changed, 11 insertions(+), 0 deletions(-) create mode 100644 version.sh.in
.gitignore +1 -0
@@ -39,6 +39,7 @@ m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 +version.sh msvc-env-local.bat config-msvc-local.h config-msvc-version.h
Makefile.am +5 -0
@@ -69,3 +69,8 @@ endif dist_noinst_HEADERS = \ config-msvc.h \ config-msvc-version.h.in + +if WIN32 +rootdir=$(prefix) +root_DATA = version.sh +endif
configure.ac +1 -0
@@ -904,6 +904,7 @@ AC_SUBST([OPTIONAL_PKCS11_HELPER_LIBS]) AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"]) AC_CONFIG_FILES([ + version.sh Makefile build/Makefile build/msvc/Makefile
version.sh.in new file +4 -0
@@ -0,0 +1,4 @@ +OPENVPN_PACKAGE_NAME="@PACKAGE_NAME@" +OPENVPN_PACKAGE_TARNAME="@PACKAGE_TARNAME@" +OPENVPN_PACKAGE_VERSION="@PACKAGE_VERSION@" +OPENVPN_PACKAGE_HOST="@host@"
Signature · 1 line
1.7.3.4
PATCH 51/52 build: distribute samples in windows
In reply to Alon Bar-Lev--- configure.ac | 3 +++ sample/Makefile.am | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 0 deletions(-)
configure.ac +3 -0
@@ -903,6 +903,9 @@ AC_SUBST([OPTIONAL_PKCS11_HELPER_LIBS]) AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"]) +sampledir="\$(docdir)/sample" +AC_SUBST([sampledir]) + AC_CONFIG_FILES([ version.sh Makefile
sample/Makefile.am +14 -0
@@ -17,3 +17,17 @@ EXTRA_DIST = \ sample-windows \ sample-keys \ sample-scripts + +if WIN32 +sample_DATA = \ + client.ovpn \ + server.ovpn \ + sample-windows/sample.ovpn + +client.ovpn: sample-config-files/client.conf + -rm -f client.ovpn + cp "$(srcdir)/sample-config-files/client.conf" client.ovpn +server.ovpn: sample-config-files/server.conf + -rm -f server.ovpn + cp "$(srcdir)/sample-config-files/server.conf" server.ovpn +endif
Signature · 1 line
1.7.3.4
PATCH 52/52 build: use tap-windows.h as external dependency
In reply to Alon Bar-Levtap-windows.h is provided by the tap project
--- configure.ac | 12 ++++++++ include/Makefile.am | 2 - include/tap-windows.h | 68 -------------------------------------------- msvc-env.bat | 2 + src/openvpn/Makefile.am | 1 + src/openvpn/openvpn.vcproj | 4 +- 6 files changed, 17 insertions(+), 72 deletions(-) delete mode 100644 include/tap-windows.h
configure.ac +12 -0
@@ -666,6 +666,18 @@ PKG_CHECK_MODULES( )] ) +AC_ARG_VAR([TAP_WINDOWS_CFLAGS], [C compiler flags for TAP-Windows]) +if test "${WIN32}" = "yes"; then + old_CFLAGS="${CFLAGS}" + CFLAGS="${CFLAGS} ${TAP_WINDOWS_CFLAGS}" + AC_CHECK_HEADERS( + [tap-windows.h], + , + [AC_MSG_ERROR([tap-windows.h is required but missing])] + ) + CFLAGS="${old_CFLAGS}" +fi + if test "${have_openssl_crypto}" = "yes"; then saved_CFLAGS="${CFLAGS}" saved_LIBS="${LIBS}"
include/Makefile.am +0 -2
@@ -12,6 +12,4 @@ MAINTAINERCLEANFILES = \ $(srcdir)/Makefile.in -dist_noinst_HEADERS = tap-windows.h - include_HEADERS = openvpn-plugin.h
include/tap-windows.h deleted +0 -68
68 lines not on this page · raw message
msvc-env.bat +2 -0
@@ -23,7 +23,9 @@ 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% +if "%TAP_WINDOWS_HOME%" == "" set TAP_WINDOWS_HOME=%OPENVPN_DEPROOT% if not exist "%OPENSSL_HOME%" echo WARNING: openssl '%OPENSSL_HOME%' does not exist if not exist "%LZO_HOME%" echo WARNING: lzo '%LZO_HOME%' does not exist if not exist "%PKCS11H_HOME%" echo WARNING: pkcs11-helper '%PKCS11H_HOME%' does not exist +if not exist "%TAP_WINDOWS_HOME%" echo WARNING: tap-windows '%TAP_WINDOWS_HOME%' does not exist
src/openvpn/Makefile.am +1 -0
@@ -22,6 +22,7 @@ INCLUDES = \ -I$(top_srcdir)/src/compat AM_CFLAGS = \ + $(TAP_WINDOWS_CFLAGS) \ $(OPTIONAL_CRYPTO_CFLAGS) \ $(OPTIONAL_LZO_CFLAGS) \ $(OPTIONAL_PKCS11_HELPER_CFLAGS)
src/openvpn/openvpn.vcproj +2 -2
@@ -41,7 +41,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="$(SOURCEBASE);$(SOURCEBASE)/src/compat;$(SOURCEBASE)/include;$(OPENSSL_HOME)/include;$(LZO_HOME)/include;$(PKCS11H_HOME)/include" + AdditionalIncludeDirectories="$(SOURCEBASE);$(SOURCEBASE)/src/compat;$(SOURCEBASE)/include;$(TAP_WINDOWS_HOME)/include;$(OPENSSL_HOME)/include;$(LZO_HOME)/include;$(PKCS11H_HOME)/include" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;$(CPPFLAGS)" MinimalRebuild="true" BasicRuntimeChecks="3"
@@ -118,7 +118,7 @@ Name="VCCLCompilerTool" Optimization="2" EnableIntrinsicFunctions="true" - AdditionalIncludeDirectories="$(SOURCEBASE);$(SOURCEBASE)/src/compat;$(SOURCEBASE)/include;$(OPENSSL_HOME)/include;$(LZO_HOME)/include;$(PKCS11H_HOME)/include" + AdditionalIncludeDirectories="$(SOURCEBASE);$(SOURCEBASE)/src/compat;$(SOURCEBASE)/include;$(TAP_WINDOWS_HOME)/include;$(OPENSSL_HOME)/include;$(LZO_HOME)/include;$(PKCS11H_HOME)/include" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;$(CPPFLAGS)" RuntimeLibrary="2" EnableFunctionLevelLinking="true"
Signature · 1 line
1.7.3.4
Re: [Openvpn-devel] [PATCH 02/52] package: rpm: strip should be handled by package management
In reply to Alon Bar-LevQuoted 11 lines
Signed-off-by Alon Bar-Lev <[email protected]...>--- openvpn.spec.in | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)openvpn.spec.in +0
-0
openvpn.spec.in and portability to most major OS platforms. · line 106
Quoted 7 lines
openvpn.spec.in +0
-1@@ -101,7 +101,6 @@ and portability to most major OS platforms. %build %configure --disable-dependency-tracking %{?with_password_save:--enable-password-save} %{?without_lzo:--disable-lzo} %{?with_kerberos:--with-ssl-headers=/usr/kerberos/include} %__make -%__strip %{name} # Build down-root plugin pushd plugin/down-root
Let's see if I understood this correctly... the binary is stripped anyways when the package is installed? On a CentOS 6 box I have this in "rpm --showrc" output[1]:
-14: __os_install_post
%{_rpmconfigdir}/brp-compress
%{_rpmconfigdir}/brp-strip
%{_rpmconfigdir}/brp-strip-static-archive
%{_rpmconfigdir}/brp-strip-comment-note
If so, I give this one an ACK.
Signature · 9 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock [1] See <http://groups.google.com/group/linux.redhat.rpm/browse_thread/thread/4cacfa2591cad1c9>
Re: [Openvpn-devel] [PATCH 02/52] package: rpm: strip should be handled by package management
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 20 lines · Samuli Seppänen
Quoted 14 lines
Signed-off-by Alon Bar-Lev <[email protected]...> ---openvpn.spec.in | 1 - 1 files changed, 0 insertions(+), 1
deletions(-)openvpn.spec.in index renamed from openvpn.spec.in +0
-0c5178e9..c42e7c6 100644 --- a/openvpn.spec.in +++ b/openvpn.spec.in
openvpn.spec.in index renamed from openvpn.spec.in +0
-0@@ -101,7 +101,6 @@ and portability to most major OS platforms.%build %configure --disable-dependency-tracking %{?with_password_save:--enable-password-save} %{?without_lzo:--disable-lzo} %{?with_kerberos:--with-ssl-headers=/usr/kerberos/include} %__make -%__strip %{name}
Quoted 1 line
# Build down-root plugin pushd plugin/down-root
Let's see if I understood this correctly... the binary is stripped anyways when the package is installed? On a CentOS 6 box I have this in "rpm --showrc" output[1]:
Quoted 5 lines
-14:
__os_install_post%{_rpmconfigdir}/brp-compress %{_rpmconfigdir}/brp-strip %{_rpmconfigdir}/brp-strip-static-archive %{_rpmconfigdir}/brp-strip-comment-noteIf so, I give this one an ACK.
That's correct, according to what I remember from the Fedora packaging guidelines. The .spec file should not strip packages explicit. The rpmbuild process will take care of that, which will also create the debuginfo files during that process. If explicit stripping the binaries in the .spec file, there won't be any debuginfo files either.
The Fedora packaging rules also applies to EPEL, which then (kind of) hits RHEL, CentOS and ScientificLinux as well.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9V4FUACgkQDC186MBRfrogGwCdFnC9pPmXYjEFfFF0Yyon78kG 6aEAn207GtSWS437XpN9mDoCGtXNm3iI
=gJ2V
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 04/52] cleanup: remove C++ warnings
In reply to Alon Bar-LevQuoted 122 lines
Signed-off-by Alon Bar-Lev <[email protected]...>--- httpdigest.c | 4 ++-- init.c | 2 +- misc.c | 6 +++--- options.c | 4 ++-- socket.c | 4 ++-- ssl_polarssl.c | 6 ++++-- 6 files changed, 14 insertions(+), 12 deletions(-)httpdigest.c +2
-2@@ -111,7 +111,7 @@ DigestCalcResponse(md_ctx_t md5_ctx;const md_kt_t *md5_kt =md_kt_get ("MD5" ); -// calculate H(A2) +/* calculate H(A2) */ md_ctx_init (&md5_ctx, md5_kt);md_ctx_update (&md5_ctx, pszMethod,strlen (pszMethod));md_ctx_update (&md5_ctx,":" ,1 );@@ -124,7 +124,7 @@ DigestCalcResponse(md_ctx_final (&md5_ctx,HA2 );CvtHex (HA2 , HA2Hex); -// calculate response +/* calculate response */ md_ctx_init (&md5_ctx, md5_kt);md_ctx_update (&md5_ctx,HA1 ,HASHHEXLEN );md_ctx_update (&md5_ctx,":" ,1 );init.c +1
-1@@ -745,7 +745,7 @@ init_static (void)uint8_t rndbuf[8 ];int i;prng_init ("sha1" ,16 ); -//prng_init (NULL, 0); +/*prng_init (NULL, 0);*/ const int factor =1 ;for (i =0 ; i < factor *8 ; ++i) {misc.c +3
-3@@ -2457,17 +2457,17 @@ argv_test (void)argv_printf (&a,"%sc foo bar %s" ,"c:\\\\src\\\\test\\\\jyargs.exe" ,"foo bar" );argv_msg_prefix (M_INFO , &a,"ARGV" );msg (M_INFO ,"ARGV-S: %s" ,argv_system_str (&a)); -//openvpn_execve_check (&a, NULL, 0, "command failed"); +/*openvpn_execve_check (&a, NULL, 0, "command failed");*/ argv_printf (&a,"%sc %s %s" ,"c:\\\\src\\\\test files\\\\batargs.bat" ,"foo" ,"bar" );argv_msg_prefix (M_INFO , &a,"ARGV" );msg (M_INFO ,"ARGV-S: %s" ,argv_system_str (&a)); -//openvpn_execve_check (&a, NULL, 0, "command failed"); +/*openvpn_execve_check (&a, NULL, 0, "command failed");*/ argv_printf (&a,"%s%sc foo bar %s %s/%d %d %u" ,"/foo" ,"/bar.exe" ,"one two" ,"1.2.3.4" ,24 ,-69 ,96 );argv_msg_prefix (M_INFO , &a,"ARGV" );msg (M_INFO ,"ARGV-S: %s" ,argv_system_str (&a)); -//openvpn_execve_check (&a, NULL, 0, "command failed"); +/*openvpn_execve_check (&a, NULL, 0, "command failed");*/ argv_printf (&a,"this is a %s test of int %d unsigned %u" ,"FOO" ,-69 ,42 ); s =argv_str (&a, &gc,PA_BRACKET );options.c +2
-2@@ -4764,7 +4764,7 @@ add_option (struct options *options, }else if (streq (p[0 ],"fragment" ) && p[1 ]) { -// VERIFY_PERMISSION (OPT_P_MTU); +/* VERIFY_PERMISSION (OPT_P_MTU); */ VERIFY_PERMISSION (OPT_P_MTU |OPT_P_CONNECTION ); options->ce.fragment =positive_atoi (p[1 ]); }@@ -5118,7 +5118,7 @@ add_option (struct options *options,else if (streq (p[0 ],"explicit-exit-notify" )) {VERIFY_PERMISSION (OPT_P_GENERAL |OPT_P_CONNECTION ); -// VERIFY_PERMISSION (OPT_P_EXPLICIT_NOTIFY); +/* VERIFY_PERMISSION (OPT_P_EXPLICIT_NOTIFY); */ if (p[1 ]) { options->ce.explicit_exit_notification =positive_atoi (p[1 ]);socket.c +2
-2@@ -3106,7 +3106,7 @@ openvpn_inet_ntop(int af, const void *src, char *dst, socklen_t size)default :ASSERT (0 ); } -// cannot direclty use &size because of strict aliasing rules +/* cannot direclty use &size because of strict aliasing rules */ return (WSAAddressToString ((struct sockaddr *)&ss,sizeof (ss),NULL , dst, &s) ==0 )? dst :NULL ; }@@ -3119,7 +3119,7 @@ openvpn_inet_pton(int af, const char *src, void *dst)char src_copy[INET6_ADDRSTRLEN +1 ];CLEAR (ss); -// stupid non-const API +/* stupid non-const API */ strncpynt (src_copy, src,INET6_ADDRSTRLEN +1 );if (WSAStringToAddress (src_copy, af,NULL , (struct sockaddr *)&ss, &size) ==0 ) {ssl_polarssl.c +0
-0@@ -324,8 +324,10 @@ tls_ctx_load_priv_file (struct tls_root_ctx *ctx, const char *priv_key_filewarn_if_group_others_accessible (priv_key_file);
ssl_polarssl.c tls_ctx_load_priv_file (struct tls_root_ctx *ctx, const char *priv_key_file · line 333
Quoted 10 lines
ssl_polarssl.c +4
-2/* TODO: Check Private Key */ -// if (!SSL_CTX_check_private_key (ctx)) -// msg (M_SSLERR, "Private key does not match the certificate"); +#if 0 +if (!SSL_CTX_check_private_key (ctx)) +msg (M_SSLERR ,"Private key does not match the certificate" ); +#endif return 0 ; }
The C++ style commenting[1] has not spread widely in OpenVPN:
$ grep "//" *.c|less
Although this commenting style has been valid in C since C99 (year 2000), the actual C99 implementations seem to be incomplete[2]. So, just to be on the safe side, I'll give this one an ACK.
Signature · 9 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock [1] <http://en.wikipedia.org/wiki/C_syntax#Comments> [2] <http://en.wikipedia.org/wiki/C99#Implementations>
Re: [Openvpn-devel] [PATCH 06/52] cleanup: remove redundant ';'
In reply to Alon Bar-LevQuoted 11 lines
Signed-off-by Alon Bar-Lev <[email protected]...>--- misc.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)misc.h +0
-0
misc.h openvpn_run_script (const struct argv *a, const struct env_set *es, const unsign · line 151
Quoted 8 lines
misc.h +1
-1@@ -145,7 +145,7 @@ openvpn_run_script (const struct argv *a, const struct env_set *es, const unsignopenvpn_snprintf (msg,sizeof (msg),"WARNING: Failed running command (%s)" , hook);return openvpn_execve_check (a, es, flags |S_SCRIPT , msg); -}; +}#ifdef WIN32 FILE *openvpn_fopen (const char *path,const char *mode);
Seems like an anomaly. ACK.
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
Re: [Openvpn-devel] [PATCH 07/52] cleanup: crypto_openssl.c: remove support for pre-openssl-0.9.6
In reply to Alon Bar-LevQuoted 70 lines
autoconf 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 +0
-42@@ -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
crypto_openssl.c cipher_ok (const char* name) · line 101
Quoted 10 lines
crypto_openssl.c +0
-7- -#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
It has been agreed earlier that OpenSSL 0.9.6 will not be supported anymore. ACK.
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
Re: [Openvpn-devel] [PATCH 08/52] cleanup: tun.c: fix incorrect option in message (ip-win32)
In reply to Alon Bar-LevQuoted 11 lines
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. There is indeed no --tap-win32 option.
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
Re: [Openvpn-devel] [PATCH 09/52] cleanup: memcmp.c: remove unused source
In reply to Alon Bar-LevQuoted 61 lines
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 +0
-3@@ -564,9 +564,6 @@ else fi -dnl Required library functions -AC_FUNC_MEMCMP - dnl dnl Check for res_init dnlmemcmp.c deleted +0
-33@@ -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 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_t n) -{ -unsigned const char *p1 = s1, *p2 = s2; -int d;
memcmp.c line 43
Quoted 10 lines
memcmp.c deleted +0
-10- -if (n) -while (n-- >0 ) - { - d = *p1++ - *p2++; -if (d !=0 ) -return d; - } -return 0 ; -}
My C-fu is fairly low, but this still seems to make sense as there's no memcmp.h. The memcmp function calls in other source files seem to use memcmp function stored elsewhere (gcc[1], libc[2], etc.).
ACK.
Signature · 10 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock [1] <http://justin.harmonize.fm/index.php/2009/05/exploring-memcmp> [2] <http://www.slac.stanford.edu/comp/unix/package/rtems/doc/html/libc/libc.info.memcmp.html>
Re: [Openvpn-devel] [PATCH 11/52] build: correct place to alter WINVER is at build system
In reply to Alon Bar-LevIl 29.02.2012 22:11, Alon Bar-Lev ha scritto:
Quoted 40 lines
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 +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 +0
-0
win/msvc.mak.in LIB_DIRS = -LIBPATH:$(OPENSSL)\lib -LIBPATH:$(POLARSSL)\build\library -LIBPATH:$ · line 44
Quoted 8 lines
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
Makes sense. WINVER defines the minimum supported Windows version[1]. In this case (0x501) we support WIndows XP and later. Making this a buildsystem option makes perfect sense to me - editing the header files to determine which Windows version will be supported seems silly.
ACK.
Signature · 9 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock [1] <http://blogs.msdn.com/b/dsvc/archive/2009/06/19/troubleshooting-not-a-valid-win32-application-error-at-the-startup.aspx>
Re: [Openvpn-devel] [PATCH 12/52] Update .gitignore
In reply to Alon Bar-LevQuoted 11 lines
Signed-off-by Alon Bar-Lev <[email protected]...>--- .gitignore | 1 + 1 files changed, 1 insertions(+), 0 deletions(-).gitignore +0
-0
.gitignore line 11
Quoted 7 lines
.gitignore +1
-0@@ -5,6 +5,7 @@ *.obj *.pyc *.so +*~ .deps Makefile Makefile.in
Editor backup files in "git status" are annoying. ACK.
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
Re: [Openvpn-devel] [PATCH 16/52] build: we need the sample.ovpn in future
In reply to Alon Bar-LevIl 29.02.2012 22:11, Alon Bar-Lev ha scritto:
Quoted 227 lines
Signed-off-by Alon Bar-Lev <[email protected]...>--- install-win32/sample.ovpn | 103 -------------------------------------------- sample-windows/sample.ovpn | 103 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 103 deletions(-) delete mode 100755 install-win32/sample.ovpn create mode 100755 sample-windows/sample.ovpninstall-win32/sample.ovpn deleted +0
-103@@ -1,103 +0,0 @@ -# Edit this file, and save to a .ovpn extension -# so that OpenVPN will activate it when run -# as a service. - -# Change 'myremote' to be your remote host, -# or comment out to enter a listening -# server mode. -remote myremote - -# Uncomment this line to use a different -# port number than the default of 1194. -; port 1194 - -# Choose one of three protocols supported by -# OpenVPN. If left commented out, defaults -# to udp. -; proto [tcp-server | tcp-client | udp] - -# You must specify one of two possible network -# protocols, 'dev tap' or 'dev tun' to be used -# on both sides of the connection. 'tap' creates -# a VPN using the ethernet protocol while 'tun' -# uses the IP protocol. You must use 'tap' -# if you are ethernet bridging or want to route -# broadcasts. 'tun' is somewhat more efficient -# but requires configuration of client software -# to not depend on broadcasts. Some platforms -# such as Solaris, OpenBSD, and Mac OS X only -# support 'tun' interfaces, so if you are -# connecting to such a platform, you must also -# use a 'tun' interface on the Windows side. - -# Enable 'dev tap' or 'dev tun' but not both! -dev tap - -# This is a 'dev tap' ifconfig that creates -# a virtual ethernet subnet. -# 10.3.0.1 is the local VPN IP address -# and 255.255.255.0 is the VPN subnet. -# Only define this option for 'dev tap'. -ifconfig 10.3.0.1 255.255.255.0 - -# This is a 'dev tun' ifconfig that creates -# a point-to-point IP link. -# 10.3.0.1 is the local VPN IP address and -# 10.3.0.2 is the remote VPN IP address. -# Only define this option for 'dev tun'. -# Make sure to include the "tun-mtu" option -# on the remote machine, but swap the order -# of the ifconfig addresses. -;tun-mtu 1500 -;ifconfig 10.3.0.1 10.3.0.2 - -# If you have fragmentation issues or misconfigured -# routers in the path which block Path MTU discovery, -# lower the TCP MSS and internally fragment non-TCP -# protocols. -;fragment 1300 -;mssfix - -# If you have set up more than one TAP-Win32 adapter -# on your system, you must refer to it by name. -;dev-node my-tap - -# You can generate a static OpenVPN key -# by selecting the Generate Key option -# in the start menu. -# -# You can also generate key.txt manually -# with the following command: -# openvpn --genkey --secret key.txt -# -# key must match on both ends of the connection, -# so you should generate it on one machine and -# copy it to the other over a secure medium. -# Place key.txt in the same directory as this -# config file. -secret key.txt - -# Uncomment this section for a more reliable -# detection when a system loses its connection. -# For example, dial-ups or laptops that travel -# to other locations. -# -# If this section is enabled and "myremote" -# above is a dynamic DNS name (i.e. dyndns.org), -# OpenVPN will dynamically "follow" the IP -# address of "myremote" if it changes. -; ping-restart 60 -; ping-timer-rem -; persist-tun -; persist-key -; resolv-retry 86400 - -# keep-alive ping -ping 10 - -# enable LZO compression -comp-lzo - -# moderate verbosity -verb 4 -mute 10sample-windows/sample.ovpn new file +103
-1@@ -0,0 +1,103 @@ +# Edit this file, and save to a .ovpn extension +# so that OpenVPN will activate it when run +# as a service. + +# Change 'myremote' to be your remote host, +# or comment out to enter a listening +# server mode. +remote myremote + +# Uncomment this line to use a different +# port number than the default of 1194. +; port 1194 + +# Choose one of three protocols supported by +# OpenVPN. If left commented out, defaults +# to udp. +; proto [tcp-server | tcp-client | udp] + +# You must specify one of two possible network +# protocols, 'dev tap' or 'dev tun' to be used +# on both sides of the connection. 'tap' creates +# a VPN using the ethernet protocol while 'tun' +# uses the IP protocol. You must use 'tap' +# if you are ethernet bridging or want to route +# broadcasts. 'tun' is somewhat more efficient +# but requires configuration of client software +# to not depend on broadcasts. Some platforms +# such as Solaris, OpenBSD, and Mac OS X only +# support 'tun' interfaces, so if you are +# connecting to such a platform, you must also +# use a 'tun' interface on the Windows side. + +# Enable 'dev tap' or 'dev tun' but not both! +dev tap + +# This is a 'dev tap' ifconfig that creates +# a virtual ethernet subnet. +# 10.3.0.1 is the local VPN IP address +# and 255.255.255.0 is the VPN subnet. +# Only define this option for 'dev tap'. +ifconfig 10.3.0.1 255.255.255.0 + +# This is a 'dev tun' ifconfig that creates +# a point-to-point IP link. +# 10.3.0.1 is the local VPN IP address and +# 10.3.0.2 is the remote VPN IP address. +# Only define this option for 'dev tun'. +# Make sure to include the "tun-mtu" option +# on the remote machine, but swap the order +# of the ifconfig addresses. +;tun-mtu 1500 +;ifconfig 10.3.0.1 10.3.0.2 + +# If you have fragmentation issues or misconfigured +# routers in the path which block Path MTU discovery, +# lower the TCP MSS and internally fragment non-TCP +# protocols. +;fragment 1300 +;mssfix + +# If you have set up more than one TAP-Win32 adapter +# on your system, you must refer to it by name. +;dev-node my-tap + +# You can generate a static OpenVPN key +# by selecting the Generate Key option +# in the start menu. +# +# You can also generate key.txt manually +# with the following command: +# openvpn --genkey --secret key.txt +# +# key must match on both ends of the connection, +# so you should generate it on one machine and +# copy it to the other over a secure medium. +# Place key.txt in the same directory as this +# config file. +secret key.txt + +# Uncomment this section for a more reliable +# detection when a system loses its connection. +# For example, dial-ups or laptops that travel +# to other locations. +# +# If this section is enabled and "myremote" +# above is a dynamic DNS name (i.e. dyndns.org), +# OpenVPN will dynamically "follow" the IP +# address of "myremote" if it changes. +; ping-restart 60 +; ping-timer-rem +; persist-tun +; persist-key +; resolv-retry 86400 + +# keep-alive ping +ping 10 + +# enable LZO compression +comp-lzo + +# moderate verbosity +verb 4 +mute 10 --
Quoted 3 lines
1.7.3.4
Just wondering... why not move sample.ovpn to "sample-config-files" directory?
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
Re: [Openvpn-devel] [PATCH 17/52] Remove install-win32
In reply to Alon Bar-LevThe "install-win32" directory is obsolete, and will be even more so with this new buildsystem.
ACK.
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
Quoted 2,703 lines
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/setpath.nsi | 231 --------- install-win32/settings.in | 71 --- install-win32/trans.pl | 97 ---- install-win32/u2d.c | 20 - install-win32/winconfig | 18 - 35 files changed, 1 insertions(+), 2163 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/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/winconfigMakefile.am +1
-4@@ -51,10 +51,7 @@ EXTRA_DIST = \ plugins \ win -SUBDIRS = \ - images \ - service-win32 \ - install-win32 +SUBDIRS = service-win32 TESTS = t_client.sh t_lpback.sh t_cltsrv.sh sbin_PROGRAMS = openvpnconfigure.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.inimages/Makefile.am deleted +0
-41@@ -1,41 +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) 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 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 -# - -MAINTAINERCLEANFILES = $(srcdir)/Makefile.in - -images = \ - install-whirl.bmp \ - icon.ico - -if WIN32 - -imagedir = $(win32datadir)/images -dist_image_DATA = $(images) - -else - -dist_noinst_DATA = $(images) - -endif -images/icon.ico deleted binary +0
-0zcmeHP2Xs
$*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)[email protected]...=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][email protected]...}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(a3Cimages/install-whirl.bmp deleted binary +0
-0z=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_nz8K9&%{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* [email protected]...>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!<[email protected]...|3ZaJigYIrS<St{g0uJCX{9%jMk4 hsaL^p<zTVgkyJ2TF6UNGy$Xga2aDy7#QdL1{tGA-a#jEUinstall-win32/.svnignore deleted +0
-4@@ -1,4 +0,0 @@ -*.o -Makefile.in -settings -Makefileinstall-win32/GetWindowsVersion.nsi deleted +0
-109@@ -1,109 +0,0 @@ -; Turn off old selected section -; GetWindowsVersion -; -; Based on Yazno's function -; Updated by Joost Verburg -; Updated for Windows 98 SE by Matthew Win Tibbals 5-21-03 -; Updated for Vista by Joe Cincotta 12-2-07 -; -; Returns on top of stack -; -; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003, VISTA) -; or -; '' (Unknown Windows Version) -; -; Usage: -; Call GetWindowsVersion -; Pop $R0 -; ; at this point $R0 is "NT 4.0" or whatnot -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function GetWindowsVersion - - Push $R0 - Push $R1 - - ClearErrors - - ReadRegStr $R0 HKLM \ - "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion - - IfErrors 0 lbl_winnt - - ; we are not NT - ReadRegStr $R0 HKLM \ - "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber - - StrCpy $R1 $R0 1 - StrCmp $R1 '4' 0 lbl_error - - StrCpy $R1 $R0 3 - - StrCmp $R1 '4.0' lbl_win32_95 - StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98 - - lbl_win32_95: - StrCpy $R0 '95' - Goto lbl_done - - lbl_win32_98: -;;beginning of additions to support win 98 SE - push $R0 - push "." - call strstr - pop $R0 - StrCpy $R0 $R0 "" 1 - StrCmp $R0 "10.2222" lbl_win32_98SE - StrCpy $R0 '98' ;;this line was not added - Goto lbl_done ;;this line was not added either - - lbl_win32_98SE: - StrCpy $R0 '98 SE' - Goto lbl_done -;;end of additions to support win 98 SE - lbl_win32_ME: - StrCpy $R0 'ME' - Goto lbl_done - - lbl_winnt: - - StrCpy $R1 $R0 1 - - StrCmp $R1 '3' lbl_winnt_x - StrCmp $R1 '4' lbl_winnt_x - - StrCpy $R1 $R0 3 - - StrCmp $R1 '5.0' lbl_winnt_2000 - StrCmp $R1 '5.1' lbl_winnt_XP - StrCmp $R1 '5.2' lbl_winnt_2003 - StrCmp $R1 '6.0' lbl_winnt_VISTA lbl_error - - lbl_winnt_x: - StrCpy $R0 "NT $R0" 6 - Goto lbl_done - - lbl_winnt_2000: - Strcpy $R0 '2000' - Goto lbl_done - - lbl_winnt_XP: - Strcpy $R0 'XP' - Goto lbl_done - - lbl_winnt_2003: - Strcpy $R0 '2003' - Goto lbl_done - - lbl_winnt_VISTA: - Strcpy $R0 'VISTA' - Goto lbl_done - - lbl_error: - Strcpy $R0 '' - lbl_done: - - Pop $R1 - Exch $R0 - -FunctionEnd -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;install-win32/Makefile.am deleted +0
-97@@ -1,97 +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) 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 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 -# - -MAINTAINERCLEANFILES = $(srcdir)/Makefile.in - -dist_noinst_DATA = \ - openssl \ - GetWindowsVersion.nsi \ - build-pkcs11-helper.sh \ - buildinstaller \ - ddk-common \ - doclean \ - dosname.pl \ - getgui \ - getopenssl \ - getpkcs11helper \ - getprebuilt \ - getxgui \ - ifdef.pl \ - m4todef.pl \ - macro.pl \ - makeopenvpn \ - maketap \ - maketapinstall \ - maketext \ - openvpn.nsi \ - setpath.nsi \ - settings.in \ - trans.pl \ - u2d.c \ - winconfig - -if WIN32 - -nodist_doc_DATA = tmp/license.txt - -confdir = $(win32datadir)/config -nodist_conf_DATA = \ - tmp/openssl-1.0.0.cnf \ - tmp/client.ovpn \ - tmp/server.ovpn -dist_conf_DATA = \ - sample.ovpn - -easyrsadir = $(win32datadir)/easy-rsa/Windows -nodist_easyrsa_DATA = \ - $(top_srcdir)/easy-rsa/Windows/* - -keysdir = $(win32datadir)/sample-keys -nodist_keys_DATA = \ - $(top_srcdir)/sample-keys/* - -tmp: - mkdir tmp - -tmp/client.ovpn: tmp $(top_srcdir)/sample-config-files/client.conf - cp $(top_srcdir)/sample-config-files/client.conf tmp/client.ovpn - -tmp/server.ovpn: tmp $(top_srcdir)/sample-config-files/server.conf - cp $(top_srcdir)/sample-config-files/server.conf tmp/server.ovpn - -tmp/license.txt: tmp $(top_srcdir)/COPYING $(top_srcdir)/COPYRIGHT.GPL - cat $(top_srcdir)/COPYING $(top_srcdir)/COPYRIGHT.GPL > tmp/license.txt - -tmp/openssl-1.0.0.cnf: tmp $(top_srcdir)/easy-rsa/2.0/openssl-1.0.0.cnf - cp $(top_srcdir)/easy-rsa/2.0/openssl-1.0.0.cnf tmp/openssl-1.0.0.cnf - -clean-local: - -rm -fr tmp - -else - -dist_noinst_DATA += sample.ovpn - -endif -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=noinstall-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)" -fiinstall-win32/ddk-common deleted +0
-2@@ -1,2 +0,0 @@ -# DDKs <= 5600 use "AMD64", later use "x64" -x64_tag=x64install-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" ./docleaninstall-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 -fiinstall-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 -fiinstall-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 -fiinstall-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 -fiinstall-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 -fiinstall-win32/ifdef.pl deleted +0
-53@@ -1,53 +0,0 @@ -#!/usr/bin/perl - -# Simple ifdef/else/endif processor. - -die "usage: ifdef [-C<command-prefix>] [-Dname ...] [control-file ...] " if (@ARGV[0] =~ /^(-h|--help)$/); - -%Parms = (); - -$pre = "!"; -while ($arg=shift(@ARGV)) { - if ($arg =~ /^-/) { - if ($arg =~ /^-D(\w+)$/) { - $Parms{$1} = 1; - } elsif ($arg =~ /-C(.*)$/) { - $pre = $1; - } else { - die "unrecognized option: $arg"; - } - } else { - open(CONTROL, "< $arg") or die "cannot open $arg"; - while (<CONTROL>) { - if (/^!define\s+(\w+)/) { - $Parms{$1} = 1; - } - } - } -} - -sub ifdef { - my ($var, $enabled) = @_; - my $def = 0; - $def = 1 if (defined $Parms{$var}) || ($var eq "true"); - $def = 0 if $var eq "false"; - while (<STDIN>) { - if (/^\s*\Q$pre\Eifdef\s+(\w+)\s*$/) { - return 1 if ifdef ($1, $def & $enabled); - } elsif (/^\s*\Q$pre\Eelseif\s+(\w+)\s*$/) { - $def = $def ^ 1; - return ifdef ($1, $def & $enabled); - } elsif (/^\s*\Q$pre\Eelse\s*$/) { - $def = $def ^ 1; - } elsif (/^\s*\Q$pre\Eendif\s*$/) { - return 0; - } elsif (/^\s*\Q$pre\E/) { - die "unrecognized command: $_"; - } else { - print if $def && $enabled; - } - } - return 1; -} - -ifdef("true", 1);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@@ -1,61 +0,0 @@ -#!/usr/bin/perl - -# Simple macro processor. - -# Macros are defined in a control file that follows -# a simple definition-based grammar as documented in the -# trans script. Stdin is then copied to stdout, and any -# occurrence of @@MACRO@@ is substituted. Macros can also -# be specified on the command line. - -die "usage: macro [-O<openquote>] [-C<closequote>] [-Dname=var ...] [control-file ...] " if (@ARGV < 1); - -%Parms = (); -$open_quote = "@@"; -$close_quote = "@@"; - -while ($arg=shift(@ARGV)) { - if ($arg =~ /^-/) { - if ($arg =~ /^-D(\w+)(?:=(.*))?$/) { - $Parms{$1} = $2 - } elsif ($arg =~ /-O(.*)$/) { - $open_quote = $1; - } elsif ($arg =~ /-C(.*)$/) { - $close_quote = $1; - } else { - die "unrecognized option: $arg"; - } - } else { - open(CONTROL, "< $arg") or die "cannot open $arg"; - while (<CONTROL>) { - if (/^!define\s+(\w+)(?:\s+['"]?(.*?)['"]?)?\s*$/) { - $Parms{$1} = $2; - } - } - } -} - -sub print_symbol_table { - foreach my $k (sort (keys(%Parms))) { - my $v = $Parms{$k}; - print "[$k] -> \"$v\"\n"; - } -} - -#print_symbol_table (); -#exit 0; - -while (<STDIN>) { - s{ - \Q$open_quote\E - \s* - ( - \w+ - ) - \s* - \Q$close_quote\E - }{ - $Parms{$1} - }xge; - print; -}install-win32/makeopenvpn deleted +0
-67@@ -1,67 +0,0 @@ -#!/bin/sh - -H=`pwd` - -case "`uname -o 2>/dev/null`" in - *inux) - - # cross-compiling, make dude's life easier - XAUTOCONF="--host=i586-mingw32msvc --build=i386-linux $XAUTOCONF" - export CC=i586-mingw32msvc-gcc - export CXXCPP=i586-mingw32msvc-cpp - export CXX=i586-mingw32msvc-g++ - # this requires the human to setup these environ vars: - # OPENSSL_DIR LZO_DIR PKCS11_HELPER_DIR - OPENSSL_INC_DIR=$OPENSSL_DIR/include - OPENSSL_LIB_DIR=$OPENSSL_DIR/out - LZO_INC_DIR=$LZO_DIR/include - LZO_LIB_DIR=$LZO_DIR/src/.libs - PKCS11_INC_DIR=$PKCS11_HELPER_DIR/include/pkcs11-helper-1.0/ - PKCS11_LIB_DIR=$PKCS11_HELPER_DIR/lib/.libs/ - ;; - *) - # get version.nsi definitions - . autodefs/defs.sh - XAUTOCONF="" - # default configuration creates relative-path environ vars: - OPENSSL_INC_DIR=$H/$OPENSSL_DIR/include - OPENSSL_LIB_DIR=$H/$OPENSSL_DIR/out - LZO_INC_DIR=$H/$LZO_DIR/include - LZO_LIB_DIR=$H/$LZO_DIR - PKCS11_INC_DIR=$H/$PKCS11_HELPER_DIR/usr/local/include - PKCS11_LIB_DIR=$H/$PKCS11_HELPER_DIR/usr/local/lib - ;; -esac -if $CC --version &>/dev/null && [ -d "$OPENSSL_DIR" ] && [ -d "$LZO_DIR" ] && [ -d "$PKCS11_HELPER_DIR" ]; then - # build OpenVPN binary - - if ! [ -f Makefile ]; then - autoreconf -i -v \ - && ./configure $XAUTOCONF \ - --enable-strict \ - --prefix=$H/windest \ - MAN2HTML=true \ - --with-ssl-headers=$OPENSSL_INC_DIR \ - --with-ssl-lib=$OPENSSL_LIB_DIR \ - --with-lzo-headers=$LZO_INC_DIR \ - --with-lzo-lib=$LZO_LIB_DIR \ - --with-pkcs11-helper-headers=$PKCS11_INC_DIR \ - --with-pkcs11-helper-lib=$PKCS11_LIB_DIR \ - || exit 1 - fi - - make -j $MAKE_JOBS && make install - - if [ -n "$GENOOUT" ];then - # copy OpenVPN and service executables to GENOUT/bin - mkdir -p $GENOUT/bin &>/dev/null - cp windest/sbin/openvpn.exe $GENOUT/bin - cp windest/sbin/openvpnserv.exe $GENOUT/bin - if [ -z "$NO_STRIP" ]; then - strip $GENOUT/bin/openvpn.exe - strip $GENOUT/bin/openvpnserv.exe - fi - fi -else - echo DID NOT BUILD openvpn.exe and openvpnserv.exe because one or more of gcc, OPENSSL_DIR, LZO_DIR, or PKCS11_HELPER_DIR directories were missing -fiinstall-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 -fiinstall-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 -fiinstall-win32/maketext deleted +0
-59@@ -1,59 +0,0 @@ -#!/bin/sh - -# get version.nsi definitions -. autodefs/defs.sh - -mkdir -p $GENOUT/text &>/dev/null - -# build license file -cat COPYING COPYRIGHT.GPL >$GENOUT/text/license.txt - -# copy install file -cp INSTALL-win32.txt $GENOUT/text/INSTALL-win32.txt - -# copy sample configuration files and docs -s=$GENOUT/samples -mkdir -p $s &>/dev/null -cp sample-config-files/client.conf $s/client.$PRODUCT_FILE_EXT -cp sample-config-files/server.conf $s/server.$PRODUCT_FILE_EXT -cp install-win32/sample.ovpn $s/sample.$PRODUCT_FILE_EXT - -# get easy-rsa (Windows) -e=$GENOUT/easy-rsa -mkdir -p $e &>/dev/null -cp easy-rsa/1.0/openssl.cnf $e/openssl.cnf.sample -cp easy-rsa/Windows/* $e - -# get images -i=$GENOUT/images -mkdir -p $i &>/dev/null -cp images/*.ico $i -cp images/*.bmp $i - -# get NSI files -n=$GENOUT/nsi -mkdir -p $n &>/dev/null -cp autodefs/defs.nsi $n -cp autodefs/guidefs.nsi $n -cp autodefs/xguidefs.nsi $n -cp install-win32/openvpn.nsi $n -cp install-win32/setpath.nsi $n -cp install-win32/GetWindowsVersion.nsi $n - -if [ -n "$EXTRACT_FILES" ]; then - cp "$EXTRACT_FILES/MultiFileExtract.nsi" $n -fi - -# get OpenVPN client config files -if [ -n "$SAMPCONF_DIR" ]; then - c=$GENOUT/conf - mkdir -p $c &>/dev/null - test -n "$SAMPCONF_CONF" && cp "../$SAMPCONF_DIR/$SAMPCONF_CONF" $c - test -n "$SAMPCONF_CONF2" && cp "../$SAMPCONF_DIR/$SAMPCONF_CONF2" $c - test -n "$SAMPCONF_P12" && cp "../$SAMPCONF_DIR/$SAMPCONF_P12" $c - test -n "$SAMPCONF_TA" && cp "../$SAMPCONF_DIR/$SAMPCONF_TA" $c - test -n "$SAMPCONF_CA" && cp "../$SAMPCONF_DIR/$SAMPCONF_CA" $c - test -n "$SAMPCONF_CRT" && cp "../$SAMPCONF_DIR/$SAMPCONF_CRT" $c - test -n "$SAMPCONF_KEY" && cp "../$SAMPCONF_DIR/$SAMPCONF_KEY" $c - test -n "$SAMPCONF_DH" && cp "../$SAMPCONF_DIR/$SAMPCONF_DH" $c -fiinstall-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.patchinstall-win32/openssl/openssl097.patch deleted +0
-68@@ -1,68 +0,0 @@ -[in msys bash window] -cd /c/src/openssl-0.9.7m -patch -p1 <../21/install-win32/openssl.patch - -[open command prompt window] -cd \src\openssl-0.9.7m -ms\mw - -diff -wur openssl-0.9.7m.orig/ms/mw.bat openssl-0.9.7m/ms/mw.bat ---- openssl-0.9.7m.orig/ms/mw.bat Sat Feb 22 11:02:46 2003 -+++ openssl-0.9.7m/ms/mw.bat Mon Jan 21 23:12:34 2008 -@@ -1,17 +1,23 @@ - @rem OpenSSL with Mingw32 - @rem -------------------- - -+@rem Include MinGW, MSYS, and ActiveState Perl in path -+set PATH=c:\perl\bin;c:\MinGW\bin;c:\msys\1.0\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem -+ - @rem Makefile - perl util\mkfiles.pl >MINFO --perl util\mk1mf.pl Mingw32 >ms\mingw32.mak -+perl util\mk1mf.pl no-idea no-mdc2 no-rc5 Mingw32 >ms\mingw32.mak -+ - @rem DLL definition files --perl util\mkdef.pl 32 libeay >ms\libeay32.def -+perl util\mkdef.pl no-idea no-mdc2 no-rc5 32 libeay >ms\libeay32.def - if errorlevel 1 goto end --perl util\mkdef.pl 32 ssleay >ms\ssleay32.def -+perl util\mkdef.pl no-idea no-mdc2 no-rc5 32 ssleay >ms\ssleay32.def - if errorlevel 1 goto end - - @rem Build the libraries --make -f ms/mingw32.mak -+ -+@rem JY added --win32 flag -+make --win32 -f ms/mingw32.mak - if errorlevel 1 goto end - - @rem Generate the DLLs and input libraries -@@ -20,7 +26,9 @@ - dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a - if errorlevel 1 goto end - -+@rem JY added openssl.exe linked to DLL -+gcc -o openssl tmp\verify.o tmp\asn1pars.o tmp\req.o tmp\dgst.o tmp\dh.o tmp\dhparam.o tmp\enc.o tmp\passwd.o tmp\gendh.o tmp\errstr.o tmp\ca.o tmp\pkcs7.o tmp\crl2p7.o tmp\crl.o tmp\rsa.o tmp\rsautl.o tmp\dsa.o tmp\dsaparam.o tmp\x509.o tmp\genrsa.o tmp\gendsa.o tmp\s_server.o tmp\s_client.o tmp\speed.o tmp\s_time.o tmp\apps.o tmp\s_cb.o tmp\s_socket.o tmp\app_rand.o tmp\version.o tmp\sess_id.o tmp\ciphers.o tmp\nseq.o tmp\pkcs12.o tmp\pkcs8.o tmp\spkac.o tmp\smime.o tmp\rand.o tmp\engine.o tmp\ocsp.o tmp\prime.o tmp\openssl.o -leay32 -lssl32 -L. -lwsock32 -lgdi32 -+ - echo Done compiling OpenSSL - - :end -- -diff -wur openssl-0.9.7m.orig/util/pl/Mingw32.pl openssl-0.9.7m/util/pl/Mingw32.pl ---- openssl-0.9.7m.orig/util/pl/Mingw32.pl Sun May 16 23:28:32 2004 -+++ openssl-0.9.7m/util/pl/Mingw32.pl Mon Jan 21 17:52:36 2008 -@@ -99,10 +99,10 @@ - $n=&bname($target); - $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; -- if (defined $sha1file) -- { -- $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; -- } -+# if (defined $sha1file) -+# { -+# $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; -+# } - $ret.="\n"; - return($ret); - }install-win32/openssl/openssl098.patch deleted +0
-56@@ -1,56 +0,0 @@ -diff -urw tmp/openssl-0.9.8h/crypto/pqueue/pqueue.c openssl-0.9.8h/crypto/pqueue/pqueue.c ---- tmp/openssl-0.9.8h/crypto/pqueue/pqueue.c Tue Jun 28 06:53:34 2005 -+++ openssl-0.9.8h/crypto/pqueue/pqueue.c Wed Jun 4 02:52:42 2008 -@@ -199,10 +199,10 @@ - return found; - } - --#if PQ_64BIT_IS_INTEGER - void - pqueue_print(pqueue_s *pq) - { -+#if PQ_64BIT_IS_INTEGER - pitem *item = pq->items; - - while(item != NULL) -@@ -210,8 +210,8 @@ - printf("item\t" PQ_64BIT_PRINT "\n", item->priority); - item = item->next; - } -- } - #endif -+ } - - pitem * - pqueue_iterator(pqueue_s *pq) -diff -urw tmp/openssl-0.9.8h/ms/mw.bat openssl-0.9.8h/ms/mw.bat ---- tmp/openssl-0.9.8h/ms/mw.bat Sat Feb 22 11:00:10 2003 -+++ openssl-0.9.8h/ms/mw.bat Wed Jun 4 02:56:54 2008 -@@ -1,17 +1,23 @@ - @rem OpenSSL with Mingw32 - @rem -------------------- - -+@rem Include MinGW, MSYS, and ActiveState Perl in path -+set PATH=c:\bin;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\MinGW\bin;c:\msys\1.0\bin -+ - @rem Makefile - perl util\mkfiles.pl >MINFO --perl util\mk1mf.pl Mingw32 >ms\mingw32.mak -+perl util\mk1mf.pl no-idea no-mdc2 no-rc5 Mingw32 >ms\mingw32.mak -+ - @rem DLL definition files --perl util\mkdef.pl 32 libeay >ms\libeay32.def -+perl util\mkdef.pl no-idea no-mdc2 no-rc5 32 libeay >ms\libeay32.def - if errorlevel 1 goto end --perl util\mkdef.pl 32 ssleay >ms\ssleay32.def -+perl util\mkdef.pl no-idea no-mdc2 no-rc5 32 ssleay >ms\ssleay32.def - if errorlevel 1 goto end - - @rem Build the libraries --make -f ms/mingw32.mak -+ -+@rem JY added --win32 -+make --win32 -f ms/mingw32.mak - if errorlevel 1 goto end - - @rem Generate the DLLs and input librariesinstall-win32/openvpn.nsi deleted +0
-886@@ -1,886 +0,0 @@ -; **************************************************************************** -; * Copyright (C) 2002-2010 OpenVPN Technologies, Inc. * -; * This program is free software; you can redistribute it and/or modify * -; * it under the terms of the GNU General Public License version 2 * -; * as published by the Free Software Foundation. * -; **************************************************************************** - -; OpenVPN install script for Windows, using NSIS - -SetCompressor lzma - -!include "MUI.nsh" - -!include "defs.nsi" -!include "guidefs.nsi" -!include "xguidefs.nsi" -!include "setpath.nsi" -!include "GetWindowsVersion.nsi" - -!ifdef EXTRACT_FILES -!include "MultiFileExtract.nsi" -!endif - -!define GEN ".." -!define BIN "${GEN}\bin" -!define LIB "${GEN}\lib" - -; Which GUI to use (XGUI has priority). -; We will define either USE_XGUI (XML-based version) or -; USE_GUI (Mathias Sundman version) but not both. -!ifdef OPENVPN_XGUI_DEFINED -!define USE_XGUI -!else -!ifdef OPENVPN_GUI_DEFINED -!define USE_GUI -!endif -!endif - -!define PRODUCT_ICON "icon.ico" - -!ifdef USE_XGUI -!define XGUI_POSTFIX "X" -!else -!define XGUI_POSTFIX "" -!endif - -!ifdef PRODUCT_TAP_DEBUG -!define DBG_POSTFIX "-DBG" -!else -!define DBG_POSTFIX "" -!endif - -!define VERSION "${PRODUCT_VERSION}${XGUI_POSTFIX}${DBG_POSTFIX}" - -!define TAP "${PRODUCT_TAP_ID}" -!define TAPDRV "${TAP}.sys" - -; Default service settings -!define SERV_CONFIG_DIR "$INSTDIR\config" -!define SERV_CONFIG_EXT "${PRODUCT_FILE_EXT}" -!define SERV_EXE_PATH "$INSTDIR\bin\${PRODUCT_UNIX_NAME}.exe" -!define SERV_LOG_DIR "$INSTDIR\log" -!define SERV_PRIORITY "NORMAL_PRIORITY_CLASS" -!define SERV_LOG_APPEND "0" - -; XGUI variables -!define XGUI_EXE ovpn-xgui-en.exe -!define XGUI_TRAY ovpn-tray.exe -!define XGUI_XMLSERV ovpn-xmlserv.exe -!define XGUI_HTDOCS htdocs - -!define XGUI_AJAX_GUI_NAME "${PRODUCT_NAME} Ajax GUI" -!define XGUI_TRANSITION_GUI_NAME "${PRODUCT_NAME} Transitional GUI" - -;-------------------------------- -;Configuration - - ;General - - OutFile "${GEN}\${PRODUCT_UNIX_NAME}-${VERSION}${OUTFILE_LABEL}-install.exe" - - ShowInstDetails show - ShowUninstDetails show - - ;Folder selection page - InstallDir "$PROGRAMFILES\${PRODUCT_NAME}" - - ;Remember install folder - InstallDirRegKey HKCU "Software\${PRODUCT_NAME}" "" - -;-------------------------------- -;Modern UI Configuration - - Name "${PRODUCT_NAME} ${VERSION} ${TITLE_LABEL}" - - !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of ${PRODUCT_NAME}, an Open Source VPN package by James Yonan.\r\n\r\nNote that the Windows version of ${PRODUCT_NAME} will only run on Win 2000, XP, or higher.\r\n\r\n\r\n" - - !define MUI_COMPONENTSPAGE_TEXT_TOP "Select the components to install/upgrade. Stop any ${PRODUCT_NAME} processes or the ${PRODUCT_NAME} service if it is running. All DLLs are installed locally." - - !define MUI_COMPONENTSPAGE_SMALLDESC - !ifdef USE_XGUI - !define MUI_FINISHPAGE_SHOWREADME "http://openvpn.net/" - !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED - !else - !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\INSTALL-win32.txt" - !endif - !define MUI_FINISHPAGE_NOAUTOCLOSE - !define MUI_ABORTWARNING - !define MUI_ICON "${GEN}\images\${PRODUCT_ICON}" - !define MUI_UNICON "${GEN}\images\${PRODUCT_ICON}" - !define MUI_HEADERIMAGE - !define MUI_HEADERIMAGE_BITMAP "${GEN}\images\install-whirl.bmp" - !define MUI_UNFINISHPAGE_NOAUTOCLOSE - - !insertmacro MUI_PAGE_WELCOME - !insertmacro MUI_PAGE_LICENSE "${GEN}\text\license.txt" - !insertmacro MUI_PAGE_COMPONENTS - !insertmacro MUI_PAGE_DIRECTORY - !insertmacro MUI_PAGE_INSTFILES - !insertmacro MUI_PAGE_FINISH - - !insertmacro MUI_UNPAGE_CONFIRM - !insertmacro MUI_UNPAGE_INSTFILES - !insertmacro MUI_UNPAGE_FINISH - - -;-------------------------------- -;Languages - - !insertmacro MUI_LANGUAGE "English" - -;-------------------------------- -;Language Strings - - LangString DESC_SecOpenVPNUserSpace ${LANG_ENGLISH} "Install ${PRODUCT_NAME} user-space components, including ${PRODUCT_UNIX_NAME}.exe." - -!ifdef USE_GUI - LangString DESC_SecOpenVPNGUI ${LANG_ENGLISH} "Install ${PRODUCT_NAME} GUI by Mathias Sundman" -!endif - -!ifdef USE_XGUI - LangString DESC_SecOpenVPNXGUI ${LANG_ENGLISH} "Install ${PRODUCT_NAME} XML-based GUI" -!endif - - LangString DESC_SecOpenVPNEasyRSA ${LANG_ENGLISH} "Install ${PRODUCT_NAME} RSA scripts for X509 certificate management." - - LangString DESC_SecOpenSSLDLLs ${LANG_ENGLISH} "Install OpenSSL DLLs locally (may be omitted if DLLs are already installed globally)." - - LangString DESC_SecPKCS11DLLs ${LANG_ENGLISH} "Install PKCS#11 helper DLLs locally (may be omitted if DLLs are already installed globally)." - - LangString DESC_SecTAP ${LANG_ENGLISH} "Install/Upgrade the TAP virtual device driver. Will not interfere with CIPE." - - LangString DESC_SecService ${LANG_ENGLISH} "Install the ${PRODUCT_NAME} service wrapper (${PRODUCT_UNIX_NAME}serv.exe)" - - LangString DESC_SecOpenSSLUtilities ${LANG_ENGLISH} "Install the OpenSSL Utilities (used for generating public/private key pairs)." - - LangString DESC_SecAddPath ${LANG_ENGLISH} "Add ${PRODUCT_NAME} executable directory to the current user's PATH." - - LangString DESC_SecAddShortcuts ${LANG_ENGLISH} "Add ${PRODUCT_NAME} shortcuts to the current user's Start Menu." - - LangString DESC_SecFileAssociation ${LANG_ENGLISH} "Register ${PRODUCT_NAME} config file association (*.${SERV_CONFIG_EXT})" - -;-------------------------------- -;Reserve Files - - ;Things that need to be extracted on first (keep these lines before any File command!) - ;Only useful for BZIP2 compression - - ReserveFile "${GEN}\images\install-whirl.bmp" - -;-------------------------------- -;Macros - -!macro WriteRegStringIfUndef ROOT SUBKEY KEY VALUE -Push $R0 -ReadRegStr $R0 "${ROOT}" "${SUBKEY}" "${KEY}" -StrCmp $R0 "" +1 +2 -WriteRegStr "${ROOT}" "${SUBKEY}" "${KEY}" '${VALUE}' -Pop $R0 -!macroend - -!macro DelRegStringIfUnchanged ROOT SUBKEY KEY VALUE -Push $R0 -ReadRegStr $R0 "${ROOT}" "${SUBKEY}" "${KEY}" -StrCmp $R0 '${VALUE}' +1 +2 -DeleteRegValue "${ROOT}" "${SUBKEY}" "${KEY}" -Pop $R0 -!macroend - -!macro DelRegKeyIfUnchanged ROOT SUBKEY VALUE -Push $R0 -ReadRegStr $R0 "${ROOT}" "${SUBKEY}" "" -StrCmp $R0 '${VALUE}' +1 +2 -DeleteRegKey "${ROOT}" "${SUBKEY}" -Pop $R0 -!macroend - -!macro DelRegKeyIfEmpty ROOT SUBKEY -Push $R0 -EnumRegValue $R0 "${ROOT}" "${SUBKEY}" 1 -StrCmp $R0 "" +1 +2 -DeleteRegKey /ifempty "${ROOT}" "${SUBKEY}" -Pop $R0 -!macroend - -;------------------------------------------ -;Set reboot flag based on tapinstall return - -Function CheckReboot - IntCmp $R0 1 "" noreboot noreboot - IntOp $R0 0 & 0 - SetRebootFlag true - DetailPrint "REBOOT flag set" - noreboot: -FunctionEnd - -;-------------------------------- -;Installer Sections - -Function .onInit - ClearErrors - -# Verify that user has admin privs - UserInfo::GetName - IfErrors ok - Pop $R0 - UserInfo::GetAccountType - Pop $R1 - StrCmp $R1 "Admin" ok - Messagebox MB_OK "Administrator privileges required to install ${PRODUCT_NAME} [$R0/$R1]" - Abort - ok: - -# Delete previous start menu - RMDir /r $SMPROGRAMS\${PRODUCT_NAME} - -!ifdef CHECK_WINDOWS_VERSION -# Check windows version - Call GetWindowsVersion - Pop $1 - StrCmp $1 "2000" goodwinver - StrCmp $1 "XP" goodwinver - StrCmp $1 "2003" goodwinver - StrCmp $1 "VISTA" goodwinver - - Messagebox MB_OK "Sorry, ${PRODUCT_NAME} does not currently support Windows $1" - Abort - -goodwinver: - System::Call "kernel32::GetCurrentProcess() i .s" - System::Call "kernel32::IsWow64Process(i s, *i .r0)" - IntCmp $0 0 init32bits - - ; we are running on 64-bit windows - StrCmp $1 "VISTA" vista64bummer - -# Messagebox MB_OK "Sorry, ${PRODUCT_NAME} doesn't currently support 64-bit Windows." -# Abort - -vista64bummer: - -# Messagebox MB_OK "Sorry, ${PRODUCT_NAME} doesn't currently support 64-bit Vista because Microsoft doesn't allow the installation of 64 bit unsigned drivers." -# Abort - -init32bits: - -!endif - -FunctionEnd - -!ifndef SF_SELECTED -!define SF_SELECTED 1 -!endif - -;-------------------- -;Pre-install section - -Section -pre - - ; Stop OpenVPN if currently running - DetailPrint "Previous Service REMOVE (if exists)" - nsExec::ExecToLog '"$INSTDIR\bin\${PRODUCT_UNIX_NAME}serv.exe" -remove' - Pop $R0 # return value/error/timeout - -!ifdef USE_XGUI - DetailPrint "Previous XML Service REMOVE (if exists)" - nsExec::ExecToLog '"$INSTDIR\bin\${XGUI_XMLSERV}" -remove' - Pop $R0 # return value/error/timeout -!endif - - Sleep 3000 - -SectionEnd - -Section "${PRODUCT_NAME} User-Space Components" SecOpenVPNUserSpace - - SetOverwrite on - SetOutPath "$INSTDIR\bin" - - File "${BIN}\${PRODUCT_UNIX_NAME}.exe" - -SectionEnd - -!ifdef USE_GUI -Section "${PRODUCT_NAME} GUI" SecOpenVPNGUI - - SetOverwrite on - SetOutPath "$INSTDIR\bin" - - File "${BIN}\${OPENVPN_GUI}" - -SectionEnd -!endif - -!ifdef USE_XGUI -Section "${PRODUCT_NAME} XML-based GUI" SecOpenVPNXGUI - - SetOverwrite on - - SetOutPath "$INSTDIR\bin" - File "${BIN}\${XGUI_EXE}" - File "${BIN}\${XGUI_TRAY}" - File "${BIN}\${XGUI_XMLSERV}" - - SetOutPath "$INSTDIR\${XGUI_HTDOCS}" - File "${GEN}\${XGUI_HTDOCS}\*.*" - -SectionEnd -!endif - -Section "${PRODUCT_NAME} RSA Certificate Management Scripts" SecOpenVPNEasyRSA - - SetOverwrite on - SetOutPath "$INSTDIR\easy-rsa" - - File "${GEN}\easy-rsa\openssl-1.0.0.cnf" - File "${GEN}\easy-rsa\vars.bat.sample" - - File "${GEN}\easy-rsa\init-config.bat" - - File "${GEN}\easy-rsa\README.txt" - File "${GEN}\easy-rsa\build-ca.bat" - File "${GEN}\easy-rsa\build-dh.bat" - File "${GEN}\easy-rsa\build-key-server.bat" - File "${GEN}\easy-rsa\build-key.bat" - File "${GEN}\easy-rsa\build-key-pkcs12.bat" - File "${GEN}\easy-rsa\clean-all.bat" - File "${GEN}\easy-rsa\index.txt.start" - File "${GEN}\easy-rsa\revoke-full.bat" - File "${GEN}\easy-rsa\serial.start" - -SectionEnd - -Section "${PRODUCT_NAME} Service" SecService - - SetOverwrite on - - SetOutPath "$INSTDIR\bin" - File "${BIN}\${PRODUCT_UNIX_NAME}serv.exe" - - SetOutPath "$INSTDIR\config" - - FileOpen $R0 "$INSTDIR\config\README.txt" w - FileWrite $R0 "This directory should contain ${PRODUCT_NAME} configuration files$\r$\n" - FileWrite $R0 "each having an extension of .${SERV_CONFIG_EXT}$\r$\n" - FileWrite $R0 "$\r$\n" - FileWrite $R0 "When ${PRODUCT_NAME} is started as a service, a separate ${PRODUCT_NAME}$\r$\n" - FileWrite $R0 "process will be instantiated for each configuration file.$\r$\n" - FileClose $R0 - - SetOutPath "$INSTDIR\sample-config" - File "${GEN}\samples\sample.${SERV_CONFIG_EXT}" - File "${GEN}\samples\client.${SERV_CONFIG_EXT}" - File "${GEN}\samples\server.${SERV_CONFIG_EXT}" - - CreateDirectory "$INSTDIR\log" - FileOpen $R0 "$INSTDIR\log\README.txt" w - FileWrite $R0 "This directory will contain the log files for ${PRODUCT_NAME}$\r$\n" - FileWrite $R0 "sessions which are being run as a service.$\r$\n" - FileClose $R0 - -SectionEnd - -Section "${PRODUCT_NAME} File Associations" SecFileAssociation -SectionEnd - -Section "OpenSSL DLLs" SecOpenSSLDLLs - - SetOverwrite on - SetOutPath "$INSTDIR\bin" - File "${LIB}\libeay32.dll" - File "${LIB}\libssl32.dll" - -SectionEnd - -Section "OpenSSL Utilities" SecOpenSSLUtilities - - SetOverwrite on - SetOutPath "$INSTDIR\bin" - File "${BIN}\openssl.exe" - -SectionEnd - -Section "PKCS#11 DLLs" SecPKCS11DLLs - - SetOverwrite on - SetOutPath "$INSTDIR\bin" - File "${LIB}\libpkcs11-helper-1.dll" - -SectionEnd - -Section "TAP Virtual Ethernet Adapter" SecTAP - - SetOverwrite on - - FileOpen $R0 "$INSTDIR\bin\addtap.bat" w - FileWrite $R0 "rem Add a new TAP virtual ethernet adapter$\r$\n" - FileWrite $R0 '"$INSTDIR\bin\tapinstall.exe" install "$INSTDIR\driver\OemWin2k.inf" ${TAP}$\r$\n' - FileWrite $R0 "pause$\r$\n" - FileClose $R0 - - FileOpen $R0 "$INSTDIR\bin\deltapall.bat" w - FileWrite $R0 "echo WARNING: this script will delete ALL TAP virtual adapters (use the device manager to delete adapters one at a time)$\r$\n" - FileWrite $R0 "pause$\r$\n" - FileWrite $R0 '"$INSTDIR\bin\tapinstall.exe" remove ${TAP}$\r$\n' - FileWrite $R0 "pause$\r$\n" - FileClose $R0 - - ; Check if we are running on a 64 bit system. - System::Call "kernel32::GetCurrentProcess() i .s" - System::Call "kernel32::IsWow64Process(i s, *i .r0)" - IntCmp $0 0 tap-32bit - -; tap-64bit: - - DetailPrint "We are running on a 64-bit system." - - SetOutPath "$INSTDIR\bin" - - File "${GEN}\tapinstall\amd64\tapinstall.exe" - - SetOutPath "$INSTDIR\driver" - - File "${GEN}\driver\amd64\OemWin2k.inf" - File "${GEN}\driver\amd64\${PRODUCT_TAP_ID}.cat" - File "${GEN}\driver\amd64\${TAPDRV}" - -goto tapend - -tap-32bit: - - DetailPrint "We are running on a 32-bit system." - - SetOutPath "$INSTDIR\bin" - File "${GEN}\tapinstall\i386\tapinstall.exe" - - SetOutPath "$INSTDIR\driver" - File "${GEN}\driver\i386\OemWin2k.inf" - File "${GEN}\driver\i386\${PRODUCT_TAP_ID}.cat" - File "${GEN}\driver\i386\${TAPDRV}" - - tapend: - -SectionEnd - -Section "Add ${PRODUCT_NAME} to PATH" SecAddPath - - ; remove previously set path (if any) - Push "$INSTDIR\bin" - Call RemoveFromPath - - ; append our bin directory to end of current user path - Push "$INSTDIR\bin" - Call AddToPath - -SectionEnd - -Section "Add Shortcuts to Start Menu" SecAddShortcuts - - SetOverwrite on - CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" - CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}\Documentation" - WriteINIStr "$SMPROGRAMS\${PRODUCT_NAME}\Documentation\${PRODUCT_NAME} Windows Notes.url" "InternetShortcut" "URL" "http://openvpn.net/INSTALL-win32.html" - WriteINIStr "$SMPROGRAMS\${PRODUCT_NAME}\Documentation\${PRODUCT_NAME} Manual Page.url" "InternetShortcut" "URL" "http://openvpn.net/man.html" - WriteINIStr "$SMPROGRAMS\${PRODUCT_NAME}\Documentation\${PRODUCT_NAME} HOWTO.url" "InternetShortcut" "URL" "http://openvpn.net/howto.html" - WriteINIStr "$SMPROGRAMS\${PRODUCT_NAME}\Documentation\${PRODUCT_NAME} Web Site.url" "InternetShortcut" "URL" "http://openvpn.net/" - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall ${PRODUCT_NAME}.lnk" "$INSTDIR\Uninstall.exe" - -SectionEnd - -;-------------------- -;Post-install section - -Section -post - - SetOverwrite on - - ; delete old devcon.exe - Delete "$INSTDIR\bin\devcon.exe" - - ; Store README, license, icon - SetOverwrite on - SetOutPath $INSTDIR - !ifndef USE_XGUI - File "${GEN}\text\INSTALL-win32.txt" - !endif - File "${GEN}\text\license.txt" - File "${GEN}\images\${PRODUCT_ICON}" - - ; store sample config files - !ifdef SAMPCONF_DIR - SetOverwrite on - SetOutPath "$INSTDIR\config" - !ifdef SAMPCONF_CONF - File "${GEN}\conf\${SAMPCONF_CONF}" - !endif - !ifdef SAMPCONF_CONF2 - File "${GEN}\conf\${SAMPCONF_CONF2}" - !endif - !ifdef SAMPCONF_P12 - File "${GEN}\conf\${SAMPCONF_P12}" - !endif - !ifdef SAMPCONF_TA - File "${GEN}\conf\${SAMPCONF_TA}" - !endif - !ifdef SAMPCONF_CA - File "${GEN}\conf\${SAMPCONF_CA}" - !endif - !ifdef SAMPCONF_CRT - File "${GEN}\conf\${SAMPCONF_CRT}" - !endif - !ifdef SAMPCONF_KEY - File "${GEN}\conf\${SAMPCONF_KEY}" - !endif - !ifdef SAMPCONF_DH - File "${GEN}\conf\${SAMPCONF_DH}" - !endif - !endif - - ; Try to extract files if present - !ifdef EXTRACT_FILES - Push "$INSTDIR" - Call MultiFileExtract - Pop $R0 - IntCmp $R0 0 +3 +1 +1 - DetailPrint "MultiFileExtract Failed status=$R0" - goto +2 - DetailPrint "MultiFileExtract Succeeded" - !endif - - ; - ; install/upgrade TAP driver if selected, using tapinstall.exe - ; - SectionGetFlags ${SecTAP} $R0 - IntOp $R0 $R0 & ${SF_SELECTED} - IntCmp $R0 ${SF_SELECTED} "" notap notap - ; TAP install/update was selected. - ; Should we install or update? - ; If tapinstall error occurred, $5 will - ; be nonzero. - IntOp $5 0 & 0 - nsExec::ExecToStack '"$INSTDIR\bin\tapinstall.exe" hwids ${TAP}' - Pop $R0 # return value/error/timeout - IntOp $5 $5 | $R0 - DetailPrint "tapinstall hwids returned: $R0" - - ; If tapinstall output string contains "${TAP}" we assume - ; that TAP device has been previously installed, - ; therefore we will update, not install. - Push "${TAP}" - Call StrStr - Pop $R0 - - IntCmp $5 0 "" tapinstall_check_error tapinstall_check_error - IntCmp $R0 -1 tapinstall - - ;tapupdate: - DetailPrint "TAP UPDATE" - nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" update "$INSTDIR\driver\OemWin2k.inf" ${TAP}' - Pop $R0 # return value/error/timeout - Call CheckReboot - IntOp $5 $5 | $R0 - DetailPrint "tapinstall update returned: $R0" - Goto tapinstall_check_error - - tapinstall: - DetailPrint "TAP REMOVE OLD TAP" - - nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" remove TAP0801' - Pop $R0 # return value/error/timeout - DetailPrint "tapinstall remove TAP0801 returned: $R0" - - DetailPrint "TAP INSTALL (${TAP})" - nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" install "$INSTDIR\driver\OemWin2k.inf" ${TAP}' - Pop $R0 # return value/error/timeout - Call CheckReboot - IntOp $5 $5 | $R0 - DetailPrint "tapinstall install returned: $R0" - - tapinstall_check_error: - DetailPrint "tapinstall cumulative status: $5" - IntCmp $5 0 notap - MessageBox MB_OK "An error occurred installing the TAP device driver." - - notap: - - ; Store install folder in registry - WriteRegStr HKLM SOFTWARE\${PRODUCT_NAME} "" $INSTDIR - - ; install as a service if requested - SectionGetFlags ${SecService} $R0 - IntOp $R0 $R0 & ${SF_SELECTED} - IntCmp $R0 ${SF_SELECTED} "" noserv noserv - - ; set registry parameters for openvpnserv - !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PRODUCT_NAME}" "config_dir" "${SERV_CONFIG_DIR}" - !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PRODUCT_NAME}" "config_ext" "${SERV_CONFIG_EXT}" - !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PRODUCT_NAME}" "exe_path" "${SERV_EXE_PATH}" - !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PRODUCT_NAME}" "log_dir" "${SERV_LOG_DIR}" - !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PRODUCT_NAME}" "priority" "${SERV_PRIORITY}" - !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PRODUCT_NAME}" "log_append" "${SERV_LOG_APPEND}" - - ; install openvpnserv as a service (to be started manually from service control manager) - DetailPrint "Service INSTALL" - nsExec::ExecToLog '"$INSTDIR\bin\${PRODUCT_UNIX_NAME}serv.exe" -install' - Pop $R0 # return value/error/timeout - - noserv: - !ifdef USE_XGUI - IfFileExists "$INSTDIR\bin\${XGUI_XMLSERV}" "" fileass - ; install and automatically start XML service - DetailPrint "XML Service INSTALL" - nsExec::ExecToLog '"$INSTDIR\bin\${XGUI_XMLSERV}" -install' - Pop $R0 # return value/error/timeout - - Sleep 2000 - - DetailPrint "XML Service START" - nsExec::ExecToLog '"$INSTDIR\bin\${XGUI_XMLSERV}" -start' - Pop $R0 # return value/error/timeout - - !endif - - ; Create file association if requested - fileass: - SectionGetFlags ${SecFileAssociation} $R0 - IntOp $R0 $R0 & ${SF_SELECTED} - IntCmp $R0 ${SF_SELECTED} "" noass noass - WriteRegStr HKCR ".${SERV_CONFIG_EXT}" "" "${PRODUCT_NAME}File" - WriteRegStr HKCR "${PRODUCT_NAME}File" "" "${PRODUCT_NAME} Config File" - WriteRegStr HKCR "${PRODUCT_NAME}File\shell" "" "open" - WriteRegStr HKCR "${PRODUCT_NAME}File\DefaultIcon" "" "$INSTDIR\${PRODUCT_ICON},0" - WriteRegStr HKCR "${PRODUCT_NAME}File\shell\open\command" "" 'notepad.exe "%1"' - WriteRegStr HKCR "${PRODUCT_NAME}File\shell\run" "" "Start ${PRODUCT_NAME} on this config file" - WriteRegStr HKCR "${PRODUCT_NAME}File\shell\run\command" "" '"$INSTDIR\bin\${PRODUCT_UNIX_NAME}.exe" --pause-exit --config "%1"' - - ; Create start menu folders - noass: - CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}\Utilities" - CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}\Shortcuts" - - ; Create start menu and desktop shortcuts to OpenVPN GUI - !ifdef USE_GUI - IfFileExists "$INSTDIR\bin\${OPENVPN_GUI}" "" tryaddxgui - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME} GUI.lnk" "$INSTDIR\bin\${OPENVPN_GUI}" "" - CreateShortcut "$DESKTOP\${PRODUCT_NAME} GUI.lnk" "$INSTDIR\bin\${OPENVPN_GUI}" - !endif - - ; Create start menu and desktop shortcuts to OpenVPN XGUI - tryaddxgui: - !ifdef USE_XGUI - IfFileExists "$INSTDIR\bin\${XGUI_EXE}" "" tryaddtray - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${XGUI_TRANSITION_GUI_NAME}.lnk" "$INSTDIR\bin\${XGUI_EXE}" "" -# CreateShortcut "$DESKTOP\${XGUI_TRANSITION_GUI_NAME}.lnk" "$INSTDIR\bin\${XGUI_EXE}" - tryaddtray: - IfFileExists "$INSTDIR\bin\${XGUI_TRAY}" "" tryaddtap - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${XGUI_AJAX_GUI_NAME}.lnk" "$INSTDIR\bin\${XGUI_EXE}" "" - CreateShortcut "$DESKTOP\${XGUI_AJAX_GUI_NAME}.lnk" "$INSTDIR\bin\${XGUI_TRAY}" - !endif - - ; Create start menu shortcuts to addtap.bat and deltapall.bat - tryaddtap: - IfFileExists "$INSTDIR\bin\addtap.bat" "" trydeltap - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Utilities\Add a new TAP virtual ethernet adapter.lnk" "$INSTDIR\bin\addtap.bat" "" - - trydeltap: - IfFileExists "$INSTDIR\bin\deltapall.bat" "" config_shortcut - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Utilities\Delete ALL TAP virtual ethernet adapters.lnk" "$INSTDIR\bin\deltapall.bat" "" - - ; Create start menu shortcuts for config and log directories - config_shortcut: - IfFileExists "$INSTDIR\config" "" log_shortcut - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Shortcuts\${PRODUCT_NAME} configuration file directory.lnk" "$INSTDIR\config" "" - - log_shortcut: - IfFileExists "$INSTDIR\log" "" samp_shortcut - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Shortcuts\${PRODUCT_NAME} log file directory.lnk" "$INSTDIR\log" "" - - samp_shortcut: - IfFileExists "$INSTDIR\sample-config" "" genkey_shortcut - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Shortcuts\${PRODUCT_NAME} Sample Configuration Files.lnk" "$INSTDIR\sample-config" "" - - genkey_shortcut: - IfFileExists "$INSTDIR\bin\${PRODUCT_UNIX_NAME}.exe" "" noshortcuts - IfFileExists "$INSTDIR\config" "" noshortcuts - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Utilities\Generate a static ${PRODUCT_NAME} key.lnk" "$INSTDIR\bin\${PRODUCT_UNIX_NAME}.exe" '--pause-exit --verb 3 --genkey --secret "$INSTDIR\config\key.txt"' "$INSTDIR\${PRODUCT_ICON}" 0 - - noshortcuts: - ; Create uninstaller - WriteUninstaller "$INSTDIR\Uninstall.exe" - - ; Show up in Add/Remove programs - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayName" "${PRODUCT_NAME} ${VERSION}" - WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "UninstallString" "$INSTDIR\Uninstall.exe" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayIcon" "$INSTDIR\${PRODUCT_ICON}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayVersion" "${VERSION}" - - ; Advise a reboot - ;Messagebox MB_OK "IMPORTANT: Rebooting the system is advised in order to finalize TAP driver installation/upgrade (this is an informational message only, pressing OK will not reboot)." - -SectionEnd - -;-------------------------------- -;Descriptions - -!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNUserSpace} $(DESC_SecOpenVPNUserSpace) - !ifdef USE_GUI - !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNGUI} $(DESC_SecOpenVPNGUI) - !endif - !ifdef USE_XGUI - !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNXGUI} $(DESC_SecOpenVPNXGUI) - !endif - !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNEasyRSA} $(DESC_SecOpenVPNEasyRSA) - !insertmacro MUI_DESCRIPTION_TEXT ${SecTAP} $(DESC_SecTAP) - !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenSSLUtilities} $(DESC_SecOpenSSLUtilities) - !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenSSLDLLs} $(DESC_SecOpenSSLDLLs) - !insertmacro MUI_DESCRIPTION_TEXT ${SecPKCS11DLLs} $(DESC_SecPKCS11DLLs) - !insertmacro MUI_DESCRIPTION_TEXT ${SecAddPath} $(DESC_SecAddPath) - !insertmacro MUI_DESCRIPTION_TEXT ${SecAddShortcuts} $(DESC_SecAddShortcuts) - !insertmacro MUI_DESCRIPTION_TEXT ${SecService} $(DESC_SecService) - !insertmacro MUI_DESCRIPTION_TEXT ${SecFileAssociation} $(DESC_SecFileAssociation) -!insertmacro MUI_FUNCTION_DESCRIPTION_END - -;-------------------------------- -;Uninstaller Section - -Function un.onInit - ClearErrors - UserInfo::GetName - IfErrors ok - Pop $R0 - UserInfo::GetAccountType - Pop $R1 - StrCmp $R1 "Admin" ok - Messagebox MB_OK "Administrator privileges required to uninstall ${PRODUCT_NAME} [$R0/$R1]" - Abort - ok: -FunctionEnd - -Section "Uninstall" - -!ifdef USE_XGUI - DetailPrint "XML Service REMOVE" - nsExec::ExecToLog '"$INSTDIR\bin\${XGUI_XMLSERV}" -remove' - Pop $R0 # return value/error/timeout -!endif - - ; Stop OpenVPN if currently running - DetailPrint "Service REMOVE" - nsExec::ExecToLog '"$INSTDIR\bin\${PRODUCT_UNIX_NAME}serv.exe" -remove' - Pop $R0 # return value/error/timeout - - Sleep 3000 - - DetailPrint "TAP REMOVE" - nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" remove ${TAP}' - Pop $R0 # return value/error/timeout - DetailPrint "tapinstall remove returned: $R0" - - Push "$INSTDIR\bin" - Call un.RemoveFromPath - - RMDir /r $SMPROGRAMS\${PRODUCT_NAME} - - ; delete sample config files - !ifdef SAMPCONF_DIR - !ifdef SAMPCONF_CONF - Delete "$INSTDIR\config\${SAMPCONF_CONF}" - !endif - !ifdef SAMPCONF_CONF2 - Delete "$INSTDIR\config\${SAMPCONF_CONF2}" - !endif - !ifdef SAMPCONF_P12 - Delete "$INSTDIR\config\${SAMPCONF_P12}" - !endif - !ifdef SAMPCONF_TA - Delete "$INSTDIR\config\${SAMPCONF_TA}" - !endif - !ifdef SAMPCONF_CA - Delete "$INSTDIR\config\${SAMPCONF_CA}" - !endif - !ifdef SAMPCONF_CRT - Delete "$INSTDIR\config\${SAMPCONF_CRT}" - !endif - !ifdef SAMPCONF_KEY - Delete "$INSTDIR\config\${SAMPCONF_KEY}" - !endif - !ifdef SAMPCONF_DH - Delete "$INSTDIR\config\${SAMPCONF_DH}" - !endif - !endif - - !ifdef USE_GUI - Delete "$INSTDIR\bin\${OPENVPN_GUI}" - Delete "$DESKTOP\${PRODUCT_NAME} GUI.lnk" - !endif - - !ifdef USE_XGUI - Delete "$INSTDIR\bin\${XGUI_EXE}" - Delete "$INSTDIR\bin\${XGUI_TRAY}" - Delete "$INSTDIR\bin\${XGUI_XMLSERV}" - RMDir /r "$INSTDIR\${XGUI_HTDOCS}" - Delete "$DESKTOP\${XGUI_AJAX_GUI_NAME}.lnk" - Delete "$DESKTOP\${XGUI_TRANSITION_GUI_NAME}.lnk" - !endif - - Delete "$INSTDIR\bin\${PRODUCT_UNIX_NAME}.exe" - Delete "$INSTDIR\bin\${PRODUCT_UNIX_NAME}serv.exe" - Delete "$INSTDIR\bin\libeay32.dll" - Delete "$INSTDIR\bin\libssl32.dll" - Delete "$INSTDIR\bin\libpkcs11-helper-1.dll" - Delete "$INSTDIR\bin\tapinstall.exe" - Delete "$INSTDIR\bin\addtap.bat" - Delete "$INSTDIR\bin\deltapall.bat" - - Delete "$INSTDIR\config\README.txt" - Delete "$INSTDIR\config\sample.${SERV_CONFIG_EXT}.txt" - - Delete "$INSTDIR\log\README.txt" - - Delete "$INSTDIR\driver\OemWin2k.inf" - Delete "$INSTDIR\driver\${PRODUCT_TAP_ID}.cat" - Delete "$INSTDIR\driver\${TAPDRV}" - - Delete "$INSTDIR\bin\openssl.exe" - - Delete "$INSTDIR\INSTALL-win32.txt" - Delete "$INSTDIR\${PRODUCT_ICON}" - Delete "$INSTDIR\license.txt" - Delete "$INSTDIR\Uninstall.exe" - - Delete "$INSTDIR\easy-rsa\openssl-1.0.0.cnf" - Delete "$INSTDIR\easy-rsa\vars.bat.sample" - Delete "$INSTDIR\easy-rsa\init-config.bat" - Delete "$INSTDIR\easy-rsa\README.txt" - Delete "$INSTDIR\easy-rsa\build-ca.bat" - Delete "$INSTDIR\easy-rsa\build-dh.bat" - Delete "$INSTDIR\easy-rsa\build-key-server.bat" - Delete "$INSTDIR\easy-rsa\build-key.bat" - Delete "$INSTDIR\easy-rsa\build-key-pkcs12.bat" - Delete "$INSTDIR\easy-rsa\clean-all.bat" - Delete "$INSTDIR\easy-rsa\index.txt.start" - Delete "$INSTDIR\easy-rsa\revoke-key.bat" - Delete "$INSTDIR\easy-rsa\revoke-full.bat" - Delete "$INSTDIR\easy-rsa\serial.start" - - Delete "$INSTDIR\sample-config\*.${PRODUCT_FILE_EXT}" - - RMDir "$INSTDIR\bin" - RMDir "$INSTDIR\config" - RMDir "$INSTDIR\driver" - RMDir "$INSTDIR\easy-rsa" - RMDir "$INSTDIR\sample-config" - RMDir /r "$INSTDIR\log" - RMDir "$INSTDIR" - - !insertmacro DelRegKeyIfUnchanged HKCR ".${SERV_CONFIG_EXT}" "${PRODUCT_NAME}File" - DeleteRegKey HKCR "${PRODUCT_NAME}File" - DeleteRegKey HKLM SOFTWARE\${PRODUCT_NAME} - DeleteRegKey HKCU "Software\${PRODUCT_NAME}" - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" - - ;Messagebox MB_OK "IMPORTANT: If you intend on reinstalling ${PRODUCT_NAME} after this uninstall, and you are running Win2K, you are strongly urged to reboot before reinstalling (this is an informational message only, pressing OK will not reboot)." - -SectionEndinstall-win32/setpath.nsi deleted +0
-231@@ -1,231 +0,0 @@ -; Modify the user's PATH variable. -; -; Modified by JY to have both a RemoveFromPath -; and an un.RemoveFromPath which are basically -; copies of each other. Why does NSIS demand -; this nonsense? -; -; Modified Feb 14, 2005 by Mathias Sundman: -; Added code to remove the semicolon at the end of the path -; when uninstalling. -; -; Added code to make sure we don't insert an extra semicolon -; before our path if there already exist one at the end of -; the original path. -; -; Removed duplicated "un. and install" functions and made -; macros to duplicate the code instead. - -; example usage -; -;Section "Add to path" -; Push $INSTDIR -; Call AddToPath -;SectionEnd -; -;# ... -; -;Section "uninstall" -; # ... -; Push $INSTDIR -; Call un.RemoveFromPath -; # ... -;SectionEnd - -!verbose 3 -!include "WinMessages.NSH" -!verbose 4 - -;==================================================== -; AddToPath - Adds the given dir to the search path. -; Input - head of the stack -; Note - Win9x systems requires reboot -;==================================================== -Function AddToPath - Exch $0 - Push $1 - Push $2 - - Call IsNT - Pop $1 - StrCmp $1 1 AddToPath_NT - ; Not on NT - StrCpy $1 $WINDIR 2 - FileOpen $1 "$1\autoexec.bat" a - FileSeek $1 0 END - GetFullPathName /SHORT $0 $0 - FileWrite $1 "$\r$\nSET PATH=%PATH%;$0$\r$\n" - FileClose $1 - Goto AddToPath_done - - AddToPath_NT: - ReadRegStr $1 HKCU "Environment" "PATH" - StrCpy $2 $1 1 -1 # copy last char - StrCmp $2 ";" 0 +2 # if last char == ; - StrCpy $1 $1 -1 # remove last char - - StrCmp $1 "" AddToPath_NTdoIt - StrCpy $0 "$1;$0" - Goto AddToPath_NTdoIt - AddToPath_NTdoIt: - WriteRegExpandStr HKCU "Environment" "PATH" $0 - SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 - - AddToPath_done: - Pop $2 - Pop $1 - Pop $0 -FunctionEnd - -;==================================================== -; RemoveFromPath - Remove a given dir from the path -; Input: head of the stack -;==================================================== -!macro RemoveFromPath un -Function ${un}RemoveFromPath - Exch $0 - Push $1 - Push $2 - Push $3 - Push $4 - Push $5 - - Call ${un}IsNT - Pop $1 - StrCmp $1 1 RemoveFromPath_NT - ; Not on NT - StrCpy $1 $WINDIR 2 - FileOpen $1 "$1\autoexec.bat" r - GetTempFileName $4 - FileOpen $2 $4 w - GetFullPathName /SHORT $0 $0 - StrCpy $0 "SET PATH=%PATH%;$0" - SetRebootFlag true - Goto RemoveFromPath_dosLoop - - RemoveFromPath_dosLoop: - FileRead $1 $3 - StrCmp $3 "$0$\r$\n" RemoveFromPath_dosLoop - StrCmp $3 "$0$\n" RemoveFromPath_dosLoop - StrCmp $3 "$0" RemoveFromPath_dosLoop - StrCmp $3 "" RemoveFromPath_dosLoopEnd - FileWrite $2 $3 - Goto RemoveFromPath_dosLoop - - RemoveFromPath_dosLoopEnd: - FileClose $2 - FileClose $1 - StrCpy $1 $WINDIR 2 - Delete "$1\autoexec.bat" - CopyFiles /SILENT $4 "$1\autoexec.bat" - Delete $4 - Goto RemoveFromPath_done - - RemoveFromPath_NT: - StrLen $2 $0 - ReadRegStr $1 HKCU "Environment" "PATH" - Push $1 - Push $0 - Call ${un}StrStr ; Find $0 in $1 - Pop $0 ; pos of our dir - IntCmp $0 -1 RemoveFromPath_done - ; else, it is in path - StrCpy $3 $1 $0 ; $3 now has the part of the path before our dir - IntOp $2 $2 + $0 ; $2 now contains the pos after our dir in the path (';') - IntOp $2 $2 + 1 ; $2 now containts the pos after our dir and the semicolon. - StrLen $0 $1 - StrCpy $1 $1 $0 $2 - StrCpy $3 "$3$1" - - StrCpy $5 $3 1 -1 # copy last char - StrCmp $5 ";" 0 +2 # if last char == ; - StrCpy $3 $3 -1 # remove last char - - WriteRegExpandStr HKCU "Environment" "PATH" $3 - SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 - - RemoveFromPath_done: - Pop $5 - Pop $4 - Pop $3 - Pop $2 - Pop $1 - Pop $0 -FunctionEnd -!macroend -!insertmacro RemoveFromPath "" -!insertmacro RemoveFromPath "un." - - -;==================================================== -; StrStr - Finds a given string in another given string. -; Returns -1 if not found and the pos if found. -; Input: head of the stack - string to find -; second in the stack - string to find in -; Output: head of the stack -;==================================================== -!macro StrStr un -Function ${un}StrStr - Push $0 - Exch - Pop $0 ; $0 now have the string to find - Push $1 - Exch 2 - Pop $1 ; $1 now have the string to find in - Exch - Push $2 - Push $3 - Push $4 - Push $5 - - StrCpy $2 -1 - StrLen $3 $0 - StrLen $4 $1 - IntOp $4 $4 - $3 - - StrStr_loop: - IntOp $2 $2 + 1 - IntCmp $2 $4 0 0 StrStrReturn_notFound - StrCpy $5 $1 $3 $2 - StrCmp $5 $0 StrStr_done StrStr_loop - - StrStrReturn_notFound: - StrCpy $2 -1 - - StrStr_done: - Pop $5 - Pop $4 - Pop $3 - Exch $2 - Exch 2 - Pop $0 - Pop $1 -FunctionEnd -!macroend -!insertmacro StrStr "" -!insertmacro StrStr "un." - -;==================================================== -; IsNT - Returns 1 if the current system is NT, 0 -; otherwise. -; Output: head of the stack -;==================================================== -!macro IsNT un -Function ${un}IsNT - Push $0 - ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion - StrCmp $0 "" 0 IsNT_yes - ; we are not NT. - Pop $0 - Push 0 - Return - - IsNT_yes: - ; NT!!! - Pop $0 - Push 1 -FunctionEnd -!macroend -!insertmacro IsNT "" -!insertmacro IsNT "un." -install-win32/settings.in deleted +0
-71@@ -1,71 +0,0 @@ -# Version numbers, settings, and dependencies -# for Windows OpenVPN installer. - -# Get the OpenVPN version number -!include "autodefs/version.in" - -# Branding -!define PRODUCT_NAME "OpenVPN" -!define PRODUCT_UNIX_NAME "openvpn" -!define PRODUCT_FILE_EXT "ovpn" - -# Allow --askpass and --auth-user-pass passwords to be read from a file -;!define ENABLE_PASSWORD_SAVE - -# Include the OpenVPN GUI exe in the installer. -# May be undefined. -!define OPENVPN_GUI_DIR "../openvpn-gui" -!define OPENVPN_GUI "openvpn-gui-1.0.3.exe" - -# Include the OpenVPN XML-based GUI exe in the installer. -# May be undefined. -;!define OPENVPN_XGUI_DIR "../ovpnxml" - -# Prebuilt libraries. DMALLOC is optional. -!define OPENSSL_DIR "../openssl.mingw/openssl-0.9.8o" -!define LZO_DIR "../lzo-2.02" -!define PKCS11_HELPER_DIR "../pkcs11-helper" -;!define DMALLOC_DIR "../dmalloc-5.4.2" - -# Prebuilt TAP drivers and tapinstall -!define TAPBINSRC "../tap_dist" - -# Directory containing python script for signing .exe files -!define SIGNTOOL "../signtool" - -# Optional directory of prebuilt OpenVPN binary components, -# to be used as a source when build-from-scratch prerequisites -# are not met. -;!define GENOUT_PREBUILT "../gen-prebuilt" - -# -j parameter passed to make -!define MAKE_JOBS 1 - -# output directory for built binaries -# and other generated files -!define GENOUT "gen" - -# delete GENOUT directory before starting -# set to "yes" or "no" -!define CLEAN "yes" - -# Don't strip executables and DLLs -;!define NO_STRIP - -; DEBUGGING -- set to something like "-DBG2" -!define OUTFILE_LABEL "" - -; DEBUGGING -- set to something like "DEBUG2" -!define TITLE_LABEL "" - -# include a sample configuration file and key -;!define SAMPCONF_DIR "test-key" -;!define SAMPCONF_CONF "test.ovpn" -;!define SAMPCONF_P12 "test.p12" -;!define SAMPCONF_TA "ta.key" -;!define SAMPCONF_CA "ca.crt" -;!define SAMPCONF_CRT "test.crt" -;!define SAMPCONF_KEY "test.key" - -# Extract files embedded in installer -;!define EXTRACT_FILESinstall-win32/trans.pl deleted +0
-97@@ -1,97 +0,0 @@ -#!/usr/bin/perl - -# This script translates a simple definition-based grammar -# to either C, sh, Javascript, or in (in = identity grammar, i.e. -# same grammar as input). -# -# Input grammar: -# (1) comments having ';' or '#' as the first char in the line -# (2) a blank line -# (3) !include "file" -# (4) !define foo bar -# (5) !define foo "bar" -# -# Environmental variables can be used to override a setting. -# The special value "null" causes the variable to be undefined. -# If an environmental value is bracketed, i.e [abc], the brackets -# will be converted to double quotes prior to output. - -sub comment { - my ($cmt) = @_; - print "//$cmt\n" if ($mode =~ /^(c|js|h)$/); - print "#$cmt\n" if ($mode =~ /^(sh|nsi|in)$/); -} - -sub define { - my ($name, $value) = @_; - if ($mode eq "sh") { - $value="true" if !$value; - print "[ -z \"\$$name\" ] && export $name=$value\n"; - print "[ \"\$$name\" = \"$nulltag\" ] && unset $name\n"; - } else { - if ($ENV{$name}) { - $value = $ENV{$name}; - $value = "\"$1\"" if ($value =~ /\[(.*)\]$/); - } - if ($value ne $nulltag) { - print "#define $name $value\n" if ($mode =~ /^(c|h)$/); - print "!define $name $value\n" if ($mode =~ /^(nsi|in)$/); - print "var $name=$value;\n" if ($mode eq "js"); - } else { - print "//#undef $name\n" if ($mode =~ /^(c|h)$/); - print "#!undef $name\n" if ($mode eq "nsi"); - print ";!undef $name\n" if ($mode eq "in"); - print "//undef $name\n" if ($mode eq "js"); - } - } -} - -sub include_file { - local $_; - $include_file_level++; - die "!include file nesting too deep" if ($include_file_level > $max_inc_depth); - my ($parm) = @_; - my $fn = "$incdir/$parm"; - local *IN; - open(IN, "< $fn") or die "cannot open $fn"; - while (<IN>) { - chomp; - if (/^\s*$/) { - print "\n"; - } elsif (/^[#;](.*)$/) { - comment ($1); - } elsif (/^!define\s+(\w+)(?:\s+(.*?))?\s*$/) { - define ($1, $2); - } elsif (/^!include\s+"(.+)"$/) { - include_file ($1); - } else { - die "can't parse this line: $_\n"; - } - } - $include_file_level--; -} - -die "usage: trans <c|h|sh|js|nsi|in> [-I<dir>] [files ...]" if (@ARGV < 1); - -($mode) = shift(@ARGV); -die "mode must be one of c, h, sh, js, nsi, or in" if !($mode =~ /^(c|h|sh|js|nsi|in)$/); - -$nulltag = "null"; -$max_inc_depth = 10; -$include_file_level = 0; -$incdir = "."; - -comment(" This file was automatically generated by trans.pl"); - -while ($arg=shift(@ARGV)) { - if ($arg =~ /^-/) { - if ($arg =~ /^-I(.*)$/) { - $incdir = $1; - } else { - die "unrecognized option: $arg"; - } - } else { - print "\n"; - include_file ($arg); - } -}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
-19@@ -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 --1.7.3.4
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Re: [Openvpn-devel] [PATCH 18/52] Remove easy-rsa
In reply to Alon Bar-LevMoving easy-rsa into a separate subproject, so this makes sense.
ACK.
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
Quoted 3,146 lines
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 --- openvpn.spec.in | 2 +- 56 files changed, 1 insertions(+), 2668 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.sampleMakefile.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@@ -1,161 +0,0 @@ -This is a small RSA key management package, -based on the openssl command line tool, that -can be found in the easy-rsa subdirectory -of the OpenVPN distribution. - -These are reference notes. For step -by step instructions, see the HOWTO: - -http://openvpn.net/howto.html - -INSTALL - -1. Edit vars. -2. Set KEY_CONFIG to point to the openssl.cnf file - included in this distribution. -3. Set KEY_DIR to point to a directory which will - contain all keys, certificates, etc. This - directory need not exist, and if it does, - it will be deleted with rm -rf, so BE - CAREFUL how you set KEY_DIR. -4. (Optional) Edit other fields in vars - per your site data. You may want to - increase KEY_SIZE to 2048 if you are - paranoid and don't mind slower key - processing, but certainly 1024 is - fine for testing purposes. KEY_SIZE - must be compatible across both peers - participating in a secure SSL/TLS - connection. -5 . vars -6. ./clean-all -7. As you create certificates, keys, and - certificate signing requests, understand that - only .key files should be kept confidential. - .crt and .csr files can be sent over insecure - channels such as plaintext email. -8. You should never need to copy a .key file - between computers. Normally each computer - will have its own certificate/key pair. - -BUILD YOUR OWN ROOT CERTIFICATE AUTHORITY (CA) CERTIFICATE/KEY - -1. ./build-ca -2. ca.crt and ca.key will be built in your KEY_DIR - directory - -BUILD AN INTERMEDIATE CERTIFICATE AUTHORITY CERTIFICATE/KEY (optional) - -1. ./build-inter inter -2. inter.crt and inter.key will be built in your KEY_DIR - directory and signed with your root certificate. - -BUILD DIFFIE-HELLMAN PARAMETERS (necessary for -the server end of a SSL/TLS connection). - -1. ./build-dh - -BUILD A CERTIFICATE SIGNING REQUEST (If -you want to sign your certificate with a root -certificate controlled by another individual -or organization, or residing on a different machine). - -1. Get ca.crt (the root certificate) from your - certificate authority. Though this - transfer can be over an insecure channel, to prevent - man-in-the-middle attacks you must confirm that - ca.crt was not tampered with. Large CAs solve this - problem by hardwiring their root certificates into - popular web browsers. A simple way to verify a root - CA is to call the issuer on the telephone and confirm - that the md5sum or sha1sum signatures on the ca.crt - files match (such as with the command: "md5sum ca.crt"). -2. Choose a name for your certificate such as your computer - name. In our example we will use "mycert". -3. ./build-req mycert -4. You can ignore most of the fields, but set - "Common Name" to something unique such as your - computer's host name. Leave all password - fields blank, unless you want your private key - to be protected by password. Using a password - is not required -- it will make your key more secure - but also more inconvenient to use, because you will - need to supply your password anytime the key is used. - NOTE: if you are using a password, use ./build-req-pass - instead of ./build-req -5. Your key will be written to $KEY_DIR/mycert.key -6. Your certificate signing request will be written to - to $KEY_DIR/mycert.csr -7. Email mycert.csr to the individual or organization - which controls the root certificate. This can be - done over an insecure channel. -8. After the .csr file is signed by the root certificate - authority, you will receive a file mycert.crt - (your certificate). Place mycert.crt in your - KEY_DIR directory. -9. The combined files of mycert.crt, mycert.key, - and ca.crt can now be used to secure one end of - an SSL/TLS connection. - -SIGN A CERTIFICATE SIGNING REQUEST - -1. ./sign-req mycert -2. mycert.crt will be built in your KEY_DIR - directory using mycert.csr and your root CA - file as input. - -BUILD AND SIGN A CERTIFICATE SIGNING REQUEST -USING A LOCALLY INSTALLED ROOT CERTIFICATE/KEY -- this -script generates and signs a certificate in one step, -but it requires that the generated certificate and private -key files be copied to the destination host over a -secure channel. - -1. ./build-key mycert (no password protection) -2. OR ./build-key-pass mycert (with password protection) -3. OR ./build-key-pkcs12 mycert (PKCS #12 format) -4. OR ./build-key-server mycert (with nsCertType=server) -5. mycert.crt and mycert.key will be built in your - KEY_DIR directory, and mycert.crt will be signed - by your root CA. If ./build-key-pkcs12 was used a - mycert.p12 file will also be created including the - private key, certificate and the ca certificate. - -IMPORTANT - -To avoid a possible Man-in-the-Middle attack where an authorized -client tries to connect to another client by impersonating the -server, make sure to enforce some kind of server certificate -verification by clients. There are currently four different ways -of accomplishing this, listed in the order of preference: - -(1) Build your server certificates with the build-key-server - script. This will designate the certificate as a - server-only certificate by setting nsCertType=server. - Now add the following line to your client configuration: - - ns-cert-type server - - This will block clients from connecting to any - server which lacks the nsCertType=server designation - in its certificate, even if the certificate has been - signed by the CA which is cited in the OpenVPN configuration - file (--ca directive). - -(2) Use the --tls-remote directive on the client to - accept/reject the server connection based on the common - name of the server certificate. - -(3) Use a --tls-verify script or plugin to accept/reject the - server connection based on a custom test of the server - certificate's embedded X509 subject details. - -(4) Sign server certificates with one CA and client certificates - with a different CA. The client config "ca" directive should - reference the server-signing CA while the server config "ca" - directive should reference the client-signing CA. - -NOTES - -Show certificate fields: - openssl x509 -in cert.crt -texteasy-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 -fieasy-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 -fieasy-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 -fieasy-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 -fieasy-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 -fieasy-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 -fieasy-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 -fieasy-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 -fieasy-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 -fieasy-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 -fieasy-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 -fieasy-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 -fieasy-rsa/1.0/openssl.cnf deleted +0
-255@@ -1,255 +0,0 @@ -# -# OpenSSL example configuration file. -# This is mostly being used for generation of certificate requests. -# - -# This definition stops the following lines choking if HOME isn't -# defined. -HOME = . -RANDFILE = $ENV::HOME/.rnd - -# Extra OBJECT IDENTIFIER info: -#oid_file = $ENV::HOME/.oid -oid_section = new_oids - -# To use this configuration file with the "-extfile" option of the -# "openssl x509" utility, name here the section containing the -# X.509v3 extensions to use: -# extensions = -# (Alternatively, use a configuration file that has only -# X.509v3 extensions in its main [= default] section.) - -[ new_oids ] - -# We can add new OIDs in here for use by 'ca' and 'req'. -# Add a simple OID like this: -# testoid1=1.2.3.4 -# Or use config file substitution like this: -# testoid2=${testoid1}.5.6 - -#################################################################### -[ ca ] -default_ca = CA_default # The default ca section - -#################################################################### -[ CA_default ] - -dir = $ENV::KEY_DIR # Where everything is kept -certs = $dir # Where the issued certs are kept -crl_dir = $dir # Where the issued crl are kept -database = $dir/index.txt # database index file. -new_certs_dir = $dir # default place for new certs. - -certificate = $dir/ca.crt # The CA certificate -serial = $dir/serial # The current serial number -crl = $dir/crl.pem # The current CRL -private_key = $dir/ca.key # The private key -RANDFILE = $dir/.rand # private random number file - -x509_extensions = usr_cert # The extentions to add to the cert - -# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs -# so this is commented out by default to leave a V1 CRL. -# crl_extensions = crl_ext - -default_days = 3650 # how long to certify for -default_crl_days= 30 # how long before next CRL -default_md = md5 # which md to use. -preserve = no # keep passed DN ordering - -# A few difference way of specifying how similar the request should look -# For type CA, the listed attributes must be the same, and the optional -# and supplied fields are just that :-) -policy = policy_match - -# For the CA policy -[ policy_match ] -countryName = match -stateOrProvinceName = match -organizationName = match -organizationalUnitName = optional -commonName = supplied -emailAddress = optional - -# For the 'anything' policy -# At this point in time, you must list all acceptable 'object' -# types. -[ policy_anything ] -countryName = optional -stateOrProvinceName = optional -localityName = optional -organizationName = optional -organizationalUnitName = optional -commonName = supplied -emailAddress = optional - -#################################################################### -[ req ] -default_bits = $ENV::KEY_SIZE -default_keyfile = privkey.pem -distinguished_name = req_distinguished_name -attributes = req_attributes -x509_extensions = v3_ca # The extentions to add to the self signed cert - -# Passwords for private keys if not present they will be prompted for -# input_password = secret -# output_password = secret - -# This sets a mask for permitted string types. There are several options. -# default: PrintableString, T61String, BMPString. -# pkix : PrintableString, BMPString. -# utf8only: only UTF8Strings. -# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings). -# MASK:XXXX a literal mask value. -# WARNING: current versions of Netscape crash on BMPStrings or UTF8Strings -# so use this option with caution! -string_mask = nombstr - -# req_extensions = v3_req # The extensions to add to a certificate request - -[ req_distinguished_name ] -countryName = Country Name (2 letter code) -countryName_default = $ENV::KEY_COUNTRY -countryName_min = 2 -countryName_max = 2 - -stateOrProvinceName = State or Province Name (full name) -stateOrProvinceName_default = $ENV::KEY_PROVINCE - -localityName = Locality Name (eg, city) -localityName_default = $ENV::KEY_CITY - -0.organizationName = Organization Name (eg, company) -0.organizationName_default = $ENV::KEY_ORG - -# we can do this but it is not needed normally :-) -#1.organizationName = Second Organization Name (eg, company) -#1.organizationName_default = World Wide Web Pty Ltd - -organizationalUnitName = Organizational Unit Name (eg, section) -#organizationalUnitName_default = - -commonName = Common Name (eg, your name or your server\'s hostname) -commonName_max = 64 - -emailAddress = Email Address -emailAddress_default = $ENV::KEY_EMAIL -emailAddress_max = 40 - -# SET-ex3 = SET extension number 3 - -[ req_attributes ] -challengePassword = A challenge password -challengePassword_min = 4 -challengePassword_max = 20 - -unstructuredName = An optional company name - -[ usr_cert ] - -# These extensions are added when 'ca' signs a request. - -# This goes against PKIX guidelines but some CAs do it and some software -# requires this to avoid interpreting an end user certificate as a CA. - -basicConstraints=CA:FALSE - -# Here are some examples of the usage of nsCertType. If it is omitted -# the certificate can be used for anything *except* object signing. - -# This is OK for an SSL server. -# nsCertType = server - -# For an object signing certificate this would be used. -# nsCertType = objsign - -# For normal client use this is typical -# nsCertType = client, email - -# and for everything including object signing: -# nsCertType = client, email, objsign - -# This is typical in keyUsage for a client certificate. -# keyUsage = nonRepudiation, digitalSignature, keyEncipherment - -# This will be displayed in Netscape's comment listbox. -nsComment = "OpenSSL Generated Certificate" - -# PKIX recommendations harmless if included in all certificates. -subjectKeyIdentifier=hash -authorityKeyIdentifier=keyid,issuer:always - -# This stuff is for subjectAltName and issuerAltname. -# Import the email address. -# subjectAltName=email:copy - -# Copy subject details -# issuerAltName=issuer:copy - -#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem -#nsBaseUrl -#nsRevocationUrl -#nsRenewalUrl -#nsCaPolicyUrl -#nsSslServerName - -[ server ] - -# JY ADDED -- Make a cert with nsCertType set to "server" -basicConstraints=CA:FALSE -nsCertType = server -nsComment = "OpenSSL Generated Server Certificate" -subjectKeyIdentifier=hash -authorityKeyIdentifier=keyid,issuer:always - -[ v3_req ] - -# Extensions to add to a certificate request - -basicConstraints = CA:FALSE -keyUsage = nonRepudiation, digitalSignature, keyEncipherment - -[ v3_ca ] - - -# Extensions for a typical CA - - -# PKIX recommendation. - -subjectKeyIdentifier=hash - -authorityKeyIdentifier=keyid:always,issuer:always - -# This is what PKIX recommends but some broken software chokes on critical -# extensions. -#basicConstraints = critical,CA:true -# So we do this instead. -basicConstraints = CA:true - -# Key usage: this is typical for a CA certificate. However since it will -# prevent it being used as an test self-signed certificate it is best -# left out by default. -# keyUsage = cRLSign, keyCertSign - -# Some might want this also -# nsCertType = sslCA, emailCA - -# Include email address in subject alt name: another PKIX recommendation -# subjectAltName=email:copy -# Copy issuer details -# issuerAltName=issuer:copy - -# DER hex encoding of an extension: beware experts only! -# obj=DER:02:03 -# Where 'obj' is a standard or added object -# You can even override a supported extension: -# basicConstraints= critical, DER:30:03:01:01:FF - -[ crl_ext ] - -# CRL extensions. -# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL. - -# issuerAltName=issuer:copy -authorityKeyIdentifier=keyid:always,issuer:alwayseasy-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 -fieasy-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 -fieasy-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 -fieasy-rsa/1.0/vars deleted +0
-49@@ -1,49 +0,0 @@ -# easy-rsa parameter settings - -# NOTE: If you installed from an RPM, -# don't edit this file in place in -# /usr/share/openvpn/easy-rsa -- -# instead, you should copy the whole -# easy-rsa directory to another location -# (such as /etc/openvpn) so that your -# edits will not be wiped out by a future -# OpenVPN package upgrade. - -# This variable should point to -# the top level of the easy-rsa -# tree. -export D=`pwd` - -# This variable should point to -# the openssl.cnf file included -# with easy-rsa. -export KEY_CONFIG=$D/openssl.cnf - -# Edit this variable to point to -# your soon-to-be-created key -# directory. -# -# WARNING: clean-all will do -# a rm -rf on this directory -# so make sure you define -# it correctly! -export KEY_DIR=$D/keys - -# Issue rm -rf warning -echo NOTE: when you run ./clean-all, I will be doing a rm -rf on $KEY_DIR - -# Increase this to 2048 if you -# are paranoid. This will slow -# down TLS negotiation performance -# as well as the one-time DH parms -# generation process. -export KEY_SIZE=1024 - -# These are the default values for fields -# which will be placed in the certificate. -# Don't leave any of these fields blank. -export KEY_COUNTRY=KG -export KEY_PROVINCE=NA -export KEY_CITY=BISHKEK -export KEY_ORG="OpenVPN-TEST" -export KEY_EMAIL="[email protected]..."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@@ -1,229 +0,0 @@ -EASY-RSA Version 2.0-rc1 - -This is a small RSA key management package, based on the openssl -command line tool, that can be found in the easy-rsa subdirectory -of the OpenVPN distribution. While this tool is primary concerned -with key management for the SSL VPN application space, it can also -be used for building web certificates. - -These are reference notes. For step-by-step instructions, see the -HOWTO: - -http://openvpn.net/howto.html - -This package is based on the ./pkitool script. Run ./pkitool -without arguments for a detailed help message (which is also pasted -below). - -Release Notes for easy-rsa-2.0 - -* Most functionality has been consolidated into the pkitool - script. For compatibility, all previous scripts from 1.0 such - as build-key and build-key-server are provided as stubs - which call pkitool to do the real work. - -* pkitool has a --batch flag (enabled by default) which generates - keys/certs without needing any interactive input. pkitool - can still generate certs/keys using interactive prompting by - using the --interact flag. - -* The inherit-inter script has been provided for creating - a new PKI rooted on an intermediate certificate built within a - higher-level PKI. See comments in the inherit-inter script - for more info. - -* The openssl.cnf file has been modified. pkitool will not - work with the openssl.cnf file included with previous - easy-rsa releases. - -* The vars file has been modified -- the following extra - variables have been added: EASY_RSA, CA_EXPIRE, - KEY_EXPIRE. - -* The make-crl and revoke-crt scripts have been removed and - are replaced by the revoke-full script. - -* The "Organizational Unit" X509 field can be set using - the KEY_OU environmental variable before calling pkitool. - -* This release only affects the Linux/Unix version of easy-rsa. - The Windows version (written to use the Windows shell) is unchanged. - -* Use the revoke-full script to revoke a certificate, and generate - (or update) the crl.pem file in the keys directory (as set by the - vars script). Then use "crl-verify crl.pem" in your OpenVPN server - config file, so that OpenVPN can reject any connections coming from - clients which present a revoked certificate. Usage for the script is: - - revoke-full <common-name> - - Note this this procedure is primarily designed to revoke client - certificates. You could theoretically use this method to revoke - server certificates as well, but then you would need to propagate - the crl.pem file to all clients as well, and have them include - "crl-verify crl.pem" in their configuration files. - -* PKCS#11 support was added. - -* For those interested in using this tool to generate web certificates, - A variant of the easy-rsa package that allows the creation of multi-domain - certificates with subjectAltName can be obtained from here: - - http://www.bisente.com/proyectos/easy-rsa-subjectaltname/ - -INSTALL easy-rsa - -1. Edit vars. -2. Set KEY_CONFIG to point to the correct openssl-<version>.cnf - file included in this distribution. -3. Set KEY_DIR to point to a directory which will - contain all keys, certificates, etc. This - directory need not exist, and if it does, - it will be deleted with rm -rf, so BE - CAREFUL how you set KEY_DIR. -4. (Optional) Edit other fields in vars - per your site data. You may want to - increase KEY_SIZE to 2048 if you are - paranoid and don't mind slower key - processing, but certainly 1024 is - fine for testing purposes. KEY_SIZE - must be compatible across both peers - participating in a secure SSL/TLS - connection. -5. (Optional) If you intend to use PKCS#11, - install openssl >= 0.9.7, install the - following components from www.opensc.org: - - opensc >= 0.10.0 - - engine_pkcs11 >= 0.1.3 - Update the openssl.cnf to load the engine: - - Uncomment pkcs11 under engine_section. - - Validate path at dynamic_path under pkcs11_section. -6. . vars -7. ./clean-all -8. As you create certificates, keys, and - certificate signing requests, understand that - only .key files should be kept confidential. - .crt and .csr files can be sent over insecure - channels such as plaintext email. - -IMPORTANT - -To avoid a possible Man-in-the-Middle attack where an authorized -client tries to connect to another client by impersonating the -server, make sure to enforce some kind of server certificate -verification by clients. There are currently four different ways -of accomplishing this, listed in the order of preference: - -(1) Build your server certificates with specific key usage and - extended key usage. The RFC3280 determine that the following - attributes should be provided for TLS connections: - - Mode Key usage Extended key usage - --------------------------------------------------------------------------- - Client digitalSignature TLS Web Client Authentication - keyAgreement - digitalSignature, keyAgreement - - Server digitalSignature, keyEncipherment TLS Web Server Authentication - digitalSignature, keyAgreement - - Now add the following line to your client configuration: - - remote-cert-tls server - - This will block clients from connecting to any - server which lacks the required extension designation - in its certificate, even if the certificate has been - signed by the CA which is cited in the OpenVPN configuration - file (--ca directive). - -(3) Use the --tls-remote directive on the client to - accept/reject the server connection based on the common - name of the server certificate. - -(3) Use a --tls-verify script or plugin to accept/reject the - server connection based on a custom test of the server - certificate's embedded X509 subject details. - -(4) Sign server certificates with one CA and client certificates - with a different CA. The client config "ca" directive should - reference the server-signing CA while the server config "ca" - directive should reference the client-signing CA. - -NOTES - -Show certificate fields: - openssl x509 -in cert.crt -text - -PKITOOL documentation - -pkitool 2.0 -Usage: pkitool [options...] [common-name] -Options: - --batch : batch mode (default) - --keysize : Set keysize - size : size (default=1024) - --interact : interactive mode - --server : build server cert - --initca : build root CA - --inter : build intermediate CA - --pass : encrypt private key with password - --csr : only generate a CSR, do not sign - --sign : sign an existing CSR - --pkcs12 : generate a combined PKCS#12 file - --pkcs11 : generate certificate on PKCS#11 token - lib : PKCS#11 library - slot : PKCS#11 slot - id : PKCS#11 object id (hex string) - label : PKCS#11 object label -Standalone options: - --pkcs11-slots : list PKCS#11 slots - lib : PKCS#11 library - --pkcs11-objects : list PKCS#11 token objects - lib : PKCS#11 library - slot : PKCS#11 slot - --pkcs11-init : initialize PKCS#11 token DANGEROUS!!! - lib : PKCS#11 library - slot : PKCS#11 slot - label : PKCS#11 token label -Notes: - Please edit the vars script to reflect your configuration, - then source it with "source ./vars". - Next, to start with a fresh PKI configuration and to delete any - previous certificates and keys, run "./clean-all". - Finally, you can run this tool (pkitool) to build certificates/keys. - In order to use PKCS#11 interface you must have opensc-0.10.0 or higher. -Generated files and corresponding OpenVPN directives: -(Files will be placed in the $KEY_DIR directory, defined in ./vars) - ca.crt -> root certificate (--ca) - ca.key -> root key, keep secure (not directly used by OpenVPN) - .crt files -> client/server certificates (--cert) - .key files -> private keys, keep secure (--key) - .csr files -> certificate signing request (not directly used by OpenVPN) - dh1024.pem or dh2048.pem -> Diffie Hellman parameters (--dh) -Examples: - pkitool --initca -> Build root certificate - pkitool --initca --pass -> Build root certificate with password-protected key - pkitool --server server1 -> Build "server1" certificate/key - pkitool client1 -> Build "client1" certificate/key - pkitool --pass client2 -> Build password-protected "client2" certificate/key - pkitool --pkcs12 client3 -> Build "client3" certificate/key in PKCS#12 format - pkitool --csr client4 -> Build "client4" CSR to be signed by another CA - pkitool --sign client4 -> Sign "client4" CSR - pkitool --inter interca -> Build an intermediate key-signing certificate/key - Also see ./inherit-inter script. - pkitool --pkcs11 /usr/lib/pkcs11/lib1 0 010203 "client5 id" client5 - -> Build "client5" certificate/key in PKCS#11 token -Typical usage for initial PKI setup. Build myserver, client1, and client2 cert/keys. -Protect client2 key with a password. Build DH parms. Generated files in ./keys : - [edit vars with your site-specific info] - source ./vars - ./clean-all - ./build-dh -> takes a long time, consider backgrounding - ./pkitool --initca - ./pkitool --server myserver - ./pkitool client1 - ./pkitool --pass client2 -Typical usage for adding client cert to existing PKI: - source ./vars - ./pkitool client-neweasy-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.' -fieasy-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.' -fieasy-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.' -fieasy-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.' -fieasy-rsa/2.0/openssl-0.9.6.cnf deleted +0
-265@@ -1,265 +0,0 @@ -# For use with easy-rsa version 2.0 - -# -# OpenSSL example configuration file. -# This is mostly being used for generation of certificate requests. -# - -# This definition stops the following lines choking if HOME isn't -# defined. -HOME = . -RANDFILE = $ENV::HOME/.rnd - -# Extra OBJECT IDENTIFIER info: -#oid_file = $ENV::HOME/.oid -oid_section = new_oids - -# To use this configuration file with the "-extfile" option of the -# "openssl x509" utility, name here the section containing the -# X.509v3 extensions to use: -# extensions = -# (Alternatively, use a configuration file that has only -# X.509v3 extensions in its main [= default] section.) - -[ new_oids ] - -# We can add new OIDs in here for use by 'ca' and 'req'. -# Add a simple OID like this: -# testoid1=1.2.3.4 -# Or use config file substitution like this: -# testoid2=${testoid1}.5.6 - -#################################################################### -[ ca ] -default_ca = CA_default # The default ca section - -#################################################################### -[ CA_default ] - -dir = $ENV::KEY_DIR # Where everything is kept -certs = $dir # Where the issued certs are kept -crl_dir = $dir # Where the issued crl are kept -database = $dir/index.txt # database index file. -new_certs_dir = $dir # default place for new certs. - -certificate = $dir/ca.crt # The CA certificate -serial = $dir/serial # The current serial number -crl = $dir/crl.pem # The current CRL -private_key = $dir/ca.key # The private key -RANDFILE = $dir/.rand # private random number file - -x509_extensions = usr_cert # The extentions to add to the cert - -# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs -# so this is commented out by default to leave a V1 CRL. -# crl_extensions = crl_ext - -default_days = 3650 # how long to certify for -default_crl_days= 30 # how long before next CRL -default_md = md5 # which md to use. -preserve = no # keep passed DN ordering - -# A few difference way of specifying how similar the request should look -# For type CA, the listed attributes must be the same, and the optional -# and supplied fields are just that :-) -policy = policy_anything - -# For the CA policy -[ policy_match ] -countryName = match -stateOrProvinceName = match -organizationName = match -organizationalUnitName = optional -commonName = supplied -emailAddress = optional - -# For the 'anything' policy -# At this point in time, you must list all acceptable 'object' -# types. -[ policy_anything ] -countryName = optional -stateOrProvinceName = optional -localityName = optional -organizationName = optional -organizationalUnitName = optional -commonName = supplied -emailAddress = optional - -#################################################################### -[ req ] -default_bits = $ENV::KEY_SIZE -default_keyfile = privkey.pem -distinguished_name = req_distinguished_name -attributes = req_attributes -x509_extensions = v3_ca # The extentions to add to the self signed cert - -# Passwords for private keys if not present they will be prompted for -# input_password = secret -# output_password = secret - -# This sets a mask for permitted string types. There are several options. -# default: PrintableString, T61String, BMPString. -# pkix : PrintableString, BMPString. -# utf8only: only UTF8Strings. -# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings). -# MASK:XXXX a literal mask value. -# WARNING: current versions of Netscape crash on BMPStrings or UTF8Strings -# so use this option with caution! -string_mask = nombstr - -# req_extensions = v3_req # The extensions to add to a certificate request - -[ req_distinguished_name ] -countryName = Country Name (2 letter code) -countryName_default = $ENV::KEY_COUNTRY -countryName_min = 2 -countryName_max = 2 - -stateOrProvinceName = State or Province Name (full name) -stateOrProvinceName_default = $ENV::KEY_PROVINCE - -localityName = Locality Name (eg, city) -localityName_default = $ENV::KEY_CITY - -0.organizationName = Organization Name (eg, company) -0.organizationName_default = $ENV::KEY_ORG - -# we can do this but it is not needed normally :-) -#1.organizationName = Second Organization Name (eg, company) -#1.organizationName_default = World Wide Web Pty Ltd - -organizationalUnitName = Organizational Unit Name (eg, section) -#organizationalUnitName_default = - -commonName = Common Name (eg, your name or your server\'s hostname) -commonName_max = 64 - -emailAddress = Email Address -emailAddress_default = $ENV::KEY_EMAIL -emailAddress_max = 40 - -# JY -- added for batch mode -organizationalUnitName_default = $ENV::KEY_OU -commonName_default = $ENV::KEY_CN - -# SET-ex3 = SET extension number 3 - -[ req_attributes ] -challengePassword = A challenge password -challengePassword_min = 4 -challengePassword_max = 20 - -unstructuredName = An optional company name - -[ usr_cert ] - -# These extensions are added when 'ca' signs a request. - -# This goes against PKIX guidelines but some CAs do it and some software -# requires this to avoid interpreting an end user certificate as a CA. - -basicConstraints=CA:FALSE - -# Here are some examples of the usage of nsCertType. If it is omitted -# the certificate can be used for anything *except* object signing. - -# This is OK for an SSL server. -# nsCertType = server - -# For an object signing certificate this would be used. -# nsCertType = objsign - -# For normal client use this is typical -# nsCertType = client, email - -# and for everything including object signing: -# nsCertType = client, email, objsign - -# This is typical in keyUsage for a client certificate. -# keyUsage = nonRepudiation, digitalSignature, keyEncipherment - -# This will be displayed in Netscape's comment listbox. -nsComment = "Easy-RSA Generated Certificate" - -# PKIX recommendations harmless if included in all certificates. -subjectKeyIdentifier=hash -authorityKeyIdentifier=keyid,issuer:always -extendedKeyUsage=clientAuth -keyUsage = digitalSignature - -# This stuff is for subjectAltName and issuerAltname. -# Import the email address. -# subjectAltName=email:copy - -# Copy subject details -# issuerAltName=issuer:copy - -#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem -#nsBaseUrl -#nsRevocationUrl -#nsRenewalUrl -#nsCaPolicyUrl -#nsSslServerName - -[ server ] - -# JY ADDED -- Make a cert with nsCertType set to "server" -basicConstraints=CA:FALSE -nsCertType = server -nsComment = "Easy-RSA Generated Server Certificate" -subjectKeyIdentifier=hash -authorityKeyIdentifier=keyid,issuer:always -extendedKeyUsage=serverAuth -keyUsage = digitalSignature, keyEncipherment - -[ v3_req ] - -# Extensions to add to a certificate request - -basicConstraints = CA:FALSE -keyUsage = nonRepudiation, digitalSignature, keyEncipherment - -[ v3_ca ] - - -# Extensions for a typical CA - - -# PKIX recommendation. - -subjectKeyIdentifier=hash - -authorityKeyIdentifier=keyid:always,issuer:always - -# This is what PKIX recommends but some broken software chokes on critical -# extensions. -#basicConstraints = critical,CA:true -# So we do this instead. -basicConstraints = CA:true - -# Key usage: this is typical for a CA certificate. However since it will -# prevent it being used as an test self-signed certificate it is best -# left out by default. -# keyUsage = cRLSign, keyCertSign - -# Some might want this also -# nsCertType = sslCA, emailCA - -# Include email address in subject alt name: another PKIX recommendation -# subjectAltName=email:copy -# Copy issuer details -# issuerAltName=issuer:copy - -# DER hex encoding of an extension: beware experts only! -# obj=DER:02:03 -# Where 'obj' is a standard or added object -# You can even override a supported extension: -# basicConstraints= critical, DER:30:03:01:01:FF - -[ crl_ext ] - -# CRL extensions. -# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL. - -# issuerAltName=issuer:copy -authorityKeyIdentifier=keyid:always,issuer:alwayseasy-rsa/2.0/openssl-0.9.8.cnf deleted +0
-290@@ -1,290 +0,0 @@ -# For use with easy-rsa version 2.0 - -# -# OpenSSL example configuration file. -# This is mostly being used for generation of certificate requests. -# - -# This definition stops the following lines choking if HOME isn't -# defined. -HOME = . -RANDFILE = $ENV::HOME/.rnd -openssl_conf = openssl_init - -[ openssl_init ] -# Extra OBJECT IDENTIFIER info: -#oid_file = $ENV::HOME/.oid -oid_section = new_oids -engines = engine_section - -# To use this configuration file with the "-extfile" option of the -# "openssl x509" utility, name here the section containing the -# X.509v3 extensions to use: -# extensions = -# (Alternatively, use a configuration file that has only -# X.509v3 extensions in its main [= default] section.) - -[ new_oids ] - -# We can add new OIDs in here for use by 'ca' and 'req'. -# Add a simple OID like this: -# testoid1=1.2.3.4 -# Or use config file substitution like this: -# testoid2=${testoid1}.5.6 - -#################################################################### -[ ca ] -default_ca = CA_default # The default ca section - -#################################################################### -[ CA_default ] - -dir = $ENV::KEY_DIR # Where everything is kept -certs = $dir # Where the issued certs are kept -crl_dir = $dir # Where the issued crl are kept -database = $dir/index.txt # database index file. -new_certs_dir = $dir # default place for new certs. - -certificate = $dir/ca.crt # The CA certificate -serial = $dir/serial # The current serial number -crl = $dir/crl.pem # The current CRL -private_key = $dir/ca.key # The private key -RANDFILE = $dir/.rand # private random number file - -x509_extensions = usr_cert # The extentions to add to the cert - -# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs -# so this is commented out by default to leave a V1 CRL. -# crl_extensions = crl_ext - -default_days = 3650 # how long to certify for -default_crl_days= 30 # how long before next CRL -default_md = md5 # which md to use. -preserve = no # keep passed DN ordering - -# A few difference way of specifying how similar the request should look -# For type CA, the listed attributes must be the same, and the optional -# and supplied fields are just that :-) -policy = policy_anything - -# For the CA policy -[ policy_match ] -countryName = match -stateOrProvinceName = match -organizationName = match -organizationalUnitName = optional -commonName = supplied -name = optional -emailAddress = optional - -# For the 'anything' policy -# At this point in time, you must list all acceptable 'object' -# types. -[ policy_anything ] -countryName = optional -stateOrProvinceName = optional -localityName = optional -organizationName = optional -organizationalUnitName = optional -commonName = supplied -name = optional -emailAddress = optional - -#################################################################### -[ req ] -default_bits = $ENV::KEY_SIZE -default_keyfile = privkey.pem -distinguished_name = req_distinguished_name -attributes = req_attributes -x509_extensions = v3_ca # The extentions to add to the self signed cert - -# Passwords for private keys if not present they will be prompted for -# input_password = secret -# output_password = secret - -# This sets a mask for permitted string types. There are several options. -# default: PrintableString, T61String, BMPString. -# pkix : PrintableString, BMPString. -# utf8only: only UTF8Strings. -# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings). -# MASK:XXXX a literal mask value. -# WARNING: current versions of Netscape crash on BMPStrings or UTF8Strings -# so use this option with caution! -string_mask = nombstr - -# req_extensions = v3_req # The extensions to add to a certificate request - -[ req_distinguished_name ] -countryName = Country Name (2 letter code) -countryName_default = $ENV::KEY_COUNTRY -countryName_min = 2 -countryName_max = 2 - -stateOrProvinceName = State or Province Name (full name) -stateOrProvinceName_default = $ENV::KEY_PROVINCE - -localityName = Locality Name (eg, city) -localityName_default = $ENV::KEY_CITY - -0.organizationName = Organization Name (eg, company) -0.organizationName_default = $ENV::KEY_ORG - -# we can do this but it is not needed normally :-) -#1.organizationName = Second Organization Name (eg, company) -#1.organizationName_default = World Wide Web Pty Ltd - -organizationalUnitName = Organizational Unit Name (eg, section) -#organizationalUnitName_default = - -commonName = Common Name (eg, your name or your server\'s hostname) -commonName_max = 64 - -name = Name -name_max = 64 - -emailAddress = Email Address -emailAddress_default = $ENV::KEY_EMAIL -emailAddress_max = 40 - -# JY -- added for batch mode -organizationalUnitName_default = $ENV::KEY_OU -commonName_default = $ENV::KEY_CN -name_default = $ENV::KEY_NAME - -# SET-ex3 = SET extension number 3 - -[ req_attributes ] -challengePassword = A challenge password -challengePassword_min = 4 -challengePassword_max = 20 - -unstructuredName = An optional company name - -[ usr_cert ] - -# These extensions are added when 'ca' signs a request. - -# This goes against PKIX guidelines but some CAs do it and some software -# requires this to avoid interpreting an end user certificate as a CA. - -basicConstraints=CA:FALSE - -# Here are some examples of the usage of nsCertType. If it is omitted -# the certificate can be used for anything *except* object signing. - -# This is OK for an SSL server. -# nsCertType = server - -# For an object signing certificate this would be used. -# nsCertType = objsign - -# For normal client use this is typical -# nsCertType = client, email - -# and for everything including object signing: -# nsCertType = client, email, objsign - -# This is typical in keyUsage for a client certificate. -# keyUsage = nonRepudiation, digitalSignature, keyEncipherment - -# This will be displayed in Netscape's comment listbox. -nsComment = "Easy-RSA Generated Certificate" - -# PKIX recommendations harmless if included in all certificates. -subjectKeyIdentifier=hash -authorityKeyIdentifier=keyid,issuer:always -extendedKeyUsage=clientAuth -keyUsage = digitalSignature - -# This stuff is for subjectAltName and issuerAltname. -# Import the email address. -# subjectAltName=email:copy - -# Copy subject details -# issuerAltName=issuer:copy - -#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem -#nsBaseUrl -#nsRevocationUrl -#nsRenewalUrl -#nsCaPolicyUrl -#nsSslServerName - -[ server ] - -# JY ADDED -- Make a cert with nsCertType set to "server" -basicConstraints=CA:FALSE -nsCertType = server -nsComment = "Easy-RSA Generated Server Certificate" -subjectKeyIdentifier=hash -authorityKeyIdentifier=keyid,issuer:always -extendedKeyUsage=serverAuth -keyUsage = digitalSignature, keyEncipherment - -[ v3_req ] - -# Extensions to add to a certificate request - -basicConstraints = CA:FALSE -keyUsage = nonRepudiation, digitalSignature, keyEncipherment - -[ v3_ca ] - - -# Extensions for a typical CA - - -# PKIX recommendation. - -subjectKeyIdentifier=hash - -authorityKeyIdentifier=keyid:always,issuer:always - -# This is what PKIX recommends but some broken software chokes on critical -# extensions. -#basicConstraints = critical,CA:true -# So we do this instead. -basicConstraints = CA:true - -# Key usage: this is typical for a CA certificate. However since it will -# prevent it being used as an test self-signed certificate it is best -# left out by default. -# keyUsage = cRLSign, keyCertSign - -# Some might want this also -# nsCertType = sslCA, emailCA - -# Include email address in subject alt name: another PKIX recommendation -# subjectAltName=email:copy -# Copy issuer details -# issuerAltName=issuer:copy - -# DER hex encoding of an extension: beware experts only! -# obj=DER:02:03 -# Where 'obj' is a standard or added object -# You can even override a supported extension: -# basicConstraints= critical, DER:30:03:01:01:FF - -[ crl_ext ] - -# CRL extensions. -# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL. - -# issuerAltName=issuer:copy -authorityKeyIdentifier=keyid:always,issuer:always - -[ engine_section ] -# -# If you are using PKCS#11 -# Install engine_pkcs11 of opensc (www.opensc.org) -# And uncomment the following -# verify that dynamic_path points to the correct location -# -#pkcs11 = pkcs11_section - -[ pkcs11_section ] -engine_id = pkcs11 -dynamic_path = /usr/lib/engines/engine_pkcs11.so -MODULE_PATH = $ENV::PKCS11_MODULE_PATH -PIN = $ENV::PKCS11_PIN -init = 0easy-rsa/2.0/openssl-1.0.0.cnf deleted +0
-285@@ -1,285 +0,0 @@ -# For use with easy-rsa version 2.0 and OpenSSL 1.0.0* - -# This definition stops the following lines choking if HOME isn't -# defined. -HOME = . -RANDFILE = $ENV::HOME/.rnd -openssl_conf = openssl_init - -[ openssl_init ] -# Extra OBJECT IDENTIFIER info: -#oid_file = $ENV::HOME/.oid -oid_section = new_oids -engines = engine_section - -# To use this configuration file with the "-extfile" option of the -# "openssl x509" utility, name here the section containing the -# X.509v3 extensions to use: -# extensions = -# (Alternatively, use a configuration file that has only -# X.509v3 extensions in its main [= default] section.) - -[ new_oids ] - -# We can add new OIDs in here for use by 'ca' and 'req'. -# Add a simple OID like this: -# testoid1=1.2.3.4 -# Or use config file substitution like this: -# testoid2=${testoid1}.5.6 - -#################################################################### -[ ca ] -default_ca = CA_default # The default ca section - -#################################################################### -[ CA_default ] - -dir = $ENV::KEY_DIR # Where everything is kept -certs = $dir # Where the issued certs are kept -crl_dir = $dir # Where the issued crl are kept -database = $dir/index.txt # database index file. -new_certs_dir = $dir # default place for new certs. - -certificate = $dir/ca.crt # The CA certificate -serial = $dir/serial # The current serial number -crl = $dir/crl.pem # The current CRL -private_key = $dir/ca.key # The private key -RANDFILE = $dir/.rand # private random number file - -x509_extensions = usr_cert # The extentions to add to the cert - -# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs -# so this is commented out by default to leave a V1 CRL. -# crl_extensions = crl_ext - -default_days = 3650 # how long to certify for -default_crl_days= 30 # how long before next CRL -default_md = md5 # use public key default MD -preserve = no # keep passed DN ordering - -# A few difference way of specifying how similar the request should look -# For type CA, the listed attributes must be the same, and the optional -# and supplied fields are just that :-) -policy = policy_anything - -# For the CA policy -[ policy_match ] -countryName = match -stateOrProvinceName = match -organizationName = match -organizationalUnitName = optional -commonName = supplied -name = optional -emailAddress = optional - -# For the 'anything' policy -# At this point in time, you must list all acceptable 'object' -# types. -[ policy_anything ] -countryName = optional -stateOrProvinceName = optional -localityName = optional -organizationName = optional -organizationalUnitName = optional -commonName = supplied -name = optional -emailAddress = optional - -#################################################################### -[ req ] -default_bits = $ENV::KEY_SIZE -default_keyfile = privkey.pem -distinguished_name = req_distinguished_name -attributes = req_attributes -x509_extensions = v3_ca # The extentions to add to the self signed cert - -# Passwords for private keys if not present they will be prompted for -# input_password = secret -# output_password = secret - -# This sets a mask for permitted string types. There are several options. -# default: PrintableString, T61String, BMPString. -# pkix : PrintableString, BMPString (PKIX recommendation after 2004). -# utf8only: only UTF8Strings (PKIX recommendation after 2004). -# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings). -# MASK:XXXX a literal mask value. -string_mask = nombstr - -# req_extensions = v3_req # The extensions to add to a certificate request - -[ req_distinguished_name ] -countryName = Country Name (2 letter code) -countryName_default = $ENV::KEY_COUNTRY -countryName_min = 2 -countryName_max = 2 - -stateOrProvinceName = State or Province Name (full name) -stateOrProvinceName_default = $ENV::KEY_PROVINCE - -localityName = Locality Name (eg, city) -localityName_default = $ENV::KEY_CITY - -0.organizationName = Organization Name (eg, company) -0.organizationName_default = $ENV::KEY_ORG - -# we can do this but it is not needed normally :-) -#1.organizationName = Second Organization Name (eg, company) -#1.organizationName_default = World Wide Web Pty Ltd - -organizationalUnitName = Organizational Unit Name (eg, section) -#organizationalUnitName_default = - -commonName = Common Name (eg, your name or your server\'s hostname) -commonName_max = 64 - -name = Name -name_max = 64 - -emailAddress = Email Address -emailAddress_default = $ENV::KEY_EMAIL -emailAddress_max = 40 - -# JY -- added for batch mode -organizationalUnitName_default = $ENV::KEY_OU -commonName_default = $ENV::KEY_CN -name_default = $ENV::KEY_NAME - - -# SET-ex3 = SET extension number 3 - -[ req_attributes ] -challengePassword = A challenge password -challengePassword_min = 4 -challengePassword_max = 20 - -unstructuredName = An optional company name - -[ usr_cert ] - -# These extensions are added when 'ca' signs a request. - -# This goes against PKIX guidelines but some CAs do it and some software -# requires this to avoid interpreting an end user certificate as a CA. - -basicConstraints=CA:FALSE - -# Here are some examples of the usage of nsCertType. If it is omitted -# the certificate can be used for anything *except* object signing. - -# This is OK for an SSL server. -# nsCertType = server - -# For an object signing certificate this would be used. -# nsCertType = objsign - -# For normal client use this is typical -# nsCertType = client, email - -# and for everything including object signing: -# nsCertType = client, email, objsign - -# This is typical in keyUsage for a client certificate. -# keyUsage = nonRepudiation, digitalSignature, keyEncipherment - -# This will be displayed in Netscape's comment listbox. -nsComment = "Easy-RSA Generated Certificate" - -# PKIX recommendations harmless if included in all certificates. -subjectKeyIdentifier=hash -authorityKeyIdentifier=keyid,issuer:always -extendedKeyUsage=clientAuth -keyUsage = digitalSignature - - -# This stuff is for subjectAltName and issuerAltname. -# Import the email address. -# subjectAltName=email:copy - -# Copy subject details -# issuerAltName=issuer:copy - -#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem -#nsBaseUrl -#nsRevocationUrl -#nsRenewalUrl -#nsCaPolicyUrl -#nsSslServerName - -[ server ] - -# JY ADDED -- Make a cert with nsCertType set to "server" -basicConstraints=CA:FALSE -nsCertType = server -nsComment = "Easy-RSA Generated Server Certificate" -subjectKeyIdentifier=hash -authorityKeyIdentifier=keyid,issuer:always -extendedKeyUsage=serverAuth -keyUsage = digitalSignature, keyEncipherment - -[ v3_req ] - -# Extensions to add to a certificate request - -basicConstraints = CA:FALSE -keyUsage = nonRepudiation, digitalSignature, keyEncipherment - -[ v3_ca ] - - -# Extensions for a typical CA - - -# PKIX recommendation. - -subjectKeyIdentifier=hash - -authorityKeyIdentifier=keyid:always,issuer:always - -# This is what PKIX recommends but some broken software chokes on critical -# extensions. -#basicConstraints = critical,CA:true -# So we do this instead. -basicConstraints = CA:true - -# Key usage: this is typical for a CA certificate. However since it will -# prevent it being used as an test self-signed certificate it is best -# left out by default. -# keyUsage = cRLSign, keyCertSign - -# Some might want this also -# nsCertType = sslCA, emailCA - -# Include email address in subject alt name: another PKIX recommendation -# subjectAltName=email:copy -# Copy issuer details -# issuerAltName=issuer:copy - -# DER hex encoding of an extension: beware experts only! -# obj=DER:02:03 -# Where 'obj' is a standard or added object -# You can even override a supported extension: -# basicConstraints= critical, DER:30:03:01:01:FF - -[ crl_ext ] - -# CRL extensions. -# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL. - -# issuerAltName=issuer:copy -authorityKeyIdentifier=keyid:always,issuer:always - -[ engine_section ] -# -# If you are using PKCS#11 -# Install engine_pkcs11 of opensc (www.opensc.org) -# And uncomment the following -# verify that dynamic_path points to the correct location -# -#pkcs11 = pkcs11_section - -[ pkcs11_section ] -engine_id = pkcs11 -dynamic_path = /usr/lib/engines/engine_pkcs11.so -MODULE_PATH = $ENV::PKCS11_MODULE_PATH -PIN = $ENV::PKCS11_PIN -init = 0easy-rsa/2.0/pkitool deleted +0
-379@@ -1,379 +0,0 @@ -#!/bin/sh - -# 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 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 - -# pkitool is a front-end for the openssl tool. - -# Calling scripts can set the certificate organizational -# unit with the KEY_OU environmental variable. - -# Calling scripts can also set the KEY_NAME environmental -# variable to set the "name" X509 subject field. - -PROGNAME=pkitool -VERSION=2.0 -DEBUG=0 - -die() -{ - local m="$1" - - echo "$m" >&2 - exit 1 -} - -need_vars() -{ - echo ' Please edit the vars script to reflect your configuration,' - echo ' then source it with "source ./vars".' - echo ' Next, to start with a fresh PKI configuration and to delete any' - echo ' previous certificates and keys, run "./clean-all".' - echo " Finally, you can run this tool ($PROGNAME) to build certificates/keys." -} - -usage() -{ - echo "$PROGNAME $VERSION" - echo "Usage: $PROGNAME [options...] [common-name]" - echo "Options:" - echo " --batch : batch mode (default)" - echo " --keysize : Set keysize" - echo " size : size (default=1024)" - echo " --interact : interactive mode" - echo " --server : build server cert" - echo " --initca : build root CA" - echo " --inter : build intermediate CA" - echo " --pass : encrypt private key with password" - echo " --csr : only generate a CSR, do not sign" - echo " --sign : sign an existing CSR" - echo " --pkcs12 : generate a combined PKCS#12 file" - echo " --pkcs11 : generate certificate on PKCS#11 token" - echo " lib : PKCS#11 library" - echo " slot : PKCS#11 slot" - echo " id : PKCS#11 object id (hex string)" - echo " label : PKCS#11 object label" - echo "Standalone options:" - echo " --pkcs11-slots : list PKCS#11 slots" - echo " lib : PKCS#11 library" - echo " --pkcs11-objects : list PKCS#11 token objects" - echo " lib : PKCS#11 library" - echo " slot : PKCS#11 slot" - echo " --pkcs11-init : initialize PKCS#11 token DANGEROUS!!!" - echo " lib : PKCS#11 library" - echo " slot : PKCS#11 slot" - echo " label : PKCS#11 token label" - echo "Notes:" - need_vars - echo " In order to use PKCS#11 interface you must have opensc-0.10.0 or higher." - echo "Generated files and corresponding OpenVPN directives:" - echo '(Files will be placed in the $KEY_DIR directory, defined in ./vars)' - echo " ca.crt -> root certificate (--ca)" - echo " ca.key -> root key, keep secure (not directly used by OpenVPN)" - echo " .crt files -> client/server certificates (--cert)" - echo " .key files -> private keys, keep secure (--key)" - echo " .csr files -> certificate signing request (not directly used by OpenVPN)" - echo " dh1024.pem or dh2048.pem -> Diffie Hellman parameters (--dh)" - echo "Examples:" - echo " $PROGNAME --initca -> Build root certificate" - echo " $PROGNAME --initca --pass -> Build root certificate with password-protected key" - echo " $PROGNAME --server server1 -> Build \"server1\" certificate/key" - echo " $PROGNAME client1 -> Build \"client1\" certificate/key" - echo " $PROGNAME --pass client2 -> Build password-protected \"client2\" certificate/key" - echo " $PROGNAME --pkcs12 client3 -> Build \"client3\" certificate/key in PKCS#12 format" - echo " $PROGNAME --csr client4 -> Build \"client4\" CSR to be signed by another CA" - echo " $PROGNAME --sign client4 -> Sign \"client4\" CSR" - echo " $PROGNAME --inter interca -> Build an intermediate key-signing certificate/key" - echo " Also see ./inherit-inter script." - echo " $PROGNAME --pkcs11 /usr/lib/pkcs11/lib1 0 010203 \"client5 id\" client5" - echo " -> Build \"client5\" certificate/key in PKCS#11 token" - echo "Typical usage for initial PKI setup. Build myserver, client1, and client2 cert/keys." - echo "Protect client2 key with a password. Build DH parms. Generated files in ./keys :" - echo " [edit vars with your site-specific info]" - echo " source ./vars" - echo " ./clean-all" - echo " ./build-dh -> takes a long time, consider backgrounding" - echo " ./$PROGNAME --initca" - echo " ./$PROGNAME --server myserver" - echo " ./$PROGNAME client1" - echo " ./$PROGNAME --pass client2" - echo "Typical usage for adding client cert to existing PKI:" - echo " source ./vars" - echo " ./$PROGNAME client-new" -} - -# Set tool defaults -[ -n "$OPENSSL" ] || export OPENSSL="openssl" -[ -n "$PKCS11TOOL" ] || export PKCS11TOOL="pkcs11-tool" -[ -n "$GREP" ] || export GREP="grep" - -# Set defaults -DO_REQ="1" -REQ_EXT="" -DO_CA="1" -CA_EXT="" -DO_P12="0" -DO_P11="0" -DO_ROOT="0" -NODES_REQ="-nodes" -NODES_P12="" -BATCH="-batch" -CA="ca" -# must be set or errors of openssl.cnf -PKCS11_MODULE_PATH="dummy" -PKCS11_PIN="dummy" - -# Process options -while [ $# -gt 0 ]; do - case "$1" in - --keysize ) KEY_SIZE=$2 - shift;; - --server ) REQ_EXT="$REQ_EXT -extensions server" - CA_EXT="$CA_EXT -extensions server" ;; - --batch ) BATCH="-batch" ;; - --interact ) BATCH="" ;; - --inter ) CA_EXT="$CA_EXT -extensions v3_ca" ;; - --initca ) DO_ROOT="1" ;; - --pass ) NODES_REQ="" ;; - --csr ) DO_CA="0" ;; - --sign ) DO_REQ="0" ;; - --pkcs12 ) DO_P12="1" ;; - --pkcs11 ) DO_P11="1" - PKCS11_MODULE_PATH="$2" - PKCS11_SLOT="$3" - PKCS11_ID="$4" - PKCS11_LABEL="$5" - shift 4;; - - # standalone - --pkcs11-init) - PKCS11_MODULE_PATH="$2" - PKCS11_SLOT="$3" - PKCS11_LABEL="$4" - if [ -z "$PKCS11_LABEL" ]; then - die "Please specify library name, slot and label" - fi - $PKCS11TOOL --module "$PKCS11_MODULE_PATH" --init-token --slot "$PKCS11_SLOT" \ - --label "$PKCS11_LABEL" && - $PKCS11TOOL --module "$PKCS11_MODULE_PATH" --init-pin --slot "$PKCS11_SLOT" - exit $?;; - --pkcs11-slots) - PKCS11_MODULE_PATH="$2" - if [ -z "$PKCS11_MODULE_PATH" ]; then - die "Please specify library name" - fi - $PKCS11TOOL --module "$PKCS11_MODULE_PATH" --list-slots - exit 0;; - --pkcs11-objects) - PKCS11_MODULE_PATH="$2" - PKCS11_SLOT="$3" - if [ -z "$PKCS11_SLOT" ]; then - die "Please specify library name and slot" - fi - $PKCS11TOOL --module "$PKCS11_MODULE_PATH" --list-objects --login --slot "$PKCS11_SLOT" - exit 0;; - - --help|--usage) - usage - exit ;; - --version) - echo "$PROGNAME $VERSION" - exit ;; - # errors - --* ) die "$PROGNAME: unknown option: $1" ;; - * ) break ;; - esac - shift -done - -if ! [ -z "$BATCH" ]; then - if $OPENSSL version | grep 0.9.6 > /dev/null; then - die "Batch mode is unsupported in openssl<0.9.7" - fi -fi - -if [ $DO_P12 -eq 1 -a $DO_P11 -eq 1 ]; then - die "PKCS#11 and PKCS#12 cannot be specified together" -fi - -if [ $DO_P11 -eq 1 ]; then - if ! grep "^pkcs11.*=" "$KEY_CONFIG" > /dev/null; then - die "Please edit $KEY_CONFIG and setup PKCS#11 engine" - fi -fi - -# If we are generating pkcs12, only encrypt the final step -if [ $DO_P12 -eq 1 ]; then - NODES_P12="$NODES_REQ" - NODES_REQ="-nodes" -fi - -if [ $DO_P11 -eq 1 ]; then - if [ -z "$PKCS11_LABEL" ]; then - die "PKCS#11 arguments incomplete" - fi -fi - -# If undefined, set default key expiration intervals -if [ -z "$KEY_EXPIRE" ]; then - KEY_EXPIRE=3650 -fi -if [ -z "$CA_EXPIRE" ]; then - CA_EXPIRE=3650 -fi - -# Set organizational unit to empty string if undefined -if [ -z "$KEY_OU" ]; then - KEY_OU="" -fi - -# Set X509 Name string to empty string if undefined -if [ -z "$KEY_NAME" ]; then - KEY_NAME="" -fi - -# Set KEY_CN, FN -if [ $DO_ROOT -eq 1 ]; then - if [ -z "$KEY_CN" ]; then - if [ "$1" ]; then - KEY_CN="$1" - elif [ "$KEY_ORG" ]; then - KEY_CN="$KEY_ORG CA" - fi - fi - if [ $BATCH ] && [ "$KEY_CN" ]; then - echo "Using CA Common Name:" "$KEY_CN" - fi - FN="$KEY_CN" -elif [ $BATCH ] && [ "$KEY_CN" ]; then - echo "Using Common Name:" "$KEY_CN" - FN="$KEY_CN" - if [ "$1" ]; then - FN="$1" - fi -else - if [ $# -ne 1 ]; then - usage - exit 1 - else - KEY_CN="$1" - fi - FN="$KEY_CN" -fi - -export CA_EXPIRE KEY_EXPIRE KEY_OU KEY_NAME KEY_CN PKCS11_MODULE_PATH PKCS11_PIN - -# Show parameters (debugging) -if [ $DEBUG -eq 1 ]; then - echo DO_REQ $DO_REQ - echo REQ_EXT $REQ_EXT - echo DO_CA $DO_CA - echo CA_EXT $CA_EXT - echo NODES_REQ $NODES_REQ - echo NODES_P12 $NODES_P12 - echo DO_P12 $DO_P12 - echo KEY_CN $KEY_CN - echo BATCH $BATCH - echo DO_ROOT $DO_ROOT - echo KEY_EXPIRE $KEY_EXPIRE - echo CA_EXPIRE $CA_EXPIRE - echo KEY_OU $KEY_OU - echo KEY_NAME $KEY_NAME - echo DO_P11 $DO_P11 - echo PKCS11_MODULE_PATH $PKCS11_MODULE_PATH - echo PKCS11_SLOT $PKCS11_SLOT - echo PKCS11_ID $PKCS11_ID - echo PKCS11_LABEL $PKCS11_LABEL -fi - -# Make sure ./vars was sourced beforehand -if [ -d "$KEY_DIR" ] && [ "$KEY_CONFIG" ]; then - cd "$KEY_DIR" - - # Make sure $KEY_CONFIG points to the correct version - # of openssl.cnf - if $GREP -i 'easy-rsa version 2\.[0-9]' "$KEY_CONFIG" >/dev/null; then - : - else - echo "$PROGNAME: KEY_CONFIG (set by the ./vars script) is pointing to the wrong" - echo "version of openssl.cnf: $KEY_CONFIG" - echo "The correct version should have a comment that says: easy-rsa version 2.x"; - exit 1; - fi - - # Build root CA - if [ $DO_ROOT -eq 1 ]; then - $OPENSSL req $BATCH -days $CA_EXPIRE $NODES_REQ -new -newkey rsa:$KEY_SIZE -sha1 \ - -x509 -keyout "$CA.key" -out "$CA.crt" -config "$KEY_CONFIG" && \ - chmod 0600 "$CA.key" - else - # Make sure CA key/cert is available - if [ $DO_CA -eq 1 ] || [ $DO_P12 -eq 1 ]; then - if [ ! -r "$CA.crt" ] || [ ! -r "$CA.key" ]; then - echo "$PROGNAME: Need a readable $CA.crt and $CA.key in $KEY_DIR" - echo "Try $PROGNAME --initca to build a root certificate/key." - exit 1 - fi - fi - - # Generate key for PKCS#11 token - PKCS11_ARGS= - if [ $DO_P11 -eq 1 ]; then - stty -echo - echo -n "User PIN: " - read -r PKCS11_PIN - stty echo - export PKCS11_PIN - - echo "Generating key pair on PKCS#11 token..." - $PKCS11TOOL --module "$PKCS11_MODULE_PATH" --keypairgen \ - --login --pin "$PKCS11_PIN" \ - --key-type rsa:1024 \ - --slot "$PKCS11_SLOT" --id "$PKCS11_ID" --label "$PKCS11_LABEL" || exit 1 - PKCS11_ARGS="-engine pkcs11 -keyform engine -key $PKCS11_SLOT:$PKCS11_ID" - fi - - # Build cert/key - ( [ $DO_REQ -eq 0 ] || $OPENSSL req $BATCH -days $KEY_EXPIRE $NODES_REQ -new -newkey rsa:$KEY_SIZE \ - -keyout "$FN.key" -out "$FN.csr" $REQ_EXT -config "$KEY_CONFIG" $PKCS11_ARGS ) && \ - ( [ $DO_CA -eq 0 ] || $OPENSSL ca $BATCH -days $KEY_EXPIRE -out "$FN.crt" \ - -in "$FN.csr" $CA_EXT -md sha1 -config "$KEY_CONFIG" ) && \ - ( [ $DO_P12 -eq 0 ] || $OPENSSL pkcs12 -export -inkey "$FN.key" \ - -in "$FN.crt" -certfile "$CA.crt" -out "$FN.p12" $NODES_P12 ) && \ - ( [ $DO_CA -eq 0 -o $DO_P11 -eq 1 ] || chmod 0600 "$FN.key" ) && \ - ( [ $DO_P12 -eq 0 ] || chmod 0600 "$FN.p12" ) - - # Load certificate into PKCS#11 token - if [ $DO_P11 -eq 1 ]; then - $OPENSSL x509 -in "$FN.crt" -inform PEM -out "$FN.crt.der" -outform DER && \ - $PKCS11TOOL --module "$PKCS11_MODULE_PATH" --write-object "$FN.crt.der" --type cert \ - --login --pin "$PKCS11_PIN" \ - --slot "$PKCS11_SLOT" --id "$PKCS11_ID" --label "$PKCS11_LABEL" - [ -e "$FN.crt.der" ]; rm "$FN.crt.der" - fi - - fi - -# Need definitions -else - need_vars -fieasy-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.' -fieasy-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@@ -1,74 +0,0 @@ -# easy-rsa parameter settings - -# NOTE: If you installed from an RPM, -# don't edit this file in place in -# /usr/share/openvpn/easy-rsa -- -# instead, you should copy the whole -# easy-rsa directory to another location -# (such as /etc/openvpn) so that your -# edits will not be wiped out by a future -# OpenVPN package upgrade. - -# This variable should point to -# the top level of the easy-rsa -# tree. -export EASY_RSA="`pwd`" - -# -# This variable should point to -# the requested executables -# -export OPENSSL="openssl" -export PKCS11TOOL="pkcs11-tool" -export GREP="grep" - - -# This variable should point to -# the openssl.cnf file included -# with easy-rsa. -export KEY_CONFIG=`$EASY_RSA/whichopensslcnf $EASY_RSA` - -# Edit this variable to point to -# your soon-to-be-created key -# directory. -# -# WARNING: clean-all will do -# a rm -rf on this directory -# so make sure you define -# it correctly! -export KEY_DIR="$EASY_RSA/keys" - -# Issue rm -rf warning -echo NOTE: If you run ./clean-all, I will be doing a rm -rf on $KEY_DIR - -# PKCS11 fixes -export PKCS11_MODULE_PATH="dummy" -export PKCS11_PIN="dummy" - -# Increase this to 2048 if you -# are paranoid. This will slow -# down TLS negotiation performance -# as well as the one-time DH parms -# generation process. -export KEY_SIZE=1024 - -# In how many days should the root CA key expire? -export CA_EXPIRE=3650 - -# In how many days should certificates expire? -export KEY_EXPIRE=3650 - -# These are the default values for fields -# which will be placed in the certificate. -# Don't leave any of these fields blank. -export KEY_COUNTRY="US" -export KEY_PROVINCE="CA" -export KEY_CITY="SanFrancisco" -export KEY_ORG="Fort-Funston" -export KEY_EMAIL="[email protected]..." -export [email protected]... -export KEY_CN=changeme -export KEY_NAME=changeme -export KEY_OU=changeme -export PKCS11_MODULE_PATH=changeme -export PKCS11_PIN=1234easy-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 0easy-rsa/Windows/README.txt deleted +0
-44@@ -1,44 +0,0 @@ -Extract all zip'd files to the OpenVPN home directory, -including the openssl.cnf file from the top-level -"easy-rsa" directory. - -First run init-config.bat - -Next, edit vars.bat to adapt it to your environment, and -create the directory that will hold your key files. - -To generate TLS keys: - -Create new empty index and serial files (once only) -1. vars -2. clean-all - -Build a CA key (once only) -1. vars -2. build-ca - -Build a DH file (for server side, once only) -1. vars -2. build-dh - -Build a private key/certficate for the openvpn server -1. vars -2. build-key-server <machine-name> - -Build key files in PEM format (for each client machine) -1. vars -2. build-key <machine-name> - (use <machine name> for specific name within script) - -or - -Build key files in PKCS #12 format (for each client machine) -1. vars -2. build-key-pkcs12 <machine-name> - (use <machine name> for specific name within script) - -To revoke a TLS certificate and generate a CRL file: -1. vars -2. revoke-full <machine-name> -3. verify last line of output confirms revokation -4. copy crl.pem to server directory and ensure config file uses "crl-verify <crl filename>"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%\*.oldeasy-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%\*.oldeasy-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%\*.oldeasy-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%\*.oldeasy-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%\*.oldeasy-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%\*.oldeasy-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
-0easy-rsa/Windows/init-config.bat deleted +0
-1@@ -1 +0,0 @@ -copy vars.bat.sample vars.bateasy-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.pemeasy-rsa/Windows/serial.start deleted +0
-1@@ -1 +0,0 @@ -01easy-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=1234openvpn.spec.in +1
-2@@ -222,7 +222,7 @@ fi %endif # Install extra %doc stuff -%doc contrib/ easy-rsa/ sample-*/ plugins/README.* +%doc contrib/ sample-*/ plugins/README.* %changelog * Thu Jul 30 2009 David Sommerseth <[email protected]...> --1.7.3.4
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Re: [Openvpn-devel] [PATCH 19/52] Remove tap-win32
In reply to Alon Bar-LevAs tap-win32 is being moved to a separate subproject, this makes sense.
ACK.
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
Quoted 6,707 lines
Introduce
tap-windows.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, 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.hMakefile.am +1
-2@@ -44,7 +44,6 @@ EXTRA_DIST = \ sample-keys \ sample-scripts \ suse \ - tap-win32 \ contrib \ debug \ plugins \@@ -147,7 +146,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.cconfigure.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.deftap-win32/SOURCES.in deleted +0
-64@@ -1,64 +0,0 @@ -# Build TAP-Win32 driver. -# Build Command: build -cef - -MAJORCOMP=ntos -MINORCOMP=ndis - -TARGETNAME=@@PRODUCT_TAP_ID@@ -TARGETTYPE=DRIVER -TARGETPATH=. -TARGETLIBS=$(DDK_LIB_PATH)\ndis.lib $(DDK_LIB_PATH)\ntstrsafe.lib -INCLUDES=$(DDK_INCLUDE_PATH) .. - -# The TAP version numbers here must be >= -# PRODUCT_TAP_WIN32_MIN_x values defined in version.m4 -C_DEFINES= -C_DEFINES=$(C_DEFINES) -DTAP_DRIVER_MAJOR_VERSION=@@PRODUCT_TAP_MAJOR_VER@@ -C_DEFINES=$(C_DEFINES) -DTAP_DRIVER_MINOR_VERSION=@@PRODUCT_TAP_MINOR_VER@@ - -# Produce the same symbolic information for both free & checked builds. -# This will allow us to perform full source-level debugging on both -# builds without affecting the free build's performance. -!IF "$(DDKBUILDENV)" != "chk" -NTDEBUGTYPE=both -USE_PDB=1 -!ELSE -NTDEBUGTYPE=both -USE_PDB=1 -!ENDIF - -# Set compiler optimizations: -# /Ox - Full optimization enabled -# /Os - favor speed over size when optimizing -# /Od - Disable all optimizations -# /Oi - Enable optimization for intrinsic functions -# /Fc - Generate mixed assembler/source code files -# -# For both checked and free builds, make sure that any intrinsic -# functions are compiled correctly. To do this, ensure that /Oi -# is selected for both free and checked builds. There is a bug in -# VC++ 6.0 (at least through SP4) where, if you specify any -# intrinsic functions in your code with "#pragma intrinsic" but -# you don't have the /Oi optimization enabled, neither a call -# to the function, nor the intrinsic inline version of the function -# will end up in your object code. This bug only applies to free -# builds, but just to be safe we'll make sure that the flag is -# enabled for all builds. - -!IF "$(DDKBUILDENV)" != "chk" -MSC_OPTIMIZATION=/Ox /Oi /Fc -!ELSE -MSC_OPTIMIZATION=/Od /Oi /Fc -!ENDIF - -# Generate a linker map file just in case we need one for debugging -LINKER_FLAGS=$(LINKER_FLAGS) /INCREMENTAL:NO /MAP /MAPINFO:EXPORTS - -# Generate a browser information file for use in IDE development -#BROWSER_INFO=1 -#BROWSERFILE=$(TARGETNAME).BSC -n - -# Abort compilation on warnings by adding /WX -MSC_WARNING_LEVEL=/W3 - -SOURCES=tapdrvr.c resource.rctap-win32/common.h deleted +0
-82@@ -1,82 +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 -*/ - -//=============================================== -// This file is included both by OpenVPN and -// the TAP-Win32 driver and contains definitions -// common to both. -//=============================================== - -#ifndef HAVE_CONFIG_H -#include "autodefs.h" -#endif - -//============= -// TAP IOCTLs -//============= - -#define TAP_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) - -// Added in 8.2 - -/* obsoletes TAP_IOCTL_CONFIG_POINT_TO_POINT */ -#define TAP_IOCTL_CONFIG_TUN TAP_CONTROL_CODE (10, METHOD_BUFFERED) - -//================= -// Registry keys -//================= - -#define ADAPTER_KEY "SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}" - -#define NETWORK_CONNECTIONS_KEY "SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}" - -//====================== -// Filesystem prefixes -//====================== - -#define USERMODEDEVICEDIR "\\\\.\\Global\\" -#define SYSDEVICEDIR "\\Device\\" -#define USERDEVICEDIR "\\DosDevices\\Global\\" -#define TAPSUFFIX ".tap" - -//========================================================= -// TAP_COMPONENT_ID -- This string defines the TAP driver -// type -- different component IDs can reside in the system -// simultaneously. -//========================================================= - -#define TAP_COMPONENT_ID TAP_IDtap-win32/constants.h deleted +0
-52@@ -1,52 +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 -*/ - -//==================================================================== -// Product and Version public settings -//==================================================================== - -#define PRODUCT_STRING PRODUCT_TAP_DEVICE_DESCRIPTION - -#define TAP_NDIS_MAJOR_VERSION 5 -#define TAP_NDIS_MINOR_VERSION 0 - -//=========================================================== -// Driver constants -//=========================================================== - -#define ETHERNET_HEADER_SIZE (sizeof (ETH_HEADER)) -#define ETHERNET_MTU 1500 -#define ETHERNET_PACKET_SIZE (ETHERNET_MTU + ETHERNET_HEADER_SIZE) -#define DEFAULT_PACKET_LOOKAHEAD (ETHERNET_PACKET_SIZE) - -#define NIC_MAX_MCAST_LIST 32 // Max length of multicast address list - -#define MINIMUM_MTU 576 // USE TCP Minimum MTU -#define MAXIMUM_MTU 65536 // IP maximum MTU - -#define PACKET_QUEUE_SIZE 64 // tap -> userspace queue size -#define IRP_QUEUE_SIZE 16 // max number of simultaneous i/o operations from userspace -#define INJECT_QUEUE_SIZE 16 // DHCP/ARP -> tap injection queue - -#define TAP_LITTLE_ENDIAN // affects ntohs, htonl, etc. functions tap-win32/dhcp.c deleted +0
-599@@ -1,599 +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 -*/ - -//========================= -// Code to set DHCP options -//========================= - -VOID -SetDHCPOpt (DHCPMsg *m,void *data,unsigned int len) -{ -if (!m->overflow) - { -if (m->optlen + len <=DHCP_OPTIONS_BUFFER_SIZE ) - { -if (len) - { -NdisMoveMemory (m->msg.options + m->optlen, data, len); - m->optlen += len; - } - } -else - { - m->overflow = TRUE; - } - } -} - -VOID -SetDHCPOpt0 (DHCPMsg *msg,int type) -{ -DHCPOPT0 opt; - opt.type = (UCHAR ) type; -SetDHCPOpt (msg, &opt,sizeof (opt)); -} - -VOID -SetDHCPOpt8 (DHCPMsg *msg,int type,ULONG data) -{ -DHCPOPT8 opt; - opt.type = (UCHAR ) type; - opt.len =sizeof (opt.data); - opt.data = (UCHAR ) data; -SetDHCPOpt (msg, &opt,sizeof (opt)); -} - -VOID -SetDHCPOpt32 (DHCPMsg *msg,int type,ULONG data) -{ -DHCPOPT32 opt; - opt.type = (UCHAR ) type; - opt.len =sizeof (opt.data); - opt.data = data; -SetDHCPOpt (msg, &opt,sizeof (opt)); -} - -//============== -// Checksum code -//============== - -USHORT -ip_checksum (const UCHAR *buf,const int len_ip_header) -{ -USHORT word16; -ULONG sum =0 ; -int i; - -// make 16 bit words out of every two adjacent 8 bit words in the packet -// and add them up -for (i =0 ; i < len_ip_header -1 ; i +=2 ) { - word16 = ((buf[i] <<8 ) &0xFF00 ) + (buf[i+1 ] &0xFF ); - sum += (ULONG ) word16; - } - -// take only 16 bits out of the 32 bit sum and add up the carries -while (sum >>16 ) - sum = (sum &0xFFFF ) + (sum >>16 ); - -// one's complement the result -return ((USHORT ) ~sum); -} - -USHORT -udp_checksum (const UCHAR *buf, -const int len_udp, -const UCHAR *src_addr, -const UCHAR *dest_addr) -{ -USHORT word16; -ULONG sum =0 ; -int i; - -// make 16 bit words out of every two adjacent 8 bit words and -// calculate the sum of all 16 bit words -for (i =0 ; i < len_udp; i +=2 ){ - word16 = ((buf[i] <<8 ) &0xFF00 ) + ((i +1 < len_udp) ? (buf[i+1 ] &0xFF ) :0 ); - sum += word16; - } - -// add the UDP pseudo header which contains the IP source and destination addresses -for (i =0 ; i <4 ; i +=2 ){ - word16 =((src_addr[i] <<8 ) &0xFF00 ) + (src_addr[i+1 ] &0xFF ); - sum += word16; - } -for (i =0 ; i <4 ; i +=2 ){ - word16 =((dest_addr[i] <<8 ) &0xFF00 ) + (dest_addr[i+1 ] &0xFF ); - sum += word16; - } - -// the protocol number and the length of the UDP packet - sum += (USHORT )IPPROTO_UDP + (USHORT ) len_udp; - -// keep only the last 16 bits of the 32 bit calculated sum and add the carries -while (sum >>16 ) - sum = (sum &0xFFFF ) + (sum >>16 ); - -// Take the one's complement of sum -return ((USHORT ) ~sum); -} - -//================================ -// Set IP and UDP packet checksums -//================================ - -VOID -SetChecksumDHCPMsg (DHCPMsg *m) -{ -// Set IP checksum - m->msg.pre.ip.check =htons (ip_checksum ((UCHAR *) &m->msg.pre.ip,sizeof (IPHDR ))); - -// Set UDP Checksum - m->msg.pre.udp.check =htons (udp_checksum ((UCHAR *) &m->msg.pre.udp, -sizeof (UDPHDR ) +sizeof (DHCP ) + m->optlen, - (UCHAR *)&m->msg.pre.ip.saddr, - (UCHAR *)&m->msg.pre.ip.daddr)); -} - -//=================== -// DHCP message tests -//=================== - -int -GetDHCPMessageType (const DHCP *dhcp,const int optlen) -{ -const UCHAR *p = (UCHAR *) (dhcp +1 ); -int i; - -for (i =0 ; i < optlen; ++i) - { -const UCHAR type = p[i]; -const int room = optlen - i -1 ; -if (type ==DHCP_END )// didn't find what we were looking for -return -1 ; -else if (type ==DHCP_PAD )// no-operation - ; -else if (type ==DHCP_MSG_TYPE )// what we are looking for - { -if (room >=2 ) - { -if (p[i+1 ] ==1 )// message length should be 1 -return p[i+2 ];// return message type - } -return -1 ; - } -else // some other message - { -if (room >=1 ) - { -const int len = p[i+1 ];// get message length - i += (len +1 );// advance to next message - } - } - } -return -1 ; -} - -BOOLEAN -DHCPMessageOurs (const TapAdapterPointer p_Adapter, -const ETH_HEADER *eth, -const IPHDR *ip, -const UDPHDR *udp, -const DHCP *dhcp) -{ -// Must be UDPv4 protocol -if (!(eth->proto ==htons (ETH_P_IP ) && ip->protocol ==IPPROTO_UDP )) -return FALSE; - -// Source MAC must be our adapter -if (!MAC_EQUAL (eth->src, p_Adapter->m_MAC)) -return FALSE; - -// Dest MAC must be either broadcast or our virtual DHCP server -if (!(MAC_EQUAL (eth->dest, p_Adapter->m_MAC_Broadcast) - ||MAC_EQUAL (eth->dest, p_Adapter->m_dhcp_server_mac))) -return FALSE; - -// Port numbers must be correct -if (!(udp->dest ==htons (BOOTPS_PORT ) - && udp->source ==htons (BOOTPC_PORT ))) -return FALSE; - -// Hardware address must be MAC addr sized -if (!(dhcp->hlen ==sizeof (MACADDR ))) -return FALSE; - -// Hardware address must match our adapter -if (!MAC_EQUAL (eth->src, dhcp->chaddr)) -return FALSE; - -return TRUE; -} - - -//===================================================== -// Build all of DHCP packet except for DHCP options. -// Assume that *p has been zeroed before we are called. -//===================================================== - -VOID -BuildDHCPPre (const TapAdapterPointer a, -DHCPPre *p, -const ETH_HEADER *eth, -const IPHDR *ip, -const UDPHDR *udp, -const DHCP *dhcp, -const int optlen, -const int type) -{ -// Should we broadcast or direct to a specific MAC / IP address? -const BOOLEAN broadcast = (type ==DHCPNAK - ||MAC_EQUAL (eth->dest, a->m_MAC_Broadcast)); -// Build ethernet header - -COPY_MAC (p->eth.src, a->m_dhcp_server_mac); - -if (broadcast) -COPY_MAC (p->eth.dest, a->m_MAC_Broadcast); -else -COPY_MAC (p->eth.dest, eth->src); - - p->eth.proto =htons (ETH_P_IP ); - -// Build IP header - - p->ip.version_len = (4 <<4 ) | (sizeof (IPHDR ) >>2 ); - p->ip.tos =0 ; - p->ip.tot_len =htons (sizeof (IPHDR ) +sizeof (UDPHDR ) +sizeof (DHCP ) + optlen); - p->ip.id =0 ; - p->ip.frag_off =0 ; - p->ip.ttl =16 ; - p->ip.protocol =IPPROTO_UDP ; - p->ip.check =0 ; - p->ip.saddr = a->m_dhcp_server_ip; - -if (broadcast) - p->ip.daddr = ~0 ; -else - p->ip.daddr = a->m_dhcp_addr; - -// Build UDP header - - p->udp.source =htons (BOOTPS_PORT ); - p->udp.dest =htons (BOOTPC_PORT ); - p->udp.len =htons (sizeof (UDPHDR ) +sizeof (DHCP ) + optlen); - p->udp.check =0 ; - -// Build DHCP response - - p->dhcp.op =BOOTREPLY ; - p->dhcp.htype =1 ; - p->dhcp.hlen =sizeof (MACADDR ); - p->dhcp.hops =0 ; - p->dhcp.xid = dhcp->xid; - p->dhcp.secs =0 ; - p->dhcp.flags =0 ; - p->dhcp.ciaddr =0 ; - -if (type ==DHCPNAK ) - p->dhcp.yiaddr =0 ; -else - p->dhcp.yiaddr = a->m_dhcp_addr; - - p->dhcp.siaddr = a->m_dhcp_server_ip; - p->dhcp.giaddr =0 ; -COPY_MAC (p->dhcp.chaddr, eth->src); - p->dhcp.magic =htonl (0x63825363 ); -} -//============================= -// Build specific DHCP messages -//============================= - -VOID -SendDHCPMsg (const TapAdapterPointer a, -const int type, -const ETH_HEADER *eth, -const IPHDR *ip, -const UDPHDR *udp, -const DHCP *dhcp) -{ -DHCPMsg *pkt; - -if (!(type ==DHCPOFFER || type ==DHCPACK || type ==DHCPNAK )) - { -DEBUGP (("[TAP] SendDHCPMsg: Bad DHCP type: %d\n" , type)); -return ; - } - - pkt = (DHCPMsg *)MemAlloc (sizeof (DHCPMsg), TRUE); - -if (pkt) - { -//----------------------- -// Build DHCP options -//----------------------- - -// Message Type -SetDHCPOpt8 (pkt,DHCP_MSG_TYPE , type); - -// Server ID -SetDHCPOpt32 (pkt,DHCP_SERVER_ID , a->m_dhcp_server_ip); - -if (type ==DHCPOFFER || type ==DHCPACK ) - { -// Lease Time -SetDHCPOpt32 (pkt,DHCP_LEASE_TIME ,htonl (a->m_dhcp_lease_time)); - -// Netmask -SetDHCPOpt32 (pkt,DHCP_NETMASK , a->m_dhcp_netmask); - -// Other user-defined options -SetDHCPOpt (pkt, - a->m_dhcp_user_supplied_options_buffer, - a->m_dhcp_user_supplied_options_buffer_len); - } - -// End -SetDHCPOpt0 (pkt,DHCP_END ); - -if (!DHCPMSG_OVERFLOW (pkt)) - { -// The initial part of the DHCP message (not including options) gets built here -BuildDHCPPre (a, - &pkt->msg.pre, - eth, - ip, - udp, - dhcp, -DHCPMSG_LEN_OPT (pkt), - type); - -SetChecksumDHCPMsg (pkt); - -DUMP_PACKET ("DHCPMsg" , -DHCPMSG_BUF (pkt), -DHCPMSG_LEN_FULL (pkt)); - -// Return DHCP response to kernel -InjectPacketDeferred (a, -DHCPMSG_BUF (pkt), -DHCPMSG_LEN_FULL (pkt)); - } -else - { -DEBUGP (("[TAP] SendDHCPMsg: DHCP buffer overflow\n" )); - } - -MemFree (pkt,sizeof (DHCPMsg)); - } -} - -//=================================================================== -// Handle a BOOTPS packet produced by the local system to -// resolve the address/netmask of this adapter. -// If we are in TAP_IOCTL_CONFIG_DHCP_MASQ mode, reply -// to the message. Return TRUE if we processed the passed -// message, so that downstream stages can ignore it. -//=================================================================== - -BOOLEAN -ProcessDHCP (TapAdapterPointer p_Adapter, -const ETH_HEADER *eth, -const IPHDR *ip, -const UDPHDR *udp, -const DHCP *dhcp, -int optlen) -{ -int msg_type; - -// Sanity check IP header -if (!(ntohs (ip->tot_len) ==sizeof (IPHDR ) +sizeof (UDPHDR ) +sizeof (DHCP ) + optlen - && (ntohs (ip->frag_off) &IP_OFFMASK ) ==0 )) -return TRUE; - -// Does this message belong to us? -if (!DHCPMessageOurs (p_Adapter, eth, ip, udp, dhcp)) -return FALSE; - - msg_type =GetDHCPMessageType (dhcp, optlen); - -// Drop non-BOOTREQUEST messages -if (dhcp->op !=BOOTREQUEST ) -return TRUE; - -// Drop any messages except DHCPDISCOVER or DHCPREQUEST -if (!(msg_type ==DHCPDISCOVER || msg_type ==DHCPREQUEST )) -return TRUE; - -// Should we reply with DHCPOFFER, DHCPACK, or DHCPNAK? -if (msg_type ==DHCPREQUEST - && ((dhcp->ciaddr && dhcp->ciaddr != p_Adapter->m_dhcp_addr) - || !p_Adapter->m_dhcp_received_discover - || p_Adapter->m_dhcp_bad_requests >=BAD_DHCPREQUEST_NAK_THRESHOLD )) -SendDHCPMsg (p_Adapter, -DHCPNAK , - eth, ip, udp, dhcp); -else -SendDHCPMsg (p_Adapter, - (msg_type ==DHCPDISCOVER ?DHCPOFFER :DHCPACK ), - eth, ip, udp, dhcp); - -// Remember if we received a DHCPDISCOVER -if (msg_type ==DHCPDISCOVER ) - p_Adapter->m_dhcp_received_discover = TRUE; - -// Is this a bad DHCPREQUEST? -if (msg_type ==DHCPREQUEST && dhcp->ciaddr != p_Adapter->m_dhcp_addr) - ++p_Adapter->m_dhcp_bad_requests; - -return TRUE; -} - -#if DBG - -const char * -message_op_text (int op) -{ -switch (op) - { -case BOOTREQUEST : -return "BOOTREQUEST" ; -case BOOTREPLY : -return "BOOTREPLY" ; -default : -return "???" ; - } -} - -const char * -message_type_text (int type) -{ -switch (type) - { -case DHCPDISCOVER : -return "DHCPDISCOVER" ; -case DHCPOFFER : -return "DHCPOFFER" ; -case DHCPREQUEST : -return "DHCPREQUEST" ; -case DHCPDECLINE : -return "DHCPDECLINE" ; -case DHCPACK : -return "DHCPACK" ; -case DHCPNAK : -return "DHCPNAK" ; -case DHCPRELEASE : -return "DHCPRELEASE" ; -case DHCPINFORM : -return "DHCPINFORM" ; -default : -return "???" ; - } -} - -const char * -port_name (int port) -{ -switch (port) - { -case BOOTPS_PORT : -return "BOOTPS" ; -case BOOTPC_PORT : -return "BOOTPC" ; -default : -return "unknown" ; - } -} - -VOID -DumpDHCP (const ETH_HEADER *eth, -const IPHDR *ip, -const UDPHDR *udp, -const DHCP *dhcp, -const int optlen) -{ -DEBUGP ((" %s" ,message_op_text (dhcp->op))); -DEBUGP ((" %s " ,message_type_text (GetDHCPMessageType (dhcp, optlen)))); -PrIP (ip->saddr); -DEBUGP ((":%s[" ,port_name (ntohs (udp->source)))); -PrMac (eth->src); -DEBUGP (("] -> " )); -PrIP (ip->daddr); -DEBUGP ((":%s[" ,port_name (ntohs (udp->dest)))); -PrMac (eth->dest); -DEBUGP (("]" )); -if (dhcp->ciaddr) - { -DEBUGP ((" ci=" )); -PrIP (dhcp->ciaddr); - } -if (dhcp->yiaddr) - { -DEBUGP ((" yi=" )); -PrIP (dhcp->yiaddr); - } -if (dhcp->siaddr) - { -DEBUGP ((" si=" )); -PrIP (dhcp->siaddr); - } -if (dhcp->hlen ==sizeof (MACADDR )) - { -DEBUGP ((" ch=" )); -PrMac (dhcp->chaddr); - } - -DEBUGP ((" xid=0x%08x" ,ntohl (dhcp->xid))); - -if (ntohl (dhcp->magic) !=0x63825363 ) -DEBUGP ((" ma=0x%08x" ,ntohl (dhcp->magic))); -if (dhcp->htype !=1 ) -DEBUGP ((" htype=%d" , dhcp->htype)); -if (dhcp->hops) -DEBUGP ((" hops=%d" , dhcp->hops)); -if (ntohs (dhcp->secs)) -DEBUGP ((" secs=%d" ,ntohs (dhcp->secs))); -if (ntohs (dhcp->flags)) -DEBUGP ((" flags=0x%04x" ,ntohs (dhcp->flags))); - -// extra stuff - -if (ip->version_len !=0x45 ) -DEBUGP ((" vl=0x%02x" , ip->version_len)); -if (ntohs (ip->tot_len) !=sizeof (IPHDR ) +sizeof (UDPHDR ) +sizeof (DHCP ) + optlen) -DEBUGP ((" tl=%d" ,ntohs (ip->tot_len))); -if (ntohs (udp->len) !=sizeof (UDPHDR ) +sizeof (DHCP ) + optlen) -DEBUGP ((" ul=%d" ,ntohs (udp->len))); - -if (ip->tos) -DEBUGP ((" tos=0x%02x" , ip->tos)); -if (ntohs (ip->id)) -DEBUGP ((" id=0x%04x" ,ntohs (ip->id))); -if (ntohs (ip->frag_off)) -DEBUGP ((" frag_off=0x%04x" ,ntohs (ip->frag_off))); - -DEBUGP ((" ttl=%d" , ip->ttl)); -DEBUGP ((" ic=0x%04x [0x%04x]" ,ntohs (ip->check), -ip_checksum ((UCHAR *)ip,sizeof (IPHDR )))); -DEBUGP ((" uc=0x%04x [0x%04x/%d]" ,ntohs (udp->check), -udp_checksum ((UCHAR *) udp, -sizeof (UDPHDR ) +sizeof (DHCP ) + optlen, - (UCHAR *) &ip->saddr, - (UCHAR *) &ip->daddr), - optlen)); - -// Options - { -const UCHAR *opt = (UCHAR *) (dhcp +1 ); -int i; - -DEBUGP ((" OPT" )); -for (i =0 ; i < optlen; ++i) - { -const UCHAR data = opt[i]; -DEBUGP ((".%d" , data)); - } - } -} - -#endif /* DBG */ tap-win32/dhcp.h deleted +0
-164@@ -1,164 +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 -*/ - -#pragma pack(1) - -//=================================================== -// How many bad DHCPREQUESTs do we receive before we -// return a NAK? -// -// A bad DHCPREQUEST is defined to be one where the -// requestor doesn't know its IP address. -//=================================================== - -#define BAD_DHCPREQUEST_NAK_THRESHOLD 3 - -//============================================== -// Maximum number of DHCP options bytes supplied -//============================================== - -#define DHCP_USER_SUPPLIED_OPTIONS_BUFFER_SIZE 256 -#define DHCP_OPTIONS_BUFFER_SIZE 256 - -//=================================== -// UDP port numbers of DHCP messages. -//=================================== - -#define BOOTPS_PORT 67 -#define BOOTPC_PORT 68 - -//=========================== -// The DHCP message structure -//=========================== - -typedef struct { -# define BOOTREQUEST 1 -# define BOOTREPLY 2 -UCHAR op;/* message op */ - -UCHAR htype;/* hardware address type (e.g. '1' = 10Mb Ethernet) */ -UCHAR hlen;/* hardware address length (e.g. '6' for 10Mb Ethernet) */ -UCHAR hops;/* client sets to 0, may be used by relay agents */ -ULONG xid;/* transaction ID, chosen by client */ -USHORT secs;/* seconds since request process began, set by client */ -USHORT flags; -ULONG ciaddr;/* client IP address, client sets if known */ -ULONG yiaddr;/* 'your' IP address -- server's response to client */ -ULONG siaddr;/* server IP address */ -ULONG giaddr;/* relay agent IP address */ -UCHAR chaddr[16 ];/* client hardware address */ -UCHAR sname[64 ];/* optional server host name */ -UCHAR file[128 ];/* boot file name */ -ULONG magic;/* must be 0x63825363 (network order) */ -}DHCP ; - -typedef struct { -ETH_HEADER eth; -IPHDR ip; -UDPHDR udp; -DHCP dhcp; -}DHCPPre ; - -typedef struct { -DHCPPre pre; -UCHAR options[DHCP_OPTIONS_BUFFER_SIZE ]; -}DHCPFull ; - -typedef struct { -unsigned int optlen; -BOOLEAN overflow; -DHCPFull msg; -}DHCPMsg ; - -//=================== -// Macros for DHCPMSG -//=================== - -#define DHCPMSG_LEN_BASE (p) (sizeof (DHCPPre)) -#define DHCPMSG_LEN_OPT (p) ((p)->optlen) -#define DHCPMSG_LEN_FULL (p) (DHCPMSG_LEN_BASE(p) + DHCPMSG_LEN_OPT(p)) -#define DHCPMSG_BUF (p) ((UCHAR*) &(p)->msg) -#define DHCPMSG_OVERFLOW (p) ((p)->overflow) - -//======================================== -// structs to hold individual DHCP options -//======================================== - -typedef struct { -UCHAR type; -}DHCPOPT0 ; - -typedef struct { -UCHAR type; -UCHAR len; -UCHAR data; -}DHCPOPT8 ; - -typedef struct { -UCHAR type; -UCHAR len; -ULONG data; -}DHCPOPT32 ; - -#pragma pack() - -//================== -// DHCP Option types -//================== - -#define DHCP_MSG_TYPE 53/* message type (u8) */ -#define DHCP_PARM_REQ 55/* parameter request list: c1 (u8), ... */ -#define DHCP_CLIENT_ID 61/* client ID: type (u8), i1 (u8), ... */ -#define DHCP_IP 50/* requested IP addr (u32) */ -#define DHCP_NETMASK 1/* subnet mask (u32) */ -#define DHCP_LEASE_TIME 51/* lease time sec (u32) */ -#define DHCP_RENEW_TIME 58/* renewal time sec (u32) */ -#define DHCP_REBIND_TIME 59/* rebind time sec (u32) */ -#define DHCP_SERVER_ID 54/* server ID: IP addr (u32) */ -#define DHCP_PAD 0 -#define DHCP_END 255 - -//==================== -// DHCP Messages types -//==================== - -#define DHCPDISCOVER 1 -#define DHCPOFFER 2 -#define DHCPREQUEST 3 -#define DHCPDECLINE 4 -#define DHCPACK 5 -#define DHCPNAK 6 -#define DHCPRELEASE 7 -#define DHCPINFORM 8 - -#if DBG - -VOID -DumpDHCP (const ETH_HEADER *eth, -const IPHDR *ip, -const UDPHDR *udp, -const DHCP *dhcp, -const int optlen); - -#endif 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@@ -1,378 +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 -*/ - -//----------------- -// DEBUGGING OUTPUT -//----------------- - -const char *g_LastErrorFilename; -int g_LastErrorLineNumber; - -#if DBG - -DebugOutput g_Debug; - -BOOLEAN -NewlineExists (const char *str,int len) -{ -while (len-- >0 ) - { -const char c = *str++; -if (c =='\n' ) -return TRUE; -else if (c =='\0' ) -break ; - } -return FALSE; -} - -VOID -MyDebugInit (unsigned int bufsiz) -{ -NdisZeroMemory (&g_Debug,sizeof (g_Debug)); - g_Debug.text = (char *)MemAlloc (bufsiz, FALSE); -if (g_Debug.text) - g_Debug.capacity = bufsiz; -} - -VOID -MyDebugFree () -{ -if (g_Debug.text) -MemFree (g_Debug.text, g_Debug.capacity); -NdisZeroMemory (&g_Debug,sizeof (g_Debug)); -} - -VOID -MyDebugPrint (const unsigned char * format, ...) -{ -if (g_Debug.text && g_Debug.capacity >0 &&CAN_WE_PRINT ) - { -BOOLEAN owned; -ACQUIRE_MUTEX_ADAPTIVE (&g_Debug.lock, owned); -if (owned) - { -const int remaining = (int )g_Debug.capacity - (int )g_Debug.out; - -if (remaining >0 ) - { -va_list args; -NTSTATUS status; -char *end; - -va_start (args, format); - status =RtlStringCchVPrintfExA (g_Debug.text + g_Debug.out, - remaining, - &end, -NULL , -STRSAFE_NO_TRUNCATION |STRSAFE_IGNORE_NULLS , - format, - args); -va_end (args); - -if (status ==STATUS_SUCCESS ) - g_Debug.out = (unsigned int ) (end - g_Debug.text); -else - g_Debug.error = TRUE; - } -else - g_Debug.error = TRUE; - -RELEASE_MUTEX (&g_Debug.lock); - } -else - g_Debug.error = TRUE; - } -} - -BOOLEAN -GetDebugLine (char *buf,const int len) -{ -static const char *truncated ="[OUTPUT TRUNCATED]\n" ; -BOOLEAN ret = FALSE; - -NdisZeroMemory (buf, len); - -if (g_Debug.text && g_Debug.capacity >0 ) - { -BOOLEAN owned; -ACQUIRE_MUTEX_ADAPTIVE (&g_Debug.lock, owned); -if (owned) - { -int i =0 ; - -if (g_Debug.error ||NewlineExists (g_Debug.text + g_Debug.in, (int )g_Debug.out - (int )g_Debug.in)) - { -while (i < (len -1 ) && g_Debug.in < g_Debug.out) - { -const char c = g_Debug.text[g_Debug.in++]; -if (c =='\n' ) -break ; - buf[i++] = c; - } -if (i < len) - buf[i] ='\0' ; - } - -if (!i) - { -if (g_Debug.in == g_Debug.out) - { - g_Debug.in = g_Debug.out =0 ; -if (g_Debug.error) - { -const unsigned int tlen =strlen (truncated); -if (tlen < g_Debug.capacity) - { -NdisMoveMemory (g_Debug.text, truncated, tlen+1 ); - g_Debug.out = tlen; - } - g_Debug.error = FALSE; - } - } - } -else - ret = TRUE; - -RELEASE_MUTEX (&g_Debug.lock); - } - } -return ret; -} - -VOID -MyAssert (const unsigned char *file,int line) -{ -DEBUGP (("MYASSERT failed %s/%d\n" , file, line)); -KeBugCheckEx (0x0F00BABA , - (ULONG_PTR ) line, - (ULONG_PTR )0 , - (ULONG_PTR )0 , - (ULONG_PTR )0 ); -} - -VOID -PrMac (const MACADDR mac) -{ -DEBUGP (("%x:%x:%x:%x:%x:%x" , - mac[0 ], mac[1 ], mac[2 ], - mac[3 ], mac[4 ], mac[5 ])); -} - -VOID -PrIP (IPADDR ip_addr) -{ -const unsigned char *ip = (const unsigned char *) &ip_addr; - -DEBUGP (("%d.%d.%d.%d" , - ip[0 ], ip[1 ], ip[2 ], ip[3 ])); -} - -const char * -PrIPProto (int proto) -{ -switch (proto) - { -case IPPROTO_UDP : -return "UDP" ; -case IPPROTO_TCP : -return "TCP" ; -case IPPROTO_ICMP : -return "ICMP" ; -case IPPROTO_IGMP : -return "IGMP" ; -default : -return "???" ; - } -} - -VOID -DumpARP (const char *prefix,const ARP_PACKET *arp) -{ -DEBUGP (("%s ARP src=" , prefix)); -PrMac (arp->m_MAC_Source); -DEBUGP ((" dest=" )); -PrMac (arp->m_MAC_Destination); -DEBUGP ((" OP=0x%04x" , - (int )ntohs (arp->m_ARP_Operation))); -DEBUGP ((" M=0x%04x(%d)" , - (int )ntohs (arp->m_MAC_AddressType), - (int )arp->m_MAC_AddressSize)); -DEBUGP ((" P=0x%04x(%d)" , - (int )ntohs (arp->m_PROTO_AddressType), - (int )arp->m_PROTO_AddressSize)); - -DEBUGP ((" MacSrc=" )); -PrMac (arp->m_ARP_MAC_Source); -DEBUGP ((" MacDest=" )); -PrMac (arp->m_ARP_MAC_Destination); - -DEBUGP ((" IPSrc=" )); -PrIP (arp->m_ARP_IP_Source); -DEBUGP ((" IPDest=" )); -PrIP (arp->m_ARP_IP_Destination); - -DEBUGP (("\n" )); -} - -struct ethpayload { -ETH_HEADER eth; -UCHAR payload[DEFAULT_PACKET_LOOKAHEAD ]; -}; - -VOID -DumpPacket2 (const char *prefix, -const ETH_HEADER *eth, -const unsigned char *data, -unsigned int len) -{ -struct ethpayload *ep = (struct ethpayload *)MemAlloc (sizeof (struct ethpayload ), TRUE); -if (ep) - { -if (len >DEFAULT_PACKET_LOOKAHEAD ) - len =DEFAULT_PACKET_LOOKAHEAD ; - ep->eth = *eth; -NdisMoveMemory (ep->payload, data, len); -DumpPacket (prefix, (unsigned char *) ep,sizeof (ETH_HEADER ) + len); -MemFree (ep,sizeof (struct ethpayload )); - } -} - -VOID -DumpPacket (const char *prefix, -const unsigned char *data, -unsigned int len) -{ -const ETH_HEADER *eth = (const ETH_HEADER *) data; -const IPHDR *ip = (const IPHDR *) (data +sizeof (ETH_HEADER )); - -if (len <sizeof (ETH_HEADER )) - { -DEBUGP (("%s TRUNCATED PACKET LEN=%d\n" , prefix, len)); -return ; - } - -// ARP Packet? -if (len >=sizeof (ARP_PACKET ) && eth->proto ==htons (ETH_P_ARP )) - { -DumpARP (prefix, (const ARP_PACKET *) data); -return ; - } - -// IPv4 packet? -if (len >= (sizeof (IPHDR ) +sizeof (ETH_HEADER )) - && eth->proto ==htons (ETH_P_IP ) - &&IPH_GET_VER (ip->version_len) ==4 ) - { -const int hlen =IPH_GET_LEN (ip->version_len); -const int blen = len -sizeof (ETH_HEADER ); -BOOLEAN did = FALSE; - -DEBUGP (("%s IPv4 %s[%d]" , prefix,PrIPProto (ip->protocol), len)); - -if (!(ntohs (ip->tot_len) == blen && hlen <= blen)) - { -DEBUGP ((" XXX" )); -return ; - } - -// TCP packet? -if (ip->protocol ==IPPROTO_TCP - && blen - hlen >= (sizeof (TCPHDR ))) - { -const TCPHDR *tcp = (TCPHDR *) (data +sizeof (ETH_HEADER ) + hlen); -DEBUGP ((" " )); -PrIP (ip->saddr); -DEBUGP ((":%d" ,ntohs (tcp->source))); -DEBUGP ((" -> " )); -PrIP (ip->daddr); -DEBUGP ((":%d" ,ntohs (tcp->dest))); - did = TRUE; - } - -// UDP packet? -else if ((ntohs (ip->frag_off) &IP_OFFMASK ) ==0 - && ip->protocol ==IPPROTO_UDP - && blen - hlen >= (sizeof (UDPHDR ))) - { -const UDPHDR *udp = (UDPHDR *) (data +sizeof (ETH_HEADER ) + hlen); - -// DHCP packet? -if ((udp->dest ==htons (BOOTPC_PORT ) || udp->dest ==htons (BOOTPS_PORT )) - && blen - hlen >= (sizeof (UDPHDR ) +sizeof (DHCP ))) - { -const DHCP *dhcp = (DHCP *) (data - + hlen - +sizeof (ETH_HEADER ) - +sizeof (UDPHDR )); - -int optlen = len - -sizeof (ETH_HEADER ) - - hlen - -sizeof (UDPHDR ) - -sizeof (DHCP ); - -if (optlen <0 ) - optlen =0 ; - -DumpDHCP (eth, ip, udp, dhcp, optlen); - did = TRUE; - } - -if (!did) - { -DEBUGP ((" " )); -PrIP (ip->saddr); -DEBUGP ((":%d" ,ntohs (udp->source))); -DEBUGP ((" -> " )); -PrIP (ip->daddr); -DEBUGP ((":%d" ,ntohs (udp->dest))); - did = TRUE; - } - } - -if (!did) - { -DEBUGP ((" ipproto=%d " , ip->protocol)); -PrIP (ip->saddr); -DEBUGP ((" -> " )); -PrIP (ip->daddr); - } - -DEBUGP (("\n" )); -return ; - } - - { -DEBUGP (("%s ??? src=" , prefix)); -PrMac (eth->src); -DEBUGP ((" dest=" )); -PrMac (eth->dest); -DEBUGP ((" proto=0x%04x len=%d\n" , - (int )ntohs (eth->proto), - len)); - } -} - -#endif tap-win32/error.h deleted +0
-88@@ -1,88 +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 -*/ - -//----------------- -// DEBUGGING OUTPUT -//----------------- - -#define NOTE_ERROR () \ -{ \ - g_LastErrorFilename = __FILE__; \ - g_LastErrorLineNumber = __LINE__; \ -} - -#if DBG - -typedef struct { -unsigned int in; -unsigned int out; -unsigned int capacity; -char *text; -BOOLEAN error; -MUTEX lock; -}DebugOutput ; - -VOID MyDebugPrint (const unsigned char * format, ...); - -VOID MyAssert (const unsigned char *file,int line); - -VOID DumpPacket (const char *prefix, -const unsigned char *data, -unsigned int len); - -VOID DumpPacket2 (const char *prefix, -const ETH_HEADER *eth, -const unsigned char *data, -unsigned int len); - -#define CAN_WE_PRINT (DEBUGP_AT_DISPATCH || KeGetCurrentIrql () < DISPATCH_LEVEL) - -#if ALSO_DBGPRINT -#define DEBUGP (fmt) { MyDebugPrint fmt; if (CAN_WE_PRINT) DbgPrint fmt; } -#else -#define DEBUGP (fmt) { MyDebugPrint fmt; } -#endif - -#define MYASSERT (exp) \ -{ \ - if (!(exp)) \ - { \ - MyAssert(__FILE__, __LINE__); \ - } \ -} - -#define DUMP_PACKET (prefix, data, len) \ - DumpPacket (prefix, data, len) - -#define DUMP_PACKET2 (prefix, eth, data, len) \ - DumpPacket2 (prefix, eth, data, len) - -#else - -#define DEBUGP (fmt) -#define MYASSERT (exp) -#define DUMP_PACKET (prefix, data, len) -#define DUMP_PACKET2 (prefix, eth, data, len) - -#endif tap-win32/hexdump.c deleted +0
-69@@ -1,69 +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 __cplusplus -extern "C" { -#endif - -#include "hexdump.h" - -#ifndef NDIS_MINIPORT_DRIVER - -VOID (*DbgMessage)(char *p_Format, ...) = DisplayDebugString; - -VOID DisplayDebugString (char *p_Format, ...) - { -static char l_Buffer [4096 ]; - -va_list l_ArgumentList; -va_start (l_ArgumentList, p_Format); -vsprintf (l_Buffer, p_Format, l_ArgumentList); -va_end (l_ArgumentList); - -OutputDebugStringA (l_Buffer); - } - -#endif - -VOID HexDump (unsigned char *p_Buffer,unsigned long p_Size) - { -unsigned long l_Index, l_Idx; -unsigned char l_Row [17 ]; - -for (l_Index = l_Row [16 ] =0 ; l_Index < p_Size || l_Index %16 ; ++l_Index) - { -if (l_Index %16 ==0 ) -DEBUGP (("%05x " , l_Index)); -DEBUGP (("%02x " , l_Row [l_Index %16 ] = (l_Index < p_Size ? p_Buffer [l_Index] :0 ))); - l_Row [l_Index %16 ] =IfPrint (l_Row [l_Index %16 ]); -if ((l_Index +1 ) %16 ==0 ) -DEBUGP ((" %s\n" , l_Row)); - } - -DEBUGP (("\n" )); - } - -#ifdef __cplusplus -} -#endif tap-win32/hexdump.h deleted +0
-63@@ -1,63 +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 HEXDUMP_DEFINED -#define HEXDUMP_DEFINED - -#ifdef __cplusplus -extern "C" { -#endif - -//===================================================================================== -// Debug Routines -//===================================================================================== - -#ifndef NDIS_MINIPORT_DRIVER -# include <stdio.h> -# include <ctype.h> -# include <windows.h> -# include <winnt.h> -# include <memory.h> - -# ifndef DEBUGP -# define DEBUGP (fmt) { DbgMessage fmt; } -# endif - -extern VOID (*DbgMessage)(char *p_Format, ...); - -VOID DisplayDebugString (char *p_Format, ...); -#endif - -//=================================================================================== -// Reporting / Debugging -//=================================================================================== -#define IfPrint (c) (c >= 32 && c < 127 ? c : '.') - -VOID HexDump (unsigned char *p_Buffer,unsigned long p_Size); - -#ifdef __cplusplus -} -#endif - -#endif tap-win32/i386/OemWin2k.inf.in deleted +0
-195@@ -1,195 +0,0 @@ -; **************************************************************************** -; * Copyright (C) 2002-2010 OpenVPN Technologies, Inc. * -; * This program is free software; you can redistribute it and/or modify * -; * it under the terms of the GNU General Public License version 2 * -; * as published by the Free Software Foundation. * -; **************************************************************************** - -; SYNTAX CHECKER -; cd \WINDDK\3790\tools\chkinf -; chkinf c:\src\openvpn\tap-win32\i386\oemwin2k.inf -; OUTPUT -> file:///c:/WINDDK/3790/tools/chkinf/htm/c%23+src+openvpn+tap-win32+i386+__OemWin2k.htm - -; INSTALL/REMOVE DRIVER -; tapinstall install OemWin2k.inf TAP0901 -; tapinstall update OemWin2k.inf TAP0901 -; tapinstall remove TAP0901 - -;********************************************************* -; Note to Developers: -; -; If you are bundling the TAP-Win32 driver with your app, -; you should try to rename it in such a way that it will -; not collide with other instances of TAP-Win32 defined -; by other apps. Multiple versions of the TAP-Win32 -; driver, each installed by different apps, can coexist -; on the same machine if you follow these guidelines. -; NOTE: these instructions assume you are editing the -; generated OemWin2k.inf file, not the source -; OemWin2k.inf.in file which is preprocessed by winconfig -; and uses macro definitions from settings.in. -; -; (1) Rename all tapXXXX instances in this file to -; something different (use at least 5 characters -; for this name!) -; (2) Change the "!define TAP" definition in openvpn.nsi -; to match what you changed tapXXXX to. -; (3) Change TARGETNAME in SOURCES to match what you -; changed tapXXXX to. -; (4) Change TAP_COMPONENT_ID in common.h to match what -; you changed tapXXXX to. -; (5) Change SZDEPENDENCIES in service.h to match what -; you changed tapXXXX to. -; (6) Change DeviceDescription and Provider strings. -; (7) Change PRODUCT_STRING in constants.h to what you -; set DeviceDescription to. -; -;********************************************************* - -[Version] - Signature = "$Windows NT$" - CatalogFile = @@PRODUCT_TAP_ID@@.cat - ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318} - Provider = %Provider% - Class = Net - -; This version number should match the version -; number given in SOURCES. - DriverVer=@@PRODUCT_TAP_RELDATE@@,@@PRODUCT_TAP_MAJOR_VER@@.00.00.@@PRODUCT_TAP_MINOR_VER@@ - -[Strings] - DeviceDescription = "@@PRODUCT_TAP_DEVICE_DESCRIPTION@@" - Provider = "@@PRODUCT_TAP_PROVIDER@@" - -;---------------------------------------------------------------- -; Manufacturer + Product Section (Done) -;---------------------------------------------------------------- -[Manufacturer] -!ifdef AMD64 - %Provider% = @@PRODUCT_TAP_ID@@, NTamd64 -!else - %Provider% = @@PRODUCT_TAP_ID@@ -!endif - -!ifdef AMD64 -[@@PRODUCT_TAP_ID@@.NTamd64] -!else -[@@PRODUCT_TAP_ID@@] -!endif - %DeviceDescription% = @@PRODUCT_TAP_ID@@.ndi, @@PRODUCT_TAP_ID@@ - -;--------------------------------------------------------------- -; Driver Section (Done) -;--------------------------------------------------------------- - -;----------------- Characteristics ------------ -; NCF_PHYSICAL = 0x04 -; NCF_VIRTUAL = 0x01 -; NCF_SOFTWARE_ENUMERATED = 0x02 -; NCF_HIDDEN = 0x08 -; NCF_NO_SERVICE = 0x10 -; NCF_HAS_UI = 0x80 -;----------------- Characteristics ------------ - -[@@PRODUCT_TAP_ID@@.ndi] - CopyFiles = @@PRODUCT_TAP_ID@@.driver, @@PRODUCT_TAP_ID@@.files - AddReg = @@PRODUCT_TAP_ID@@.reg - AddReg = @@PRODUCT_TAP_ID@@.params.reg - Characteristics = @@PRODUCT_TAP_CHARACTERISTICS@@ - -[@@PRODUCT_TAP_ID@@.ndi.Services] - AddService = @@PRODUCT_TAP_ID@@, 2, @@PRODUCT_TAP_ID@@.service - -[@@PRODUCT_TAP_ID@@.reg] - HKR, Ndi, Service, 0, "@@PRODUCT_TAP_ID@@" - HKR, Ndi\Interfaces, UpperRange, 0, "ndis5" - HKR, Ndi\Interfaces, LowerRange, 0, "ethernet" - HKR, , Manufacturer, 0, "%Provider%" - HKR, , ProductName, 0, "%DeviceDescription%" - -[@@PRODUCT_TAP_ID@@.params.reg] - HKR, Ndi\params\MTU, ParamDesc, 0, "MTU" - HKR, Ndi\params\MTU, Type, 0, "int" - HKR, Ndi\params\MTU, Default, 0, "1500" - HKR, Ndi\params\MTU, Optional, 0, "0" - HKR, Ndi\params\MTU, Min, 0, "100" - HKR, Ndi\params\MTU, Max, 0, "1500" - HKR, Ndi\params\MTU, Step, 0, "1" - HKR, Ndi\params\MediaStatus, ParamDesc, 0, "Media Status" - HKR, Ndi\params\MediaStatus, Type, 0, "enum" - HKR, Ndi\params\MediaStatus, Default, 0, "0" - HKR, Ndi\params\MediaStatus, Optional, 0, "0" - HKR, Ndi\params\MediaStatus\enum, "0", 0, "Application Controlled" - HKR, Ndi\params\MediaStatus\enum, "1", 0, "Always Connected" - HKR, Ndi\params\MAC, ParamDesc, 0, "MAC Address" - HKR, Ndi\params\MAC, Type, 0, "edit" - HKR, Ndi\params\MAC, Optional, 0, "1" - HKR, Ndi\params\AllowNonAdmin, ParamDesc, 0, "Non-Admin Access" - HKR, Ndi\params\AllowNonAdmin, Type, 0, "enum" - HKR, Ndi\params\AllowNonAdmin, Default, 0, "1" - HKR, Ndi\params\AllowNonAdmin, Optional, 0, "0" - HKR, Ndi\params\AllowNonAdmin\enum, "0", 0, "Not Allowed" - HKR, Ndi\params\AllowNonAdmin\enum, "1", 0, "Allowed" - -;---------------------------------------------------------------- -; Service Section -;---------------------------------------------------------------- - -;---------- Service Type ------------- -; SERVICE_KERNEL_DRIVER = 0x01 -; SERVICE_WIN32_OWN_PROCESS = 0x10 -;---------- Service Type ------------- - -;---------- Start Mode --------------- -; SERVICE_BOOT_START = 0x0 -; SERVICE_SYSTEM_START = 0x1 -; SERVICE_AUTO_START = 0x2 -; SERVICE_DEMAND_START = 0x3 -; SERVICE_DISABLED = 0x4 -;---------- Start Mode --------------- - -[@@PRODUCT_TAP_ID@@.service] - DisplayName = %DeviceDescription% - ServiceType = 1 - StartType = 3 - ErrorControl = 1 - LoadOrderGroup = NDIS - ServiceBinary = %12%\@@PRODUCT_TAP_ID@@.sys - -;----------------------------------------------------------------- -; File Installation -;----------------------------------------------------------------- - -;----------------- Copy Flags ------------ -; COPYFLG_NOSKIP = 0x02 -; COPYFLG_NOVERSIONCHECK = 0x04 -;----------------- Copy Flags ------------ - -; SourceDisksNames -; diskid = description[, [tagfile] [, <unused>, subdir]] -; 1 = "Intel Driver Disk 1",e100bex.sys,, - -[SourceDisksNames] - 1 = %DeviceDescription%, @@PRODUCT_TAP_ID@@.sys - -; SourceDisksFiles -; filename_on_source = diskID[, [subdir][, size]] -; e100bex.sys = 1,, ; on distribution disk 1 - -[SourceDisksFiles] -@@PRODUCT_TAP_ID@@.sys = 1 - -[DestinationDirs] - @@PRODUCT_TAP_ID@@.files = 11 - @@PRODUCT_TAP_ID@@.driver = 12 - -[@@PRODUCT_TAP_ID@@.files] -; TapPanel.cpl,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK -; cipsrvr.exe,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK - -[@@PRODUCT_TAP_ID@@.driver] - @@PRODUCT_TAP_ID@@.sys,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK - -;--------------------------------------------------------------- -; End -;---------------------------------------------------------------tap-win32/instance.c deleted +0
-241@@ -1,241 +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 -*/ - -#define INSTANCE_KEY (a) ((PVOID)((a)->m_Extension.m_TapDevice)) - -#define N_INSTANCE_BUCKETS 256 - -typedef struct _INSTANCE { -struct _INSTANCE *next; -TapAdapterPointer m_Adapter; -}INSTANCE ; - -typedef struct { -INSTANCE *list; -MUTEX lock; -}INSTANCE_BUCKET ; - -typedef struct { -INSTANCE_BUCKET buckets[N_INSTANCE_BUCKETS ]; -}INSTANCE_HASH ; - -INSTANCE_HASH *g_InstanceHash =NULL ; - -// must return a hash >= 0 and < N_INSTANCE_BUCKETS -int -InstanceHashValue (PVOID addr) -{ -UCHAR *p = (UCHAR *) &addr; - -if (sizeof (addr) ==4 ) -return p[0 ] ^ p[1 ] ^ p[2 ] ^ p[3 ]; -else if (sizeof (addr) ==8 ) -return p[0 ] ^ p[1 ] ^ p[2 ] ^ p[3 ] ^ p[4 ] ^ p[5 ] ^ p[6 ] ^ p[7 ]; -else - { -MYASSERT (0 ); - } -} - -BOOLEAN -InitInstanceList (VOID ) -{ -MYASSERT (g_InstanceHash ==NULL ); - g_InstanceHash =MemAlloc (sizeof (INSTANCE_HASH ), TRUE); -if (g_InstanceHash) - { -int i; -for (i =0 ; i <N_INSTANCE_BUCKETS ; ++i) -INIT_MUTEX (&g_InstanceHash->buckets[i].lock); -return TRUE; - } -else -return FALSE; -} - -int -NInstances (VOID ) -{ -int i, n =0 ; - -if (g_InstanceHash) - { -for (i =0 ; i <N_INSTANCE_BUCKETS ; ++i) - { -BOOLEAN got_lock; -INSTANCE_BUCKET *ib = &g_InstanceHash->buckets[i]; -ACQUIRE_MUTEX_ADAPTIVE (&ib->lock, got_lock); - -if (got_lock) - { -INSTANCE *current; -for (current = ib->list; current !=NULL ; current = current->next) - ++n; -RELEASE_MUTEX (&ib->lock); - } -else -return -1 ; - } - } - -return n; -} - -int -InstanceMaxBucketSize (VOID ) -{ -int i, n =0 ; - -if (g_InstanceHash) - { -for (i =0 ; i <N_INSTANCE_BUCKETS ; ++i) - { -BOOLEAN got_lock; -int bucket_size =0 ; -INSTANCE_BUCKET *ib = &g_InstanceHash->buckets[i]; -ACQUIRE_MUTEX_ADAPTIVE (&ib->lock, got_lock); - -if (got_lock) - { -INSTANCE *current; -for (current = ib->list; current !=NULL ; current = current->next) - ++bucket_size; -if (bucket_size > n) - n = bucket_size; -RELEASE_MUTEX (&ib->lock); - } -else -return -1 ; - } - } - -return n; -} - -VOID -FreeInstanceList (VOID ) -{ -if (g_InstanceHash) - { -MYASSERT (NInstances () ==0 ); -MemFree (g_InstanceHash,sizeof (INSTANCE_HASH )); - g_InstanceHash =NULL ; - } -} - -BOOLEAN -AddAdapterToInstanceList (TapAdapterPointer p_Adapter) -{ -BOOLEAN got_lock; -BOOLEAN ret = FALSE; -const int hash =InstanceHashValue (INSTANCE_KEY (p_Adapter)); -INSTANCE_BUCKET *ib = &g_InstanceHash->buckets[hash]; - -DEBUGP (("[TAP] AddAdapterToInstanceList hash=%d\n" , hash)); - -ACQUIRE_MUTEX_ADAPTIVE (&ib->lock, got_lock); - -if (got_lock) - { -INSTANCE *i =MemAlloc (sizeof (INSTANCE ), FALSE); -if (i) - { -MYASSERT (p_Adapter); - i->m_Adapter = p_Adapter; - i->next = ib->list; - ib->list = i; - ret = TRUE; - } -RELEASE_MUTEX (&ib->lock); - } - -return ret; -} - -BOOLEAN -RemoveAdapterFromInstanceList (TapAdapterPointer p_Adapter) -{ -BOOLEAN got_lock; -BOOLEAN ret = FALSE; -INSTANCE_BUCKET *ib = &g_InstanceHash->buckets[InstanceHashValue (INSTANCE_KEY (p_Adapter))]; - -ACQUIRE_MUTEX_ADAPTIVE (&ib->lock, got_lock); - -if (got_lock) - { -INSTANCE *current, *prev=NULL ; -for (current = ib->list; current !=NULL ; current = current->next) - { -if (current->m_Adapter == p_Adapter)// found match - { -if (prev) - prev->next = current->next; -else - ib->list = current->next; -MemFree (current->m_Adapter,sizeof (TapAdapter)); -MemFree (current,sizeof (INSTANCE )); - ret = TRUE; -break ; - } - prev = current; - } -RELEASE_MUTEX (&ib->lock); - } - -return ret; -} - -TapAdapterPointer -LookupAdapterInInstanceList (PDEVICE_OBJECT p_DeviceObject) -{ -BOOLEAN got_lock; -TapAdapterPointer ret =NULL ; -INSTANCE_BUCKET *ib = &g_InstanceHash->buckets[InstanceHashValue ((PVOID )p_DeviceObject)]; - -ACQUIRE_MUTEX_ADAPTIVE (&ib->lock, got_lock); - -if (got_lock) - { -INSTANCE *current, *prev=NULL ; -for (current = ib->list; current !=NULL ; current = current->next) - { -if (p_DeviceObject ==INSTANCE_KEY (current->m_Adapter))// found match - { -// move it to head of list -if (prev) - { - prev->next = current->next; - current->next = ib->list; - ib->list = current; - } - ret = ib->list->m_Adapter; -break ; - } - prev = current; - } -RELEASE_MUTEX (&ib->lock); - } - -return ret; -}tap-win32/lock.h deleted +0
-75@@ -1,75 +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 -*/ - -typedef struct -{ -volatile long count; -}MUTEX ; - -#define MUTEX_SLEEP_TIME 10000 // microseconds - -#define INIT_MUTEX (m) { (m)->count = 0; } - -#define ACQUIRE_MUTEX_BLOCKING (m) \ -{ \ - while (NdisInterlockedIncrement (&((m)->count)) != 1) \ - { \ - NdisInterlockedDecrement(&((m)->count)); \ - NdisMSleep(MUTEX_SLEEP_TIME); \ - } \ -} - -#define RELEASE_MUTEX (m) \ -{ \ - NdisInterlockedDecrement(&((m)->count)); \ -} - -#define ACQUIRE_MUTEX_NONBLOCKING (m, result) \ -{ \ - if (NdisInterlockedIncrement (&((m)->count)) != 1) \ - { \ - NdisInterlockedDecrement(&((m)->count)); \ - result = FALSE; \ - } \ - else \ - { \ - result = TRUE; \ - } \ -} - -#define ACQUIRE_MUTEX_ADAPTIVE (m, result) \ -{ \ - result = TRUE; \ - while (NdisInterlockedIncrement (&((m)->count)) != 1) \ - { \ - NdisInterlockedDecrement(&((m)->count)); \ - if (KeGetCurrentIrql () < DISPATCH_LEVEL) \ - NdisMSleep(MUTEX_SLEEP_TIME); \ - else \ - { \ - result = FALSE; \ - break; \ - } \ - } \ -}tap-win32/macinfo.c deleted +0
-154@@ -1,154 +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 -*/ - -#include "macinfo.h" - -int -HexStringToDecimalInt (const int p_Character) -{ -int l_Value =0 ; - -if (p_Character >='A' && p_Character <='F' ) - l_Value = (p_Character -'A' ) +10 ; -else if (p_Character >='a' && p_Character <='f' ) - l_Value = (p_Character -'a' ) +10 ; -else if (p_Character >='0' && p_Character <='9' ) - l_Value = p_Character -'0' ; - -return l_Value; -} - -BOOLEAN -ParseMAC (MACADDR dest,const char *src) -{ -int c; -int mac_index =0 ; -BOOLEAN high_digit = FALSE; -int delim_action =1 ; - -MYASSERT (src); -MYASSERT (dest); - -CLEAR_MAC (dest); - -while (c = *src++) - { -if (IsMacDelimiter (c)) - { - mac_index += delim_action; - high_digit = FALSE; - delim_action =1 ; - } -else if (IsHexDigit (c)) - { -const int digit =HexStringToDecimalInt (c); -if (mac_index <sizeof (MACADDR )) - { -if (!high_digit) - { - dest[mac_index] = (char )(digit); - high_digit = TRUE; - delim_action =1 ; - } -else - { - dest[mac_index] = (char )(dest[mac_index] *16 + digit); - ++mac_index; - high_digit = FALSE; - delim_action =0 ; - } - } -else -return FALSE; - } -else -return FALSE; - } - -return (mac_index + delim_action) >=sizeof (MACADDR ); -} - -/* -* Generate a MAC using the GUID in the adapter name. -* -* The mac is constructed as 00:FF:xx:xx:xx:xx where -* the Xs are taken from the first 32 bits of the GUID in the -* adapter name. This is similar to the Linux 2.4 tap MAC -* generator, except linux uses 32 random bits for the Xs. -* -* In general, this solution is reasonable for most -* applications except for very large bridged TAP networks, -* where the probability of address collisions becomes more -* than infintesimal. -* -* Using the well-known "birthday paradox", on a 1000 node -* network the probability of collision would be -* 0.000116292153. On a 10,000 node network, the probability -* of collision would be 0.01157288998621678766. -*/ - -VOID GenerateRandomMac (MACADDR mac,const unsigned char *adapter_name) -{ -unsigned const char *cp = adapter_name; -unsigned char c; -unsigned int i =2 ; -unsigned int byte =0 ; -int brace =0 ; -int state =0 ; - -CLEAR_MAC (mac); - - mac[0 ] =0x00 ; - mac[1 ] =0xFF ; - -while (c = *cp++) - { -if (i >=sizeof (MACADDR )) -break ; -if (c =='{' ) - brace =1 ; -if (IsHexDigit (c) && brace) - { -const unsigned int digit =HexStringToDecimalInt (c); -if (state) - { - byte <<=4 ; - byte |= digit; - mac[i++] = (unsigned char ) byte; - state =0 ; - } -else - { - byte = digit; - state =1 ; - } - } - } -} - -VOID GenerateRelatedMAC (MACADDR dest,const MACADDR src,const int delta) -{ -COPY_MAC (dest, src); - dest[2 ] += (UCHAR ) delta; -}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@@ -1,186 +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 -*/ - -//------------------ -// Memory Management -//------------------ - -PVOID -MemAlloc (ULONG p_Size,BOOLEAN zero) -{ -PVOID l_Return =NULL ; - -if (p_Size) - { - __try - { -if (NdisAllocateMemoryWithTag (&l_Return, p_Size,'APAT' ) - ==NDIS_STATUS_SUCCESS ) - { -if (zero) -NdisZeroMemory (l_Return, p_Size); - } -else - l_Return =NULL ; - } - __except (EXCEPTION_EXECUTE_HANDLER ) - { - l_Return =NULL ; - } - } - -return l_Return; -} - -VOID -MemFree (PVOID p_Addr,ULONG p_Size) -{ -if (p_Addr && p_Size) - { - __try - { -#if DBG -NdisZeroMemory (p_Addr, p_Size); -#endif -NdisFreeMemory (p_Addr, p_Size,0 ); - } - __except (EXCEPTION_EXECUTE_HANDLER ) - { - } - } -} - -/* -* Circular queue management routines. -*/ - -#define QUEUE_BYTE_ALLOCATION (size) \ - (sizeof (Queue) + (size * sizeof (PVOID))) - -#define QUEUE_ADD_INDEX (var, inc) \ -{ \ - var += inc; \ - if (var >= q->capacity) \ - var -= q->capacity; \ - MYASSERT (var < q->capacity); \ -} - -#define QUEUE_SANITY_CHECK () \ - MYASSERT (q != NULL && q->base < q->capacity && q->size <= q->capacity) - -#define QueueCount (q) (q->size) - -#define UPDATE_MAX_SIZE () \ -{ \ - if (q->size > q->max_size) \ - q->max_size = q->size; \ -} - -Queue * -QueueInit (ULONG capacity) -{ -Queue *q; - -MYASSERT (capacity >0 ); - q = (Queue *)MemAlloc (QUEUE_BYTE_ALLOCATION (capacity), TRUE); -if (!q) -return NULL ; - - q->base = q->size =0 ; - q->capacity = capacity; - q->max_size =0 ; -return q; -} - -VOID -QueueFree (Queue *q) -{ -if (q) - { -QUEUE_SANITY_CHECK (); -MemFree (q,QUEUE_BYTE_ALLOCATION (q->capacity)); - } -} - -PVOID -QueuePush (Queue *q,PVOID item) -{ -ULONG dest; -QUEUE_SANITY_CHECK (); -if (q->size == q->capacity) -return NULL ; - dest = q->base; -QUEUE_ADD_INDEX (dest, q->size); - q->data[dest] = item; - ++q->size; -UPDATE_MAX_SIZE (); -return item; -} - -PVOID -QueuePop (Queue *q) -{ -ULONG oldbase; -QUEUE_SANITY_CHECK (); -if (!q->size) -return NULL ; - oldbase = q->base; -QUEUE_ADD_INDEX (q->base,1 ); - --q->size; -UPDATE_MAX_SIZE (); -return q->data[oldbase]; -} - -PVOID -QueueExtract (Queue *q,PVOID item) -{ -ULONG src, dest, count, n; -QUEUE_SANITY_CHECK (); - n =0 ; - src = dest = q->base; - count = q->size; -while (count--) - { -if (item == q->data[src]) - { - ++n; - --q->size; - } -else - { - q->data[dest] = q->data[src]; -QUEUE_ADD_INDEX (dest,1 ); - } -QUEUE_ADD_INDEX (src,1 ); - } -if (n) -return item; -else -return NULL ; -} - -#undef QUEUE_BYTE_ALLOCATION -#undef QUEUE_ADD_INDEX -#undef QUEUE_SANITY_CHECK -#undef UPDATE_MAX_SIZEtap-win32/proto.h deleted +0
-224@@ -1,224 +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 -*/ - -//============================================================ -// MAC address, Ethernet header, and ARP -//============================================================ - -#pragma pack(1) - -#define IP_HEADER_SIZE 20 -#define IPV6_HEADER_SIZE 40 - -typedef unsigned char MACADDR [6 ]; -typedef unsigned long IPADDR ; -typedef unsigned char IPV6ADDR [16 ]; - -//----------------- -// Ethernet address -//----------------- - -typedef struct { -MACADDR addr; -}ETH_ADDR ; - -typedef struct { -ETH_ADDR list[NIC_MAX_MCAST_LIST ]; -}MC_LIST ; - -//---------------- -// Ethernet header -//---------------- - -typedef struct -{ -MACADDR dest;/* destination eth addr */ -MACADDR src;/* source ether addr */ - -# define ETH_P_IP 0x0800/* IPv4 protocol */ -# define ETH_P_IPV6 0x86DD/* IPv6 protocol */ -# define ETH_P_ARP 0x0806/* ARP protocol */ -USHORT proto;/* packet type ID field */ -}ETH_HEADER , *PETH_HEADER ; - -//---------------- -// ARP packet -//---------------- - -typedef struct - { -MACADDR m_MAC_Destination;// Reverse these two -MACADDR m_MAC_Source;// to answer ARP requests -USHORT m_Proto;// 0x0806 - -# define MAC_ADDR_TYPE 0x0001 -USHORT m_MAC_AddressType;// 0x0001 - -USHORT m_PROTO_AddressType;// 0x0800 -UCHAR m_MAC_AddressSize;// 0x06 -UCHAR m_PROTO_AddressSize;// 0x04 - -# define ARP_REQUEST 0x0001 -# define ARP_REPLY 0x0002 -USHORT m_ARP_Operation;// 0x0001 for ARP request, 0x0002 for ARP reply - -MACADDR m_ARP_MAC_Source; -IPADDR m_ARP_IP_Source; -MACADDR m_ARP_MAC_Destination; -IPADDR m_ARP_IP_Destination; - } -ARP_PACKET , *PARP_PACKET ; - -//---------- -// IP Header -//---------- - -typedef struct { -# define IPH_GET_VER (v) (((v) >> 4) & 0x0F) -# define IPH_GET_LEN (v) (((v) & 0x0F) << 2) -UCHAR version_len; - -UCHAR tos; -USHORT tot_len; -USHORT id; - -# define IP_OFFMASK 0x1fff -USHORT frag_off; - -UCHAR ttl; - -# define IPPROTO_UDP 17/* UDP protocol */ -# define IPPROTO_TCP 6/* TCP protocol */ -# define IPPROTO_ICMP 1/* ICMP protocol */ -# define IPPROTO_IGMP 2/* IGMP protocol */ -UCHAR protocol; - -USHORT check; -ULONG saddr; -ULONG daddr; -/* The options start here. */ -}IPHDR ; - -//----------- -// UDP header -//----------- - -typedef struct { -USHORT source; -USHORT dest; -USHORT len; -USHORT check; -}UDPHDR ; - -//-------------------------- -// TCP header, per RFC 793. -//-------------------------- - -typedef struct { -USHORT source;/* source port */ -USHORT dest;/* destination port */ -ULONG seq;/* sequence number */ -ULONG ack_seq;/* acknowledgement number */ - -# define TCPH_GET_DOFF (d) (((d) & 0xF0) >> 2) -UCHAR doff_res; - -# define TCPH_FIN_MASK (1<<0) -# define TCPH_SYN_MASK (1<<1) -# define TCPH_RST_MASK (1<<2) -# define TCPH_PSH_MASK (1<<3) -# define TCPH_ACK_MASK (1<<4) -# define TCPH_URG_MASK (1<<5) -# define TCPH_ECE_MASK (1<<6) -# define TCPH_CWR_MASK (1<<7) -UCHAR flags; - -USHORT window; -USHORT check; -USHORT urg_ptr; -}TCPHDR ; - -#define TCPOPT_EOL 0 -#define TCPOPT_NOP 1 -#define TCPOPT_MAXSEG 2 -#define TCPOLEN_MAXSEG 4 - -//------------ -// IPv6 Header -//------------ - -typedef struct { -UCHAR version_prio; -UCHAR flow_lbl[3 ]; -USHORT payload_len; -# define IPPROTO_ICMPV6 0x3a/* ICMP protocol v6 */ -UCHAR nexthdr; -UCHAR hop_limit; -IPV6ADDR saddr; -IPV6ADDR daddr; -}IPV6HDR ; - -//-------------------------------------------- -// IPCMPv6 NS/NA Packets (RFC4443 and RFC4861) -//-------------------------------------------- - -// Neighbor Solictiation - RFC 4861, 4.3 -// (this is just the ICMPv6 part of the packet) -typedef struct { -UCHAR type; -# define ICMPV6_TYPE_NS 135 // neighbour solicitation -UCHAR code; -# define ICMPV6_CODE_0 0 // no specific sub-code for NS/NA -USHORT checksum; -ULONG reserved; -IPV6ADDR target_addr; -}ICMPV6_NS ; - -// Neighbor Advertisement - RFC 4861, 4.4 + 4.6/4.6.1 -// (this is just the ICMPv6 payload) -typedef struct { -UCHAR type; -# define ICMPV6_TYPE_NA 136 // neighbour advertisement -UCHAR code; -# define ICMPV6_CODE_0 0 // no specific sub-code for NS/NA -USHORT checksum; -UCHAR rso_bits;// Router(0), Solicited(2), Ovrrd(4) -UCHAR reserved[3 ]; -IPV6ADDR target_addr; -// always include "Target Link-layer Address" option (RFC 4861 4.6.1) -UCHAR opt_type; -#define ICMPV6_OPTION_TLLA 2 -UCHAR opt_length; -#define ICMPV6_LENGTH_TLLA 1 // multiplied by 8 -> 1 = 8 bytes -MACADDR target_macaddr; -}ICMPV6_NA ; - -// this is the complete packet with Ethernet and IPv6 headers -typedef struct { -ETH_HEADER eth; -IPV6HDR ipv6; -ICMPV6_NA icmpv6; -}ICMPV6_NA_PKT ; - -#pragma pack()tap-win32/prototypes.h deleted +0
-260@@ -1,260 +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 TAP_PROTOTYPES_DEFINED -#define TAP_PROTOTYPES_DEFINED - -NTSTATUS DriverEntry - ( - IN PDRIVER_OBJECT p_DriverObject, - IN PUNICODE_STRING p_RegistryPath - ); - -VOID TapDriverUnload - ( - IN PDRIVER_OBJECT p_DriverObject - ); - -NDIS_STATUS AdapterCreate - ( - OUT PNDIS_STATUS p_ErrorStatus, - OUT PUINT p_MediaIndex, - IN PNDIS_MEDIUM p_Media, - IN UINT p_MediaCount, - IN NDIS_HANDLE p_AdapterHandle, - IN NDIS_HANDLE p_ConfigurationHandle - ); - -VOID AdapterHalt - ( - IN NDIS_HANDLE p_AdapterContext - ); - -VOID AdapterFreeResources - ( -TapAdapterPointer p_Adapter - ); - -NDIS_STATUS AdapterReset - ( - OUT PBOOLEAN p_AddressingReset, - IN NDIS_HANDLE p_AdapterContext - ); - -NDIS_STATUS AdapterQuery - ( - IN NDIS_HANDLE p_AdapterContext, - IN NDIS_OID p_OID, - IN PVOID p_Buffer, - IN ULONG p_BufferLength, - OUT PULONG p_BytesWritten, - OUT PULONG p_BytesNeeded - ); - -NDIS_STATUS AdapterModify - ( - IN NDIS_HANDLE p_AdapterContext, - IN NDIS_OID p_OID, - IN PVOID p_Buffer, - IN ULONG p_BufferLength, - OUT PULONG p_BytesRead, - OUT PULONG p_BytesNeeded - ); - -NDIS_STATUS AdapterTransmit - ( - IN NDIS_HANDLE p_AdapterContext, - IN PNDIS_PACKET p_Packet, - IN UINT p_Flags - ); - -NDIS_STATUS AdapterReceive - ( - OUT PNDIS_PACKET p_Packet, - OUT PUINT p_Transferred, - IN NDIS_HANDLE p_AdapterContext, - IN NDIS_HANDLE p_ReceiveContext, - IN UINT p_Offset, - IN UINT p_ToTransfer - ); - -NTSTATUS TapDeviceHook - ( - IN PDEVICE_OBJECT p_DeviceObject, - IN PIRP p_IRP - ); - -NDIS_STATUS CreateTapDevice - ( -TapExtensionPointer p_Extension, -const char *p_Name - ); - -VOID DestroyTapDevice - ( -TapExtensionPointer p_Extension - ); - -VOID TapDeviceFreeResources - ( -TapExtensionPointer p_Extension - ); - -NTSTATUS CompleteIRP - ( - IN PIRP p_IRP, - IN TapPacketPointer p_PacketBuffer, - IN CCHAR PriorityBoost - ); - -VOID CancelIRPCallback - ( - IN PDEVICE_OBJECT p_DeviceObject, - IN PIRP p_IRP - ); - -VOID CancelIRP - ( -TapExtensionPointer p_Extension, - IN PIRP p_IRP, -BOOLEAN callback - ); - -VOID FlushQueues - ( -TapExtensionPointer p_Extension - ); - -VOID ResetTapAdapterState - ( -TapAdapterPointer p_Adapter - ); - -BOOLEAN ProcessARP - ( -TapAdapterPointer p_Adapter, -const PARP_PACKET src, -const IPADDR adapter_ip, -const IPADDR ip_network, -const IPADDR ip_netmask, -const MACADDR mac - ); - -VOID SetMediaStatus - ( -TapAdapterPointer p_Adapter, -BOOLEAN state - ); - -VOID InjectPacketDeferred - ( -TapAdapterPointer p_Adapter, -UCHAR *packet, -const unsigned int len - ); - -VOID InjectPacketNow - ( -TapAdapterPointer p_Adapter, -UCHAR *packet, -const unsigned int len - ); - -// for KDEFERRED_ROUTINE and Static Driver Verifier -//#include <wdm.h> -//KDEFERRED_ROUTINE InjectPacketDpc; - -VOID InjectPacketDpc - ( -KDPC *Dpc, -PVOID DeferredContext, -PVOID SystemArgument1, -PVOID SystemArgument2 - ); - -VOID CheckIfDhcpAndTunMode - ( -TapAdapterPointer p_Adapter - ); - -VOID HookDispatchFunctions (); - -#if ENABLE_NONADMIN - -#if DDKVER_MAJOR <5600 -/* -* Better solution for use on Vista DDK, but possibly not compatible with -* earlier DDKs: -* -* Eliminate the definition of SECURITY_DESCRIPTOR (and even ZwSetSecurityObject), -* and at the top of tapdrv.c change: -* -* #include <ndis.h> -* #include <ntstrsafe.h> -* #include <ntddk.h> -* -* To -* -* #include <ntifs.h> -* #include <ndis.h> -* #include <ntstrsafe.h> -*/ -typedef struct _SECURITY_DESCRIPTOR { -unsigned char opaque[64 ]; -}SECURITY_DESCRIPTOR ; - -NTSYSAPI -NTSTATUS -NTAPI -ZwSetSecurityObject ( - IN HANDLE Handle, - IN SECURITY_INFORMATION SecurityInformation, - IN PSECURITY_DESCRIPTOR SecurityDescriptor); - -#endif - -VOID AllowNonAdmin (TapExtensionPointer p_Extension); - -#endif - -struct WIN2K_NDIS_MINIPORT_BLOCK -{ -unsigned char opaque[16 ]; -UNICODE_STRING MiniportName;// how mini-port refers to us -}; - -#if PACKET_TRUNCATION_CHECK - -VOID IPv4PacketSizeVerify - (Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
1.7.3.4
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Part of the diff is not shown here. View the raw message.
Re: [Openvpn-devel] [PATCH 20/52] cleanup: rename tap-windows function from win32 to win
In reply to Alon Bar-LevAs is said on tap-win32/common.h and in many other places:
"TAP-Win32/TAP-Win64 -- A kernel driver to provide virtual tap device functionality on Windows."
So, it's not 32-bit only. Thus converting "tap-win32" into "tap-win" makes sense.
ACK.
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
Quoted 833 lines
Signed-off-by Alon Bar-Lev <[email protected]...>--- 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@@ -1176,7 +1176,7 @@ do_ifconfig (struct tuntap *tt,break ;case IPW32_SET_NETSH :if (!strcmp (actual,"NULL" )) -msg (M_FATAL ,"Error: When using --ip-win32 netsh, if you have more than one TAP-Win32 adapter, you must also specify --dev-node" ); +msg (M_FATAL ,"Error: When using --ip-win32 netsh, if you have more than one TAP-Windows adapter, you must also specify --dev-node" ); netsh_ifconfig (&tt->options, actual,@@ -1195,7 +1195,7 @@ do_ifconfig (struct tuntap *tt,char * saved_actual;if (!strcmp (actual,"NULL" )) -msg (M_FATAL ,"Error: When using --tun-ipv6, if you have more than one TAP-Win32 adapter, you must also specify --dev-node" ); +msg (M_FATAL ,"Error: When using --tun-ipv6, if you have more than one TAP-Windows adapter, you must also specify --dev-node" );/* example: netsh interface ipv6 set address MyTap 2001:608:8003::d store=active */ argv_printf (&argv,@@ -2786,7 +2786,7 @@ get_tap_reg (struct gc_arena *gc)if (status ==ERROR_SUCCESS && data_type ==REG_SZ ) { -if (!strcmp (component_id,TAP_COMPONENT_ID )) +if (!strcmp (component_id,TAP_WIN_COMPONENT_ID )) {struct tap_reg *reg; ALLOC_OBJ_CLEAR_GC (reg, struct tap_reg, gc);@@ -2953,7 +2953,7 @@ void show_valid_win32_tun_subnets (void)int col =0 ;printf ("On Windows, point-to-point IP support (i.e. --dev tun)\n" ); -printf ("is emulated by the TAP-Win32 driver. The major limitation\n" ); +printf ("is emulated by the TAP-Windows driver. The major limitation\n" );printf ("imposed by this approach is that the --ifconfig local and\n" );printf ("remote endpoints must be part of the same 255.255.255.252\n" );printf ("subnet. The following list shows examples of endpoint\n" );@@ -2978,7 +2978,7 @@ void show_valid_win32_tun_subnets (void) }void -show_tap_win32_adapters (int msglev,int warnlev) +show_tap_win_adapters (int msglev,int warnlev) {struct gc_arena gc =gc_new ();@@ -2997,7 +2997,7 @@ show_tap_win32_adapters (int msglev, int warnlev)msg (msglev,"Available TAP-WIN32 adapters [name, GUID]:" ); -/* loop through each TAP-Win32 adapter registry entry */ +/* loop through each TAP-Windows adapter registry entry */ for (tr = tap_reg; tr !=NULL ; tr = tr->next) { links =0 ;@@ -3025,7 +3025,7 @@ show_tap_win32_adapters (int msglev, int warnlev) } } -/* check for TAP-Win32 adapter duplicated GUIDs */ +/* check for TAP-Windows adapter duplicated GUIDs */ for (tr = tap_reg; tr !=NULL ; tr = tr->next) {for (tr1 = tap_reg; tr1 !=NULL ; tr1 = tr1->next)@@ -3037,22 +3037,22 @@ show_tap_win32_adapters (int msglev, int warnlev)/* warn on registry inconsistencies */ if (warn_tap_dup) -msg (warnlev,"WARNING: Some TAP-Win32 adapters have duplicate GUIDs" ); +msg (warnlev,"WARNING: Some TAP-Windows adapters have duplicate GUIDs" );if (warn_panel_dup) -msg (warnlev,"WARNING: Some TAP-Win32 adapters have duplicate links from the Network Connections control panel" ); +msg (warnlev,"WARNING: Some TAP-Windows adapters have duplicate links from the Network Connections control panel" );if (warn_panel_null) -msg (warnlev,"WARNING: Some TAP-Win32 adapters have no link from the Network Connections control panel" ); +msg (warnlev,"WARNING: Some TAP-Windows adapters have no link from the Network Connections control panel" );gc_free (&gc); }/* -* Confirm that GUID is a TAP-Win32 adapter. +* Confirm that GUID is a TAP-Windows adapter. */ static bool -is_tap_win32 (const char *guid,const struct tap_reg *tap_reg) +is_tap_win (const char *guid,const struct tap_reg *tap_reg) {const struct tap_reg *tr;@@ -3086,7 +3086,7 @@ name_to_guid (const char *name, const struct tap_reg *tap_reg, const struct panefor (pr = panel_reg; pr !=NULL ; pr = pr->next) { -if (name && !strcmp (pr->name, name) &&is_tap_win32 (pr->guid, tap_reg)) +if (name && !strcmp (pr->name, name) &&is_tap_win (pr->guid, tap_reg))return pr->guid; }@@ -3094,10 +3094,10 @@ name_to_guid (const char *name, const struct tap_reg *tap_reg, const struct pane }static void -at_least_one_tap_win32 (const struct tap_reg *tap_reg) +at_least_one_tap_win (const struct tap_reg *tap_reg) {if (!tap_reg) -msg (M_FATAL ,"There are no TAP-Win32 adapters on this system. You should be able to create a TAP-Win32 adapter by going to Start -> All Programs -> " PACKAGE_NAME " -> Add a new TAP-Win32 virtual ethernet adapter." ); +msg (M_FATAL ,"There are no TAP-Windows adapters on this system. You should be able to create a TAP-Windows adapter by going to Start -> All Programs -> " PACKAGE_NAME " -> Add a new TAP-Windows virtual ethernet adapter." ); }/* @@ -3181,7 +3181,7 @@ get_device_guid (const char *name, }/* Check if GUID was explicitly specified as --dev-node parameter */ -if (is_tap_win32 (name, tap_reg)) +if (is_tap_win (name, tap_reg)) {const char *act =guid_to_name (name, panel_reg);buf_printf (&ret,"%s" , name);@@ -3767,7 +3767,7 @@ show_adapters (int msglev) }/* -* Set a particular TAP-Win32 adapter (or all of them if +* Set a particular TAP-Windows adapter (or all of them if * adapter_name == NULL) to allow it to be opened from * a non-admin account. This setting will only persist * for the lifetime of the device object. @@ -3789,7 +3789,7 @@ tap_allow_nonadmin_access_handle (const char *device_path, HANDLE hand) }else { -msg (M_INFO |M_NOPREFIX ,"TAP-Win32 device: %s [Non-admin access allowed]" , device_path); +msg (M_INFO |M_NOPREFIX ,"TAP-Windows device: %s [Non-admin access allowed]" , device_path); } }@@ -3804,7 +3804,7 @@ tap_allow_nonadmin_access (const char *dev_node)char actual_buffer[256 ];char device_path[256 ]; -at_least_one_tap_win32 (tap_reg); +at_least_one_tap_win (tap_reg);if (dev_node) {@@ -3812,13 +3812,13 @@ tap_allow_nonadmin_access (const char *dev_node) device_guid =get_device_guid (dev_node, actual_buffer,sizeof (actual_buffer), tap_reg, panel_reg, &gc);if (!device_guid) -msg (M_FATAL ,"TAP-Win32 adapter '%s' not found" , dev_node); +msg (M_FATAL ,"TAP-Windows adapter '%s' not found" , dev_node); -/* Open Windows TAP-Win32 adapter */ +/* Open Windows TAP-Windows adapter */ openvpn_snprintf (device_path,sizeof (device_path),"%s%s%s" ,USERMODEDEVICEDIR , device_guid, -TAPSUFFIX ); +TAP_WIN_SUFFIX ); hand = CreateFile ( device_path,@@ -3853,11 +3853,11 @@ tap_allow_nonadmin_access (const char *dev_node)if (!device_guid)break ; -/* Open Windows TAP-Win32 adapter */ +/* Open Windows TAP-Windows adapter */ openvpn_snprintf (device_path,sizeof (device_path),"%s%s%s" ,USERMODEDEVICEDIR , device_guid, -TAPSUFFIX ); +TAP_WIN_SUFFIX ); hand = CreateFile ( device_path,@@ -3902,7 +3902,7 @@ dhcp_release_by_adapter_index(const DWORD adapter_index) ret = true; }else -msg (M_WARN ,"NOTE: Release of DHCP-assigned IP address lease on TAP-Win32 adapter failed: %s (code=%u)" , +msg (M_WARN ,"NOTE: Release of DHCP-assigned IP address lease on TAP-Windows adapter failed: %s (code=%u)" ,strerror_win32 (status, &gc), (unsigned int )status); }@@ -3936,7 +3936,7 @@ dhcp_renew_by_adapter_index (const DWORD adapter_index) ret = true; }else -msg (M_WARN ,"WARNING: Failed to renew DHCP IP address lease on TAP-Win32 adapter: %s (code=%u)" , +msg (M_WARN ,"WARNING: Failed to renew DHCP IP address lease on TAP-Windows adapter: %s (code=%u)" ,strerror_win32 (status, &gc), (unsigned int )status); }@@ -4281,7 +4281,7 @@ netsh_get_id (const char *dev_node, struct gc_arena *gc)struct buffer actual =alloc_buf_gc (256 , gc);const char *guid; -at_least_one_tap_win32 (tap_reg); +at_least_one_tap_win (tap_reg);if (dev_node) {@@ -4291,7 +4291,7 @@ netsh_get_id (const char *dev_node, struct gc_arena *gc) { guid =get_unspecified_device_guid (0 ,BPTR (&actual),BCAP (&actual), tap_reg, panel_reg, gc); -if (get_unspecified_device_guid (1 ,NULL ,0 , tap_reg, panel_reg, gc))/* ambiguous if more than one TAP-Win32 adapter */ +if (get_unspecified_device_guid (1 ,NULL ,0 , tap_reg, panel_reg, gc))/* ambiguous if more than one TAP-Windows adapter */ guid =NULL ; }@@ -4304,7 +4304,7 @@ netsh_get_id (const char *dev_node, struct gc_arena *gc) }/* -* Called iteratively on TAP-Win32 wait-for-initialization polling loop +* Called iteratively on TAP-Windows wait-for-initialization polling loop */ void tun_standby_init (struct tuntap *tt)@@ -4535,7 +4535,7 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tuconst struct panel_reg *panel_reg =get_panel_reg (&gc);char actual_buffer[256 ]; -at_least_one_tap_win32 (tap_reg); +at_least_one_tap_win (tap_reg);if (dev_node) {@@ -4543,13 +4543,13 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tu device_guid =get_device_guid (dev_node, actual_buffer,sizeof (actual_buffer), tap_reg, panel_reg, &gc);if (!device_guid) -msg (M_FATAL ,"TAP-Win32 adapter '%s' not found" , dev_node); +msg (M_FATAL ,"TAP-Windows adapter '%s' not found" , dev_node); -/* Open Windows TAP-Win32 adapter */ +/* Open Windows TAP-Windows adapter */ openvpn_snprintf (device_path,sizeof (device_path),"%s%s%s" ,USERMODEDEVICEDIR , device_guid, -TAPSUFFIX ); +TAP_WIN_SUFFIX ); tt->hand = CreateFile ( device_path,@@ -4579,13 +4579,13 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tu &gc);if (!device_guid) -msg (M_FATAL ,"All TAP-Win32 adapters on this system are currently in use." ); +msg (M_FATAL ,"All TAP-Windows adapters on this system are currently in use." ); -/* Open Windows TAP-Win32 adapter */ +/* Open Windows TAP-Windows adapter */ openvpn_snprintf (device_path,sizeof (device_path),"%s%s%s" ,USERMODEDEVICEDIR , device_guid, -TAPSUFFIX ); +TAP_WIN_SUFFIX ); tt->hand = CreateFile ( device_path,@@ -4618,20 +4618,20 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tu {ULONG info[3 ];CLEAR (info); -if (DeviceIoControl (tt->hand,TAP_IOCTL_GET_VERSION , +if (DeviceIoControl (tt->hand,TAP_WIN_IOCTL_GET_VERSION , &info,sizeof (info), &info,sizeof (info), &len,NULL )) { -msg (D_TUNTAP_INFO ,"TAP-Win32 Driver Version %d.%d %s" , +msg (D_TUNTAP_INFO ,"TAP-Windows Driver Version %d.%d %s" , (int ) info[0 ], (int ) info[1 ], (info[2 ] ?"(DEBUG)" :"" )); } -if (!(info[0 ] ==TAP_WIN32_MIN_MAJOR && info[1 ] >=TAP_WIN32_MIN_MINOR )) -msg (M_FATAL ,"ERROR: This version of " PACKAGE_NAME " requires a TAP-Win32 driver that is at least version %d.%d -- If you recently upgraded your " PACKAGE_NAME " distribution, a reboot is probably required at this point to get Windows to see the new driver." , -TAP_WIN32_MIN_MAJOR , -TAP_WIN32_MIN_MINOR ); +if (!(info[0 ] ==TAP_WIN_MIN_MAJOR && info[1 ] >=TAP_WIN_MIN_MINOR )) +msg (M_FATAL ,"ERROR: This version of " PACKAGE_NAME " requires a TAP-Windows driver that is at least version %d.%d -- If you recently upgraded your " PACKAGE_NAME " distribution, a reboot is probably required at this point to get Windows to see the new driver." , +TAP_WIN_MIN_MAJOR , +TAP_WIN_MIN_MINOR );/* usage of numeric constants is ugly, but this is really tied to * *this* version of the driver @@ -4655,17 +4655,17 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tu/* get driver MTU */ {ULONG mtu; -if (DeviceIoControl (tt->hand,TAP_IOCTL_GET_MTU , +if (DeviceIoControl (tt->hand,TAP_WIN_IOCTL_GET_MTU , &mtu,sizeof (mtu), &mtu,sizeof (mtu), &len,NULL )) { tt->post_open_mtu = (int ) mtu; -msg (D_MTU_INFO ,"TAP-Win32 MTU=%d" , (int ) mtu); +msg (D_MTU_INFO ,"TAP-Windows MTU=%d" , (int ) mtu); } }/* -* Preliminaries for setting TAP-Win32 adapter TCP/IP +* Preliminaries for setting TAP-Windows adapter TCP/IP * properties via --ip-win32 dynamic or --ip-win32 adaptive. */ if (tt->did_ifconfig_setup)@@ -4718,11 +4718,11 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tu ep[1 ] =htonl (tt->local & tt->remote_netmask); ep[2 ] =htonl (tt->remote_netmask); - status =DeviceIoControl (tt->hand,TAP_IOCTL_CONFIG_TUN , + status =DeviceIoControl (tt->hand,TAP_WIN_IOCTL_CONFIG_TUN , ep,sizeof (ep), ep,sizeof (ep), &len,NULL ); - msg (status ? M_INFO : M_FATAL, "Set TAP-Win32 TUN subnet mode network/local/netmask = %s/%s/%s [%s]", + msg (status ? M_INFO : M_FATAL, "Set TAP-Windows TUN subnet mode network/local/netmask = %s/%s/%s [%s]", print_in_addr_t (ep[1], IA_NET_ORDER, &gc), print_in_addr_t (ep[0], IA_NET_ORDER, &gc), print_in_addr_t (ep[2], IA_NET_ORDER, &gc),@@ -4734,14 +4734,14 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tu ep[0 ] =htonl (tt->local); ep[1 ] =htonl (tt->remote_netmask); -if (!DeviceIoControl (tt->hand,TAP_IOCTL_CONFIG_POINT_TO_POINT , +if (!DeviceIoControl (tt->hand,TAP_WIN_IOCTL_CONFIG_POINT_TO_POINT , ep,sizeof (ep), ep,sizeof (ep), &len,NULL )) -msg (M_FATAL ,"ERROR: The TAP-Win32 driver rejected a DeviceIoControl call to set Point-to-Point mode, which is required for --dev tun" ); +msg (M_FATAL ,"ERROR: The TAP-Windows driver rejected a DeviceIoControl call to set Point-to-Point mode, which is required for --dev tun" ); } } -/* should we tell the TAP-Win32 driver to masquerade as a DHCP server as a means +/* should we tell the TAP-Windows driver to masquerade as a DHCP server as a means of setting the adapter address? */ if (dhcp_masq) {@@ -4776,12 +4776,12 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tuASSERT (ep[3 ] >0 );#ifndef SIMULATE_DHCP_FAILED /* this code is disabled to simulate bad DHCP negotiation */ -if (!DeviceIoControl (tt->hand,TAP_IOCTL_CONFIG_DHCP_MASQ , +if (!DeviceIoControl (tt->hand,TAP_WIN_IOCTL_CONFIG_DHCP_MASQ , ep,sizeof (ep), ep,sizeof (ep), &len,NULL )) -msg (M_FATAL ,"ERROR: The TAP-Win32 driver rejected a DeviceIoControl call to set TAP_IOCTL_CONFIG_DHCP_MASQ mode" ); +msg (M_FATAL ,"ERROR: The TAP-Windows driver rejected a DeviceIoControl call to set TAP_WIN_IOCTL_CONFIG_DHCP_MASQ mode" ); - msg (M_INFO, "Notified TAP-Win32 driver to set a DHCP IP/netmask of %s/%s on interface %s [DHCP-serv: %s, lease-time: %d]", + msg (M_INFO, "Notified TAP-Windows driver to set a DHCP IP/netmask of %s/%s on interface %s [DHCP-serv: %s, lease-time: %d]", print_in_addr_t (tt->local, 0, &gc), print_in_addr_t (tt->adapter_netmask, 0, &gc), device_guid,@@ -4796,10 +4796,10 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tuif (build_dhcp_options_string (&buf, &tt->options)) {msg (D_DHCP_OPT ,"DHCP option string: %s" ,format_hex (BPTR (&buf),BLEN (&buf),0 , &gc)); -if (!DeviceIoControl (tt->hand,TAP_IOCTL_CONFIG_DHCP_SET_OPT , +if (!DeviceIoControl (tt->hand,TAP_WIN_IOCTL_CONFIG_DHCP_SET_OPT ,BPTR (&buf),BLEN (&buf),BPTR (&buf),BLEN (&buf), &len,NULL )) -msg (M_FATAL ,"ERROR: The TAP-Win32 driver rejected a TAP_IOCTL_CONFIG_DHCP_SET_OPT DeviceIoControl call" ); +msg (M_FATAL ,"ERROR: The TAP-Windows driver rejected a TAP_WIN_IOCTL_CONFIG_DHCP_SET_OPT DeviceIoControl call" ); }else msg (M_WARN ,"DHCP option string not set due to error" );@@ -4811,10 +4811,10 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tu/* set driver media status to 'connected' */ {ULONG status = TRUE; -if (!DeviceIoControl (tt->hand,TAP_IOCTL_SET_MEDIA_STATUS , +if (!DeviceIoControl (tt->hand,TAP_WIN_IOCTL_SET_MEDIA_STATUS , &status,sizeof (status), &status,sizeof (status), &len,NULL )) -msg (M_WARN ,"WARNING: The TAP-Win32 driver rejected a TAP_IOCTL_SET_MEDIA_STATUS DeviceIoControl call." ); +msg (M_WARN ,"WARNING: The TAP-Windows driver rejected a TAP_WIN_IOCTL_SET_MEDIA_STATUS DeviceIoControl call." ); }/* possible wait for adapter to come up */ @@ -4849,7 +4849,7 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tu }/* -* If the TAP-Win32 driver is masquerading as a DHCP server +* If the TAP-Windows driver is masquerading as a DHCP server * make sure the TCP/IP properties for the adapter are * set correctly. */ @@ -4857,7 +4857,7 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tu {/* check dhcp enable status */ if (dhcp_status (index) ==DHCP_STATUS_DISABLED ) -msg (M_WARN ,"WARNING: You have selected '--ip-win32 dynamic', which will not work unless the TAP-Win32 TCP/IP properties are set to 'Obtain an IP address automatically'" ); +msg (M_WARN ,"WARNING: You have selected '--ip-win32 dynamic', which will not work unless the TAP-Windows TCP/IP properties are set to 'Obtain an IP address automatically'" );/* force an explicit DHCP lease renewal on TAP adapter? */ if (tt->options.dhcp_pre_release)@@ -4883,7 +4883,7 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tu/* check dhcp enable status */ if (dhcp_status (index) ==DHCP_STATUS_DISABLED ) -msg (M_WARN ,"NOTE: You have selected (explicitly or by default) '--ip-win32 ipapi', which has a better chance of working correctly if the TAP-Win32 TCP/IP properties are set to 'Obtain an IP address automatically'" ); +msg (M_WARN ,"NOTE: You have selected (explicitly or by default) '--ip-win32 ipapi', which has a better chance of working correctly if the TAP-Windows TCP/IP properties are set to 'Obtain an IP address automatically'" );/* delete previously added IP addresses which were not correctly deleted */ @@ -4917,13 +4917,13 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tu }const char * -tap_win32_getinfo (const struct tuntap *tt,struct gc_arena *gc) +tap_win_getinfo (const struct tuntap *tt,struct gc_arena *gc) {if (tt && tt->hand !=NULL ) {struct buffer out =alloc_buf_gc (256 , gc);DWORD len; -if (DeviceIoControl (tt->hand,TAP_IOCTL_GET_INFO , +if (DeviceIoControl (tt->hand,TAP_WIN_IOCTL_GET_INFO ,BSTR (&out),BCAP (&out),BSTR (&out),BCAP (&out), &len,NULL ))@@ -4941,12 +4941,12 @@ tun_show_debug (struct tuntap *tt) {struct buffer out =alloc_buf (1024 );DWORD len; -while (DeviceIoControl (tt->hand,TAP_IOCTL_GET_LOG_LINE , +while (DeviceIoControl (tt->hand,TAP_WIN_IOCTL_GET_LOG_LINE ,BSTR (&out),BCAP (&out),BSTR (&out),BCAP (&out), &len,NULL )) { -msg (D_TAP_WIN32_DEBUG ,"TAP-Win32: %s" ,BSTR (&out)); +msg (D_TAP_WIN_DEBUG ,"TAP-Windows: %s" ,BSTR (&out)); }free_buf (&out); }@@ -4986,7 +4986,7 @@ close_tun (struct tuntap *tt)DWORD status;if ((status =DeleteIPAddress (tt->ipapi_context)) !=NO_ERROR ) { -msg (M_WARN ,"Warning: DeleteIPAddress[%u] failed on TAP-Win32 adapter, status=%u : %s" , +msg (M_WARN ,"Warning: DeleteIPAddress[%u] failed on TAP-Windows adapter, status=%u : %s" , (unsigned int )tt->ipapi_context, (unsigned int )status,strerror_win32 (status, &gc));@@ -4999,22 +4999,22 @@ close_tun (struct tuntap *tt)if (tt->hand !=NULL ) { -dmsg (D_WIN32_IO_LOW ,"Attempting CancelIO on TAP-Win32 adapter" ); +dmsg (D_WIN32_IO_LOW ,"Attempting CancelIO on TAP-Windows adapter" );if (!CancelIo (tt->hand)) -msg (M_WARN |M_ERRNO ,"Warning: CancelIO failed on TAP-Win32 adapter" ); +msg (M_WARN |M_ERRNO ,"Warning: CancelIO failed on TAP-Windows adapter" ); } -dmsg (D_WIN32_IO_LOW ,"Attempting close of overlapped read event on TAP-Win32 adapter" ); +dmsg (D_WIN32_IO_LOW ,"Attempting close of overlapped read event on TAP-Windows adapter" );overlapped_io_close (&tt->reads); -dmsg (D_WIN32_IO_LOW ,"Attempting close of overlapped write event on TAP-Win32 adapter" ); +dmsg (D_WIN32_IO_LOW ,"Attempting close of overlapped write event on TAP-Windows adapter" );overlapped_io_close (&tt->writes);if (tt->hand !=NULL ) { -dmsg (D_WIN32_IO_LOW ,"Attempting CloseHandle on TAP-Win32 adapter" ); +dmsg (D_WIN32_IO_LOW ,"Attempting CloseHandle on TAP-Windows adapter" );if (!CloseHandle (tt->hand)) -msg (M_WARN |M_ERRNO ,"Warning: CloseHandle failed on TAP-Win32 adapter" ); +msg (M_WARN |M_ERRNO ,"Warning: CloseHandle failed on TAP-Windows adapter" ); }if (tt->actual_name)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.3_alpha1]) 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
-5@@ -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" --1.7.3.4
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel