Export key and certificate algorithm names.
Switch from string literals over to using the constants for any key/cert algorithm references.
Make URL references visible in the godoc web display.
Standardize url reference names with surrounding [].
R=dave, agl, jonathan.mark.pittman
CC=golang-dev
https://golang.org/cl/6944047
This allows easy import/export of public keys in the format
expected by OpenSSH for authorized_keys files, as well as
allowing comparisons with ServerConfig's PublickeyCallback.
Fixesgolang/go#3908.
R=agl, dave, golang-dev, bradfitz
CC=agl, golang-dev
https://golang.org/cl/6855107
The go.crypto repo was missed when this function was removed from the
ciphers in the standard library.
R=agl
CC=golang-dev
https://golang.org/cl/6904062
t caches the value of z squared, but wasn't getting correctly
initialised when the value of z was reset.
R=golang-dev
CC=golang-dev
https://golang.org/cl/6850091
user.Current() currently requires cgo - if an error is returned
attempt to get the username from the environment.
R=golang-dev, minux.ma, bradfitz, dave
CC=golang-dev
https://golang.org/cl/6819113
Fixesgolang/go#4285.
Adding a new cipher that is supported by the remote end, but not supported by our client causes that cipher to be considered a valid candidate. This fails later in setupKeys when there is no cipherModes configuration.
In summary, unsupported ciphers cannot be willed into existence by adding them to the client config. This change enforces this.
R=golang-dev, agl
CC=golang-dev
https://golang.org/cl/6780047
It's useful to expose this bit of state because, although callers can
keep track of it themselves, it's already in the Conversation so it
seems wasteful to make them do so.
R=golang-dev, ioerror
CC=golang-dev
https://golang.org/cl/6724056
Also fix salt expansion code to fill the properly sized array,
since the following code never uses more than 4 uints.
Also remove unused expandedKey array.
R=golang-dev, agl
CC=golang-dev
https://golang.org/cl/6622050
This proposal is an attempt to improve the state of functional testing in the ssh package. The previous functional tests required the user to give away some personal details, like their password and private key to run the tests, and so were probably not run as frequently as they should.
R=agl, gustav.paul, kardianos, fullung
CC=golang-dev
https://golang.org/cl/6601043
This change alters the assembly to use FSUBD instructions such that
6l will actually emit the correct FSUBRD instructions and enables
the assembly code.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6514044
The check for a sensible packet length was removed a while ago
when the window size and channel packet size checks were moved
into channel.go. While the RFC suggests that any packet of size
less than uint32 -1 is valid, most implmentations limit the size
to a smaller value. OpenSSH chose 256kb, so that sounds like a
sensible default.
R=agl, huin, kardianos
CC=golang-dev
https://golang.org/cl/6490098
Fixesgolang/go#3810.
Fixes chanWriter Write after close behaviour bug.
Fixes serverChan writePacket after close bug.
Addresses final comments by agl on 6405064, plus various cleanups.
R=agl, kardianos, gustav.paul, fullung
CC=golang-dev
https://golang.org/cl/6479056
Fixesgolang/go#3989.
Tested for several hours on an 8 core ec2 instance with
random GOMAXPROC values.
Also, rolls server_test.go into session_test using the
existing dial() framework.
R=fullung, agl, kardianos
CC=golang-dev
https://golang.org/cl/6475063
Use a handler that does not attempt to send a status message
as the failing test closes the connection abruptly.
Also, check the err response on all shell.ReadLine operations.
R=agl, minux.ma, kardianos
CC=golang-dev
https://golang.org/cl/6487043
Fixesgolang/go#3810.
This change introduces an atomic boolean to guard the close
of the clientChan. Previously the client code was quite
lax with the ordering of the close messages and could allow
window adjustment or EOF messages to leak after Close had
been signaled.
Consolidating the changes to the serverChan will be handled
in a following CL.
R=agl, kardianos, gustav.paul
CC=golang-dev
https://golang.org/cl/6405064
This proposal moves the check for max packet into
channel.writePacket. Callers should be aware they cannot
pass a buffer larger than max packet. This is only a
concern to chanWriter.Write and appropriate guards are
already in place.
There was some max packet handling in transport.go but it was
incorrect. This has been removed.
This proposal also cleans up session_test.go.
R=gustav.paul, agl, fullung, huin
CC=golang-dev
https://golang.org/cl/6460075
It appears that CentOS (and so I presume Fedora/RHEL too) default to
encrypting private keys with 3DES so it looks like we need to support
that.
Fixesgolang/go#3940.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6446121
RFC 4254 s5.2 is clear that a client must never send a data
packet larger than the value of maximum packet supplied by the
remote side during channel setup. The client was not honoring
this value, in fact it wasn't even recording it.
Thanks to Albert Strasheim for the bug report.
R=agl, fullung
CC=golang-dev
https://golang.org/cl/6448128
Package bn256 implements a particular bilinear group at the 128-bit
security level.
R=golang-dev, remyoudompheng, r, r, akumar
CC=golang-dev
https://golang.org/cl/6402052
The explicit OTR termination signal tells the peer that they should
discard their session keys and, more importantly, tells them that
*you* have done so and therefore cannot decrypt future messages.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6430043
Fix a few resource leaks and prevent the test from
hanging if an error occurs reading from the remote
server.
R=agl, gustav.paul, kardianos
CC=golang-dev
https://golang.org/cl/6423065
This proposal removes the use of recover() to catch
invalid channel ids sent from the remote side. The
recover() unfortuntaly makes debugging harder as it
obscures other panic causes.
Another source of panic()s exists inside marshal.go,
which will be handled with in a later CL.
R=agl, gustav.paul
CC=golang-dev
https://golang.org/cl/6404046
RequestSubsystem requests the association of a subsystem with the ssh
session on the remote host. A subsystem is a predefined command that
runs in the background when the ssh session is initiated (i.e. sftp).
R=golang-dev, agl
CC=golang-dev, gustav.paul
https://golang.org/cl/6295096