Documentation ¶
Index ¶
- func NewCertChain(length int, versionNumber storj.IDVersionNumber) (keys []crypto.PrivateKey, certs []*x509.Certificate, _ error)
- func NewRevokedLeafChain() ([]crypto.PrivateKey, []*x509.Certificate, pkix.Extension, error)
- func RevokeCA(caKey crypto.PrivateKey, chain []*x509.Certificate) ([]*x509.Certificate, pkix.Extension, error)
- func RevokeLeaf(caKey crypto.PrivateKey, chain []*x509.Certificate) ([]*x509.Certificate, pkix.Extension, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCertChain ¶
func NewCertChain(length int, versionNumber storj.IDVersionNumber) (keys []crypto.PrivateKey, certs []*x509.Certificate, _ error)
NewCertChain creates a valid peertls certificate chain (and respective keys) of the desired length. NB: keys are in the reverse order compared to certs (i.e. first key belongs to last cert)!
func NewRevokedLeafChain ¶
func NewRevokedLeafChain() ([]crypto.PrivateKey, []*x509.Certificate, pkix.Extension, error)
NewRevokedLeafChain creates a certificate chain (of length 2) with a leaf that contains a valid revocation extension.
func RevokeCA ¶
func RevokeCA(caKey crypto.PrivateKey, chain []*x509.Certificate) ([]*x509.Certificate, pkix.Extension, error)
RevokeCA revokes the CA certificate in the passed chain and adds a revocation extension to that certificate, recording this action.
func RevokeLeaf ¶
func RevokeLeaf(caKey crypto.PrivateKey, chain []*x509.Certificate) ([]*x509.Certificate, pkix.Extension, error)
RevokeLeaf revokes the leaf certificate in the passed chain and replaces it with a "revoking" certificate, which contains a revocation extension recording this action.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.