I intend to parse BER-TLV format from smart card response to interpret the data.
it similar like JACCAL, but in Objective-C or C++
Can anyone give reference any open source project or any reference to do this?
Here is a project decode the ASN.1 BER format. https://github.com/chrisridd/asn1-dump/
main logic located in this file: https://github.com/chrisridd/asn1-dump/blob/master/berd.m
And if have enough time, it's not hard to write you own decoder after you read the standard: http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf http://luca.ntop.org/Teaching/Appunti/asn1.html
decode flow is like this: read in Tag, Length, Value sequence.
From Tag you will get
Length:
Value: the real value to read in current TLV level. if this is a constructed data(like sequence), the Value will contains internal level of TLV.
In the end of standard (http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf) there is an image shows multiple level TLV, maybe can better help you to understand BER.
After you read the standards, the best way is: 1) find some GUI viewer to look some BER Certificate file, to get familar with it. google "ASN.1 viewer" to find. 2) start to look the code https://github.com/chrisridd/asn1-dump/blob/master/berd.m