Hi,

When I call DH_compute_key(), I get a core dump.  If I run DH_check 
over the parameters passed to DH_compute_key() I get bit 1 set, which 
according to dh.h means that number generated is not prime; presumably,
this is causing DH_compute_key() to croak.

This is a short excerpt:

unsigned char *client_key;
BIGNUM client_key;
DH *dh_struct;

dh_struct= DH_new();
dh_struct= DH_generate_parameters(64, 5, NULL, NULL);
DH_check(dh_struct, dh_error);
DH_generate_key(dh_struct);
DH_compute_key(dh_secret, &client_key, dh_struct);

I do this to generate the keys once for the server, and once for the 
client; it works fine on the client, but not on the server (the code is
essentially the same for both of them).

Am I passing the correct parameters to DH_generate_parameters?  Any 
ideas?

josh.

-------------------
Josh Howlett, Network Supervisor,
Networking and Digital Communications,
Information Services.
[EMAIL PROTECTED] | 0117 9546895


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

Reply via email to