Thomas Mangold wrote:
Why not just copy the key?
EVP_PKEY *cp_key (EVP_PKEY *pkey) {
/* error handling omittet */
EVP_PKEY *pnew;
int key_type;
pnew = EVP_PKEY_new();
switch(pkey->type) {
case EVP_PKEY_RSA:
DSA *dsa = EVP_PKEY_get1_DSA(pkey);
EVP_PKEY_s
In message <[EMAIL PROTECTED]> on Fri, 23 May 2008 10:38:06 +0200,
"delcour.pierre" <[EMAIL PROTECTED]> said:
pierre.delcour> I wrote this not working code:
pierre.delcour> BIO *bout = BIO_new(BIO_s_mem());
pierre.delcour> PEM_write_bio_PrivateKey(bout, key, NULL, NULL, 0, NULL,
NULL);
p
Why not just copy the key?
EVP_PKEY *cp_key (EVP_PKEY *pkey) {
/* error handling omittet */
EVP_PKEY *pnew;
int key_type;
pnew = EVP_PKEY_new();
switch(pkey->type) {
case EVP_PKEY_RSA:
DSA *dsa = EVP_PKEY_get1_DSA(pkey);
EVP_PKEY_set1_DSA(pnew, dsa);
Marek Marcola wrote:
Hello,
I woud like my public key to be embedded in my source code
as static char*, cause later I want to verify my licence
with that key.
x509 = PEM_read_X509(fp, NULL, NULL, NULL);
pkey = X509_get_pubkey(x509);
//Serialization
for(i=0; i< sizeof(*pkey); i++){
fpri
Thank you very much for you answer.
I'll spared a lot of time with that, cause I was about to allocate
dynamic memory for structure members :)
Attila
Marek Marcola wrote:
Hello,
I woud like my public key to be embedded in my source code
as static char*, cause later I want to verify my li
Hello,
>
> I woud like my public key to be embedded in my source code
> as static char*, cause later I want to verify my licence
> with that key.
>
> x509 = PEM_read_X509(fp, NULL, NULL, NULL);
> pkey = X509_get_pubkey(x509);
>
> //Serialization
> for(i=0; i< sizeof(*pkey); i++){
> fprintf
In message <[EMAIL PROTECTED]> on Sat, 13 Mar 2004 05:11:27 -0800 (PST), "S.Mehdi
Sheikhalishahi" <[EMAIL PROTECTED]> said:
sm_justice> How can I get the RSA key of a EVP_PKEY.
What version of OpenSSL? In OpenSSL 0.9.7{x}, there's the function
EVP_PKEY_get1_RSA().
-
Please consider sponso