Topic: 101KB foot print ( possible reduction? )

I need wolfSSL for only client embedded SSL support and needs only two cipher suites which I know the target servers always support
I have tried as much as i could to reduce the footprint  but what i'm getting is 101KB.

I have used the following switchs

NO_MD4,NO_RABBIT,NO_SESSION_CACHE,NO_WOLFSSL_SERVER,NO_ERROR_STRINGS,NO_PSK,NO_PWDBASED,NO_HC128,NO_DSA,OPENSSL_EXTRA,NO_64BIT,NO_SHA-384

These are the only imports i made
   
    SSL_CTX_new
    TLSv1_1_client_method
    SSL_CTX_set_verify
    SSL_CTX_set_cipher_list
    SSL_new(ctx);
    SSL_set_fd(ssl, isocket) ;
    SSL_connect
    SSL_get_peer_certificate
    X509_NAME_oneline
    X509_get_issuer_name
    OPENSSL_free
    OPENSSL_free
    X509_free
    SSL_free
    SSL_write
    SSL_read
    SSL_library_init

I am compiling with visual studio (6 or 2008)
The fact is, i have only 50KB to spare due to the nature of the program I am writting.
Reading from the site, i could get footprint as little as 30KB, so what is wrong with my compilation?

Share

Re: 101KB foot print ( possible reduction? )

Hi Frank,

What are the two cipher suites which you need to support?  Do you need threading support?  Do you need filesystem support?  With that info, there may be more I can help you eliminate.

On a desktop compiler, the footprint size you are seeing looks fairly normal.  On an embedded system being compiled with an embedded compiler (Keil, IAR, optimized gcc cross-compiler, etc.), we typically see a full wolfSSL build come in around 60kB.  Do you have the maximum compiler optimizations turned on for size?

Our smallest build possible is called "leanPSK".  Code size when using the LeanPSK build (--enable-leanpsk) can be as low as 20kB.  The LeanPSK build supports only TLS 1.2, SHA-1, SHA-256, and PSK (pre-shared keys).  Everything else (RSA, ARC4, MD5, DTLS, SSLv3, etc.) is disabled in order to try and get the footprint size as small as possible.

Best Regards,
Chris