diff options
author | Jakob Unterwurzacher | 2021-09-04 12:01:50 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2021-09-07 18:14:05 +0200 |
commit | b8c56ccffc7d2512cb33434a4fb86467fea1e36f (patch) | |
tree | ed3dfac526ec508ed1c121d9971ba8b999c7b7ec /internal/stupidgcm/openssl.go | |
parent | 8f820c429d88f601ba6c7a614fef23b7f53eb489 (diff) |
stupidgcm: replace naked panics
Diffstat (limited to 'internal/stupidgcm/openssl.go')
-rw-r--r-- | internal/stupidgcm/openssl.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/stupidgcm/openssl.go b/internal/stupidgcm/openssl.go index 8e1357b..cb9845e 100644 --- a/internal/stupidgcm/openssl.go +++ b/internal/stupidgcm/openssl.go @@ -15,7 +15,7 @@ import "C" func openSSLSeal(a *stupidAEADCommon, dst, iv, in, authData []byte) []byte { if a.Wiped() { - panic("BUG: tried to use wiped key") + log.Panic("BUG: tried to use wiped key") } if len(iv) != a.NonceSize() { log.Panicf("Only %d-byte IVs are supported, you passed %d bytes", a.NonceSize(), len(iv)) @@ -59,7 +59,7 @@ func openSSLSeal(a *stupidAEADCommon, dst, iv, in, authData []byte) []byte { func openSSLOpen(a *stupidAEADCommon, dst, iv, in, authData []byte) ([]byte, error) { if a.Wiped() { - panic("BUG: tried to use wiped key") + log.Panic("BUG: tried to use wiped key") } if len(iv) != a.NonceSize() { log.Panicf("Only %d-byte IVs are supported, you passed %d bytes", a.NonceSize(), len(iv)) |