Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: golang/crypto Loading
base: v0.15.0
Choose a base ref
...
head repository: golang/crypto Loading
compare: v0.17.0
Choose a head ref
  • 15 commits
  • 31 files changed
  • 13 contributors

Commits on Nov 9, 2023

  1. ssh: eliminate some goroutine leaks in tests and examples

    This should fix the "Log in goroutine" panic seen in
    https://build.golang.org/log/e42bf69fc002113dbccfe602a6c67fd52e8f31df,
    as well as a few other related leaks. It also helps to verify that
    none of the functions under test deadlock unexpectedly.
    
    See https://go.dev/wiki/CodeReviewComments#goroutine-lifetimes.
    
    Updates golang/go#58901.
    
    Change-Id: Ica943444db381ae1accb80b101ea646e28ebf4f9
    Reviewed-on: https://go-review.googlesource.com/c/crypto/+/541095
    Auto-Submit: Bryan Mills <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Reviewed-by: Nicola Murino <[email protected]>
    Reviewed-by: Heschi Kreinick <[email protected]>
    Bryan C. Mills authored and gopherbot committed Nov 9, 2023
    Configuration menu
    Copy the full SHA
    ff15cd5 View commit details
    Browse the repository at this point in the history
  2. cryptobyte: fix ReadOptionalASN1Boolean

    ReadOptionalASN1Boolean was completely broken, it would only work when
    there were two BOOLEAN fields in a row, with the first being OPTIONAL
    (which is itself invalid ASN.1 due to the ambiguity). This fixes it
    to properly expect a BOOLEAN wrapped in a context-specific tag, as is
    the case for all of the other ReadOptionalASN1* methods, and updates
    its doc string.
    
    This is a breaking change as it requires adding the tag field to
    properly support context-specific tags. Given the method would
    previously not work this seems like a reasonable breakage.
    
    Fixes golang/go#43019
    
    Change-Id: I42398256216c59988e249c90bc7aa668f64df945
    Reviewed-on: https://go-review.googlesource.com/c/crypto/+/274242
    Reviewed-by: Filippo Valsorda <[email protected]>
    Reviewed-by: Damien Neil <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Auto-Submit: Roland Shoemaker <[email protected]>
    rolandshoemaker authored and gopherbot committed Nov 9, 2023
    Configuration menu
    Copy the full SHA
    a2edfb5 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2023

  1. ssh: use the correct token from the client

    This fixes the case where AcceptSecContext is always called with the
    first token sent by the client instead of the most recently sent one.
    Previously, despite being being read from the client and unmarshalled,
    it was never actually used.
    
    Fixes golang/go#43875
    
    Change-Id: I1967d9a107af03d6778a9437b48e785d61710ee5
    GitHub-Last-Rev: 0d58e4d
    GitHub-Pull-Request: #176
    Reviewed-on: https://go-review.googlesource.com/c/crypto/+/286252
    Run-TryBot: Filippo Valsorda <[email protected]>
    Auto-Submit: Filippo Valsorda <[email protected]>
    TryBot-Result: Gopher Robot <[email protected]>
    Reviewed-by: Matthew Dempsky <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Run-TryBot: Nicola Murino <[email protected]>
    Reviewed-by: Nicola Murino <[email protected]>
    Reviewed-by: Filippo Valsorda <[email protected]>
    Reviewed-by: Than McIntosh <[email protected]>
    bodgit authored and gopherbot committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    1cf1811 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2023

  1. curve25519/internal/field/_asm: go mod tidy to fix x/sys version

    Relates to CL 540537, which updated the dependency in the main module.
    
    Change-Id: I9a745f4e03b5cf14fa62c4de63363ddf663b19fd
    GitHub-Last-Rev: 836c393
    GitHub-Pull-Request: #277
    Reviewed-on: https://go-review.googlesource.com/c/crypto/+/541276
    Auto-Submit: Filippo Valsorda <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Reviewed-by: Michael Knyszek <[email protected]>
    Reviewed-by: Roland Shoemaker <[email protected]>
    Reviewed-by: Filippo Valsorda <[email protected]>
    thaJeztah authored and gopherbot committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    270bf25 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2023

  1. ssh: fix certificate authentication with OpenSSH 7.2-7.7

    OpenSSH 7.2-7.7 advertises support for rsa-sha2-256 and rsa-sha2-512
    in the "server-sig-algs" extension but doesn't support these
    algorithms for certificate authentication, so if the server rejects
    the key try to use the obtained algorithm as if "server-sig-algs" had
    not been implemented.
    
    Fixes golang/go#58371
    
    Change-Id: Id49960d3dedd32a21e2c6c2689b1696e05398286
    Reviewed-on: https://go-review.googlesource.com/c/crypto/+/510155
    Reviewed-by: Filippo Valsorda <[email protected]>
    Run-TryBot: Nicola Murino <[email protected]>
    Reviewed-by: Dmitri Shuralyov <[email protected]>
    Reviewed-by: Michael Knyszek <[email protected]>
    TryBot-Result: Gopher Robot <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Auto-Submit: Nicola Murino <[email protected]>
    drakkan authored and gopherbot committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    1c17e20 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2023

  1. ssh: add (*Client).DialContext method

    This change adds DialContext to ssh.Client, which opens a TCP-IP
    connection tunneled over the SSH connection. This is useful for
    proxying network connections, e.g. setting
    (net/http.Transport).DialContext.
    
    Fixes golang/go#20288.
    
    Change-Id: I110494c00962424ea803065535ebe2209364ac27
    GitHub-Last-Rev: 3176984
    GitHub-Pull-Request: #260
    Reviewed-on: https://go-review.googlesource.com/c/crypto/+/504735
    Run-TryBot: Nicola Murino <[email protected]>
    Run-TryBot: Han-Wen Nienhuys <[email protected]>
    Auto-Submit: Nicola Murino <[email protected]>
    Reviewed-by: Han-Wen Nienhuys <[email protected]>
    Reviewed-by: Dmitri Shuralyov <[email protected]>
    TryBot-Result: Gopher Robot <[email protected]>
    Reviewed-by: Nicola Murino <[email protected]>
    Commit-Queue: Nicola Murino <[email protected]>
    ydnar authored and gopherbot committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    b2d7c26 View commit details
    Browse the repository at this point in the history
  2. go.mod: update golang.org/x dependencies

    Update golang.org/x dependencies to their latest tagged versions.
    
    Change-Id: I7fdfe509173c79a63d006b27d674f869a5baa2af
    Reviewed-on: https://go-review.googlesource.com/c/crypto/+/545098
    Reviewed-by: Heschi Kreinick <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Auto-Submit: Gopher Robot <[email protected]>
    Reviewed-by: Dmitri Shuralyov <[email protected]>
    gopherbot committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    1eadac5 View commit details
    Browse the repository at this point in the history
  3. ssh/test: skip TestSSHCLIAuth on Windows

    It's failing with a file permissions error:
    
    sign_and_send_pubkey: signing using rsa-sha2-512 SHA256:Anr3LjZK8YVpjrxu79myrW9Hrb/wpcMNpVvTq/RcBm8\r\nBad permissions. Try removing permissions for user: UNKNOWN\\\\UNKNOWN (S-1-15-2-2) on file C:/b/s/w/ir/x/t/TestSSHCLIAuth1586735692/001/rsa.
    
    For golang/go#64403
    
    Change-Id: Iece8eac4a1ac349f9f7a273ac7389315cb96568e
    Cq-Include-Trybots: luci.golang.try:x_crypto-gotip-windows-amd64-longtest,x_crypto-go1.21-windows-amd64-longtest,x_crypto-go1.20-windows-amd64-longtest
    Reviewed-on: https://go-review.googlesource.com/c/crypto/+/545135
    Reviewed-by: Dmitri Shuralyov <[email protected]>
    Reviewed-by: Nicola Murino <[email protected]>
    Auto-Submit: Heschi Kreinick <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    heschi authored and gopherbot committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    325b735 View commit details
    Browse the repository at this point in the history
  4. argon2: avoid clobbering BP

    go vet was reporting
    
      blamka_amd64.s:203:1: [amd64] mixBlocksSSE2: invalid offset a+24(FP); expected a+8(FP)
      blamka_amd64.s:226:1: [amd64] xorBlocksSSE2: invalid offset a+24(FP); expected a+8(FP)
      blamka_amd64.s:204:1: frame pointer is clobbered before saving
      blamka_amd64.s:227:1: frame pointer is clobbered before saving
    
    Also fix a similar naming issue in sha3:
    
      sha3\keccakf_amd64.s:325:1: [amd64] keccakF1600: unknown variable state; offset 0 is a+0(FP)
    
    Updates golang/go#47027
    
    Change-Id: Ia74852cdb0721ae0216787054197b0cac9e1c0f8
    Reviewed-on: https://go-review.googlesource.com/c/crypto/+/332289
    Reviewed-by: Michael Knyszek <[email protected]>
    Reviewed-by: Nicola Murino <[email protected]>
    Reviewed-by: Dmitri Shuralyov <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Auto-Submit: Dmitri Shuralyov <[email protected]>
    Reviewed-by: Filippo Valsorda <[email protected]>
    egonelbre authored and gopherbot committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    bda2f3f View commit details
    Browse the repository at this point in the history
  5. ssh: wrap errors from client handshake

    When an error is returned by a user defined host key callback,
    it is now possible to handle it using standard Go mechanisms
    such as errors.Is or errors.As.
    
    Fixes golang/go#61309
    
    Change-Id: I4269c5f8eacd8e7e8d85070ad249f0e27777b15f
    GitHub-Last-Rev: d2a34d5
    GitHub-Pull-Request: #266
    Reviewed-on: https://go-review.googlesource.com/c/crypto/+/508876
    Run-TryBot: Nicola Murino <[email protected]>
    Auto-Submit: Dmitri Shuralyov <[email protected]>
    Reviewed-by: Muhammad Shulhan <[email protected]>
    Reviewed-by: Michael Knyszek <[email protected]>
    Reviewed-by: Dmitri Shuralyov <[email protected]>
    Reviewed-by: Nicola Murino <[email protected]>
    TryBot-Result: Gopher Robot <[email protected]>
    paxan authored and gopherbot committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    7e6fbd8 View commit details
    Browse the repository at this point in the history
  6. blake2b: drop Go 1.6, Go 1.8 compatibility

    Other packages already dropped compatibility with go < 1.12, so it
    should be safe to remove it for this package as well.
    
    Change-Id: I7e894fd11d2e7d1fe28c647bd921399a9a6e30d0
    GitHub-Last-Rev: 2b4f576
    GitHub-Pull-Request: #240
    Reviewed-on: https://go-review.googlesource.com/c/crypto/+/448240
    Run-TryBot: Nicola Murino <[email protected]>
    Reviewed-by: Joedian Reid <[email protected]>
    Reviewed-by: Nicola Murino <[email protected]>
    Commit-Queue: Nicola Murino <[email protected]>
    Auto-Submit: Nicola Murino <[email protected]>
    TryBot-Result: Gopher Robot <[email protected]>
    Reviewed-by: Michael Knyszek <[email protected]>
    Reviewed-by: Roland Shoemaker <[email protected]>
    Reviewed-by: Dmitri Shuralyov <[email protected]>
    thaJeztah authored and gopherbot committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    b8ffc16 View commit details
    Browse the repository at this point in the history
  7. ssh: defer channel window adjustment

    Sending a window adjustment after every read is unnecessarily chatty,
    especially with a series of small reads like with TTY interactions.
    
    Copy OpenSSH's logic for deferring these, which seemingly hasn't changed
    since 2007. Note that since channelWindowSize and c.maxIncomingPayload
    are currently constants here, the two checks could be combined into a
    single check for c.myWindow < 2 MiB - 96 KiB (with the current values
    of the constants).
    
    Fixes golang/go#57424.
    
    Change-Id: Ifcef5be76fcc3f0b1a6dc396096bed9c50d64f21
    Reviewed-on: https://go-review.googlesource.com/c/crypto/+/459915
    Reviewed-by: Nicola Murino <[email protected]>
    Reviewed-by: Michael Knyszek <[email protected]>
    Run-TryBot: Nicola Murino <[email protected]>
    Auto-Submit: Nicola Murino <[email protected]>
    Reviewed-by: Dmitri Shuralyov <[email protected]>
    Commit-Queue: Nicola Murino <[email protected]>
    TryBot-Result: Gopher Robot <[email protected]>
    Will Mortensen authored and gopherbot committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    fdfe1f8 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2023

  1. x509roots/fallback: update bundle

    This is an automated CL which updates the NSS root bundle.
    
    Change-Id: Ib8c85dc815297de7b59c3e23b0ad029baaf948ec
    Reviewed-on: https://go-review.googlesource.com/c/crypto/+/543735
    Auto-Submit: Gopher Robot <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Reviewed-by: Dmitri Shuralyov <[email protected]>
    Reviewed-by: Roland Shoemaker <[email protected]>
    gopherbot committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    152cdb1 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2023

  1. ssh: close net.Conn on all NewServerConn errors

    This PR ensures that the net.Conn passed to ssh.NewServerConn is closed
    on all error return paths, not just after a failed handshake. This matches
    the behavior of ssh.NewClientConn.
    
    Change-Id: Id8a51d10ae8d575cbbe26f2ef6b37de7cca840ec
    GitHub-Last-Rev: 81bb2e5
    GitHub-Pull-Request: #279
    Reviewed-on: https://go-review.googlesource.com/c/crypto/+/549095
    Run-TryBot: Nicola Murino <[email protected]>
    Auto-Submit: Nicola Murino <[email protected]>
    Reviewed-by: Roland Shoemaker <[email protected]>
    Reviewed-by: Nicola Murino <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Reviewed-by: Michael Pratt <[email protected]>
    TryBot-Result: Gopher Robot <[email protected]>
    espadolini authored and gopherbot committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    4e5a261 View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2023

  1. ssh: implement strict KEX protocol changes

    Implement the "strict KEX" protocol changes, as described in section
    1.9 of the OpenSSH PROTOCOL file (as of OpenSSH version 9.6/9.6p1).
    
    Namely this makes the following changes:
      * Both the server and the client add an additional algorithm to the
        initial KEXINIT message, indicating support for the strict KEX mode.
      * When one side of the connection sees the strict KEX extension
        algorithm, the strict KEX mode is enabled for messages originating
        from the other side of the connection. If the sequence number for
        the side which requested the extension is not 1 (indicating that it
        has already received non-KEXINIT packets), the connection is
        terminated.
      * When strict kex mode is enabled, unexpected messages during the
        handshake are considered fatal. Additionally when a key change
        occurs (on the receipt of the NEWKEYS message) the message sequence
        numbers are reset.
    
    Thanks to Fabian Bäumer, Marcus Brinkmann, and Jörg Schwenk from Ruhr
    University Bochum for reporting this issue.
    
    Fixes CVE-2023-48795
    Fixes golang/go#64784
    
    Change-Id: I96b53afd2bd2fb94d2b6f2a46a5dacf325357604
    Reviewed-on: https://go-review.googlesource.com/c/crypto/+/550715
    Reviewed-by: Nicola Murino <[email protected]>
    Reviewed-by: Tatiana Bradley <[email protected]>
    TryBot-Result: Gopher Robot <[email protected]>
    Run-TryBot: Roland Shoemaker <[email protected]>
    Reviewed-by: Damien Neil <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    rolandshoemaker committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    9d2ee97 View commit details
    Browse the repository at this point in the history
Loading