Adds readPacket() to conn, and renames conn to packetConn.
Key exchanges operate on packetConn, so they can be
unittested.
R=agl, jpsugar, dave
CC=golang-dev
https://golang.org/cl/13352055
The length of history buffer entries (which are stored as strings) was
being used as the number of runes. This was correct until ff9ce887b46b,
which allowed unicode entry, but can now cause a panic when editing
history that contains non-ASCII codepoints.
R=golang-dev, sfrithjof, r
CC=golang-dev
https://golang.org/cl/13255050
Previously, terminal only supported ASCII characters. This change
alters some []byte to []rune so that the full range of Unicode is
supported. The only thing that doesn't appear to work correctly are
grapheme clusters as the code still assumes one rune per glyph. Still,
this change allows many more languages to work than did previously.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13704043
Necessary to reproduce the same hash for verifying a UserAttribute signature.
Reuse and fix defect in serializeSubpacketLength, RFC 4880, Section 4.2.2.2.
R=agl
CC=golang-dev
https://golang.org/cl/13464044
My goal here is to allow read-only access to legacy key material without allowing new V3 keys or signatures.
R=agl
CC=golang-dev
https://golang.org/cl/12746046
Previously curve25519 contained a constant-time, optimised amd64 implementation and
a generic implemenation that used math/big and that was not constant-time.
This change contains a Go port of the public domain, "ref10" implementation from
SUPERCOP. This has the advantage of being faster and constant-time.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13343045
This obviates custom code to emulate a thread-safe connection.
Use this for testing that listeners close if the connection breaks.
R=dave, agl, fullung
CC=golang-dev
https://golang.org/cl/11781043
Supports JPEG images as well as free-form arbitrary subpacket data in
user attributes (RFC 4880, Section 5.12)
R=agl
CC=golang-dev
https://golang.org/cl/12966045
This patch implements the facilities needed to compress data before
encryption as allowed (and recommended) by RFC 4880. The new
functionality is then used to add support for compressing data during
symmetric encryption (openpgp.SymmetricallyEncrypt()).
For now, compression defaults to off. Also, only the ZIP and ZLIB
compression schemes are supported by this patch.
Resulting output tested/verified using GPG.
https://gist.github.com/marete/6189760 is a small program that can be
used to test that the output of various compression/encryption settings
can be read by GPG or other RFC 4880 programs.
Upon review, I will follow this patch with 2 others: a) Add support for compression during public key encryption (openpgp.Encrypt()) b) Enable
compression by default (subject to the restrictions of the "Compression Preferences" section in RFC 4880).
R=golang-dev, agl
CC=golang-dev
https://golang.org/cl/12685044
Previously, if Encrypt decided to use a hash function that wasn't
compiled in then it would panic.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12055043
Paul van Brouwershaven pointed out that it would be better to pass in
the issuing certificate and have the verification be done in the OCSP
package than to expect the caller to deal with the difference between
responses with and without a responder certificate.
R=golang-dev, dayveday, paul
CC=golang-dev
https://golang.org/cl/11220043
Tested using a variety of files encrypted with gpg and the
"--compress-algo BZIP2" gpg option.
R=golang-dev, bradfitz, agl
CC=golang-dev
https://golang.org/cl/10801043
The history buffer would recall previously entered lines: including passwords. With this change, lines entered while echo is disabled are no longer put into the history.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/10853043
Some OCSP responses (notably COMODO's) don't use an intermediate
certificate to sign OCSP responses so this change allowed that.
Additionally, a CreateRequest function is added for creating OCSP
requests.
This change makes one API change: SerialNumber becomes a *big.Int to
match crypto/x509. The original code dates to before encoding/asn1
could cope with big.Ints and using a []byte was a workaround for that.
R=golang-dev
CC=golang-dev
https://golang.org/cl/10402043
* Remove special handling for dynamically allocated
ports. This was a bug in OpenSSH 5.x sshd.
* Run the test with a preselected port number.
* Run TestPortForward only on unix platforms.
R=dave, agl
CC=golang-dev
https://golang.org/cl/10049045
Set maxPacket in forwarded connection, and use the requested port
number as key in forwardList.
R=golang-dev, agl, dave
CC=golang-dev
https://golang.org/cl/9753044
secretbox is supposed to append to the given slice, like hash.Sum() and
append(). However, I had a complete brain-fart: I've really no idea what
I was thinking of at the time.
R=golang-dev, sfrithjof, rsc
CC=agl, golang-dev
https://golang.org/cl/10099043
I ran go vet over all of go.crypto and removed lots of panic("unreachable") that are no longer needed.
R=golang-dev, r, dgryski
CC=golang-dev
https://golang.org/cl/10113043
Fixesgolang/go#5138.
Fixesgolang/go#4703.
This appears to pass my stress tests with and without the -race detector, but I'd like to see others hit it with their machines.
R=golang-dev, fullung, huin, kardianos, agl
CC=golang-dev
https://golang.org/cl/9929043
Followup CL for 9711043. The order that CombinedOutput returns data captured from stdout/stderr is not specified, so we have to test both variants.
Thanks to fullung for the bug report.
R=fullung, kr
CC=golang-dev
https://golang.org/cl/9921044