Mailing List Archive

Why remove trailing padding from base64 encoded fingerprint?
From sshkey.c (line 925):

/* Trim padding characters from end */
ret[strcspn(ret, "=")] = '\0';
return ret;

Why remove the trailing padding from the Base64 encoded key fingerprint? I
recognize that it's easy enough to re-pad the string, but I'm just curious
why it's being removed in the first place.

Thanks,
Mark
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: Why remove trailing padding from base64 encoded fingerprint? [ In reply to ]
On Wed, 11 Sep 2019, Mark Leonard wrote:

> From sshkey.c (line 925):
>
> /* Trim padding characters from end */
> ret[strcspn(ret, "=")] = '\0';
> return ret;
>
> Why remove the trailing padding from the Base64 encoded key fingerprint? I
> recognize that it's easy enough to re-pad the string, but I'm just curious
> why it's being removed in the first place.

Just to make the result more human readable.

-d
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev