"Hellan,Kim KHE" wrote:
> 
> Hi
> 
> I have a private key (PEM), certificate/root certificate (DER) and a small
> text: "This is a test".
> Using PKCS#7, I would like to make a small test program, where I sign the
> text with the private key, write this PKCS#7 object to a file, read the file
> again and then verify the signature.
> 
> Could anyone please tell me which OpenSSL functions I must use to accomplish
> that and in what order they must be called.
> 
> Feel free to tell me to RTFM, if it is in there somewhere......I just
> couldn't find it :-)
> 
> TIA
> Kim Hellan

Hi,

I've been working on an old source that, compiled, will give you the ability to
sign and verify the signature. It can sign and include data in the signature.

Simple usage:

usage: sign args

 -in file        - Input file
 -out file       - File where to write to
 -cert file      - Certificate file
 -keyfile file   - Sign key file
 -key            - Password protecting the private key
 -nd             - No detach signature
 -verbose        - Verbose printing


While Verify tool usage is:

usage: verify args

 -in file      - Input file
 -out file     - Output file
 -data file    - File containing signed data
 -cf file      - CA's certificate file
 -cd certsdir  - CAs' certificates directory
 -print_data   - Print Signed Data to outfile
 -no_chain     - Verifiy Just signature.
 -verbose      - Verbose output

You can download it from:

        ftp://ftp.openca.org/pub/modules/OpenCA-SV-0.5.98.tar.gz

Hope this will solve your problems... :-D

C'you,

        Massimiliano Pala ([EMAIL PROTECTED])

S/MIME Cryptographic Signature

Reply via email to