On Thu, Oct 23, 2003, Suram wrote: > HI all, > > I am trying to parse a PKCS#7 request using "asn1parse". This request is an > SCEP request. > > Iam attaching the file for your ready reference. > I used the following openssl command > > asn1parse -inform PEM -in file.txt -i -out output.txt > > I felt the output is not complete. > > I am not getting some structures (Envelope Data, Information portion ie., > the encrypted certificate request). > > 1. How to use this command to print all the information (like public key in > self-signed cert etc) ? > > 2. Why is the command not showing all the inforamtion? If the usage of the > command is wrong, What is the correct usage to get the complete information. >
ASN1 frequently embeds data in the contents of octet strings and bit strings. asn1parse doesn't actually attempt to parse these things unless you tell it to with the -strparse function. In this case you can use the 'smime' command to extract content, for example: openssl smime -verify -inform PEM -in file.pem -noverify -out content.der 'content.der' seems to be a PKCS#7 envelopedData structure which you can process further with another 'smime' command if you happen to have the appropriate certificate and private key of the recipient. Steve. -- Dr Stephen N. Henson. Core developer of the OpenSSL project: http://www.openssl.org/ Freelance consultant see: http://www.drh-consultancy.demon.co.uk/ Email addresses, PGP and S/MIME: see homepage. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]