xref: /freebsd/crypto/openssl/NOTES-DJGPP.md (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1*b077aed3SPierre ProncheryNotes for the DOS platform with DJGPP
2*b077aed3SPierre Pronchery=====================================
3*b077aed3SPierre Pronchery
4*b077aed3SPierre Pronchery OpenSSL has been ported to DJGPP, a Unix look-alike 32-bit run-time
5*b077aed3SPierre Pronchery environment for 16-bit DOS, but only with long filename support.
6*b077aed3SPierre Pronchery If you wish to compile on native DOS with 8+3 filenames, you will
7*b077aed3SPierre Pronchery have to tweak the installation yourself, including renaming files
8*b077aed3SPierre Pronchery with illegal or duplicate names.
9*b077aed3SPierre Pronchery
10*b077aed3SPierre Pronchery You should have a full DJGPP environment installed, including the
11*b077aed3SPierre Pronchery latest versions of DJGPP, GCC, BINUTILS, BASH, etc. This package
12*b077aed3SPierre Pronchery requires that PERL and the PERL module `Text::Template` also be
13*b077aed3SPierre Pronchery installed (see [NOTES-PERL.md](NOTES-PERL.md)).
14*b077aed3SPierre Pronchery
15*b077aed3SPierre Pronchery All of these can be obtained from the usual DJGPP mirror sites or
16*b077aed3SPierre Pronchery directly at <http://www.delorie.com/pub/djgpp>. For help on which
17*b077aed3SPierre Pronchery files to download, see the DJGPP "ZIP PICKER" page at
18*b077aed3SPierre Pronchery <http://www.delorie.com/djgpp/zip-picker.html>. You also need to have
19*b077aed3SPierre Pronchery the WATT-32 networking package installed before you try to compile
20*b077aed3SPierre Pronchery OpenSSL. This can be obtained from <http://www.watt-32.net/>.
21*b077aed3SPierre Pronchery The Makefile assumes that the WATT-32 code is in the directory
22*b077aed3SPierre Pronchery specified by the environment variable WATT_ROOT. If you have watt-32
23*b077aed3SPierre Pronchery in directory `watt32` under your main DJGPP directory, specify
24*b077aed3SPierre Pronchery `WATT_ROOT="/dev/env/DJDIR/watt32"`.
25*b077aed3SPierre Pronchery
26*b077aed3SPierre Pronchery To compile OpenSSL, start your BASH shell, then configure for DJGPP by
27*b077aed3SPierre Pronchery running `./Configure` with appropriate arguments:
28*b077aed3SPierre Pronchery
29*b077aed3SPierre Pronchery    ./Configure no-threads --prefix=/dev/env/DJDIR DJGPP
30*b077aed3SPierre Pronchery
31*b077aed3SPierre Pronchery And finally fire up `make`. You may run out of DPMI selectors when
32*b077aed3SPierre Pronchery running in a DOS box under Windows. If so, just close the BASH
33*b077aed3SPierre Pronchery shell, go back to Windows, and restart BASH. Then run `make` again.
34*b077aed3SPierre Pronchery
35*b077aed3SPierre Pronchery RUN-TIME CAVEAT LECTOR
36*b077aed3SPierre Pronchery --------------
37*b077aed3SPierre Pronchery
38*b077aed3SPierre Pronchery Quoting FAQ:
39*b077aed3SPierre Pronchery
40*b077aed3SPierre Pronchery  "Cryptographic software needs a source of unpredictable data to work
41*b077aed3SPierre Pronchery   correctly.  Many open source operating systems provide a "randomness
42*b077aed3SPierre Pronchery   device" (`/dev/urandom` or `/dev/random`) that serves this purpose."
43*b077aed3SPierre Pronchery
44*b077aed3SPierre Pronchery As of version 0.9.7f DJGPP port checks upon `/dev/urandom$` for a 3rd
45*b077aed3SPierre Pronchery party "randomness" DOS driver. One such driver, `NOISE.SYS`, can be
46*b077aed3SPierre Pronchery obtained from <http://www.rahul.net/dkaufman/index.html>.
47