Topic: wc_MakeSelfCert problem.

Hey Guys,

I was generating a self-signed certificate as explained by the manuals on Ubuntu with Netbeans
When I used:

    byte certDer[4096];
    bzero(&certDer, sizeof(certDer));
    certSize = wc_MakeSelfCert(&cert, certDer, sizeof(certDer), &rsaKey, &rng);

I received a runtime Segfault on the wc_MakeSelfCert function.
The error was resolved by declaring certDer as certDer[4097].

When printing the contents of the 4097th byte in the array I receive the hex value 14.

Am I missing something here or is there an extra byte filled up in the function somewhere?

Thanks in advance!

Midas

Share

Re: wc_MakeSelfCert problem.

Hi Midas,

Can you verify that you are compiling your application with the same preprocessor defines used to compile the wolfSSL library?  A simple way to do this if you used the autoconf/configure system to build wolfSSL is to include the <wolfssl/options.h> header in your application code, ie:

#include <wolfssl/options.h>

Best Regards,
Chris