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