@@ -79,7 +79,7 @@ func (o *VerifyImageSignatureOptions) Complete(f *clientcmd.Factory, cmd *cobra.
79
79
// .gnupg/pubring.gpg will be ignored.
80
80
if len (o .PublicKeyFilename ) > 0 {
81
81
if o .Remove {
82
- return kcmdutil .UsageError (cmd , "cannot use public key when removing verifications status" )
82
+ return kcmdutil .UsageError (cmd , "cannot use public key when removing verification status" )
83
83
}
84
84
if o .PublicKey , err = ioutil .ReadFile (o .PublicKeyFilename ); err != nil {
85
85
return err
@@ -174,10 +174,10 @@ func (o *VerifyImageSignatureOptions) verifyImageIdentity(reference, digest stri
174
174
return nil
175
175
}
176
176
177
- // removeImageSignature removes the current image signature from the Image object by
177
+ // clearSignatureVerificationStatus removes the current image signature from the Image object by
178
178
// erasing all signature fields that were previously set (when image signature was
179
179
// previously verified).
180
- func (o * VerifyImageSignatureOptions ) removeImageSignature (s * imageapi.ImageSignature ) {
180
+ func (o * VerifyImageSignatureOptions ) clearSignatureVerificationStatus (s * imageapi.ImageSignature ) {
181
181
s .Conditions = []imageapi.SignatureCondition {}
182
182
s .IssuedBy = nil
183
183
}
@@ -196,7 +196,7 @@ func (o *VerifyImageSignatureOptions) Run() error {
196
196
// signatures.
197
197
// TODO: This should probably need to handle removal of a single signature.
198
198
if o .Remove {
199
- o .removeImageSignature (& img .Signatures [i ])
199
+ o .clearSignatureVerificationStatus (& img .Signatures [i ])
200
200
continue
201
201
}
202
202
@@ -220,7 +220,7 @@ func (o *VerifyImageSignatureOptions) Run() error {
220
220
// If we have error and --confirm then remove the signature from the image which
221
221
// changes the image to "unverified" state.
222
222
if signatureErr != nil || signatureContentErr != nil || identityError != nil {
223
- o .removeImageSignature (& img .Signatures [i ])
223
+ o .clearSignatureVerificationStatus (& img .Signatures [i ])
224
224
continue
225
225
}
226
226
0 commit comments