mouse07410 / asn1c

The ASN.1 Compiler
http://lionet.info/asn1c/
BSD 2-Clause "Simplified" License
93 stars 70 forks source link

Not able to decode the OCTET STRING , because asn_decode() with the transfer syntax ATS_ALIGNED_BASIC_PER and ATS_ALIGNED_CANONICAL_PER is returning ecode_result.code =RC_WMORE and decode_result.consumed=0 #107

Open samrajput1143 opened 1 year ago

samrajput1143 commented 1 year ago

https://stackoverflow.com/questions/73508115/decode-hex-value-using-asn1-aligned-per-decoder-in-c

Issue While decoding OCTET string with PER . ASN.1 Compiler, v0.9.29

my output image

expected output image

samrajput1143 commented 1 year ago

below is the asn definition image

mouse07410 commented 1 year ago

Would you mind posting the complete ASN.1 file here? I'll need it to recompile on my machine.

Also, is your file encoded in APER (Aligned) or UPER (Basic, Unaligned)?

samrajput1143 commented 1 year ago

@mouse07410 https://github.com/mouse07410/asn1c/issues/107

samrajput1143 commented 1 year ago

Would you mind posting the complete ASN.1 file here? I'll need it to recompile on my machine.

Also, is your file encoded in asn_def.zip APER (Aligned) or UPER (Basic, Unaligned)?

samrajput1143 commented 1 year ago

@mouse07410 i have attached the asn definition file

samrajput1143 commented 1 year ago

Would you mind posting the complete ASN.1 file here? I'll need it to recompile on my machine.

Also, is your file encoded in APER (Aligned) or UPER (Basic, Unaligned)?

The message is encoded using APER

samrajput1143 commented 1 year ago

image

Corresponding APER encoding (HEX value is given below) image

mouse07410 commented 1 year ago

Since you posted your issue in the vlm repo and here - could you clarify which of the asn1c did you use? Did asn1c built from this repo sources fail to decode that APER? Or only the vlm asn1c?

samrajput1143 commented 1 year ago

I am using this mouse /asn1c repo only

samrajput1143 commented 1 year ago

There is problem in this repo for dcoding the octet string filed with APER.

My original message is encoded with APER only.

samrajput1143 commented 1 year ago

@mouse07410 any information regarding this issue.

mouse07410 commented 1 year ago

@samrajput1143 sorry, no information and no update.