File tree Expand file tree Collapse file tree 5 files changed +23
-10
lines changed
Expand file tree Collapse file tree 5 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 3838
3939 steps :
4040 - name : Checkout repository
41- uses : actions/checkout@v2
41+ uses : actions/checkout@v4
4242
4343 # Initializes the CodeQL tools for scanning.
4444 - name : Initialize CodeQL
Original file line number Diff line number Diff line change 99 timeout-minutes : 15
1010 runs-on : ubuntu-latest
1111 container :
12- image : golang:1.20.12-bullseye
12+ image : golang:bookworm
1313 options : --ulimit core=-1 --ulimit memlock=-1:-1
1414 steps :
1515 - uses : actions/checkout@v2
@@ -32,11 +32,12 @@ jobs:
3232 timeout-minutes : 15
3333 runs-on : ' macos-latest'
3434 steps :
35- - uses : actions/checkout@v2
35+ - uses : actions/checkout@v4
3636 - name : Set up Go
37- uses : actions/setup-go@v2
37+ uses : actions/setup-go@v5
3838 with :
39- go-version : 1.20.12
39+ go-version : 1.24
40+ check-latest : ' true'
4041 - name : Build for MacOS
4142 run : scripts/macos-build.sh
4243 - name : Publish MacOS sha256sums
Original file line number Diff line number Diff line change 1111 timeout-minutes : 15
1212 runs-on : ubuntu-latest
1313 container :
14- image : golang:1.20.12-bullseye
14+ image : golang:bookworm
1515 options : --ulimit core=-1 --ulimit memlock=-1:-1
1616 steps :
1717 - uses : actions/checkout@v2
@@ -28,10 +28,11 @@ jobs:
2828 timeout-minutes : 15
2929 runs-on : ' macos-latest'
3030 steps :
31- - uses : actions/checkout@v2
31+ - uses : actions/checkout@v4
3232 - name : Set up Go
33- uses : actions/setup-go@v2
33+ uses : actions/setup-go@v5
3434 with :
35- go-version : 1.20.12
35+ go-version : 1.24
36+ check-latest : ' true'
3637 - name : Build for MacOS
3738 run : scripts/macos-build.sh
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
1111 "github.com/godaddy/asherah/go/appencryption"
1212 "github.com/godaddy/asherah/go/appencryption/pkg/crypto/aead"
1313 "github.com/godaddy/asherah/go/appencryption/pkg/kms"
14+ asherahLog "github.com/godaddy/asherah/go/appencryption/pkg/log"
1415 "github.com/godaddy/asherah/go/appencryption/pkg/persistence"
1516 "github.com/godaddy/asherah/go/securememory/memguard"
1617)
@@ -22,12 +23,22 @@ var ErrAsherahAlreadyInitialized = errors.New("asherah already initialized")
2223var ErrAsherahNotInitialized = errors .New ("asherah not initialized" )
2324var ErrAsherahFailedInitialization = errors .New ("asherah failed initialization" )
2425
26+ type logFunc func (format string , v ... interface {})
27+
28+ func (f logFunc ) Debugf (format string , v ... interface {}) {
29+ f (format , v ... )
30+ }
31+
2532func Setup (options * Options ) error {
2633 if atomic .LoadInt32 (& globalInitialized ) == 1 {
2734 log .ErrorLog ("Failed to initialize asherah: already initialized" )
2835 return ErrAsherahAlreadyInitialized
2936 }
3037
38+ if options .Verbose && log .DebugLogf != nil {
39+ asherahLog .SetLogger (logFunc (log .DebugLogf ))
40+ }
41+
3142 crypto := aead .NewAES256GCM ()
3243
3344 if options .SessionCacheMaxSize == 0 {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import (
1010 "github.com/godaddy/cobhan-go"
1111)
1212
13- var Verbose = true
13+ var Verbose = false
1414
1515func setupAsherahForTesting (t * testing.T ) {
1616 config := & asherah.Options {}
You can’t perform that action at this time.
0 commit comments