From 4badbcf1bb42bedb80fe38afa752733d7ec38f8a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:41:41 -0700 Subject: [PATCH 1/2] Bump golang.org/x/crypto from 0.17.0 to 0.22.0 (#1619) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Matt Dale <9760375+matthewdale@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- vendor/golang.org/x/crypto/ocsp/ocsp.go | 13 +++++++------ vendor/modules.txt | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 344054b558..52aa8773c2 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/xdg-go/scram v1.1.2 github.com/xdg-go/stringprep v1.0.4 github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d - golang.org/x/crypto v0.17.0 + golang.org/x/crypto v0.22.0 golang.org/x/sync v0.1.0 ) diff --git a/go.sum b/go.sum index b3354cf3f7..544459253f 100644 --- a/go.sum +++ b/go.sum @@ -19,8 +19,8 @@ github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7Jul github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= diff --git a/vendor/golang.org/x/crypto/ocsp/ocsp.go b/vendor/golang.org/x/crypto/ocsp/ocsp.go index 4269ed113b..bf2259537d 100644 --- a/vendor/golang.org/x/crypto/ocsp/ocsp.go +++ b/vendor/golang.org/x/crypto/ocsp/ocsp.go @@ -279,21 +279,22 @@ func getOIDFromHashAlgorithm(target crypto.Hash) asn1.ObjectIdentifier { // This is the exposed reflection of the internal OCSP structures. -// The status values that can be expressed in OCSP. See RFC 6960. +// The status values that can be expressed in OCSP. See RFC 6960. +// These are used for the Response.Status field. const ( // Good means that the certificate is valid. - Good = iota + Good = 0 // Revoked means that the certificate has been deliberately revoked. - Revoked + Revoked = 1 // Unknown means that the OCSP responder doesn't know about the certificate. - Unknown + Unknown = 2 // ServerFailed is unused and was never used (see // https://go-review.googlesource.com/#/c/18944). ParseResponse will // return a ResponseError when an error response is parsed. - ServerFailed + ServerFailed = 3 ) -// The enumerated reasons for revoking a certificate. See RFC 5280. +// The enumerated reasons for revoking a certificate. See RFC 5280. const ( Unspecified = 0 KeyCompromise = 1 diff --git a/vendor/modules.txt b/vendor/modules.txt index 218e21c5cf..3287f246da 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -35,7 +35,7 @@ github.com/xdg-go/stringprep # github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d ## explicit github.com/youmark/pkcs8 -# golang.org/x/crypto v0.17.0 +# golang.org/x/crypto v0.22.0 ## explicit; go 1.18 golang.org/x/crypto/ocsp golang.org/x/crypto/pbkdf2 From 925db11db0ca0e25c32faf360123f1106dbe3c47 Mon Sep 17 00:00:00 2001 From: MarkDaveny <168091250+MarkDaveny@users.noreply.github.com> Date: Mon, 29 Apr 2024 20:50:11 +0800 Subject: [PATCH 2/2] chore: fix some comments and typos (#1623) Signed-off-by: MarkDaveny --- etc/compile_check.sh | 2 +- mongo/options/mongooptions.go | 2 +- mongo/writeconcern/writeconcern.go | 2 +- x/mongo/driver/auth/speculative_x509_test.go | 2 +- x/mongo/driver/operation.go | 2 +- x/mongo/driver/operation_test.go | 2 +- x/mongo/driver/topology/polling_srv_records_test.go | 2 +- x/mongo/driver/wiremessage/wiremessage.go | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/etc/compile_check.sh b/etc/compile_check.sh index 397322f2bf..cdb1dc4a66 100755 --- a/etc/compile_check.sh +++ b/etc/compile_check.sh @@ -12,7 +12,7 @@ function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; } -# compile_check will attempt to build the the internal/test/compilecheck project +# compile_check will attempt to build the internal/test/compilecheck project # using the provided Go version. This is to simulate an end-to-end use case. # This check will only run on environments where the Go version is greater than # or equal to the given version. diff --git a/mongo/options/mongooptions.go b/mongo/options/mongooptions.go index fd17ce44e1..36088c2fcb 100644 --- a/mongo/options/mongooptions.go +++ b/mongo/options/mongooptions.go @@ -104,7 +104,7 @@ const ( // UpdateLookup includes a delta describing the changes to the document and a copy of the entire document that // was changed. UpdateLookup FullDocument = "updateLookup" - // WhenAvailable includes a post-image of the the modified document for replace and update change events + // WhenAvailable includes a post-image of the modified document for replace and update change events // if the post-image for this event is available. WhenAvailable FullDocument = "whenAvailable" ) diff --git a/mongo/writeconcern/writeconcern.go b/mongo/writeconcern/writeconcern.go index 1d9472ec0b..7a73d8d72f 100644 --- a/mongo/writeconcern/writeconcern.go +++ b/mongo/writeconcern/writeconcern.go @@ -51,7 +51,7 @@ var ErrNegativeWTimeout = errors.New("write concern `wtimeout` field cannot be n type WriteConcern struct { // W requests acknowledgment that the write operation has propagated to a // specified number of mongod instances or to mongod instances with - // specified tags. It sets the the "w" option in a MongoDB write concern. + // specified tags. It sets the "w" option in a MongoDB write concern. // // W values must be a string or an int. // diff --git a/x/mongo/driver/auth/speculative_x509_test.go b/x/mongo/driver/auth/speculative_x509_test.go index cf46de6ffd..85bd93191b 100644 --- a/x/mongo/driver/auth/speculative_x509_test.go +++ b/x/mongo/driver/auth/speculative_x509_test.go @@ -125,7 +125,7 @@ func createSpeculativeX509Handshake() []bsoncore.Document { return []bsoncore.Document{hello} } -// createSpeculativeX509Handshake creates the server replies for a handshake + X509 authentication attempt. +// createRegularX509Handshake creates the server replies for a handshake + X509 authentication attempt. // There are two replies: // // 1. hello reply diff --git a/x/mongo/driver/operation.go b/x/mongo/driver/operation.go index f30219d3d8..b557002293 100644 --- a/x/mongo/driver/operation.go +++ b/x/mongo/driver/operation.go @@ -622,7 +622,7 @@ func (op Operation) Execute(ctx context.Context) error { } }() for { - // If we're starting a retry and the the error from the previous try was + // If we're starting a retry and the error from the previous try was // a context canceled or deadline exceeded error, stop retrying and // return that error. if errors.Is(prevErr, context.Canceled) || errors.Is(prevErr, context.DeadlineExceeded) { diff --git a/x/mongo/driver/operation_test.go b/x/mongo/driver/operation_test.go index 4fcb58b72d..6445c9d0f6 100644 --- a/x/mongo/driver/operation_test.go +++ b/x/mongo/driver/operation_test.go @@ -80,7 +80,7 @@ func TestOperation(t *testing.T) { _, err := op.selectServer(context.Background(), 1, nil) noerr(t, err) - // Assert the the selector is an operation selector wrapper. + // Assert the selector is an operation selector wrapper. oss, ok := d.params.selector.(*opServerSelector) require.True(t, ok) diff --git a/x/mongo/driver/topology/polling_srv_records_test.go b/x/mongo/driver/topology/polling_srv_records_test.go index 7484109d4e..04f5e8c75b 100644 --- a/x/mongo/driver/topology/polling_srv_records_test.go +++ b/x/mongo/driver/topology/polling_srv_records_test.go @@ -313,7 +313,7 @@ func TestPollingSRVRecordsLoadBalanced(t *testing.T) { func TestPollSRVRecordsMaxHosts(t *testing.T) { // simulateSRVPoll creates a topology with srvMaxHosts, mocks the DNS changes described by - // recordsToAdd and recordsToRemove, and returns the the topology. + // recordsToAdd and recordsToRemove, and returns the topology. simulateSRVPoll := func(srvMaxHosts int, recordsToAdd []*net.SRV, recordsToRemove []*net.SRV) (*Topology, func(ctx context.Context) error) { t.Helper() diff --git a/x/mongo/driver/wiremessage/wiremessage.go b/x/mongo/driver/wiremessage/wiremessage.go index abf09c15bd..a13dda4e89 100644 --- a/x/mongo/driver/wiremessage/wiremessage.go +++ b/x/mongo/driver/wiremessage/wiremessage.go @@ -486,7 +486,7 @@ func ReadReplyCursorID(src []byte) (cursorID int64, rem []byte, ok bool) { return readi64(src) } -// ReadReplyStartingFrom reads the starting from from src. +// ReadReplyStartingFrom reads the starting from src. func ReadReplyStartingFrom(src []byte) (startingFrom int32, rem []byte, ok bool) { return readi32(src) }