~andersk/ubuntu/oneiric/openssl/spurious-reboot

« back to all changes in this revision

Viewing changes to INSTALL.W32

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-05-01 23:51:53 UTC
  • mfrom: (11.1.20 sid)
  • Revision ID: james.westby@ubuntu.com-20110501235153-bjcxitndquaezb68
Tags: 1.0.0d-2ubuntu1
* Resynchronise with Debian (LP: #675566).  Remaining changes:
  - debian/libssl1.0.0.postinst:
    + Display a system restart required notification bubble on libssl1.0.0
      upgrade.
    + Use a different priority for libssl1.0.0/restart-services depending
      on whether a desktop, or server dist-upgrade is being performed.
  - debian/{libssl1.0.0-udeb.dirs, control, rules}: Create
    libssl1.0.0-udeb, for the benefit of wget-udeb (no wget-udeb package
    in Debian).
  - debian/{libcrypto1.0.0-udeb.dirs, libssl1.0.0.dirs, libssl1.0.0.files,
    rules}: Move runtime libraries to /lib, for the benefit of
    wpasupplicant.
  - debian/patches/aesni.patch: Backport Intel AES-NI support, now from
    http://rt.openssl.org/Ticket/Display.html?id=2065 rather than the
    0.9.8 variant.
  - debian/patches/Bsymbolic-functions.patch: Link using
    -Bsymbolic-functions.
  - debian/patches/perlpath-quilt.patch: Don't change perl #! paths under
    .pc.
  - debian/rules:
    + Don't run 'make test' when cross-building.
    + Use host compiler when cross-building.  Patch from Neil Williams.
    + Don't build for processors no longer supported: i486, i586 (on
      i386), v8 (on sparc).
    + Fix Makefile to properly clean up libs/ dirs in clean target.
    + Replace duplicate files in the doc directory with symlinks.
* Update architectures affected by Bsymbolic-functions.patch.
* Drop debian/patches/no-sslv2.patch; Debian now adds the 'no-ssl2'
  configure option, which compiles out SSLv2 support entirely, so this is
  no longer needed.
* Drop openssl-doc in favour of the libssl-doc package introduced by
  Debian.  Add Conflicts/Replaces until the next LTS release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 [Instructions for building for Windows CE can be found in INSTALL.WCE]
6
6
 [Instructions for building for Win64 can be found in INSTALL.W64]
7
7
 
8
 
 Heres a few comments about building OpenSSL in Windows environments.  Most
9
 
 of this is tested on Win32 but it may also work in Win 3.1 with some
10
 
 modification.
11
 
 
12
 
 You need Perl for Win32.  Unless you will build on Cygwin, you will need
13
 
 ActiveState Perl, available from http://www.activestate.com/ActivePerl.
14
 
 
15
 
 and one of the following C compilers:
 
8
 Here are a few comments about building OpenSSL for Win32 environments,
 
9
 such as Windows NT and Windows 9x. It should be noted though that
 
10
 Windows 9x are not ordinarily tested. Its mention merely means that we
 
11
 attempt to maintain certain programming discipline and pay attention
 
12
 to backward compatibility issues, in other words it's kind of expected
 
13
 to work on Windows 9x, but no regression tests are actually performed.
 
14
 
 
15
 On additional note newer OpenSSL versions are compiled and linked with
 
16
 Winsock 2. This means that minimum OS requirement was elevated to NT 4
 
17
 and Windows 98 [there is Winsock 2 update for Windows 95 though].
 
18
 
 
19
 - you need Perl for Win32.  Unless you will build on Cygwin, you will need
 
20
   ActiveState Perl, available from http://www.activestate.com/ActivePerl.
 
21
 
 
22
 - one of the following C compilers:
16
23
 
17
24
  * Visual C++
18
25
  * Borland C
19
26
  * GNU C (Cygwin or MinGW)
20
27
 
 
28
- Netwide Assembler, a.k.a. NASM, available from http://nasm.sourceforge.net/
 
29
  is required if you intend to utilize assembler modules. Note that NASM
 
30
  is now the only supported assembler.
 
31
 
21
32
 If you are compiling from a tarball or a CVS snapshot then the Win32 files
22
33
 may well be not up to date. This may mean that some "tweaking" is required to
23
34
 get it all to work. See the trouble shooting section later on for if (when?)
26
37
 Visual C++
27
38
 ----------
28
39
 
29
 
 If you want to compile in the assembly language routines with Visual C++ then
30
 
 you will need an assembler. This is worth doing because it will result in
31
 
 faster code: for example it will typically result in a 2 times speedup in the
32
 
 RSA routines. Currently the following assemblers are supported:
33
 
 
34
 
  * Microsoft MASM (aka "ml")
35
 
  * Free Netwide Assembler NASM.
36
 
 
37
 
 MASM is distributed with most versions of VC++. For the versions where it is
38
 
 not included in VC++, it is also distributed with some Microsoft DDKs, for
39
 
 example the Windows NT 4.0 DDK and the Windows 98 DDK. If you do not have
40
 
 either of these DDKs then you can just download the binaries for the Windows
41
 
 98 DDK and extract and rename the two files XXXXXml.exe and XXXXXml.err, to
42
 
 ml.exe and ml.err and install somewhere on your PATH. Both DDKs can be
43
 
 downloaded from the Microsoft developers site www.msdn.com.
44
 
 
45
 
 NASM is freely available. Version 0.98 was used during testing: other versions
46
 
 may also work. It is available from many places, see for example:
47
 
 http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
48
 
 The NASM binary nasmw.exe needs to be installed anywhere on your PATH.
49
 
 
50
 
 Firstly you should run Configure:
51
 
 
52
 
 > perl Configure VC-WIN32 --prefix=c:/some/openssl/dir
53
 
 
54
 
Where the prefix argument specifies where OpenSSL will be installed to.
55
 
 
56
 
 Next you need to build the Makefiles and optionally the assembly language
57
 
 files:
58
 
 
59
 
 - If you are using MASM then run:
60
 
 
61
 
   > ms\do_masm
 
40
 If you want to compile in the assembly language routines with Visual
 
41
 C++, then you will need already mentioned Netwide Assembler binary,
 
42
 nasmw.exe or nasm.exe, to be available on your %PATH%.
 
43
 
 
44
 Firstly you should run Configure with platform VC-WIN32:
 
45
 
 
46
 > perl Configure VC-WIN32 --prefix=c:\some\openssl\dir
 
47
 
 
48
 Where the prefix argument specifies where OpenSSL will be installed to.
 
49
 
 
50
 Next you need to build the Makefiles and optionally the assembly
 
51
 language files:
62
52
 
63
53
 - If you are using NASM then run:
64
54
 
66
56
 
67
57
 - If you don't want to use the assembly language files at all then run:
68
58
 
 
59
   > perl Configure VC-WIN32 no-asm --prefix=c:/some/openssl/dir
69
60
   > ms\do_ms
70
61
 
71
62
 If you get errors about things not having numbers assigned then check the
76
67
 
77
68
 > nmake -f ms\ntdll.mak
78
69
 
79
 
 If all is well it should compile and you will have some DLLs and executables
80
 
 in out32dll. If you want to try the tests then do:
 
70
 If all is well it should compile and you will have some DLLs and
 
71
 executables in out32dll. If you want to try the tests then do:
81
72
 
82
73
 > nmake -f ms\ntdll.mak test
83
74
 
84
75
 
85
 
To install OpenSSL to the specified location do:
 
76
 To install OpenSSL to the specified location do:
86
77
 
87
 
> nmake -f ms\ntdll.mak install
 
78
 > nmake -f ms\ntdll.mak install
88
79
 
89
80
 Tweaks:
90
81
 
91
 
 There are various changes you can make to the Win32 compile environment. By
92
 
 default the library is not compiled with debugging symbols. If you add 'debug'
93
 
 to the mk1mf.pl lines in the do_* batch file then debugging symbols will be
94
 
 compiled in. Note that mk1mf.pl expects the platform to be the last argument
95
 
 on the command line, so 'debug' must appear before that, as all other options.
96
 
 
97
 
 
98
 
 By default in 0.9.8 OpenSSL will compile builtin ENGINES into the libeay32.dll
99
 
 shared library. If you specify the "no-static-engine" option on the command
100
 
 line to Configure the shared library build (ms\ntdll.mak) will compile the
101
 
 engines as separate DLLs.
 
82
 There are various changes you can make to the Win32 compile
 
83
 environment. By default the library is not compiled with debugging
 
84
 symbols. If you use the platform debug-VC-WIN32 instead of VC-WIN32
 
85
 then debugging symbols will be compiled in.
 
86
 
 
87
 By default in 1.0.0 OpenSSL will compile builtin ENGINES into the
 
88
 separate shared librariesy. If you specify the "enable-static-engine"
 
89
 option on the command line to Configure the shared library build
 
90
 (ms\ntdll.mak) will compile the engines into libeay32.dll instead.
102
91
 
103
92
 The default Win32 environment is to leave out any Windows NT specific
104
93
 features.
105
94
 
106
 
 If you want to enable the NT specific features of OpenSSL (currently only the
107
 
 logging BIO) follow the instructions above but call the batch file do_nt.bat
108
 
 instead of do_ms.bat.
 
95
 If you want to enable the NT specific features of OpenSSL (currently
 
96
 only the logging BIO) follow the instructions above but call the batch
 
97
 file do_nt.bat instead of do_ms.bat.
109
98
 
110
99
 You can also build a static version of the library using the Makefile
111
100
 ms\nt.mak
112
101
 
113
102
 
114
 
 
115
103
 Borland C++ builder 5
116
104
 ---------------------
117
105
 
137
125
 GNU C (Cygwin)
138
126
 --------------
139
127
 
140
 
 Cygwin provides a bash shell and GNU tools environment running
141
 
 on NT 4.0, Windows 9x, Windows ME, Windows 2000, and Windows XP.
142
 
 Consequently, a make of OpenSSL with Cygwin is closer to a GNU
143
 
 bash environment such as Linux than to other the other Win32
144
 
 makes.
145
 
 
146
 
 Cygwin implements a Posix/Unix runtime system (cygwin1.dll).
147
 
 It is also possible to create Win32 binaries that only use the
148
 
 Microsoft C runtime system (msvcrt.dll or crtdll.dll) using
149
 
 MinGW. MinGW can be used in the Cygwin development environment
150
 
 or in a standalone setup as described in the following section.
 
128
 Cygwin implements a Posix/Unix runtime system (cygwin1.dll) on top of
 
129
 Win32 subsystem and provides a bash shell and GNU tools environment.
 
130
 Consequently, a make of OpenSSL with Cygwin is virtually identical to
 
131
 Unix procedure. It is also possible to create Win32 binaries that only
 
132
 use the Microsoft C runtime system (msvcrt.dll or crtdll.dll) using
 
133
 MinGW. MinGW can be used in the Cygwin development environment or in a
 
134
 standalone setup as described in the following section.
151
135
 
152
136
 To build OpenSSL using Cygwin:
153
137
 
192
176
 non-fatal error in "make test" but is otherwise harmless.  If
193
177
 desired and needed, GNU bc can be built with Cygwin without change.
194
178
 
195
 
 GNU C (MinGW)
 
179
 GNU C (MinGW/MSYS)
196
180
 -------------
197
181
 
198
 
 * Compiler installation:
199
 
 
200
 
   MinGW is available from http://www.mingw.org. Run the installer and
201
 
   set the MinGW bin directory to the PATH in "System Properties" or
202
 
   autoexec.bat.
 
