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
) function in the base64ct crate returns InvalidLength for some reason. The process works without error on another key with line lengths of 70, 70, 70, 70 and 32 with padding. Decoding with the base64 crate and re-encoding with padding results in the same input string and the same error.
Here's the contents of the erroring key (not sensitive):
I'm trying to parse an OpenSSH key using
ssh_key
with line lengths of 70, 70, 70, 70 and 64 without any padding, but thedecoded_len
(formats/base64ct/src/decoder.rs
Line 438 in 057aa1f
base64ct
crate returns InvalidLength for some reason. The process works without error on another key with line lengths of 70, 70, 70, 70 and 32 with padding. Decoding with thebase64
crate and re-encoding with padding results in the same input string and the same error.Here's the contents of the erroring key (not sensitive):
It appears that the checks are a little too strict, especially when other tools, like ssh-keygen, have no issues with the key.
The text was updated successfully, but these errors were encountered: