Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPKISerial ¶
func BuildPKISerial(timestamp int64) *big.Int
BuildPKISerial produces a serial number for certs that is vanishingly unlikely to collide The timestamp should be provided as an input (time.Now().UnixNano()), and then we combine that with a 32 bit random crypto-rand integer. We also know that a bigger value was created later (modulo clock skew)
func ComputeAWSKeyFingerprint ¶
func ComputeAWSKeyFingerprint(publicKey string) (string, error)
ComputeAWSKeyFingerprint computes the AWS-specific fingerprint of the SSH public key
func ComputeOpenSSHKeyFingerprint ¶
func ComputeOpenSSHKeyFingerprint(publicKey string) (string, error)
ComputeOpenSSHKeyFingerprint computes the OpenSSH fingerprint of the SSH public key
Types ¶
type Certificate ¶
type Certificate struct {
Subject pkix.Name
IsCA bool
Certificate *x509.Certificate
PublicKey crypto.PublicKey
}
func ParsePEMCertificate ¶
func ParsePEMCertificate(pemData []byte) (*Certificate, error)
func SignNewCertificate ¶
func SignNewCertificate(privateKey *PrivateKey, template *x509.Certificate, signer *x509.Certificate, signerPrivateKey *PrivateKey) (*Certificate, error)
func (*Certificate) MarshalJSON ¶
func (c *Certificate) MarshalJSON() ([]byte, error)
func (*Certificate) UnmarshalJSON ¶
func (c *Certificate) UnmarshalJSON(b []byte) error
type PrivateKey ¶
type PrivateKey struct {
Key crypto.PrivateKey
}
func GeneratePrivateKey ¶
func GeneratePrivateKey() (*PrivateKey, error)
func ParsePEMPrivateKey ¶
func ParsePEMPrivateKey(data []byte) (*PrivateKey, error)
func (*PrivateKey) MarshalJSON ¶
func (k *PrivateKey) MarshalJSON() ([]byte, error)
func (*PrivateKey) UnmarshalJSON ¶
func (k *PrivateKey) UnmarshalJSON(b []byte) (err error)
Click to show internal directories.
Click to hide internal directories.