From c3f6b7dc5f7da9dcc9c67e43e56425fe21ec35cf Mon Sep 17 00:00:00 2001 From: yuhan6665 <1588741+yuhan6665@users.noreply.github.com> Date: Sat, 10 May 2025 14:34:55 -0400 Subject: [PATCH] crypto/internal/hpke: rename Receipient to Recipient receipient -> recipient Change-Id: I9ed5937acf0f3808283e35221f8b4f41408eee7c GitHub-Last-Rev: 0ed5ff7 GitHub-Pull-Request: #73131 Reviewed-on: https://go-review.googlesource.com/c/go/+/662175 Reviewed-by: Carlos Amedee Auto-Submit: Jorropo Auto-Submit: Filippo Valsorda Reviewed-by: Jorropo LUCI-TryBot-Result: Go LUCI Reviewed-by: Filippo Valsorda Reviewed-by: Dmitri Shuralyov Reviewed-by: Daniel McCarney --- ech.go | 4 ++-- handshake_server_tls13.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ech.go b/ech.go index 9428cc0..608f21b 100644 --- a/ech.go +++ b/ech.go @@ -389,7 +389,7 @@ func decodeInnerClientHello(outer *clientHelloMsg, encoded []byte) (*clientHello return inner, nil } -func decryptECHPayload(context *hpke.Receipient, hello, payload []byte) ([]byte, error) { +func decryptECHPayload(context *hpke.Recipient, hello, payload []byte) ([]byte, error) { outerAAD := bytes.Replace(hello[4:], payload, make([]byte, len(payload)), 1) return context.Open(outerAAD, payload) } @@ -577,7 +577,7 @@ func (c *Conn) processECHClientHello(outer *clientHelloMsg) (*clientHelloMsg, *e return nil, nil, fmt.Errorf("tls: invalid EncryptedClientHelloKeys PrivateKey: %s", err) } info := append([]byte("tls ech\x00"), echKey.Config...) - hpkeContext, err := hpke.SetupReceipient(hpke.DHKEM_X25519_HKDF_SHA256, echCiphersuite.KDFID, echCiphersuite.AEADID, echPriv, info, encap) + hpkeContext, err := hpke.SetupRecipient(hpke.DHKEM_X25519_HKDF_SHA256, echCiphersuite.KDFID, echCiphersuite.AEADID, echPriv, info, encap) if err != nil { // attempt next trial decryption continue diff --git a/handshake_server_tls13.go b/handshake_server_tls13.go index 9a428c6..3c560c9 100644 --- a/handshake_server_tls13.go +++ b/handshake_server_tls13.go @@ -35,7 +35,7 @@ import ( const maxClientPSKIdentities = 5 type echServerContext struct { - hpkeContext *hpke.Receipient + hpkeContext *hpke.Recipient configID uint8 ciphersuite echCipher transcript hash.Hash