summaryrefslogtreecommitdiff
path: root/cli/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/panic_cb.go
diff options
context:
space:
mode:
authord0x471b <0x471@protonmail.com>2022-12-31 03:45:30 +0300
committerd0x471b <0x471@protonmail.com>2022-12-31 03:45:30 +0300
commit0f1d7d51de1baa21256fdb7ddafe54aab66172f7 (patch)
tree30373f9b64ba6301096f26cdade55ebac4f5e59f /cli/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/panic_cb.go
parent517ad8d13a6b23328927154226575605be70669f (diff)
Add webappHEADmaster
Diffstat (limited to 'cli/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/panic_cb.go')
-rw-r--r--cli/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/panic_cb.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/cli/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/panic_cb.go b/cli/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/panic_cb.go
new file mode 100644
index 0000000..a30b04f
--- /dev/null
+++ b/cli/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/panic_cb.go
@@ -0,0 +1,24 @@
+// Copyright 2015 Jeffrey Wilcke, Felix Lange, Gustav Simonsson. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be found in
+// the LICENSE file.
+
+//go:build !gofuzz && cgo
+// +build !gofuzz,cgo
+
+package secp256k1
+
+import "C"
+import "unsafe"
+
+// Callbacks for converting libsecp256k1 internal faults into
+// recoverable Go panics.
+
+//export secp256k1GoPanicIllegal
+func secp256k1GoPanicIllegal(msg *C.char, data unsafe.Pointer) {
+ panic("illegal argument: " + C.GoString(msg))
+}
+
+//export secp256k1GoPanicError
+func secp256k1GoPanicError(msg *C.char, data unsafe.Pointer) {
+ panic("internal error: " + C.GoString(msg))
+}