simon-git: putty (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sun Mar 8 11:14:41 GMT 2020
TL;DR:
bed4e12f testcrypt.py: marshal string literals more efficiently.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2020-03-08 11:14:41
commit bed4e12f15a4e1be0bcf1797cbf2c1ab91ba416c
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=bed4e12f15a4e1be0bcf1797cbf2c1ab91ba416c;hp=844e766b03550c5e150af058b296791d5f6587be
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Mar 8 11:09:06 2020 +0000
testcrypt.py: marshal string literals more efficiently.
The testcrypt protocol expects a string literal to be a concatenation
of literal bytes other than '%' and '\n', and %-escaped hex digit
pairs. But testcrypt.py was only ever using the latter format, so even
a legible ASCII string like "123" was being sent to testcrypt as the
unreadable and needlessly long "%31%32%33".
When debugging, I often arrange to save the testcrypt input stream to
a file, and sometimes I use that file as the starting point for
editing. So it is actually useful to have the protocol exchange be
legible to humans. Hence, here's a change to testcrypt.py which makes
it only use the %-escape encoding for byte values that aren't
printable ASCII.
test/testcrypt.py | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
More information about the tartarus-commits
mailing list