We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With the following example struct
#[derive(AsnType, Decode, Encode, Debug, PartialEq, Clone)] pub struct PaddingError { #[rasn(tag(0))] pub normal: rasn::types::Integer, #[rasn(tag(1))] pub bitstring_1: rasn::types::BitString, #[rasn(tag(2))] pub bitstring_2: rasn::types::BitString, } let expected = hex::decode("3016800101810305e100820c03ee0800000400000001ed18").unwrap(); let actual: Vec<u8> = rasn::der::encode(&PaddingError{ normal: 1.into(), bitstring_1: BitString::from_vec([0xe1, 0x00].to_vec()), bitstring_2: BitString::from_vec([0xee,0x08,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0xed,0x18].to_vec()), }).unwrap(); assert_eq!(actual, expected);
We would expect the resulting bytes to look like [48, 22, 128, 1, 1, 129, 3, 5, 225, 0, 130, 12, 3, 238, 8, 0, 0, 4, 0, 0, 0, 1, 237, 24]
[48, 22, 128, 1, 1, 129, 3, 5, 225, 0, 130, 12, 3, 238, 8, 0, 0, 4, 0, 0, 0, 1, 237, 24]
Instead what we get from our encode is [48, 21, 128, 1, 1, 129, 2, 0, 225, 130, 12, 0, 238, 8, 0, 0, 4, 0, 0, 0, 1, 237, 24]
[48, 21, 128, 1, 1, 129, 2, 0, 225, 130, 12, 0, 238, 8, 0, 0, 4, 0, 0, 0, 1, 237, 24]
The text was updated successfully, but these errors were encountered:
Mistake on my end, closing ticket - no bug present
Sorry, something went wrong.
No branches or pull requests
With the following example struct
We would expect the resulting bytes to look like
[48, 22, 128, 1, 1, 129, 3, 5, 225, 0, 130, 12, 3, 238, 8, 0, 0, 4, 0, 0, 0, 1, 237, 24]
Instead what we get from our encode is
[48, 21, 128, 1, 1, 129, 2, 0, 225, 130, 12, 0, 238, 8, 0, 0, 4, 0, 0, 0, 1, 237, 24]
The text was updated successfully, but these errors were encountered: