You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm here because I have an encoded BER payload that I wanted to access fields from, and this library has BER decoding functions. However the payload I'm trying to read seems quite nested and I'm wondering if there's a god way to access the fields I want.
First of all, here's an example payload I'm trying to decode:
That final variable is an IPv4 address that the CSR wants a certificate for, and is what I wanted to validate.
Is there a sane way to navigate structures like this? Or do I have to harden this method a bit and call it a day? I had some trouble using types as well as you can see, because only some are exported.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I'm here because I have an encoded BER payload that I wanted to access fields from, and this library has BER decoding functions. However the payload I'm trying to read seems quite nested and I'm wondering if there's a god way to access the fields I want.
First of all, here's an example payload I'm trying to decode:
After decoding the base64 to a UInt8Array I had to peel back FOUR layers of BER:
That final variable is an IPv4 address that the CSR wants a certificate for, and is what I wanted to validate.
Is there a sane way to navigate structures like this? Or do I have to harden this method a bit and call it a day? I had some trouble using types as well as you can see, because only some are exported.
Thanks in advance for your time.
Beta Was this translation helpful? Give feedback.
All reactions