File tree 5 files changed +23
-10
lines changed
5 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 38
38
39
39
steps :
40
40
- name : Checkout repository
41
- uses : actions/checkout@v2
41
+ uses : actions/checkout@v4
42
42
43
43
# Initializes the CodeQL tools for scanning.
44
44
- name : Initialize CodeQL
Original file line number Diff line number Diff line change 9
9
timeout-minutes : 15
10
10
runs-on : ubuntu-latest
11
11
container :
12
- image : golang:1.20.12-bullseye
12
+ image : golang:bookworm
13
13
options : --ulimit core=-1 --ulimit memlock=-1:-1
14
14
steps :
15
15
- uses : actions/checkout@v2
@@ -32,11 +32,12 @@ jobs:
32
32
timeout-minutes : 15
33
33
runs-on : ' macos-latest'
34
34
steps :
35
- - uses : actions/checkout@v2
35
+ - uses : actions/checkout@v4
36
36
- name : Set up Go
37
- uses : actions/setup-go@v2
37
+ uses : actions/setup-go@v5
38
38
with :
39
- go-version : 1.20.12
39
+ go-version : 1.24
40
+ check-latest : ' true'
40
41
- name : Build for MacOS
41
42
run : scripts/macos-build.sh
42
43
- name : Publish MacOS sha256sums
Original file line number Diff line number Diff line change 11
11
timeout-minutes : 15
12
12
runs-on : ubuntu-latest
13
13
container :
14
- image : golang:1.20.12-bullseye
14
+ image : golang:bookworm
15
15
options : --ulimit core=-1 --ulimit memlock=-1:-1
16
16
steps :
17
17
- uses : actions/checkout@v2
@@ -28,10 +28,11 @@ jobs:
28
28
timeout-minutes : 15
29
29
runs-on : ' macos-latest'
30
30
steps :
31
- - uses : actions/checkout@v2
31
+ - uses : actions/checkout@v4
32
32
- name : Set up Go
33
- uses : actions/setup-go@v2
33
+ uses : actions/setup-go@v5
34
34
with :
35
- go-version : 1.20.12
35
+ go-version : 1.24
36
+ check-latest : ' true'
36
37
- name : Build for MacOS
37
38
run : scripts/macos-build.sh
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
11
11
"github.com/godaddy/asherah/go/appencryption"
12
12
"github.com/godaddy/asherah/go/appencryption/pkg/crypto/aead"
13
13
"github.com/godaddy/asherah/go/appencryption/pkg/kms"
14
+ asherahLog "github.com/godaddy/asherah/go/appencryption/pkg/log"
14
15
"github.com/godaddy/asherah/go/appencryption/pkg/persistence"
15
16
"github.com/godaddy/asherah/go/securememory/memguard"
16
17
)
@@ -22,12 +23,22 @@ var ErrAsherahAlreadyInitialized = errors.New("asherah already initialized")
22
23
var ErrAsherahNotInitialized = errors .New ("asherah not initialized" )
23
24
var ErrAsherahFailedInitialization = errors .New ("asherah failed initialization" )
24
25
26
+ type logFunc func (format string , v ... interface {})
27
+
28
+ func (f logFunc ) Debugf (format string , v ... interface {}) {
29
+ f (format , v ... )
30
+ }
31
+
25
32
func Setup (options * Options ) error {
26
33
if atomic .LoadInt32 (& globalInitialized ) == 1 {
27
34
log .ErrorLog ("Failed to initialize asherah: already initialized" )
28
35
return ErrAsherahAlreadyInitialized
29
36
}
30
37
38
+ if options .Verbose && log .DebugLogf != nil {
39
+ asherahLog .SetLogger (logFunc (log .DebugLogf ))
40
+ }
41
+
31
42
crypto := aead .NewAES256GCM ()
32
43
33
44
if options .SessionCacheMaxSize == 0 {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import (
10
10
"github.com/godaddy/cobhan-go"
11
11
)
12
12
13
- var Verbose = true
13
+ var Verbose = false
14
14
15
15
func setupAsherahForTesting (t * testing.T ) {
16
16
config := & asherah.Options {}
You can’t perform that action at this time.
0 commit comments