@@ -253,12 +253,12 @@ func (v *Verifier) executePlugin(ctx context.Context, trustPolicy *TrustPolicy,
253
253
if err != nil {
254
254
return nil , err
255
255
}
256
- var attributesToProcess []interface {}
257
- extendedAttributes := make (map [interface {} ]interface {})
256
+ var attributesToProcess []string
257
+ extendedAttributes := make (map [string ]interface {})
258
258
259
259
for _ , attr := range getNonPluginExtendedCriticalAttributes (signerInfo ) {
260
- extendedAttributes [attr .Key ] = attr .Value
261
- attributesToProcess = append (attributesToProcess , attr .Key )
260
+ extendedAttributes [attr .Key .( string ) ] = attr .Value
261
+ attributesToProcess = append (attributesToProcess , attr .Key .( string ) )
262
262
}
263
263
264
264
var certChain [][]byte
@@ -316,10 +316,10 @@ func getNonPluginExtendedCriticalAttributes(signerInfo *signature.SignerInfo) []
316
316
var criticalExtendedAttrs []signature.Attribute
317
317
for _ , attr := range signerInfo .SignedAttributes .ExtendedAttributes {
318
318
attrStrKey , ok := attr .Key .(string )
319
- if ok && isPresent (attrStrKey , VerificationPluginHeaders ) { // filter the plugin extended attributes
320
- continue
319
+ if ok && ! isPresent (attrStrKey , VerificationPluginHeaders ) { // filter the plugin extended attributes
320
+ // TODO support other attribute types (COSE attribute keys can be numbers)
321
+ criticalExtendedAttrs = append (criticalExtendedAttrs , attr )
321
322
}
322
- criticalExtendedAttrs = append (criticalExtendedAttrs , attr )
323
323
}
324
324
return criticalExtendedAttrs
325
325
}
0 commit comments