Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Security / January 2004

Tip: Looking for answers? Try searching our database.

ParsingException reading P7M file

Thread view: 
Vittorio - 14 Jan 2004 10:44 GMT
Hi all,

I have a problem reading a P7M file with sun.security.pkcs.PKCS7 class.

The exception is thrown by the last code line:

[...]

FileInputStream fis = new FileInputStream("c:\\test\\file.pdf.p7m");

PKCS7 pk = new PKCS7(fis);   <----- ERROR !!!

[...]

The Exception is:

sun.security.pkcs.ParsingException: IOException: toDerInputStream rejects
tag type -96

I have created the P7M file with an "official" application that reads
Certificate from a Smart Card, and I have checked it with another "official"
application that correctly reads the file.

Thank you, Vittorio Avallone
Hans Granqvist - 14 Jan 2004 22:42 GMT
> FileInputStream fis = new FileInputStream("c:\\test\\file.pdf.p7m");
> PKCS7 pk = new PKCS7(fis);   <----- ERROR !!!
[quoted text clipped - 5 lines]
> Certificate from a Smart Card, and I have checked it with another "official"
> application that correctly reads the file.

Maybe it's incorrectly encoded and the 'official' application
is more forgiving than Sun's internal classes? What does a utility
like Peter Gutmann's dumpasn1 [1] or bouncycastle's ASN1
implementation say?

-Hans
[1] http://www.cs.auckland.ac.nz/~pgut001/dumpasn1.c


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.