unknown tag 28 encountered

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

unknown tag 28 encountered

sumit.bhrdwj
Hello,

We are using Bouncy Castle and ItextPdf to sign pdf documents from USB dongle. Our code is working fine on our dev machines, but when we are trying to execute the same code with same set of input PDFs and USB Dongle, we are seeing following error

ExceptionConverter: java.io.IOException: unknown tag 28 encountered
        at org.bouncycastle.asn1.ASN1InputStream.buildObject(Unknown Source)
        at org.bouncycastle.asn1.ASN1InputStream.readObject(Unknown Source)
        at com.itextpdf.text.pdf.security.PdfPKCS7.getAuthenticatedAttributeSet(
PdfPKCS7.java:1008)
        at com.itextpdf.text.pdf.security.PdfPKCS7.getAuthenticatedAttributeByte
s(PdfPKCS7.java:957)
        at com.itextpdf.text.pdf.security.MakeSignature.signDetached(MakeSignatu
re.java:151)


I tried looking for the error, but have not found any clues.

We are using JRE 7.25, 32 bit

Any help would be appreciated

Regards,
Sumit
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unknown tag 28 encountered

David Hook

It sounds like the input stream is trying to parse non-binary data,
unless you really have got something which has a constructed UNIVERSAL
STRING inside it. Can you generate a dump of the PKCS#7 data?

Regards,

David

On 06/01/17 16:20, sumit.bhrdwj wrote:

> Hello,
>
> We are using Bouncy Castle and ItextPdf to sign pdf documents from USB
> dongle. Our code is working fine on our dev machines, but when we are trying
> to execute the same code with same set of input PDFs and USB Dongle, we are
> seeing following error
>
> */ExceptionConverter: java.io.IOException: unknown tag 28 encountered
>         at org.bouncycastle.asn1.ASN1InputStream.buildObject(Unknown Source)
>         at org.bouncycastle.asn1.ASN1InputStream.readObject(Unknown Source)
>         at
> com.itextpdf.text.pdf.security.PdfPKCS7.getAuthenticatedAttributeSet(
> PdfPKCS7.java:1008)
>         at
> com.itextpdf.text.pdf.security.PdfPKCS7.getAuthenticatedAttributeByte
> s(PdfPKCS7.java:957)
>         at
> com.itextpdf.text.pdf.security.MakeSignature.signDetached(MakeSignatu
> re.java:151)
> /*
>
> I tried looking for the error, but have not found any clues.
>
> We are using JRE 7.25, 32 bit
>
> Any help would be appreciated
>
> Regards,
> Sumit
>
>
>
> --
> View this message in context: http://bouncy-castle.1462172.n4.nabble.com/unknown-tag-28-encountered-tp4658483.html
> Sent from the Bouncy Castle - Dev mailing list archive at Nabble.com.
>
>


Loading...