Some implementations of SSH will remove all leading zeros from an encoded RSA signature, which is allowed per the RFCs. Our verify function requires the signature to be the same size as the key. This refactor will pad a signature with leading zeros if it is short. (ZD 18095)
Description
Some implementations of SSH will remove all leading zeros from an encoded RSA signature, which is allowed per the RFCs. Our verify function requires the signature to be the same size as the key. This refactor will pad a signature with leading zeros if it is short. (ZD 18095)
Testing
Run the echoserver and the PuTTY plink tools:
The
while
version will repeatedly call the command. There's a 1/256 chance of the signature failing before the fix.