Skip to content

Commit

Permalink
Merge pull request #534 from fluxcd/pgp-pk-nil
Browse files Browse the repository at this point in the history
Check if GPG private key is nil before decrypting
  • Loading branch information
aryan9600 authored Jun 7, 2023
2 parents a85f25d + faf265e commit 7c0529b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/controller/imageupdateautomation_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ func (r *ImageUpdateAutomationReconciler) getSigningEntity(ctx context.Context,
}

entity := entities[0]
if entity.PrivateKey.Encrypted {
if entity.PrivateKey != nil && entity.PrivateKey.Encrypted {
passphrase, ok := secret.Data[signingPassphraseKey]
if !ok {
return nil, fmt.Errorf("can not use passphrase protected signing key without '%s' field present in secret %s",
Expand Down

0 comments on commit 7c0529b

Please sign in to comment.