You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnerrors.New("Invalid policy name during channelless check policy. Name must be different from nil.")
290
+
}
291
+
292
+
ifcert==nil {
293
+
returnfmt.Errorf("Invalid cert during channelless check policy with policy [%s]", policyName)
294
+
}
295
+
296
+
gi, err:=p.getIdentityer()
297
+
iferr!=nil {
298
+
returnerr
299
+
}
300
+
301
+
id, err:=gi.GetIdentityFromCert(cert)
302
+
iferr!=nil {
303
+
logger.Warnw("Failed get identity during channelless check policy", "error", err, "policyName", policyName, "cert", cert)
304
+
returnfmt.Errorf("Failed get identity during channelless check policy with policy [%s]: [%s]", policyName, err)
305
+
}
306
+
307
+
// Load MSPPrincipal for policy
308
+
principal, err:=p.principalGetter.Get(policyName)
309
+
iferr!=nil {
310
+
returnfmt.Errorf("Failed getting local MSP principal during channelless check policy with policy [%s]: [%s]", policyName, err)
311
+
}
312
+
313
+
// Verify that proposal's creator satisfies the principal
314
+
err=id.SatisfiesPrincipal(principal)
315
+
iferr!=nil {
316
+
logger.Warnw("Failed verifying that identity satisfies local MSP principal during channelless check policy", "error", err, "policyName", policyName, "requiredPrincipal", principal)
317
+
returnfmt.Errorf("Failed verifying identity satisfies local MSP principal during channelless check policy with policy [%s]: [%s]", policyName, err)
0 commit comments