• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Java and ASN.1

 
Marshal
Posts: 3708
523
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on an project with involves creating and installing GSMA eSIM Profiles over the air to smartcards (eUICC) installed in wireless handsets.

After searching for opensource Java libraries, it seems like ASN1bean (formerly jASN1) might be a good choice, but I can't find much in the way of documentation or examples on how to use it.  I'm sure given enough time I will be able to figure it out, but I was hoping for someone might be able to share some knowledge to help get me kickstarted.

 
Saloon Keeper
Posts: 24499
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ASNBean provides an antlr-based compiler intended to generate Java class code (presumably POJOs) from ASN.1 specification files such as those used to define SNMP MIBs and LDAP schemas.

I don't think that there's a whole lot to it. In addition to the compiler, there's a support library designed to marshall data in and out of the generated ASN javabeans and there's supposed to be an example in the project on how that's done.
 
Ron McLeod
Marshal
Posts: 3708
523
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah - it was simpler than I was expecting.  I am posting my initial test code in case if would be helpful to someone else in the future.

Compile the ASN.1 definition file to Java classes:

Test case:
GSMA reference:
Test output:
Portion of ASN.1 definition referenced in test:
Test utilities:
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic