certs

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCAInfo

func GetCAInfo(params GetCAInfoRequest) (*lib.GetCAInfoResponse, error)

func GetClient

func GetClient(ca FabricCAParams) (*lib.Client, error)

func ReenrollUser added in v1.9.0

func ReenrollUser(params ReenrollUserRequest, certPem string, ecdsaKey *ecdsa.PrivateKey) (*x509.Certificate, *x509.Certificate, error)

func RegisterUser

func RegisterUser(params RegisterUserRequest) (string, error)

Types

type EnrollUserRequest

type EnrollUserRequest struct {
	TLSCert    string
	URL        string
	Name       string
	MSPID      string
	User       string
	Secret     string
	Hosts      []string
	CN         string
	Profile    string
	Attributes []*api.AttributeRequest
}

type FabricCAParams

type FabricCAParams struct {
	TLSCert      string
	URL          string
	Name         string
	MSPID        string
	EnrollID     string
	EnrollSecret string
}

type FabricConfig

type FabricConfig struct {
	Name                   string                     `yaml:"name"`
	Version                string                     `yaml:"version"`
	Client                 FabricConfigClient         `yaml:"client"`
	Organizations          map[string]FabricConfigOrg `yaml:"organizations"`
	CertificateAuthorities map[string]FabricConfigCA  `yaml:"certificateAuthorities"`
}

type FabricConfigCA

type FabricConfigCA struct {
	URL         string            `yaml:"url"`
	CaName      string            `yaml:"caName"`
	TLSCACerts  FabricMultiplePem `yaml:"tlsCACerts"`
	Registrar   FabricRegistrar   `yaml:"registrar"`
	HTTPOptions FabricHttpOptions `yaml:"httpOptions"`
}

type FabricConfigClient

type FabricConfigClient struct {
	Organization    string                 `yaml:"organization"`
	CredentialStore FabricCredentialStore  `yaml:"credentialStore,omitempty"`
	Connection      FabricConfigConnection `yaml:"connection"`
}

type FabricConfigConnection

type FabricConfigConnection struct {
	Timeout FabricConfigTimeout `yaml:"timeout"`
}

type FabricConfigOrg

type FabricConfigOrg struct {
	Mspid                  string                      `yaml:"mspid"`
	CryptoPath             string                      `yaml:"cryptoPath"`
	Users                  map[string]FabricConfigUser `yaml:"users,omitempty"`
	CredentialStore        FabricCredentialStore       `yaml:"credentialStore,omitempty"`
	CertificateAuthorities []string                    `yaml:"certificateAuthorities"`
}

type FabricConfigTimeout

type FabricConfigTimeout struct {
	Peer FabricConfigTimeoutParams `yaml:"peer"`
}

type FabricConfigTimeoutParams

type FabricConfigTimeoutParams struct {
	Endorser string `yaml:"endorser"`
}

type FabricConfigUser

type FabricConfigUser struct {
	Key  FabricPem `yaml:"key"`
	Cert FabricPem `yaml:"cert"`
}

type FabricCredentialStore

type FabricCredentialStore struct {
	Path        string            `yaml:"path"`
	CryptoStore FabricCryptoStore `yaml:"cryptoStore"`
}

type FabricCryptoStore

type FabricCryptoStore struct {
	Path string `yaml:"path"`
}

type FabricHttpOptions

type FabricHttpOptions struct {
	Verify bool `yaml:"verify"`
}

type FabricMultiplePem

type FabricMultiplePem struct {
	Pem []string `yaml:"pem"`
}

type FabricPem

type FabricPem struct {
	Pem string `yaml:"pem"`
}

type FabricRegistrar

type FabricRegistrar struct {
	EnrollID     string `yaml:"enrollId"`
	EnrollSecret string `yaml:"enrollSecret"`
}

type GetCAInfoRequest

type GetCAInfoRequest struct {
	TLSCert string
	URL     string
	Name    string
	MSPID   string
}

type GetUserRequest

type GetUserRequest struct {
	TLSCert      string
	URL          string
	Name         string
	MSPID        string
	EnrollID     string
	EnrollSecret string
	User         string
}

type ReenrollUserRequest added in v1.9.0

type ReenrollUserRequest struct {
	EnrollID   string
	TLSCert    string
	URL        string
	Name       string
	MSPID      string
	Hosts      []string
	CN         string
	Profile    string
	Attributes []*api.AttributeRequest
}

type RegisterUserRequest

type RegisterUserRequest struct {
	TLSCert      string
	URL          string
	Name         string
	MSPID        string
	EnrollID     string
	EnrollSecret string
	User         string
	Secret       string
	Type         string
	Attributes   []api.Attribute
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL