Documentation ¶
Index ¶
- Variables
- func NewDefaultTxHandler(disableKDF bool) *txHandlerDefault
- func NewEndorser(cer *x509.Certificate, key crypto.PrivateKey) (*localTxEndorserDefault, error)
- func NewPeerCredential(cer *x509.Certificate, key crypto.PrivateKey, pool []*x509.Certificate) (*localPeersCredentialDefault, error)
- func NewX509ExtVerifer(certs []*x509.Certificate) *x509ExtVerifier
- func PeerMessageEncoding(msg *pb.Message) []byte
- type CertLoader
- func (c CertLoader) LoadSchemePool(vp *viper.Viper) map[string]*certScheme
- func (c CertLoader) LoadX509CertPool(vp *viper.Viper) (*x509.CertPool, error)
- func (c CertLoader) LoadX509KeyPair(vp *viper.Viper) (*x509.Certificate, crypto.PrivateKey, error)
- func (c CertLoader) MustLoadX509KeyPair(vp *viper.Viper) (*x509.Certificate, crypto.PrivateKey, error)
- type ObjIdIndex
- type SchemePool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotInitialized Initialization required ErrNotInitialized = errors.New("Initialization required.") // ErrAlreadyInitialized Already initialized ErrAlreadyInitialized = errors.New("Already initialized.") // ErrAlreadyRegistered Already registered ErrAlreadyRegistered = errors.New("Already registered.") // ErrTransactionMissingCert Transaction missing certificate or signature ErrTransactionMissingCert = errors.New("Transaction missing certificate or signature.") // ErrInvalidTransactionSignature Invalid Transaction Signature ErrInvalidTransactionSignature = errors.New("Invalid Transaction Signature.") // ErrTransactionCertificate Missing Transaction Certificate ErrTransactionCertificate = errors.New("Missing Transaction Certificate.") // ErrTransactionSignature Missing Transaction Signature ErrTransactionSignature = errors.New("Missing Transaction Signature.") // ErrInvalidSignature Invalid Certificate ErrCertificate = errors.New("Invalid Certificate.") // ErrInvalidSignature Invalid Signature ErrInvalidSignature = errors.New("Invalid Signature.") // ErrInvalidKey Invalid key ErrInvalidKey = errors.New("Invalid key.") // ErrInvalidReference Invalid reference ErrInvalidReference = errors.New("Invalid reference.") // ErrNilArgument Invalid reference ErrNilArgument = errors.New("Nil argument.") // ErrNotImplemented Not implemented ErrNotImplemented = errors.New("Not implemented.") // ErrKeyStoreAlreadyInitialized Keystore already Initilized ErrKeyStoreAlreadyInitialized = errors.New("Keystore already Initilized.") // ErrEncrypt Encryption failed ErrEncrypt = errors.New("Encryption failed.") // ErrDecrypt Decryption failed ErrDecrypt = errors.New("Decryption failed.") // ErrDifferentChaincodeID ChaincodeIDs are different ErrDifferentChaincodeID = errors.New("ChaincodeIDs are different.") // ErrDifferrentConfidentialityProtocolVersion different confidentiality protocol versions ErrDifferrentConfidentialityProtocolVersion = errors.New("Confidentiality protocol versions are different.") // ErrInvalidConfidentialityLevel Invalid confidentiality level ErrInvalidConfidentialityLevel = errors.New("Invalid confidentiality level") // ErrInvalidConfidentialityProtocol Invalid confidentiality level ErrInvalidConfidentialityProtocol = errors.New("Invalid confidentiality protocol") // ErrInvalidTransactionType Invalid transaction type ErrInvalidTransactionType = errors.New("Invalid transaction type") // ErrInvalidProtocolVersion Invalid protocol version ErrInvalidProtocolVersion = errors.New("Invalid protocol version") )
View Source
var ( HyperledgerFabricAttrHId = asn1.ObjectIdentifier{1, 2, 3, 4, 5, 6, 9} HyperledgerFabricTCertId = asn1.ObjectIdentifier{1, 2, 3, 4, 5, 6, 7} )
Functions ¶
func NewDefaultTxHandler ¶
func NewDefaultTxHandler(disableKDF bool) *txHandlerDefault
func NewEndorser ¶
func NewEndorser(cer *x509.Certificate, key crypto.PrivateKey) (*localTxEndorserDefault, error)
func NewPeerCredential ¶
func NewPeerCredential(cer *x509.Certificate, key crypto.PrivateKey, pool []*x509.Certificate) (*localPeersCredentialDefault, error)
func NewX509ExtVerifer ¶
func NewX509ExtVerifer(certs []*x509.Certificate) *x509ExtVerifier
func PeerMessageEncoding ¶
Types ¶
type CertLoader ¶
type CertLoader struct {
// contains filtered or unexported fields
}
func AddPredefineSchemes ¶
func AddPredefineSchemes(l CertLoader, pool SchemePool) CertLoader
func NewLoader ¶
func NewLoader(p persistor) CertLoader
func (CertLoader) LoadSchemePool ¶
func (c CertLoader) LoadSchemePool(vp *viper.Viper) map[string]*certScheme
only consider key/cert entry (i.e.: rootcert is not considered)
func (CertLoader) LoadX509CertPool ¶
func (CertLoader) LoadX509KeyPair ¶
func (c CertLoader) LoadX509KeyPair(vp *viper.Viper) (*x509.Certificate, crypto.PrivateKey, error)
func (CertLoader) MustLoadX509KeyPair ¶
func (c CertLoader) MustLoadX509KeyPair(vp *viper.Viper) (*x509.Certificate, crypto.PrivateKey, error)
enforce the key must existed
type ObjIdIndex ¶
type ObjIdIndex struct {
// contains filtered or unexported fields
}
func (*ObjIdIndex) AddItem ¶
func (i *ObjIdIndex) AddItem(v interface{}, objid asn1.ObjectIdentifier)
func (*ObjIdIndex) GetItem ¶
func (i *ObjIdIndex) GetItem(objid asn1.ObjectIdentifier) (interface{}, bool, asn1.ObjectIdentifier)
type SchemePool ¶
type SchemePool map[string]*certScheme
Click to show internal directories.
Click to hide internal directories.