Subject: RE: Failure to load mod_ssl under NT/apache 2.0

From: "arcean" <[email-masked]>
Date: Wed, 17 Jul 2002 05:37:07 -0700

---------- Original Message ----------------------------------
From: Alex Moon <[email-masked]>
Reply-To: [email-masked]
Date:  Wed, 17 Jul 2002 11:37:20 +0100

>I've been trying to get apache 2.0.39 +modssl to work under winNT. 
> But i am failing at what seems like the first hurdle i.e. i cannot seem to get the 
>apache mod_ssl.so module to load.  It comes up with the following:

with apache 1.3.2* under windows (not cygwin) you had to load .DDL 
and  not .SO

maybe it a way to search
>Cannot load C:/apache2/modules/mod_ssl.so into server: The operating 
>system cannot run %1
>
>Any ideas greatfully received as I cannot see what I have done 
>wrong,  
>
>Alex
>
>
>Technical Manager
>Online Learning Support Unit
>Middlesex University Business School
>
>[email-masked]
>020 8411 5092
>
>______________________________________________________________________
>Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
>User Support Mailing List                      [email-masked]
>Automated List Manager                            [email-masked]
>

__________________________________________________
D O T E A S Y - "Join the web hosting revolution!"
             http://www.doteasy.com
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email-masked]
Automated List Manager                            [email-masked]

---

From: hunter <[email-masked]>
Date: Wed, 17 Jul 2002 09:22:37 -0400

>>Middlesex University Business School

I have not done this for several weeks and maybe the distribution has 
changed, but...

mod_ssl.so was not built with Apache 1.0.39

...you have to build it.

1. place openssl into ?:\httpd-2.0.39\srclib ... there are instructions 
somewhere to follow...
2. follow the instructions in openssl and build it ... you need masm7, 
perl, vc6, etc.
3. build apache ... it finds openssl and builds mod_ssl.so ... you need 
awk, bison, sed and flex (new cygwin)

... I had to get newer version of cygwin before it worked, but then the 
newer perl was a problem.
... older perl must be in path before cygwin

After it all comes to gether you can use nmake -f makefile.win installr

Then I had trouble making certs...

Try these hints ... I will make more detailed instructions later if 
needed but I think the newer packages (must) probably work better than 
what I used ... but I have not checked.

I will have to download new source and try again to know what the 
situation is and I am sorry but I have to run off to work.  Later, ok?

Chris.

---

From: hunter <[email-masked]>
Date: Wed, 17 Jul 2002 22:40:46 -0400

I apologize for the sloppiness...

> arcean wrote:
(snip)
> situation is and I am sorry but I have to run off to work.  Later, ok?
I have not located an msi installer for Apache 2.0.39
These are the steps that I followed build it from source.

1. Download httpd-2.0.39-win32-src.zip
2. Unzip into directory httpd-2.0.39
3. Create directory ?:\httpd-2.0.39\srclib\openssl
4. Extract openssl-0.9.6d.tar.gz
5. Copy the contents of \openssl-0.9.6d to \httpd-2.0.39\srclib\openssl
6. Go to :\httpd-2.0.39\srclib\openssl follow instructions in INSTALL.W32

Bellow is the results mixed within the instructionss...

  Visual C++
  ----------

  First should run Configure:

  > perl Configure VC-WIN32

2002.07.17 21.47.37.13
[I:\httpd-2.0.39\srclib\openssl]perl configure VC-WIN32
Configuring for VC-WIN32
IsWindows=1
CC            =cl
CFLAG         =-DTHREADS  -DDSO_WIN32
EX_LIBS       =
BN_ASM        =bn_asm.o
DES_ENC       =des_enc.o fcrypt_b.o
BF_ENC        =bf_enc.o
CAST_ENC      =c_enc.o
RC4_ENC       =rc4_enc.o
RC5_ENC       =rc5_enc.o
MD5_OBJ_ASM   =
SHA1_OBJ_ASM  =
RMD160_OBJ_ASM=
PROCESSOR     =
RANLIB        =/usr/bin/ranlib
PERL          =/usr/bin/perl
THIRTY_TWO_BIT mode
BN_LLONG mode
RC4_INDEX mode
RC4_CHUNK is undefined

Configured for VC-WIN32.

2002.07.17 21.48.04.99
[I:\httpd-2.0.39\srclib\openssl]

  Next you need to build the Makefiles and optionally the assembly language
  files:

  - If you are using MASM then run:

    > ms\do_masm

2002.07.17 21.48.04.99
[I:\httpd-2.0.39\srclib\openssl]ms\do_masm
Generating x86 for MASM assember
Bignum
DES
"crypt(3)"
Blowfish
CAST5
RC4
MD5
SHA1
RIPEMD160
RC5\32

2002.07.17 21.49.00.49
[I:\httpd-2.0.39\srclib\openssl]perl util\mkfiles.pl  1>MINFO

2002.07.17 21.49.00.85
[I:\httpd-2.0.39\srclib\openssl]rem perl util\mk1mf.pl VC-MSDOS no-sock 
 >ms\msdos.mak

