On Wed, Apr 12, 2000 at 02:10:10PM -0500, Grebelsky, Konstantin wrote:
> I guess my first impression of sign.c was incorrect...
> What it does is create a signature for some data is this correct? So if I
> have to store the signature in the file I just have to append it, correct?

A well-known solution is to use "PKCS7 Signed Data".
You can put your file as contentInfo.content and signatue produced with
EVP_SignFinal() as signerInfos.SignerInfo.encryptedDigest.
Alternatively, to run EVP_Sign*() stuff on der-encoded authenticatedAttributes

> Basically I am trying to pass a file to a client, but client needs to be
> able to verify that the file is from me...

Using PKCS7 here will result in signatures verifiable with other tools
(not openssl-only).

> Also how can I encrypt the file
> before signing it?

Well, there's another one PKCS7, Envelped Data

Regards,
Vadim
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to