Hi Siddhartha:

It's never a problem, but the procedure is as follows:

1.- You sign with private key and certificate connected with that key
2.- If you then encrypt, you encrypt with the certificate of your
counterpart or recepient

When the recepient gets the encrypted block of data, he decrypts with his
private key and certificate associated with it.

To verify signature, the recepient only needs YOUR public key but using the
-noverify option of the openssl smime -verify, to avoid testing the your
certificate against the certificate authority.  If you provide both your
certificate and the certificate authority cert, then the recepient can avoid
the -noverify switch and give the -CA instead.  It's always good practice to
provide both your cert and the ca cert who signed your cert.

Hope this helps.



Siddhartha Chhabra wrote:
> 
> Hi all,
> 
> I am trying to use DSA_sign and DSA_verify functions to generate a
> signature
> and verify it. If I do this in the same file, that is signing and then
> verifying using the public key, things go on smoothly. However, if I try
> to
> save the DSA structure, that is by saving each of the values other than
> the
> private key, which I can later restore and use as a public key to verify
> the
> signature, the verification fails.
> 
> How can I generate a signature at one place (say the client) and verify it
> on another process (say a server)? Essentially how can I save the public
> key
> counterpart of the private key that was used to sign in the first place.
> 
> Thanks for the help
> 
> 

-- 
View this message in context: 
http://www.nabble.com/DSA-signing-and-verification-tp18039169p18039268.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.

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

Reply via email to