cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Small footprint libcurl

From: Miklos Nemeth <mnemeth_at_kfkisystems.com>
Date: Mon, 10 Jun 2002 11:53:22 -0700

Attached is a patch file which has a couple of modifications
against version 7.9.7 to make it posible to disable certain protocols.
The setup.h is especially interesting (as Daniel suggested)
because here you can place the various DISABLE_xxxx defines
to control what to be disabled:
/* #define HTTP_ONLY
*/
#ifdef HTTP_ONLY
#define DISABLE_FTP
#define DISABLE_LDAP
#define DISABLE_TELNET
#define DISABLE_DICT
#define DISABLE_FILE
#define DISABLE_GOPHER
#endif

There are a copule of advantages of these modifications:
(1) The resulting code could be made smaller when disabling unwanted
protocols.
(2) Disabling unused features may improve the security of your
application. This is a general security guidelines for system admins.
(3) Some features could not be compiled on some platforms (eg ldap on
libc5 Linux boxes),
and by disabling them you may compile libcurl on such platforms.

Miklos

> -----Original Message-----
> From: curl-library-admin_at_lists.sourceforge.net
> [mailto:curl-library-admin_at_lists.sourceforge.net] On Behalf
> Of Miklos Nemeth
> Sent: Sunday, June 09, 2002 11:51 AM
> To: Daniel Stenberg
> Cc: 'libcurl Mailing list'
> Subject: RE: Small footprint libcurl
>
>
> > I think I must've expressed myself unclear.
> No, you were absolutely clear.
> > Again: add #infdef DISABLE_[PROTOCOL] lines at the
> appropriate places
> > in the source code, and I can assure you that you can get
> much bigger
> > differences.
> > The biggest part surely comes when/if you disable FTP.
> I placed these DISABLE_[PROTOCOL] lines at the appropriate
> places. This way ftp.c, ftp.h, telnet.c, ldap.c, etc are left
> out entirely, and I modified url.c accordingly.
> Unfortunately, in reality, disabling FTP and all other
> protocols (except
> HTTP)
> will not give big differences.
> I think the main reason is that OpenSSL itself is so huge
> that any other attempt to reduce the code size is
> insignificant compared to SSL.
>
> Is it possible to use libcurl with other (small footprint)
> SSL libraries?
>
> Miklos
>
>
> _______________________________________________________________
>
> Don't miss the 2002 Sprint PCS Application Developer's
> Conference August 25-28 in Las Vegas -
> http://devcon.sprintpcs.com/adp/index.cfm?> source=osdntextlink
>

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

Received on 2002-06-10