Version: v1.0.0-alpha3 Latest Latest

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

Go to latest
Published: Mar 20, 2018 License: Apache-2.0 Imports: 11 Imported by: 38




This section is empty.


This section is empty.


func GetPrivateKeyFromCert

func GetPrivateKeyFromCert(cert []byte, cs core.CryptoSuite) (core.Key, error)

GetPrivateKeyFromCert will return private key represented by SKI in cert's public key

func GetPublicKeyFromCert

func GetPublicKeyFromCert(cert []byte, cs core.CryptoSuite) (core.Key, error)

GetPublicKeyFromCert will return public key the from cert

func X509KeyPair

func X509KeyPair(certPEMBlock []byte, pk core.Key, cs core.CryptoSuite) (tls.Certificate, error)

X509KeyPair will return cer/key pair used for mutual TLS


type PrivateKey

type PrivateKey struct {
	// contains filtered or unexported fields

PrivateKey is signer implementation for golang client TLS

func (*PrivateKey) Public

func (priv *PrivateKey) Public() crypto.PublicKey

Public returns the public key corresponding to private key

func (*PrivateKey) Sign

func (priv *PrivateKey) Sign(rand io.Reader, msg []byte, opts crypto.SignerOpts) ([]byte, error)

Sign signs msg with priv, reading randomness from rand. If opts is a *PSSOptions then the PSS algorithm will be used, otherwise PKCS#1 v1.5 will be used. This method is intended to support keys where the private part is kept in, for example, a hardware module.

Source Files

Jump to

Keyboard shortcuts

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