package
2.0.0-alpha+incompatible
Repository: https://github.com/hyperledger-gerrit-archive/fabric-ca.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

B64Decode base64 decodes a string.
B64Encode base64 encodes bytes.
BccspBackedSigner attempts to create a signer using csp bccsp.BCCSP.
BCCSPKeyRequestGenerate generates keys through BCCSP somewhat mirroring to cfssl/req.KeyRequest.Generate().
CheckHostsInCert checks to see if host correctly inserted into certificate.
CmdRunBegin is called at the beginning of each cobra run function.
ConfigureBCCSP configures BCCSP, using.
CopyMissingValues checks the dst interface for missing values and replaces them with value from src config struct.
CreateClientHome will create a home directory if it does not exist.
CreateToken creates a JWT-like token.
DecodeToken extracts an X509 certificate and base64 encoded signature from a token.
ErrorContains will check to see if an error occurred, if so it will check that it contains the appropriate error message.
Fatal logs a fatal message and exits.
FatalError will check to see if an error occured if so it will cause the test cases exit.
FileExists checks to see if a file exists.
FlagString sets up a flag for a string, binding it to its name.
GenECDSAToken signs the http body and cert with ECDSA using EC private key.
GetBCCSP returns BCCSP.
GetCertificateDuration returns the validity duration for a certificate.
GetCertificateDurationFromFile returns the validity duration for a certificate in a file.
GetCommandLineOptValue searches the command line arguments for the specified option and returns the following value if found; otherwise it returns "".
GetDefaultBCCSP returns the default BCCSP.
GetDefaultConfigFile gets the default path for the config file to display in usage message.
GetECPrivateKey get *ecdsa.PrivateKey from key pem.
GetEnrollmentIDFromPEM returns the EnrollmentID from a PEM buffer.
GetEnrollmentIDFromX509Certificate returns the EnrollmentID from the X509 certificate.
GetMaskedURL returns masked URL.
GetRSAPrivateKey get *rsa.PrivateKey from key pem.
GetSerialAsHex returns the serial number from certificate as hex format.
GetServerAddr returns the server's address.
GetServerPort returns the server's listening port.
GetServerProtocol returns the server's protocol.
GetServerURL returns the server's URL.
GetSignerFromCert load private key represented by ski and return bccsp signer that conforms to crypto.Signer.
GetSignerFromCertFile load skiFile and load private key represented by ski and return bccsp signer that conforms to crypto.Signer.
GetSliceFromList will return a slice from a list.
GetUser returns username and password from CLI input.
GetX509CertificateFromPEM get an X509 certificate from bytes in PEM format.
GetX509CertificateFromPEMFile gets an X509 certificate from a file.
GetX509CertificatesFromPEM returns X509 certificates from bytes in PEM format.
Hostname name returns the hostname of the machine.
HTTPRequestToString returns a string for an HTTP request for debuggging.
HTTPResponseToString returns a string for an HTTP response for debuggging.
ImportBCCSPKeyFromPEM attempts to create a private BCCSP key from a pem file keyFile.
InitBCCSP initializes BCCSP.
IsSubsetOf returns an error if there is something in 'small' that is not in 'big'.
ListContains looks through a comma separated list to see if a string exists.
LoadX509KeyPair reads and parses a public/private key pair from a pair of files.
MakeFileAbs makes 'file' absolute relative to 'dir' if not already absolute.
MakeFileNamesAbsolute makes all file names in the list absolute, relative to home.
Marshal to bytes.
NormalizeFileList provides absolute pathing for the list of files.
NormalizeStringSlice checks for seperators.
ParseObj parses an object structure, calling back with field info for each field.
RandomString returns a random string.
Read reads from Reader into a byte array.
ReadFile reads a file.
RegisterFlags registers flags for all fields in an arbitrary 'config' object.
RemoveQuotes removes outer quotes from a string if necessary.
SetDefaultServerPort overrides the default CFSSL server port by adding the "-port" option to the command line if it was not already present.
StrContained returns true if 'str' is in 'strs'; otherwise return false.
StructToString converts a struct to a string.
Unmarshal from bytes.
ValidateAndReturnAbsConf checks to see that there are no conflicts between the configuration file path and home directory.
VerifyToken verifies token signed by either ECDSA or RSA and returns the associated user ID.
ViperUnmarshal is a work around for a bug in viper.Unmarshal This can be removed once https://github.com/spf13/viper/issues/327 is fixed and vendored.
WriteFile writes a file.

# Constants

SecretTag to tag a field as secret as in password, token.
TagDefault is the tag name for a default value of a field as recognized by RegisterFlags.
TagHelp is the tag name for a help message of a field as recognized by RegisterFlags.
TagHide is the tag name which causes the field to be hidden.
TagOpt is the tag name for a one character option of a field as recognized by RegisterFlags.
TagSkip is the tag name which causes the field to be skipped by RegisterFlags.

# Variables

ErrNotImplemented used to return errors for functions not implemented.
RevocationReasonCodes is a map between string reason codes to integers as defined in RFC 5280.
URLRegex is the regular expression to check if a value is an URL.

# Structs

ECDSASignature forms the structure for R and S value for ECDSA.
Field is a field of an arbitrary struct.