gocert: launchpad.net/gocert Index | Files | Directories

package gocert

import "launchpad.net/gocert"

Index

Package Files

constants.go constants_linux.go fingerprint.go io.go selfsigned.go

Constants

const CERTIFICATE = "CERTIFICATE"
const DEFAULT_RSA_KEY_LENGTH = 2048
const RSA_PRIVATE_KEY = "RSA PRIVATE KEY"
const SHM_PATH = "/dev/shm"

func CreateKey Uses

func CreateKey(keyFile string, options *KeyOptions) (privKey interface{}, err error)

CreateDefaultKey creates a private key with specified options.

func CreateSelfSigned Uses

func CreateSelfSigned(dn *pkix.Name, certFile string, keyFile string, options *KeyOptions) error

CreateSelfSigned generates a private key and self-signed public certificate.

func LoadX509Pem Uses

func LoadX509Pem(certFile string) ([]*x509.Certificate, error)

func ShmTempDir Uses

func ShmTempDir(prefix string) (string, error)

func ShmTempFile Uses

func ShmTempFile(prefix string) (*os.File, error)

func VerifySelfSigned Uses

func VerifySelfSigned(c *x509.Certificate) error

Verify that a self-signed certificate's signature is valid; that it was made by the private key corresponding to the public key in the certificate.

func WritePem Uses

func WritePem(w io.Writer, preamble string, der []byte) error

func X509Pem Uses

func X509Pem(pemBytes []byte) (certs []*x509.Certificate, err error)

type Fingerprint Uses

type Fingerprint []byte

Fingerprint represents a cryptographically strong unique identifier of a public key identity.

func ParseFingerprint Uses

func ParseFingerprint(fp string) (Fingerprint, error)

ParseFingerprint parses a colon-delimited series of hexadecimal octets.

func SpkiFingerprint Uses

func SpkiFingerprint(cert *x509.Certificate) Fingerprint

SpkiFingerprint calculates a SHA256 digest of the SubjectPublicKeyInfo section of an X.509 certificate.

func (Fingerprint) String Uses

func (f Fingerprint) String() string

String represents the fingerprint digest as a series of colon-delimited hexadecimal octets.

type KeyOptions Uses

type KeyOptions struct {
    Length int
    Type   KeyType
}

type KeyType Uses

type KeyType uint8
const EcdsaKeyType KeyType = 1
const RsaKeyType KeyType = 0

Directories

PathSynopsis
db
testing
tools/openssl

Package gocert imports 19 packages (graph) and is imported by 7 packages. Updated 2016-07-15. Refresh now. Tools for package owners.