Re: Api's to know the file is signed or encrypted with PKCS7

2008-04-21 Thread shankar ks
Hi Stephen,
ThanQ for the information. One more doubt of mine is after signing and
encryption do we need to use these SMIME funtions ? Is it must ? .
what is the use of these

SMIME_write_PKCS  SMIME_read_PKCS funtions?
--Regards
shankar

On 4/20/08, Dr. Stephen Henson [EMAIL PROTECTED] wrote:

 On Sun, Apr 20, 2008, shankar ks wrote:

  Hi all,
 
  I am signing and encrypting a file using PKCS7 Api's . I know that file
 has
  beec signed and encrypted.. but other person on receiving side how can
 he
  knows that the file has been signed and encrypted ?
  Is there any Api is there by which we can find out whether the file is
  signed or encrypted.. so that he can decrypt and verify the file ..
  thanks in advance
 

 You can determine the outermost type using macros PKCS7_type_is_signed(),
 PKCS7_type_is_enveloped(). You then normally have to extract the contents
 and
 analyse them in a similar way.

 There is a field which gives the type of the content but this is set to
 data
 if the content in MIME (which it usually is).

 Steve.
 --
 Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
 OpenSSL project core developer and freelance consultant.
 Homepage: http://www.drh-consultancy.demon.co.uk
 __
 OpenSSL Project http://www.openssl.org
 User Support Mailing Listopenssl-users@openssl.org
 Automated List Manager   [EMAIL PROTECTED]




-- 
--Best Regards
Shankar


Re: Api's to know the file is signed or encrypted with PKCS7

2008-04-20 Thread Dr. Stephen Henson
On Sun, Apr 20, 2008, shankar ks wrote:

 Hi all,
 
 I am signing and encrypting a file using PKCS7 Api's . I know that file has
 beec signed and encrypted.. but other person on receiving side how can he
 knows that the file has been signed and encrypted ?
 Is there any Api is there by which we can find out whether the file is
 signed or encrypted.. so that he can decrypt and verify the file ..
 thanks in advance
 

You can determine the outermost type using macros PKCS7_type_is_signed(),
PKCS7_type_is_enveloped(). You then normally have to extract the contents and
analyse them in a similar way.

There is a field which gives the type of the content but this is set to data
if the content in MIME (which it usually is).

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Homepage: http://www.drh-consultancy.demon.co.uk
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


RE: API's ??

2001-11-12 Thread lgazis

Yes, there are.  If you look at req.c and genrsa.c, in the apps directory,
you can see what API calls wind up being used when you run openssl genrsa
... or openssl req ...

Lynn Gazis

-Original Message-
From: Ruby Cruiser [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 11, 2001 12:12 PM
To: [EMAIL PROTECTED]
Subject: API's ??


For generating the certifcate and private file, I am
currently using the command line interface... that is
commands like openssl genrsa ... and openssl req
-new -x509... etc.

But, are there any openssl API's for the same? If yes,
please let me know few APIs.

Thanks for the assistance,
Ruby



__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com
__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]
__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]