Okay....
Just a followup to my own reply.
The fatal error below is caused by the /WX compiler switch which causes all
warnings to be treated as errors.
I guess there is an error in the makefile generation since they specify both
/W3 and /WX, but /WX overrules /W3 so I don't think /W3 is ever used.
But anyway.....
After some modifications I ended up building a static lib without the
following ciphers "no-dh no-dsa no-bf no-cast no-idea".
Unfortunately the library size didn't decrease as much as I had hoped for:
Only from 2.25MB to 2.10MB :-(
Kim Hellan
-----Oprindelig meddelelse-----
Fra: Hellan,Kim KHE
Hi all
Greg Stark: I'm sure that you gave the right solution, so I tried doing as
you said.
For starters I just added "no-dh no-dsa" to remove DH and DSA asymmetric
ciphers.
Unfortunately when compiling, this gave the following error:
cl /Fotmp32\ssl_cert.obj -Iinc32 -Itmp32 /MT /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0
/GF /
Gy /nologo -DWIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DBN_ASM
-DMD5_ASM -DSHA1_ASM -DRMD160_ASM /Fdout32 -DNO_DSA -DNO_DH -c
.\ssl\ssl_cert.c
ssl_cert.c
.\ssl\ssl_cert.c(274) : error C2220: warning treated as error - no object
file generated
.\ssl\ssl_cert.c(274) : warning C4102: 'err' : unreferenced label
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
After looking in the source, my guess is that when NO_DH is defined, no code
ever does a "goto err". Apparently VC++ does not like to have a label that
no one ever uses.
It would be great if some of the OpenSSL developers would comment on this.
Maybe we are doing it the wrong way?
Any other ideas..... anyone?
Thanks,
Kim Hellan
-----Oprindelig meddelelse-----
Fra: Greg Stark [mailto:[EMAIL PROTECTED]]
Sendt: 15. marts 2001 16:38
Til: [EMAIL PROTECTED]
Emne: Re: How to reduce size of OpenSSL LIB file
Kim,
You can modify the do_masm.bat file in the ms\ directory. You need to
tell the perl script util\mk1mf.pl which cryptogrpahy to eliminate. Here is
a fragment that could be in do_masm.bat showing one way to do it.
SET SKIPS=no-rc5 no-bf no-cast no-idea no-ripemd no-dh no-dsa
perl util\mk1mf.pl %SKIPS% VC-WIN32 >ms\nt.mak
Look through the perl script and maybe a few other places to see what no-***
options are supported. Please post the results to the list. I think it is of
general interest.
Good luck,
_____________________________________
Greg Stark
Ethentica, Inc.
[EMAIL PROTECTED]
_____________________________________
----- Original Message -----
From: "Hellan,Kim KHE" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 15, 2001 6:33 AM
Subject: VS: How to reduce size of OpenSSL LIB file
> Yes, in some applications (like COM objects) I'm statically linking,
> because I need a "one-file" application.
> In other apps. I use the DLL's.
> I'm sure it is possible to exclude the code for some algorithms, I just
> need to know how.
>
> Kim Hellan
>
>
> You are statically linking libeay32.lib by the sounds of things. It
> would probably be better to make the dll and link in the stub library.
> My libeay32.lib and libeay32.dll are 367KB and 645KB (debug)
> respectively.
>
>
> "Hellan,Kim KHE" wrote:
> >
> > I'm building a static OpenSSL library using MS VC++ 6 on Windows NT4.
> > Using the standard OpenSSL makefiles this all works fine, but the
> > libeay32.lib file becomes very big (about 2.3 MB for a release build
> and 4
> > MB for a debug build).
> > This of course drastically increases the size of my applications when
> this
> > file is linked.
> > Is there a way to exclude some code that I never use?
> > Some algorithms like DSA or DH I never use (basically I only use 3DES
> and
> > RSA), so how can I exclude all this "unused" code when building the
> lib?
> >
> > I can see that a lot of the code for example contains a NO_DSA define,
> but
> > how can I use this when building the lib.
> >
> > TIA
> > Kim Hellan
> > KMD / KMD-CA
> > http://www.kmd-ca.dk
> > Mailto:[EMAIL PROTECTED]
> ______________________________________________________________________
> OpenSSL Project http://www.openssl.org
> User Support Mailing List [EMAIL PROTECTED]
> Automated List Manager [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]