Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Aug 27, 2022 · 12 comments

Comments

@samrajput1143
Copy link

samrajput1143 commented Aug 27, 2022

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 samrajput1143 changed the title Not able to decode the HEX value , as asn_decode() with the transfer syntax ATS_UNALIGNED_BASIC_PER and ATS_UNALIGNED_CANONICAL_PER is returning ecode_result.code =RC_WMORE and decode_result.consumed=0 Not able to decode the OCTET STRING , as asn_decode() with the transfer syntax ATS_UNALIGNED_BASIC_PER and ATS_UNALIGNED_CANONICAL_PER is returning ecode_result.code =RC_WMORE and decode_result.consumed=0 Aug 27, 2022
@samrajput1143 samrajput1143 changed the title Not able to decode the OCTET STRING , as asn_decode() with the transfer syntax ATS_UNALIGNED_BASIC_PER and ATS_UNALIGNED_CANONICAL_PER is returning ecode_result.code =RC_WMORE and decode_result.consumed=0 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 Aug 27, 2022
@samrajput1143
Copy link
Author

below is the asn definition
image

@mouse07410
Copy link
Owner

mouse07410 commented Aug 27, 2022

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
Copy link
Author

@mouse07410 #107

@samrajput1143
Copy link
Author

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
Copy link
Author

@mouse07410 i have attached the asn definition file

@samrajput1143
Copy link
Author

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
Copy link
Author

samrajput1143 commented Aug 27, 2022

image

Corresponding APER encoding (HEX value is given below)
image

@mouse07410
Copy link
Owner

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
Copy link
Author

samrajput1143 commented Aug 28, 2022

I am using this mouse /asn1c repo only

@samrajput1143
Copy link
Author

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

My original message is encoded with APER only.

@samrajput1143
Copy link
Author

samrajput1143 commented Aug 29, 2022

@mouse07410 any information regarding this issue.

@mouse07410
Copy link
Owner

@samrajput1143 sorry, no information and no update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants