diff options
| author | Russ Cox <rsc@golang.org> | 2022-05-04 08:58:02 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2022-06-06 19:10:07 +0000 |
| commit | ea5d7cbc2644643331bd675b1ebdf0aaac7419f1 (patch) | |
| tree | 51defc956fb6b4410c1523d84ab42220f170233d /src/crypto/internal | |
| parent | 6c7b223c2bfa700d9e1dc53d58c1c998493126e0 (diff) | |
| download | go-ea5d7cbc2644643331bd675b1ebdf0aaac7419f1.tar.xz | |
all: boringcrypto post-merge cleanup
This CL addresses the comments on CL 403154.
For #51940.
Change-Id: I99bb3530916d469077bfbd53095bfcd1d2aa82ef
Reviewed-on: https://go-review.googlesource.com/c/go/+/403976
Reviewed-by: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/crypto/internal')
| -rw-r--r-- | src/crypto/internal/boring/aes.go | 7 | ||||
| -rw-r--r-- | src/crypto/internal/boring/notboring.go | 1 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/crypto/internal/boring/aes.go b/src/crypto/internal/boring/aes.go index 515b60bb8a..eaa1adc892 100644 --- a/src/crypto/internal/boring/aes.go +++ b/src/crypto/internal/boring/aes.go @@ -72,9 +72,6 @@ type extraModes interface { NewCBCDecrypter(iv []byte) cipher.BlockMode NewCTR(iv []byte) cipher.Stream NewGCM(nonceSize, tagSize int) (cipher.AEAD, error) - - // Invented for BoringCrypto. - NewGCMTLS() (cipher.AEAD, error) } var _ extraModes = (*aesCipher)(nil) @@ -235,8 +232,8 @@ func (c *aesCipher) NewGCM(nonceSize, tagSize int) (cipher.AEAD, error) { return c.newGCM(false) } -func (c *aesCipher) NewGCMTLS() (cipher.AEAD, error) { - return c.newGCM(true) +func NewGCMTLS(c cipher.Block) (cipher.AEAD, error) { + return c.(*aesCipher).newGCM(true) } func (c *aesCipher) newGCM(tls bool) (cipher.AEAD, error) { diff --git a/src/crypto/internal/boring/notboring.go b/src/crypto/internal/boring/notboring.go index bb88fb0004..53096a68d1 100644 --- a/src/crypto/internal/boring/notboring.go +++ b/src/crypto/internal/boring/notboring.go @@ -50,6 +50,7 @@ func SHA512([]byte) [64]byte { panic("boringcrypto: not available") } func NewHMAC(h func() hash.Hash, key []byte) hash.Hash { panic("boringcrypto: not available") } func NewAESCipher(key []byte) (cipher.Block, error) { panic("boringcrypto: not available") } +func NewGCMTLS(cipher.Block) (cipher.AEAD, error) { panic("boringcrypto: not available") } type PublicKeyECDSA struct{ _ int } type PrivateKeyECDSA struct{ _ int } |
