Excuse me, I'm trying, using C, to do a simple sign and verify with RSA public and private keys on pem files. Which is the easy way? Someone have some sample ? TNX
-----Messaggio originale----- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di David Schwartz Inviato: venerdì 27 giugno 2008 5.41 A: openssl-users@openssl.org Oggetto: RE: PEM_read_RSAPublicKey problem > hi again, > i created a publickey.pem with command: > openssl rsa -in myprivate.pem -pubout -out publickey.pem > > then in C i try to read this public key with: > RSA *pubkey = PEM_read_RSAPublicKey(fp, NULL, NULL, NULL) > > where fp is the opened publickey.pem file. > > but it's return this error: error:0906D06C:lib(9):func(109):reason(108) > > where i'm wrong ? Hmm: error:0906D06C:PEM routines:PEM_read_bio:no start line I believe you are mixing types. 'openssl rsa -pubout' writes out a key in X.509 subjectPublicKeyInfo format. PEM_read_RSAPublicKey expects a raw RSA key. You have the same problem this guy had: http://mail.nl.linux.org/tinc/2004-02/msg00007.html DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED] ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]