Skip to main content

normalize_sshsig_armor

Function normalize_sshsig_armor 

Source
pub fn normalize_sshsig_armor(pem: &str) -> String
Expand description

Re-wrap an sshsig armor’s base64 body at 70 columns.

OpenSSH’s own base64 reader accepts any line width, but the strict PEM parser underneath SshSig::from_pem requires exactly the 70-column wrapping ssh-keygen emits. Signatures created by did-git-sign before it matched ssh-keygen’s width (76 columns) live on in git history, so the armor is normalized rather than trusted to be canonical.