@@ -86,8 +86,8 @@ type SaveChannelRequest struct {
8686 ChannelID string
8787 // Path to channel configuration file
8888 ChannelConfig string
89- // User that signs channel configuration
90- SigningIdentity context.Identity
89+ // Users that sign channel configuration
90+ SigningIdentities [] context.Identity
9191}
9292
9393//RequestOption func for each Opts argument
@@ -611,13 +611,17 @@ func (rc *Client) SaveChannel(req SaveChannelRequest, options ...RequestOption)
611611
612612 // Signing user has to belong to one of configured channel organisations
613613 // In case that order org is one of channel orgs we can use context user
614- var signer context.Identity = rc .context
615- if req .SigningIdentity != nil {
616- // Retrieve custom signing identity here
617- signer = req .SigningIdentity
618- }
614+ var signers []context.Identity
619615
620- if signer == nil {
616+ if len (req .SigningIdentities ) > 0 {
617+ for _ , id := range req .SigningIdentities {
618+ if id != nil {
619+ signers = append (signers , id )
620+ }
621+ }
622+ } else if rc .context != nil {
623+ signers = append (signers , rc .context )
624+ } else {
621625 return errors .New ("must provide signing user" )
622626 }
623627
@@ -631,18 +635,20 @@ func (rc *Client) SaveChannel(req SaveChannelRequest, options ...RequestOption)
631635 return errors .WithMessage (err , "extracting channel config failed" )
632636 }
633637
634- sigCtx := contextImpl.Client {
635- Identity : signer ,
636- Providers : rc .context ,
637- }
638+ var configSignatures []* common.ConfigSignature
639+ for _ , signer := range signers {
638640
639- configSignature , err := resource . CreateConfigSignature ( & sigCtx , chConfig )
640- if err != nil {
641- return errors . WithMessage ( err , "signing configuration failed" )
642- }
641+ sigCtx := contextImpl. Client {
642+ Identity : signer ,
643+ Providers : rc . context ,
644+ }
643645
644- var configSignatures []* common.ConfigSignature
645- configSignatures = append (configSignatures , configSignature )
646+ configSignature , err := resource .CreateConfigSignature (& sigCtx , chConfig )
647+ if err != nil {
648+ return errors .WithMessage (err , "signing configuration failed" )
649+ }
650+ configSignatures = append (configSignatures , configSignature )
651+ }
646652
647653 // Figure out orderer configuration
648654 var ordererCfg * core.OrdererConfig
0 commit comments