2002.07.17 21.49.00.85
[I:\httpd-2.0.39\srclib\openssl]rem perl util\mk1mf.pl VC-W31-32 >ms\w31.mak

2002.07.17 21.49.00.85
[I:\httpd-2.0.39\srclib\openssl]perl util\mk1mf.pl dll VC-W31-32 
1>ms\w31dll.mak
unknown option -

2002.07.17 21.49.01.34
[I:\httpd-2.0.39\srclib\openssl]perl util\mk1mf.pl VC-WIN32  1>ms\nt.mak
unknown option -

2002.07.17 21.49.01.79
[I:\httpd-2.0.39\srclib\openssl]perl util\mk1mf.pl dll VC-WIN32 
1>ms\ntdll.mak
unknown option -

2002.07.17 21.49.02.23
[I:\httpd-2.0.39\srclib\openssl]perl util\mkdef.pl 16 libeay 
1>ms\libeay16.def

2002.07.17 21.49.05.07
[I:\httpd-2.0.39\srclib\openssl]perl util\mkdef.pl 32 libeay 
1>ms\libeay32.def

2002.07.17 21.49.07.95
[I:\httpd-2.0.39\srclib\openssl]perl util\mkdef.pl 16 ssleay 
1>ms\ssleay16.def

2002.07.17 21.49.10.64
[I:\httpd-2.0.39\srclib\openssl]perl util\mkdef.pl 32 ssleay 
1>ms\ssleay32.def

2002.07.17 21.49.13.33
[I:\httpd-2.0.39\srclib\openssl]

  - If you are using NASM then run:

    > ms\do_nasm

  - If you don't want to use the assembly language files at all then run:

    > ms\do_ms

  If you get errors about things not having numbers assigned then check 
the troubleshooting section: you probably won't be able to compile it as 
it stands.

  Then from the VC++ environment at a prompt do:

  > nmake -f ms\ntdll.mak

2002.07.17 21.49.13.33
[I:\httpd-2.0.39\srclib\openssl]nmake -f ms\ntdll.mak

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

' in macroak(239) : fatal error U1001: syntax error : illegal character '
Stop.

2002.07.17 21.50.09.96
[I:\httpd-2.0.39\srclib\openssl]nmake -f ms\ntdll.mak

   in macroak(239) : fatal error U1001: syntax error : illegal character
- this is the error you get when you use the new cygwin perl...

...make certain older perl is ahead in path and start over...

2002.07.17 21.57.07.91
[I:\httpd-2.0.39\srclib\openssl]perl configure VC-WIN32
Configuring for VC-WIN32
IsWindows=1
CC            =cl
CFLAG         =-DTHREADS  -DDSO_WIN32
EX_LIBS       =
BN_ASM        =bn_asm.o
DES_ENC       =des_enc.o fcrypt_b.o
BF_ENC        =bf_enc.o
CAST_ENC      =c_enc.o
RC4_ENC       =rc4_enc.o
RC5_ENC       =rc5_enc.o
MD5_OBJ_ASM   =
SHA1_OBJ_ASM  =
RMD160_OBJ_ASM=
PROCESSOR     =
RANLIB        =true
PERL          =perl
THIRTY_TWO_BIT mode
BN_LLONG mode
RC4_INDEX mode
RC4_CHUNK is undefined

Configured for VC-WIN32.

2002.07.17 21.57.54.71
[I:\httpd-2.0.39\srclib\openssl]

2002.07.17 21.57.54.71
[I:\httpd-2.0.39\srclib\openssl]ms\do_masm
Generating x86 for MASM assember
Bignum
DES
"crypt(3)"
Blowfish
CAST5
RC4
MD5
SHA1
RIPEMD160
RC5\32

2002.07.17 21.58.37.68
[I:\httpd-2.0.39\srclib\openssl]perl util\mkfiles.pl  1>MINFO

2002.07.17 21.58.37.86
[I:\httpd-2.0.39\srclib\openssl]rem perl util\mk1mf.pl VC-MSDOS no-sock 
 >ms\msdos.mak

2002.07.17 21.58.37.86
[I:\httpd-2.0.39\srclib\openssl]rem perl util\mk1mf.pl VC-W31-32 >ms\w31.mak

2002.07.17 21.58.37.86
[I:\httpd-2.0.39\srclib\openssl]perl util\mk1mf.pl dll VC-W31-32 
1>ms\w31dll.mak

2002.07.17 21.58.38.10
[I:\httpd-2.0.39\srclib\openssl]perl util\mk1mf.pl VC-WIN32  1>ms\nt.mak

2002.07.17 21.58.38.34
[I:\httpd-2.0.39\srclib\openssl]perl util\mk1mf.pl dll VC-WIN32 
1>ms\ntdll.mak

2002.07.17 21.58.38.58
[I:\httpd-2.0.39\srclib\openssl]perl util\mkdef.pl 16 libeay 
1>ms\libeay16.def

2002.07.17 21.58.41.09
[I:\httpd-2.0.39\srclib\openssl]perl util\mkdef.pl 32 libeay 
1>ms\libeay32.def

2002.07.17 21.58.43.69
[I:\httpd-2.0.39\srclib\openssl]perl util\mkdef.pl 16 ssleay 
1>ms\ssleay16.def

2002.07.17 21.58.46.07
[I:\httpd-2.0.39\srclib\openssl]perl util\mkdef.pl 32 ssleay 
1>ms\ssleay32.def

2002.07.17 21.58.48.42
[I:\httpd-2.0.39\srclib\openssl]

... LONG BUILD ... make certain there are no errors .. the test

  If all is well it should compile and you will have some DLLs and 
executables
  in out32dll. If you want to try the tests then do:

  > cd out32dll
  > ..\ms\test

(snip) lots of test results...

test sslv2/sslv3 with both client and server authentication via BIO pair
client authentication
server authentication
depth=2 /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit)
depth=1 /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
depth=0 /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Server test cert (512 
bit)
depth=2 /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit)
depth=1 /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
depth=0 error=10 /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Client test 
cert (512 bit)
depth=0 /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Client test cert (512 
bit)
TLSv1, cipher TLSv1/SSLv3 EDH-RSA-DES-CBC3-SHA, 512 bit RSA
passed all tests

2002.07.17 22.11.14.32
[I:\httpd-2.0.39\srclib\openssl\out32dll]

7. Time to build Apache
8. cd ..\..\.. ?:\httpd-2.0.39\nmake /f Makefile.win PORT=80 
INSTDIR="f:\Apache" installr

...an old copy of bison will cause a failure here...

(snip)

    Creating library .\Release\mod_proxy_http.lib and object 
.\Release\mod_proxy_http.exp
         cd ..\..
         cd modules\ssl
         NMAKE -nologo -f mod_ssl.mak         CFG="mod_ssl - Win32 
Release" RECURSE=0  .\Release\mod_ssl.so
         if not exist ".\Release/" mkdir ".\Release"
         tempfile.bat
         tempfile.bat
         tempfile.bat
         tempfile.bat
         rc.exe /l 0x409 /fo".\Release\mod_ssl.res" /d "NDEBUG" .\mod_ssl.rc
         cl.exe @I:\Temp\nma02896.
mod_ssl.c
ssl_engine_config.c
ssl_engine_dh.c
ssl_engine_init.c
ssl_engine_io.c
ssl_engine_kernel.c
ssl_engine_log.c
ssl_engine_mutex.c
ssl_engine_pphrase.c
ssl_engine_rand.c
ssl_engine_vars.c
ssl_expr.c
ssl_expr_eval.c
ssl_expr_parse.c
ssl_expr_scan.c
ssl_scache.c
ssl_scache_dbm.c
ssl_scache_shmcb.c
ssl_scache_shmht.c
ssl_util.c
Generating Code...
Compiling...
ssl_util_ssl.c
ssl_util_table.c
Generating Code...
         link.exe @I:\Temp\nmb02896.
    Creating library .\Release\mod_ssl.lib and object .\Release\mod_ssl.exp
         cd ..\..
         cd support
         NMAKE -nologo -f abs.mak             CFG="abs - Win32 Release" 
RECURSE=0
         if not exist ".\Release/" mkdir ".\Release"
         cl.exe @I:\Temp\nma03668.
ab.c

(snip)

         1 file(s) copied.
         awk -f script.awk "docs/conf/ssl-std.conf" "f:\Apache" > 
"f:\Apache\conf\ssl.default.conf"
         if not exist "f:\Apache\conf\ssl.conf"  copy 
"f:\Apache\conf\ssl.default.conf" "f:\Apache\conf\ssl.conf"
         1 file(s) copied.
         awk -f script.awk "support/dbmmanage.in" 
 >"f:\Apache\bin\dbmmanage.pl"
         del .a .y

2002.07.17 22.20.36.19
[I:\httpd-2.0.39]

bison, flex and awk are required ... they are in my cygwin, that I had 
to update
or it would fail to build mod_ssl.so -- syntax error in dynamicall 
generated c source - generated
by bison.

I now have an installed version ...

Still to be done.

httpd.conf must be tuned and certs made

If you get this far I will tell you how I continued, but it gets mucky 
from here.  I am not very certain about creating certs.

Chris.

---

From: hunter <[email-masked]>
Date: Wed, 17 Jul 2002 23:25:58 -0400

Sorry about replying to my own message.

In the event that it may be useful I have placed the entire build on 
line -- that I made while creating my earlier instructions.

I do not feel in anyway an authority, but I have managed to get the code 
to build and start (load).  Though I did not finish the configuration in 
this case, nor did I make any certs.

http://tor.ath.cx/~hunter/apache/apache.zip

It is large ... pull it down if you wish to learn from it.  Use it if 
you like ... your choice.

---

From: Alex Moon <[email-masked]>
Date: Thu, 18 Jul 2002 14:20:27 +0100

Hunter and Brendan 

Thanks very much for your help.  Hunter you are a genius!! I 
couldn't have asked for a more comprehensive breakdown of the 
solution. Anyhow problem solved and mod_ssl.so now loads - 
hooray!  My test server is now configured so will now under go 
reliability testing before i put it up live.

Many thanks for your time and effort.

Alex 

Technical Manager

[email-masked]
020 8411 5092