github.com/canhui/fabric_ca2_2@v2.0.0-alpha+incompatible/lib/client/credential/idemix/signerconfig.go (about)

     1  /*
     2  Copyright IBM Corp. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package idemix
     8  
     9  // SignerConfig contains the crypto material to set up an idemix signing identity
    10  type SignerConfig struct {
    11  	// Cred represents the serialized idemix credential of the default signer
    12  	Cred []byte `protobuf:"bytes,1,opt,name=Cred,proto3" json:"Cred,omitempty"`
    13  	// Sk is the secret key of the default signer, corresponding to credential Cred
    14  	Sk []byte `protobuf:"bytes,2,opt,name=Sk,proto3" json:"Sk,omitempty"`
    15  	// OrganizationalUnitIdentifier defines the organizational unit the default signer is in
    16  	OrganizationalUnitIdentifier string `protobuf:"bytes,3,opt,name=organizational_unit_identifier,json=organizationalUnitIdentifier" json:"organizational_unit_identifier,omitempty"`
    17  	// Role defines whether the default signer is admin, member, peer, or client
    18  	Role int `protobuf:"varint,4,opt,name=role,json=role" json:"role,omitempty"`
    19  	// EnrollmentID contains the enrollment id of this signer
    20  	EnrollmentID string `protobuf:"bytes,5,opt,name=enrollment_id,json=enrollmentId" json:"enrollment_id,omitempty"`
    21  	// CRI contains a serialized Credential Revocation Information
    22  	CredentialRevocationInformation []byte `protobuf:"bytes,6,opt,name=credential_revocation_information,json=credentialRevocationInformation,proto3" json:"credential_revocation_information,omitempty"`
    23  }
    24  
    25  // GetCred returns credential associated with this signer config
    26  func (s *SignerConfig) GetCred() []byte {
    27  	return s.Cred
    28  
    29  }
    30  
    31  // GetSk returns secret key associated with this signer config
    32  func (s *SignerConfig) GetSk() []byte {
    33  	return s.Sk
    34  }
    35  
    36  // GetOrganizationalUnitIdentifier returns OU of the user associated with this signer config
    37  func (s *SignerConfig) GetOrganizationalUnitIdentifier() string {
    38  	return s.OrganizationalUnitIdentifier
    39  }
    40  
    41  // GetRole returns true if the user associated with this signer config is an admin, else
    42  // returns role
    43  func (s *SignerConfig) GetRole() int {
    44  	return s.Role
    45  }
    46  
    47  // GetEnrollmentID returns enrollment ID of the user associated with this signer config
    48  func (s *SignerConfig) GetEnrollmentID() string {
    49  	return s.EnrollmentID
    50  }
    51  
    52  // GetCredentialRevocationInformation returns CRI
    53  func (s *SignerConfig) GetCredentialRevocationInformation() []byte {
    54  	return s.CredentialRevocationInformation
    55  }