Hello,

I can't to set DH public key to the X509 certificate.
My code:

EVP_PKEY *key = EVP_PKEY_new();
DH *dh = DH_new();
X509 *x = X509_new();

while (RAND_status() != 1) {
RAND_seed(dh, 512);
}
dh = DH_generate_parameters(128,DH_GENERATOR_2,NULL,NULL);
DH_generate_key(dh);
EVP_PKEY_assign_DH(key, dh);

X509_set_pubkey(x,pub_key); // return 0, error :(

Please, help!
Alexander

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

Reply via email to