keybase / go-crypto

[mirror] Go supplementary cryptography libraries
https://godoc.org/golang.org/x/crypto
BSD 3-Clause "New" or "Revised" License
50 stars 20 forks source link

Remove all whitespace when dearmoring (not just trim) #58

Closed zapu closed 7 years ago

zapu commented 7 years ago

Related to this issue:

https://github.com/keybase/keybase-issues/issues/3067

Which was a failure to parse this ASCII armored bundle: https://gist.github.com/zapu/cb935798e06b1d5bed12ad61824b9610

Newlines were replaced by spaces. gpg doesn't complain, this PR makes go-crypto be able to parse it as well.

This is not necessarily the right way of fixing that bug though!

zapu commented 7 years ago

also one test is skipped that I would like to be passing, for bundles that gpg has no problems with :(

zapu commented 7 years ago

@maxtaco can you take another look? I think I got it right this time.