I've just tried out something under the latest openssl library, and it's
coredumping in BN_print() (after i call BN_print_fp). The actual code
snippet is here:

void
dh_genparams()
{
        DH *dh;
        FILE *output;
        
        fprintf(stderr,"Generating new DH parameters, please be
patient...\n");
        dh = DH_generate_parameters(PRIME_LEN, DH_GENERATOR_5, NULL,
NULL);
        BN_print_fp(stderr,dh->pub_key);
        
        output = fopen(PEMFILE,"w");
        PEM_write_DHparams(output,dh);
        
        return;
}

(gdb) run
Starting program: /home/nick/projectz/dba/test 
Generating new DH parameters, please be patient...

Program received signal SIGSEGV, Segmentation fault.
0x80493d9 in BN_print ()
(gdb) where
#0  0x80493d9 in BN_print ()
#1  0x807f500 in ?? ()
(gdb) 

I see two possibilities here:
1. BN_print() has a bug.
2. I've fubared my code.

Anyone able to assist?

Cheers,
Nick

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to