Menu

#58 DER decoding SEQUENCE OF CHOICE fails

open
nobody
None
8
2002-06-05
2002-06-05
No

This is the same bug as n°506499 - but I wanted to add
a test case - which I could not do without submitting a
new bug (the comment form does not allow to upload a
file).

I'd like to explain more precisely in which case this
happens.
The bug is "only" that when you've got a SEQUENCE
OF or SET OF a CHOICE, you cannot successfully
DER decode it.
(An ElementNotFoundException is thrown).

If you're trying to decode just a CHOICE it works.
If you try to decode a SEQUENCE containing a CHOICE
it works too.

I've included a test case. I hope this will help solving the
bug. If you don't want to run it, just have a look at the
log.txt file.

The stack at the exception point is:
cryptix.asn1.io.ElementNotFoundException: ???
at cryptix.asn1.encoding.DerDecoder.decodeAny
(DerDecoder.java:369)
at cryptix.asn1.lang.Choice.decode(Choice.java:93)
at cryptix.asn1.lang.SequenceOf.decode
(SequenceOf.java:111)
at DERSeqOfChoice.SeqOfChoiceTest.decode
(SeqOfChoiceTest.java:36)
at DERSeqOfChoice.SeqOfChoiceTest.doTest
(SeqOfChoiceTest.java:69)
at DERSeqOfChoice.MyTest.main(MyTest.java:33)

Axelle.

Discussion

  • Axelle Apvrille

    Axelle Apvrille - 2002-06-05

    Test case

     
  • Axelle Apvrille

    Axelle Apvrille - 2002-06-05
    • priority: 5 --> 8
     

Log in to post a comment.