Hello,
I'm have to create a selfsigned certificate with :
Public Key Algorithm: rsa
insted of (seems zo be the default)
Public Key Algorithm: rsaEncryption
Codesquence :
...
EVP_PKEY * privatekey = EVP_PKEY_new();
X509 * x509 = NULL;
RSA * rsa = NULL;
X509_NAME * name = NULL;
x509 = X509_new();
rsa = RSA_generate_key(bits,RSA_F4,rsacallback,NULL);
if (EVP_PKEY_assign_RSA(privatekey,rsa))
{
X509_set_version(x509,0);
ASN1_INTEGER_set(X509_get_serialNumber(x509),0);
X509_gmtime_adj(X509_get_notBefore(m_x509),0);
X509_gmtime_adj(X509_get_notAfter(m_x509),(long)60*60*24*days);
X509_set_pubkey(x509,privatekey);
name = X509_get_issuer_name(m_x509);
X509_NAME_add_entry_by_txt(name,"C",MBSTRING_ASC,country, -1, -1, 0);
X509_NAME_add_entry_by_txt(name,"O",MBSTRING_ASC,org, -1, -1, 0);
X509_sign(x509,privatekey,EVP_md5());
}
What do I have to change to get the requested result
Public Key Algorithm: rsa ?
What is the difference to
Public Key Algorithm: rsaEncryption ?
Thanks for any ideas you can give,
Martin
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [EMAIL PROTECTED]