what do you mean by "decrypt a signed message"? either u have to decrypt the encrypted message, or rehash and check the msg digest i.e the sha/md5 signature.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ambarish Mitra Sent: Thursday, April 27, 2006 5:16 PM To: openssl-users@openssl.org Subject: RE: Question on PEM_read_RSA_PUBKEY David, Thanks a lot. This worked. Next logical question is: using this public key, how do I decrypt a signed message? This signed message was signed by the corresponding private key, and naturally, my application does not have that. My application has the cert, and this signed message. How to verify that the signed message was signed by this pub key? Best regards, Ambarish. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of David Schwartz Sent: Thursday, April 27, 2006 4:24 PM To: openssl-users@openssl.org Subject: RE: Question on PEM_read_RSA_PUBKEY > Hi all, > > How to extract the public key from the certificate? 1) Read in the certificate. 2) Extract the public key. > I have a question on the function: PEM_read_RSA_PUBKEY and > PEM_read_bio_RSA_PUBKEY. > > The argument to these function is FILE *fp and BIO *bp respectively. > > Does this argument contain a X509 certificate? This I ask, since > the public > key is present in the certificate, and I want to extract the > public key from > the cert. No, these functions read in a public key, which you don't have. You want functions like 'PEM_read_bio_X509' followed by 'X509_get_pubkey'. 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] ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]