Skip to content

IllegalArgumentException thrown when generate CscaMasterList from a ml file. #304

Description

@shoutao

Dear support,
When the following code used to generate CscaMasterList from a ml file, IllegalArgumentException was thrown
FileInputStream in = new FileInputStream(mlFile);
byte[] byteArr = Streams.readAll(in);
ASN1Primitive asn1 = ASN1ObjectIdentifier.fromByteArray(byteArr);
CscaMasterList parsedList = CscaMasterList.getInstance(asn1);

The ML file was download from
https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/ElekAusweise/CSCA/GermanMasterList.html

Exception stack

java.lang.IllegalArgumentException: illegal object in getInstance: org.bouncycastle.asn1.ASN1ObjectIdentifier
at org.bouncycastle.asn1.ASN1Integer.getInstance(Unknown Source)
at org.bouncycastle.asn1.icao.CscaMasterList.(Unknown Source)
at org.bouncycastle.asn1.icao.CscaMasterList.getInstance(Unknown Source)

Please help check what is wrong.

If something wrong with the masterlist file, would you like share a CscaMasterListcan be used?

Thanks a lot.
Shoutao

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions