x/crypto: fix typos
The typos were found by misspell tool. Change-Id: I120740f12f7ba48330749ebf84050a7b98e01016 Reviewed-on: https://go-review.googlesource.com/24725 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Ian Lance Taylor
parent
cd884d3570
commit
077efaa604
+5
-5
@@ -30,11 +30,11 @@ var idPKIXOCSPBasic = asn1.ObjectIdentifier([]int{1, 3, 6, 1, 5, 5, 7, 48, 1, 1}
|
|||||||
type ResponseStatus int
|
type ResponseStatus int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Success ResponseStatus = 0
|
Success ResponseStatus = 0
|
||||||
Malformed ResponseStatus = 1
|
Malformed ResponseStatus = 1
|
||||||
InternalError ResponseStatus = 2
|
InternalError ResponseStatus = 2
|
||||||
TryLater ResponseStatus = 3
|
TryLater ResponseStatus = 3
|
||||||
// Status code four is ununsed in OCSP. See
|
// Status code four is unused in OCSP. See
|
||||||
// https://tools.ietf.org/html/rfc6960#section-4.2.1
|
// https://tools.ietf.org/html/rfc6960#section-4.2.1
|
||||||
SignatureRequired ResponseStatus = 5
|
SignatureRequired ResponseStatus = 5
|
||||||
Unauthorized ResponseStatus = 6
|
Unauthorized ResponseStatus = 6
|
||||||
|
|||||||
+1
-1
@@ -231,7 +231,7 @@ func Encrypt(ciphertext io.Writer, to []*Entity, signed *Entity, hints *FileHint
|
|||||||
}
|
}
|
||||||
|
|
||||||
cipher := packet.CipherFunction(candidateCiphers[0])
|
cipher := packet.CipherFunction(candidateCiphers[0])
|
||||||
// If the cipher specifed by config is a candidate, we'll use that.
|
// If the cipher specified by config is a candidate, we'll use that.
|
||||||
configuredCipher := config.Cipher()
|
configuredCipher := config.Cipher()
|
||||||
for _, c := range candidateCiphers {
|
for _, c := range candidateCiphers {
|
||||||
cipherFunc := packet.CipherFunction(c)
|
cipherFunc := packet.CipherFunction(c)
|
||||||
|
|||||||
+1
-1
@@ -42,7 +42,7 @@ type state struct {
|
|||||||
storage [maxRate]byte
|
storage [maxRate]byte
|
||||||
|
|
||||||
// Specific to SHA-3 and SHAKE.
|
// Specific to SHA-3 and SHAKE.
|
||||||
fixedOutput bool // whether this is a fixed-ouput-length instance
|
fixedOutput bool // whether this is a fixed-output-length instance
|
||||||
outputLen int // the default output size in bytes
|
outputLen int // the default output size in bytes
|
||||||
state spongeDirection // whether the sponge is absorbing or squeezing
|
state spongeDirection // whether the sponge is absorbing or squeezing
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// IMPLEMENTOR NOTE: To avoid a package loop, this file is in three places:
|
// IMPLEMENTATION NOTE: To avoid a package loop, this file is in three places:
|
||||||
// ssh/, ssh/agent, and ssh/test/. It should be kept in sync across all three
|
// ssh/, ssh/agent, and ssh/test/. It should be kept in sync across all three
|
||||||
// instances.
|
// instances.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ func TestDefaultCiphersExist(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestPacketCiphers(t *testing.T) {
|
func TestPacketCiphers(t *testing.T) {
|
||||||
// Still test aes128cbc cipher althought it's commented out.
|
// Still test aes128cbc cipher although it's commented out.
|
||||||
cipherModes[aes128cbcID] = &streamCipherMode{16, aes.BlockSize, 0, nil}
|
cipherModes[aes128cbcID] = &streamCipherMode{16, aes.BlockSize, 0, nil}
|
||||||
defer delete(cipherModes, aes128cbcID)
|
defer delete(cipherModes, aes128cbcID)
|
||||||
|
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ func TestClientLoginCert(t *testing.T) {
|
|||||||
t.Log("sign with wrong key")
|
t.Log("sign with wrong key")
|
||||||
cert.SignCert(rand.Reader, testSigners["dsa"])
|
cert.SignCert(rand.Reader, testSigners["dsa"])
|
||||||
if err := tryAuth(t, clientConfig); err == nil {
|
if err := tryAuth(t, clientConfig); err == nil {
|
||||||
t.Errorf("cert login passed with non-authoritive key")
|
t.Errorf("cert login passed with non-authoritative key")
|
||||||
}
|
}
|
||||||
|
|
||||||
t.Log("host cert")
|
t.Log("host cert")
|
||||||
|
|||||||
+1
-1
@@ -125,7 +125,7 @@ func ParseKnownHosts(in []byte) (marker string, hosts []string, pubKey PublicKey
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// Strip out the begining of the known_host key.
|
// Strip out the beginning of the known_host key.
|
||||||
// This is either an optional marker or a (set of) hostname(s).
|
// This is either an optional marker or a (set of) hostname(s).
|
||||||
keyFields := bytes.Fields(in)
|
keyFields := bytes.Fields(in)
|
||||||
if len(keyFields) < 3 || len(keyFields) > 5 {
|
if len(keyFields) < 3 || len(keyFields) > 5 {
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ func TestCiphers(t *testing.T) {
|
|||||||
defer server.Shutdown()
|
defer server.Shutdown()
|
||||||
conf := clientConfig()
|
conf := clientConfig()
|
||||||
conf.Ciphers = []string{ciph}
|
conf.Ciphers = []string{ciph}
|
||||||
// Don't fail if sshd doesnt have the cipher.
|
// Don't fail if sshd doesn't have the cipher.
|
||||||
conf.Ciphers = append(conf.Ciphers, cipherOrder...)
|
conf.Ciphers = append(conf.Ciphers, cipherOrder...)
|
||||||
conn, err := server.TryDial(conf)
|
conn, err := server.TryDial(conf)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
@@ -310,7 +310,7 @@ func TestMACs(t *testing.T) {
|
|||||||
defer server.Shutdown()
|
defer server.Shutdown()
|
||||||
conf := clientConfig()
|
conf := clientConfig()
|
||||||
conf.MACs = []string{mac}
|
conf.MACs = []string{mac}
|
||||||
// Don't fail if sshd doesnt have the MAC.
|
// Don't fail if sshd doesn't have the MAC.
|
||||||
conf.MACs = append(conf.MACs, macOrder...)
|
conf.MACs = append(conf.MACs, macOrder...)
|
||||||
if conn, err := server.TryDial(conf); err == nil {
|
if conn, err := server.TryDial(conf); err == nil {
|
||||||
conn.Close()
|
conn.Close()
|
||||||
@@ -328,7 +328,7 @@ func TestKeyExchanges(t *testing.T) {
|
|||||||
server := newServer(t)
|
server := newServer(t)
|
||||||
defer server.Shutdown()
|
defer server.Shutdown()
|
||||||
conf := clientConfig()
|
conf := clientConfig()
|
||||||
// Don't fail if sshd doesnt have the kex.
|
// Don't fail if sshd doesn't have the kex.
|
||||||
conf.KeyExchanges = append([]string{kex}, kexOrder...)
|
conf.KeyExchanges = append([]string{kex}, kexOrder...)
|
||||||
conn, err := server.TryDial(conf)
|
conn, err := server.TryDial(conf)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// IMPLEMENTOR NOTE: To avoid a package loop, this file is in three places:
|
// IMPLEMENTATION NOTE: To avoid a package loop, this file is in three places:
|
||||||
// ssh/, ssh/agent, and ssh/test/. It should be kept in sync across all three
|
// ssh/, ssh/agent, and ssh/test/. It should be kept in sync across all three
|
||||||
// instances.
|
// instances.
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// IMPLEMENTOR NOTE: To avoid a package loop, this file is in three places:
|
// IMPLEMENTATION NOTE: To avoid a package loop, this file is in three places:
|
||||||
// ssh/, ssh/agent, and ssh/test/. It should be kept in sync across all three
|
// ssh/, ssh/agent, and ssh/test/. It should be kept in sync across all three
|
||||||
// instances.
|
// instances.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user