Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bind/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"reflect"

"github.com/keybase/go-keychain"
"github.com/cloudengio/go-keychain"
)

// Test is a bind interface for the test
Expand Down
2 changes: 1 addition & 1 deletion bindtest/bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package bindtest
import (
"testing"

"github.com/keybase/go-keychain/bind"
"github.com/cloudengio/go-keychain/bind"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/keybase/go-keychain
module github.com/cloudengio/go-keychain

go 1.21

Expand Down
11 changes: 11 additions & 0 deletions keychain.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ var (
CreationDateKey = attrKey(C.CFTypeRef(C.kSecAttrCreationDate))
// ModificationDateKey is for kSecAttrModificationDate
ModificationDateKey = attrKey(C.CFTypeRef(C.kSecAttrModificationDate))

DataProtectionKeyChainKey = attrKey(C.CFTypeRef(C.kSecUseDataProtectionKeychain))
)

// Synchronizable is the items synchronizable status
Expand Down Expand Up @@ -362,6 +364,15 @@ func (k *Item) SetSynchronizable(sync Synchronizable) {
}
}

// SetDataProtectionKeyChain sets the data protection keychain attribute.
func (k *Item) SetDataProtectionKeyChain(value bool) {
if value {
k.attr[DataProtectionKeyChainKey] = true
} else {
delete(k.attr, DataProtectionKeyChainKey)
}
}

// SetAccessible sets the accessible attribute
func (k *Item) SetAccessible(accessible Accessible) {
if accessible != AccessibleDefault {
Expand Down