all: fix some typos in comment

Change-Id: Ia209f0a6d9b19d14e655c65d1287a1416b48c487
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/707535
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Nicola Murino <nicola.murino@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sean Liao <sean@liao.dev>
This commit is contained in:
cuishuang
2025-10-08 13:58:26 -07:00
committed by Gopher Robot
parent 627cb894b6
commit 1faea2975c
17 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ func (r *keyring) Unlock(passphrase []byte) error {
}
// expireKeysLocked removes expired keys from the keyring. If a key was added
// with a lifetimesecs contraint and seconds >= lifetimesecs seconds have
// with a lifetimesecs constraint and seconds >= lifetimesecs seconds have
// elapsed, it is removed. The caller *must* be holding the keyring mutex.
func (r *keyring) expireKeysLocked() {
for _, k := range r.keys {
+1 -1
View File
@@ -30,7 +30,7 @@ func validateListedKeys(t *testing.T, a Agent, expectedKeys []string) {
return
}
if len(listedKeys) != len(expectedKeys) {
t.Fatalf("expeted %d key, got %d", len(expectedKeys), len(listedKeys))
t.Fatalf("expected %d key, got %d", len(expectedKeys), len(listedKeys))
return
}
actualKeys := make(map[string]bool)
+1 -1
View File
@@ -1136,7 +1136,7 @@ func TestPickSignatureAlgorithm(t *testing.T) {
t.Fatalf("error generating cert signer: %v", err)
}
// The signer supports the public key algorithm and the
// public key format is a certificate type so the cerificate
// public key format is a certificate type so the certificate
// algorithm matching the key format must be returned
_, algo, err = pickSignatureAlgorithm(certSigner, c.extensions)
if err != nil {
+3 -3
View File
@@ -155,7 +155,7 @@ func ExampleNewServerConn() {
}
func ExampleServerConfig() {
// Minimal ServerConfig with SHA-1 algoritms disabled and supporting only
// Minimal ServerConfig with SHA-1 algorithms disabled and supporting only
// public key authentication.
// The algorithms returned by ssh.SupportedAlgorithms() are different from
@@ -344,7 +344,7 @@ func ExampleClientConfig() {
log.Fatalf("unable to parse private key: %v", err)
}
// Minimal ClientConfig with SHA-1 algoritms disabled.
// Minimal ClientConfig with SHA-1 algorithms disabled.
// The algorithms returned by ssh.SupportedAlgorithms() are different from
// the default ones and do not include algorithms that are considered
// insecure, such as those using SHA-1, returned by
@@ -361,7 +361,7 @@ func ExampleClientConfig() {
ssh.PublicKeys(signer),
},
HostKeyCallback: ssh.FixedHostKey(hostKey),
// We should check that hostKey algorithm is inlcuded in
// We should check that hostKey algorithm is included in
// algorithms.HostKeys.
HostKeyAlgorithms: algorithms.HostKeys,
}
+1 -1
View File
@@ -1330,7 +1330,7 @@ func TestAlgorithmNegotiationError(t *testing.T) {
_, _, _, err = NewClientConn(c2, "", clientConf)
if err == nil {
t.Fatal("client connection succeded expected algorithm negotiation error")
t.Fatal("client connection succeeded expected algorithm negotiation error")
}
var negotiationError *AlgorithmNegotiationError
if !errors.As(err, &negotiationError) {
+2 -2
View File
@@ -724,7 +724,7 @@ func TestVerifiedPublicCallbackPartialSuccessBadUsage(t *testing.T) {
_, _, _, err = NewClientConn(c2, "", &clientConf)
if err == nil {
t.Fatal("authentication suceeded with PartialSuccess returned from PublicKeyCallback and VerifiedPublicKeyCallback defined")
t.Fatal("authentication succeeded with PartialSuccess returned from PublicKeyCallback and VerifiedPublicKeyCallback defined")
}
}
@@ -803,7 +803,7 @@ func TestVerifiedPublicKeyCallbackOnly(t *testing.T) {
_, _, _, err = NewClientConn(c2, "", &clientConf)
if err == nil {
t.Fatal("authentication suceeded with only VerifiedPublicKeyCallback defined")
t.Fatal("authentication succeeded with only VerifiedPublicKeyCallback defined")
}
<-done
}
+1 -1
View File
@@ -251,7 +251,7 @@ func TestClientKeyExchanges(t *testing.T) {
var keyExchanges []string
for _, kex := range config.KeyExchanges {
// Exclude ecdh for now, to make them determistic we should use see a
// Exclude ecdh for now, to make them deterministic we should use see a
// stream of fixed bytes as the random source.
if !strings.HasPrefix(kex, "ecdh-") {
keyExchanges = append(keyExchanges, kex)
+1 -1
View File
@@ -232,7 +232,7 @@ func TestServerKeyExchanges(t *testing.T) {
var keyExchanges []string
for _, kex := range config.KeyExchanges {
// Exclude ecdh for now, to make them determistic we should use see a
// Exclude ecdh for now, to make them deterministic we should use see a
// stream of fixed bytes as the random source.
// Exclude ML-KEM because server side is not deterministic.
if !strings.HasPrefix(kex, "ecdh-") && !strings.HasPrefix(kex, "mlkem") {