fix!: Remove sha1 dependency (#379)

Removed cryptographically insecure sha1. This existed only for OPA
compatibility.

Also exclude bindings from main workspace

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2025-03-13 12:34:11 -07:00
committed by GitHub
parent c6a5f1d852
commit 4a2df93ae2
19 changed files with 28 additions and 58 deletions

View File

@@ -1,6 +1,6 @@
package regorus
// #cgo LDFLAGS: -L ../../../../target/release -lregorus_ffi
// #cgo LDFLAGS: -L ../../../ffi/target/release -lregorus_ffi
// #include "../../../ffi/regorus.h"
import "C"
import (
@@ -28,7 +28,7 @@ func (e *Engine) Clone() *Engine {
return c
}
func (e *Engine) SetRegoV0(enable bool) (error) {
func (e *Engine) SetRegoV0(enable bool) error {
result := C.regorus_engine_set_rego_v0(e.e, C.bool(enable))
defer C.regorus_result_drop(result)
@@ -84,7 +84,6 @@ func (e *Engine) GetPolicies() (string, error) {
return C.GoString(result.output), nil
}
func (e *Engine) AddDataJson(data string) error {
data_c := C.CString(data)
defer C.free(unsafe.Pointer(data_c))