Documentation ¶
Index ¶
- Constants
- Variables
- func ExtractPubKeys(certs []*x509.Certificate) ([][]byte, error)
- func FetchHashLeavesFromCosmos(client treeClient) ([][]byte, error)
- func HashCertificate(certificate *x509.Certificate) ([]byte, error)
- func NewGRPCClient(addr string, isSecure bool) (*grpc.ClientConn, error)
- func ParseCertificatesCollection(data []byte) ([]*x509.Certificate, error)
- func ParsePemKey(rawPemKey string) (*x509.Certificate, error)
- func ParsePemKeys(rawPemBlocks []string) ([]*x509.Certificate, error)
- func To32Bytes(arr []byte) []byte
Constants ¶
View Source
const PemBlockType = "CERTIFICATE"
Variables ¶
View Source
var ErrUnsupportedPublicKey = errors.New("unsupported public key, supported formats: rsa, ecdsa")
Functions ¶
func ExtractPubKeys ¶
func ExtractPubKeys(certs []*x509.Certificate) ([][]byte, error)
ExtractPubKeys extracts raw data of public keys from certificates, which can be used for hashing later.
func HashCertificate ¶
func HashCertificate(certificate *x509.Certificate) ([]byte, error)
HashCertificate hashes the public key of the certificate
func NewGRPCClient ¶
func NewGRPCClient(addr string, isSecure bool) (*grpc.ClientConn, error)
func ParseCertificatesCollection ¶
func ParseCertificatesCollection(data []byte) ([]*x509.Certificate, error)
func ParsePemKey ¶
func ParsePemKey(rawPemKey string) (*x509.Certificate, error)
func ParsePemKeys ¶
func ParsePemKeys(rawPemBlocks []string) ([]*x509.Certificate, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.