Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix#117 #118

Merged
merged 1 commit into from
Feb 15, 2022
Merged
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
8 changes: 4 additions & 4 deletions controllers/secrettokeystore/secret_to_keystore_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ func compareKeyStoreBinary(a, b, password []byte, flog logr.Logger) bool {
flog.Error(err, "unable to loadkeystore")
return false
}
return compareKeyStore(aKeyStore, bKeyStore, flog)
return compareKeyStore(aKeyStore, bKeyStore, password, flog)
}

func compareKeyStore(a, b keystore.KeyStore, flog logr.Logger) bool {
func compareKeyStore(a, b keystore.KeyStore, password []byte, flog logr.Logger) bool {
aliasesASet := strset.New(a.Aliases()...)
aleasesBSet := strset.New(b.Aliases()...)
if !aliasesASet.IsEqual(aleasesBSet) {
Expand Down Expand Up @@ -208,12 +208,12 @@ func compareKeyStore(a, b keystore.KeyStore, flog logr.Logger) bool {
if !b.IsPrivateKeyEntry(alias) {
return false
}
PKEA, err := a.GetPrivateKeyEntry(alias, []byte{})
PKEA, err := a.GetPrivateKeyEntry(alias, password)
if err != nil {
flog.Error(err, "unable to get private key entry for", "alias", alias)
return false
}
PKEB, err := b.GetPrivateKeyEntry(alias, []byte{})
PKEB, err := b.GetPrivateKeyEntry(alias, password)
if err != nil {
flog.Error(err, "unable to get private key entry for", "alias", alias)
return false
Expand Down