182
 * Compiler and shell environment installation:
 
183
 
 
184
   MinGW and MSYS are available from http://www.mingw.org/, both are
 
185
   required. Run the installers and do whatever magic they say it takes
 
186
   to start MSYS bash shell with GNU tools on its PATH.
 
187
 
 
188
   N.B. Since source tar-ball can contain symbolic links, it's essential
 
189
   that you use accompanying MSYS tar to unpack the source. It will
 
190
   either handle them in one way or another or fail to extract them,
 
191
   which does the trick too. Latter means that you may safely ignore all
 
192
   "cannot create symlink" messages, as they will be "re-created" at
 
193
   configure stage by copying corresponding files. Alternative programs
 
194
   were observed to create empty files instead, which results in build
 
195
   failure.
203
196
 
204
197
 * Compile OpenSSL:
205
198
 
206
 
   > ms\mingw32
207
 
 
208
 
   This will create the library and binaries in out. In case any problems
209
 
   occur, try
210
 
   > ms\mingw32 no-asm
211
 
   instead.
 
199
   $ ./config
 
200
   [...]
 
201
   $ make
 
202
   [...]
 
203
   $ make test
 
204
 
 
205
   This will create the library and binaries in root source directory
 
206
   and openssl.exe application in apps directory.
 
207
 
 
208
   It is also possible to cross-compile it on Linux by configuring
 
209
   with './Configure --cross-compile-prefix=i386-mingw32- mingw ...'.
 
210
   'make test' is naturally not applicable then.
212
211
 
213
212
   libcrypto.a and libssl.a are the static libraries. To use the DLLs,
214
213
   link with libeay32.a and libssl32.a instead.
215
214
 
216
 
   See troubleshooting if you get error messages about functions not having
217
 
   a number assigned.
218
 
 
219
 
 * You can now try the tests:
220
 
 
221
 
   > cd out
222
 
   > ..\ms\test
223
 
 
 
215
   See troubleshooting if you get error messages about functions not
 
216
   having a number assigned.
224
217
 
225
218
 Installation
226
219
 ------------
307
300
 
308
301
 If you link with static OpenSSL libraries [those built with ms/nt.mak],
309
302
 then you're expected to additionally link your application with
310
 
 WSOCK32.LIB, ADVAPI32.LIB, GDI32.LIB and USER32.LIB. Those developing
 
303
 WS2_32.LIB, ADVAPI32.LIB, GDI32.LIB and USER32.LIB. Those developing
311
304
 non-interactive service applications might feel concerned about linking
312
 
 with latter two, as they are justly associated with interactive desktop,
313
 
 which is not available to service processes. The toolkit is designed
314
 
 to detect in which context it's currently executed, GUI, console app
315
 
 or service, and act accordingly, namely whether or not to actually make
316
 
 GUI calls.
 
305
 with the latter two, as they are justly associated with interactive
 
306
 desktop, which is not available to service processes. The toolkit is
 
307
 designed to detect in which context it's currently executed, GUI,
 
308
 console app or service, and act accordingly, namely whether or not to
 
309
 actually make GUI calls. Additionally those who wish to
 
310
 /DELAYLOAD:GDI32.DLL and /DELAYLOAD:USER32.DLL and actually keep them
 
311
 off service process should consider implementing and exporting from
 
312
 .exe image in question own _OPENSSL_isservice not relying on USER32.DLL.
 
313
 E.g., on Windows Vista and later you could:
 
314
 
 
315
        __declspec(dllexport) __cdecl BOOL _OPENSSL_isservice(void)
 
316
        {   DWORD sess;
 
317
            if (ProcessIdToSessionId(GetCurrentProcessId(),&sess))
 
318
                return sess==0;
 
319
            return FALSE;
 
320
        }
317
321
 
318
322
 If you link with OpenSSL .DLLs, then you're expected to include into
319
323
 your application code small "shim" snippet, which provides glue between