File tree 2 files changed +13
-0
lines changed
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ package blst
16
16
// #cgo loong64 mips64 mips64le ppc64 ppc64le riscv64 s390x CFLAGS: -D__BLST_NO_ASM__
17
17
//
18
18
// #include "blst.h"
19
+ // const char *go_blst_src_server_c();
19
20
//
20
21
// #if defined(__x86_64__) && (defined(__unix__) || defined(__APPLE__))
21
22
// # include <signal.h>
@@ -156,6 +157,7 @@ import "C"
156
157
import (
157
158
"fmt"
158
159
"math/bits"
160
+ "path/filepath"
159
161
"runtime"
160
162
"sync"
161
163
"sync/atomic"
@@ -217,6 +219,11 @@ var cgo_p1Generator = *C.blst_p1_generator()
217
219
var cgo_p2Generator = * C .blst_p2_generator ()
218
220
var cgo_fp12One = * C .blst_fp12_one ()
219
221
222
+ func SrcRoot () string {
223
+ path := C .GoString (C .go_blst_src_server_c ())
224
+ return filepath .Dir (filepath .Dir (path ))
225
+ }
226
+
220
227
// Secret key
221
228
func (sk * SecretKey ) Zeroize () {
222
229
var zero SecretKey
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ package blst
12
12
// #cgo loong64 mips64 mips64le ppc64 ppc64le riscv64 s390x CFLAGS: -D__BLST_NO_ASM__
13
13
//
14
14
// #include "blst.h"
15
+ // const char *go_blst_src_server_c();
15
16
//
16
17
// #if defined(__x86_64__) && (defined(__unix__) || defined(__APPLE__))
17
18
// # include <signal.h>
@@ -207,6 +208,11 @@ var cgo_p1Generator = *C.blst_p1_generator()
207
208
var cgo_p2Generator = *C.blst_p2_generator()
208
209
var cgo_fp12One = *C.blst_fp12_one()
209
210
211
+ func SrcRoot() string {
212
+ path := C.GoString(C.go_blst_src_server_c())
213
+ return filepath.Dir(filepath.Dir(path))
214
+ }
215
+
210
216
//
211
217
// Secret key
212
218
//
You can’t perform that action at this time.
0 commit comments