vendor
This commit is contained in:
42
vendor/github.com/cloudflare/cfssl/helpers/derhelpers/derhelpers.go
generated
vendored
Normal file
42
vendor/github.com/cloudflare/cfssl/helpers/derhelpers/derhelpers.go
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
// Package derhelpers implements common functionality
|
||||
// on DER encoded data
|
||||
package derhelpers
|
||||
|
||||
import (
|
||||
"crypto"
|
||||
"crypto/ecdsa"
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
|
||||
cferr "github.com/cloudflare/cfssl/errors"
|
||||
)
|
||||
|
||||
// ParsePrivateKeyDER parses a PKCS #1, PKCS #8, or elliptic curve
|
||||
// DER-encoded private key. The key must not be in PEM format.
|
||||
func ParsePrivateKeyDER(keyDER []byte) (key crypto.Signer, err error) {
|
||||
generalKey, err := x509.ParsePKCS8PrivateKey(keyDER)
|
||||
if err != nil {
|
||||
generalKey, err = x509.ParsePKCS1PrivateKey(keyDER)
|
||||
if err != nil {
|
||||
generalKey, err = x509.ParseECPrivateKey(keyDER)
|
||||
if err != nil {
|
||||
// We don't include the actual error into
|
||||
// the final error. The reason might be
|
||||
// we don't want to leak any info about
|
||||
// the private key.
|
||||
return nil, cferr.New(cferr.PrivateKeyError,
|
||||
cferr.ParseFailed)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch generalKey.(type) {
|
||||
case *rsa.PrivateKey:
|
||||
return generalKey.(*rsa.PrivateKey), nil
|
||||
case *ecdsa.PrivateKey:
|
||||
return generalKey.(*ecdsa.PrivateKey), nil
|
||||
}
|
||||
|
||||
// should never reach here
|
||||
return nil, cferr.New(cferr.PrivateKeyError, cferr.ParseFailed)
|
||||
}
|
577
vendor/github.com/cloudflare/cfssl/helpers/helpers.go
generated
vendored
Normal file
577
vendor/github.com/cloudflare/cfssl/helpers/helpers.go
generated
vendored
Normal file
@ -0,0 +1,577 @@
|
||||
// Package helpers implements utility functionality common to many
|
||||
// CFSSL packages.
|
||||
package helpers
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto"
|
||||
"crypto/ecdsa"
|
||||
"crypto/elliptic"
|
||||
"crypto/rsa"
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"crypto/x509/pkix"
|
||||
"encoding/asn1"
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/google/certificate-transparency-go"
|
||||
cttls "github.com/google/certificate-transparency-go/tls"
|
||||
ctx509 "github.com/google/certificate-transparency-go/x509"
|
||||
"golang.org/x/crypto/ocsp"
|
||||
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/cloudflare/cfssl/crypto/pkcs7"
|
||||
cferr "github.com/cloudflare/cfssl/errors"
|
||||
"github.com/cloudflare/cfssl/helpers/derhelpers"
|
||||
"github.com/cloudflare/cfssl/log"
|
||||
"golang.org/x/crypto/pkcs12"
|
||||
)
|
||||
|
||||
// OneYear is a time.Duration representing a year's worth of seconds.
|
||||
const OneYear = 8760 * time.Hour
|
||||
|
||||
// OneDay is a time.Duration representing a day's worth of seconds.
|
||||
const OneDay = 24 * time.Hour
|
||||
|
||||
// InclusiveDate returns the time.Time representation of a date - 1
|
||||
// nanosecond. This allows time.After to be used inclusively.
|
||||
func InclusiveDate(year int, month time.Month, day int) time.Time {
|
||||
return time.Date(year, month, day, 0, 0, 0, 0, time.UTC).Add(-1 * time.Nanosecond)
|
||||
}
|
||||
|
||||
// Jul2012 is the July 2012 CAB Forum deadline for when CAs must stop
|
||||
// issuing certificates valid for more than 5 years.
|
||||
var Jul2012 = InclusiveDate(2012, time.July, 01)
|
||||
|
||||
// Apr2015 is the April 2015 CAB Forum deadline for when CAs must stop
|
||||
// issuing certificates valid for more than 39 months.
|
||||
var Apr2015 = InclusiveDate(2015, time.April, 01)
|
||||
|
||||
// KeyLength returns the bit size of ECDSA or RSA PublicKey
|
||||
func KeyLength(key interface{}) int {
|
||||
if key == nil {
|
||||
return 0
|
||||
}
|
||||
if ecdsaKey, ok := key.(*ecdsa.PublicKey); ok {
|
||||
return ecdsaKey.Curve.Params().BitSize
|
||||
} else if rsaKey, ok := key.(*rsa.PublicKey); ok {
|
||||
return rsaKey.N.BitLen()
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
// ExpiryTime returns the time when the certificate chain is expired.
|
||||
func ExpiryTime(chain []*x509.Certificate) (notAfter time.Time) {
|
||||
if len(chain) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
notAfter = chain[0].NotAfter
|
||||
for _, cert := range chain {
|
||||
if notAfter.After(cert.NotAfter) {
|
||||
notAfter = cert.NotAfter
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// MonthsValid returns the number of months for which a certificate is valid.
|
||||
func MonthsValid(c *x509.Certificate) int {
|
||||
issued := c.NotBefore
|
||||
expiry := c.NotAfter
|
||||
years := (expiry.Year() - issued.Year())
|
||||
months := years*12 + int(expiry.Month()) - int(issued.Month())
|
||||
|
||||
// Round up if valid for less than a full month
|
||||
if expiry.Day() > issued.Day() {
|
||||
months++
|
||||
}
|
||||
return months
|
||||
}
|
||||
|
||||
// ValidExpiry determines if a certificate is valid for an acceptable
|
||||
// length of time per the CA/Browser Forum baseline requirements.
|
||||
// See https://cabforum.org/wp-content/uploads/CAB-Forum-BR-1.3.0.pdf
|
||||
func ValidExpiry(c *x509.Certificate) bool {
|
||||
issued := c.NotBefore
|
||||
|
||||
var maxMonths int
|
||||
switch {
|
||||
case issued.After(Apr2015):
|
||||
maxMonths = 39
|
||||
case issued.After(Jul2012):
|
||||
maxMonths = 60
|
||||
case issued.Before(Jul2012):
|
||||
maxMonths = 120
|
||||
}
|
||||
|
||||
if MonthsValid(c) > maxMonths {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// SignatureString returns the TLS signature string corresponding to
|
||||
// an X509 signature algorithm.
|
||||
func SignatureString(alg x509.SignatureAlgorithm) string {
|
||||
switch alg {
|
||||
case x509.MD2WithRSA:
|
||||
return "MD2WithRSA"
|
||||
case x509.MD5WithRSA:
|
||||
return "MD5WithRSA"
|
||||
case x509.SHA1WithRSA:
|
||||
return "SHA1WithRSA"
|
||||
case x509.SHA256WithRSA:
|
||||
return "SHA256WithRSA"
|
||||
case x509.SHA384WithRSA:
|
||||
return "SHA384WithRSA"
|
||||
case x509.SHA512WithRSA:
|
||||
return "SHA512WithRSA"
|
||||
case x509.DSAWithSHA1:
|
||||
return "DSAWithSHA1"
|
||||
case x509.DSAWithSHA256:
|
||||
return "DSAWithSHA256"
|
||||
case x509.ECDSAWithSHA1:
|
||||
return "ECDSAWithSHA1"
|
||||
case x509.ECDSAWithSHA256:
|
||||
return "ECDSAWithSHA256"
|
||||
case x509.ECDSAWithSHA384:
|
||||
return "ECDSAWithSHA384"
|
||||
case x509.ECDSAWithSHA512:
|
||||
return "ECDSAWithSHA512"
|
||||
default:
|
||||
return "Unknown Signature"
|
||||
}
|
||||
}
|
||||
|
||||
// HashAlgoString returns the hash algorithm name contains in the signature
|
||||
// method.
|
||||
func HashAlgoString(alg x509.SignatureAlgorithm) string {
|
||||
switch alg {
|
||||
case x509.MD2WithRSA:
|
||||
return "MD2"
|
||||
case x509.MD5WithRSA:
|
||||
return "MD5"
|
||||
case x509.SHA1WithRSA:
|
||||
return "SHA1"
|
||||
case x509.SHA256WithRSA:
|
||||
return "SHA256"
|
||||
case x509.SHA384WithRSA:
|
||||
return "SHA384"
|
||||
case x509.SHA512WithRSA:
|
||||
return "SHA512"
|
||||
case x509.DSAWithSHA1:
|
||||
return "SHA1"
|
||||
case x509.DSAWithSHA256:
|
||||
return "SHA256"
|
||||
case x509.ECDSAWithSHA1:
|
||||
return "SHA1"
|
||||
case x509.ECDSAWithSHA256:
|
||||
return "SHA256"
|
||||
case x509.ECDSAWithSHA384:
|
||||
return "SHA384"
|
||||
case x509.ECDSAWithSHA512:
|
||||
return "SHA512"
|
||||
default:
|
||||
return "Unknown Hash Algorithm"
|
||||
}
|
||||
}
|
||||
|
||||
// EncodeCertificatesPEM encodes a number of x509 certificates to PEM
|
||||
func EncodeCertificatesPEM(certs []*x509.Certificate) []byte {
|
||||
var buffer bytes.Buffer
|
||||
for _, cert := range certs {
|
||||
pem.Encode(&buffer, &pem.Block{
|
||||
Type: "CERTIFICATE",
|
||||
Bytes: cert.Raw,
|
||||
})
|
||||
}
|
||||
|
||||
return buffer.Bytes()
|
||||
}
|
||||
|
||||
// EncodeCertificatePEM encodes a single x509 certificates to PEM
|
||||
func EncodeCertificatePEM(cert *x509.Certificate) []byte {
|
||||
return EncodeCertificatesPEM([]*x509.Certificate{cert})
|
||||
}
|
||||
|
||||
// ParseCertificatesPEM parses a sequence of PEM-encoded certificate and returns them,
|
||||
// can handle PEM encoded PKCS #7 structures.
|
||||
func ParseCertificatesPEM(certsPEM []byte) ([]*x509.Certificate, error) {
|
||||
var certs []*x509.Certificate
|
||||
var err error
|
||||
certsPEM = bytes.TrimSpace(certsPEM)
|
||||
for len(certsPEM) > 0 {
|
||||
var cert []*x509.Certificate
|
||||
cert, certsPEM, err = ParseOneCertificateFromPEM(certsPEM)
|
||||
if err != nil {
|
||||
|
||||
return nil, cferr.New(cferr.CertificateError, cferr.ParseFailed)
|
||||
} else if cert == nil {
|
||||
break
|
||||
}
|
||||
|
||||
certs = append(certs, cert...)
|
||||
}
|
||||
if len(certsPEM) > 0 {
|
||||
return nil, cferr.New(cferr.CertificateError, cferr.DecodeFailed)
|
||||
}
|
||||
return certs, nil
|
||||
}
|
||||
|
||||
// ParseCertificatesDER parses a DER encoding of a certificate object and possibly private key,
|
||||
// either PKCS #7, PKCS #12, or raw x509.
|
||||
func ParseCertificatesDER(certsDER []byte, password string) (certs []*x509.Certificate, key crypto.Signer, err error) {
|
||||
certsDER = bytes.TrimSpace(certsDER)
|
||||
pkcs7data, err := pkcs7.ParsePKCS7(certsDER)
|
||||
if err != nil {
|
||||
var pkcs12data interface{}
|
||||
certs = make([]*x509.Certificate, 1)
|
||||
pkcs12data, certs[0], err = pkcs12.Decode(certsDER, password)
|
||||
if err != nil {
|
||||
certs, err = x509.ParseCertificates(certsDER)
|
||||
if err != nil {
|
||||
return nil, nil, cferr.New(cferr.CertificateError, cferr.DecodeFailed)
|
||||
}
|
||||
} else {
|
||||
key = pkcs12data.(crypto.Signer)
|
||||
}
|
||||
} else {
|
||||
if pkcs7data.ContentInfo != "SignedData" {
|
||||
return nil, nil, cferr.Wrap(cferr.CertificateError, cferr.DecodeFailed, errors.New("can only extract certificates from signed data content info"))
|
||||
}
|
||||
certs = pkcs7data.Content.SignedData.Certificates
|
||||
}
|
||||
if certs == nil {
|
||||
return nil, key, cferr.New(cferr.CertificateError, cferr.DecodeFailed)
|
||||
}
|
||||
return certs, key, nil
|
||||
}
|
||||
|
||||
// ParseSelfSignedCertificatePEM parses a PEM-encoded certificate and check if it is self-signed.
|
||||
func ParseSelfSignedCertificatePEM(certPEM []byte) (*x509.Certificate, error) {
|
||||
cert, err := ParseCertificatePEM(certPEM)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err := cert.CheckSignature(cert.SignatureAlgorithm, cert.RawTBSCertificate, cert.Signature); err != nil {
|
||||
return nil, cferr.Wrap(cferr.CertificateError, cferr.VerifyFailed, err)
|
||||
}
|
||||
return cert, nil
|
||||
}
|
||||
|
||||
// ParseCertificatePEM parses and returns a PEM-encoded certificate,
|
||||
// can handle PEM encoded PKCS #7 structures.
|
||||
func ParseCertificatePEM(certPEM []byte) (*x509.Certificate, error) {
|
||||
certPEM = bytes.TrimSpace(certPEM)
|
||||
cert, rest, err := ParseOneCertificateFromPEM(certPEM)
|
||||
if err != nil {
|
||||
// Log the actual parsing error but throw a default parse error message.
|
||||
log.Debugf("Certificate parsing error: %v", err)
|
||||
return nil, cferr.New(cferr.CertificateError, cferr.ParseFailed)
|
||||
} else if cert == nil {
|
||||
return nil, cferr.New(cferr.CertificateError, cferr.DecodeFailed)
|
||||
} else if len(rest) > 0 {
|
||||
return nil, cferr.Wrap(cferr.CertificateError, cferr.ParseFailed, errors.New("the PEM file should contain only one object"))
|
||||
} else if len(cert) > 1 {
|
||||
return nil, cferr.Wrap(cferr.CertificateError, cferr.ParseFailed, errors.New("the PKCS7 object in the PEM file should contain only one certificate"))
|
||||
}
|
||||
return cert[0], nil
|
||||
}
|
||||
|
||||
// ParseOneCertificateFromPEM attempts to parse one PEM encoded certificate object,
|
||||
// either a raw x509 certificate or a PKCS #7 structure possibly containing
|
||||
// multiple certificates, from the top of certsPEM, which itself may
|
||||
// contain multiple PEM encoded certificate objects.
|
||||
func ParseOneCertificateFromPEM(certsPEM []byte) ([]*x509.Certificate, []byte, error) {
|
||||
|
||||
block, rest := pem.Decode(certsPEM)
|
||||
if block == nil {
|
||||
return nil, rest, nil
|
||||
}
|
||||
|
||||
cert, err := x509.ParseCertificate(block.Bytes)
|
||||
if err != nil {
|
||||
pkcs7data, err := pkcs7.ParsePKCS7(block.Bytes)
|
||||
if err != nil {
|
||||
return nil, rest, err
|
||||
}
|
||||
if pkcs7data.ContentInfo != "SignedData" {
|
||||
return nil, rest, errors.New("only PKCS #7 Signed Data Content Info supported for certificate parsing")
|
||||
}
|
||||
certs := pkcs7data.Content.SignedData.Certificates
|
||||
if certs == nil {
|
||||
return nil, rest, errors.New("PKCS #7 structure contains no certificates")
|
||||
}
|
||||
return certs, rest, nil
|
||||
}
|
||||
var certs = []*x509.Certificate{cert}
|
||||
return certs, rest, nil
|
||||
}
|
||||
|
||||
// LoadPEMCertPool loads a pool of PEM certificates from file.
|
||||
func LoadPEMCertPool(certsFile string) (*x509.CertPool, error) {
|
||||
if certsFile == "" {
|
||||
return nil, nil
|
||||
}
|
||||
pemCerts, err := ioutil.ReadFile(certsFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return PEMToCertPool(pemCerts)
|
||||
}
|
||||
|
||||
// PEMToCertPool concerts PEM certificates to a CertPool.
|
||||
func PEMToCertPool(pemCerts []byte) (*x509.CertPool, error) {
|
||||
if len(pemCerts) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
certPool := x509.NewCertPool()
|
||||
if !certPool.AppendCertsFromPEM(pemCerts) {
|
||||
return nil, errors.New("failed to load cert pool")
|
||||
}
|
||||
|
||||
return certPool, nil
|
||||
}
|
||||
|
||||
// ParsePrivateKeyPEM parses and returns a PEM-encoded private
|
||||
// key. The private key may be either an unencrypted PKCS#8, PKCS#1,
|
||||
// or elliptic private key.
|
||||
func ParsePrivateKeyPEM(keyPEM []byte) (key crypto.Signer, err error) {
|
||||
return ParsePrivateKeyPEMWithPassword(keyPEM, nil)
|
||||
}
|
||||
|
||||
// ParsePrivateKeyPEMWithPassword parses and returns a PEM-encoded private
|
||||
// key. The private key may be a potentially encrypted PKCS#8, PKCS#1,
|
||||
// or elliptic private key.
|
||||
func ParsePrivateKeyPEMWithPassword(keyPEM []byte, password []byte) (key crypto.Signer, err error) {
|
||||
keyDER, err := GetKeyDERFromPEM(keyPEM, password)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return derhelpers.ParsePrivateKeyDER(keyDER)
|
||||
}
|
||||
|
||||
// GetKeyDERFromPEM parses a PEM-encoded private key and returns DER-format key bytes.
|
||||
func GetKeyDERFromPEM(in []byte, password []byte) ([]byte, error) {
|
||||
keyDER, _ := pem.Decode(in)
|
||||
if keyDER != nil {
|
||||
if procType, ok := keyDER.Headers["Proc-Type"]; ok {
|
||||
if strings.Contains(procType, "ENCRYPTED") {
|
||||
if password != nil {
|
||||
return x509.DecryptPEMBlock(keyDER, password)
|
||||
}
|
||||
return nil, cferr.New(cferr.PrivateKeyError, cferr.Encrypted)
|
||||
}
|
||||
}
|
||||
return keyDER.Bytes, nil
|
||||
}
|
||||
|
||||
return nil, cferr.New(cferr.PrivateKeyError, cferr.DecodeFailed)
|
||||
}
|
||||
|
||||
// ParseCSR parses a PEM- or DER-encoded PKCS #10 certificate signing request.
|
||||
func ParseCSR(in []byte) (csr *x509.CertificateRequest, rest []byte, err error) {
|
||||
in = bytes.TrimSpace(in)
|
||||
p, rest := pem.Decode(in)
|
||||
if p != nil {
|
||||
if p.Type != "NEW CERTIFICATE REQUEST" && p.Type != "CERTIFICATE REQUEST" {
|
||||
return nil, rest, cferr.New(cferr.CSRError, cferr.BadRequest)
|
||||
}
|
||||
|
||||
csr, err = x509.ParseCertificateRequest(p.Bytes)
|
||||
} else {
|
||||
csr, err = x509.ParseCertificateRequest(in)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, rest, err
|
||||
}
|
||||
|
||||
err = csr.CheckSignature()
|
||||
if err != nil {
|
||||
return nil, rest, err
|
||||
}
|
||||
|
||||
return csr, rest, nil
|
||||
}
|
||||
|
||||
// ParseCSRPEM parses a PEM-encoded certificate signing request.
|
||||
// It does not check the signature. This is useful for dumping data from a CSR
|
||||
// locally.
|
||||
func ParseCSRPEM(csrPEM []byte) (*x509.CertificateRequest, error) {
|
||||
block, _ := pem.Decode([]byte(csrPEM))
|
||||
if block == nil {
|
||||
return nil, cferr.New(cferr.CSRError, cferr.DecodeFailed)
|
||||
}
|
||||
csrObject, err := x509.ParseCertificateRequest(block.Bytes)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return csrObject, nil
|
||||
}
|
||||
|
||||
// SignerAlgo returns an X.509 signature algorithm from a crypto.Signer.
|
||||
func SignerAlgo(priv crypto.Signer) x509.SignatureAlgorithm {
|
||||
switch pub := priv.Public().(type) {
|
||||
case *rsa.PublicKey:
|
||||
bitLength := pub.N.BitLen()
|
||||
switch {
|
||||
case bitLength >= 4096:
|
||||
return x509.SHA512WithRSA
|
||||
case bitLength >= 3072:
|
||||
return x509.SHA384WithRSA
|
||||
case bitLength >= 2048:
|
||||
return x509.SHA256WithRSA
|
||||
default:
|
||||
return x509.SHA1WithRSA
|
||||
}
|
||||
case *ecdsa.PublicKey:
|
||||
switch pub.Curve {
|
||||
case elliptic.P521():
|
||||
return x509.ECDSAWithSHA512
|
||||
case elliptic.P384():
|
||||
return x509.ECDSAWithSHA384
|
||||
case elliptic.P256():
|
||||
return x509.ECDSAWithSHA256
|
||||
default:
|
||||
return x509.ECDSAWithSHA1
|
||||
}
|
||||
default:
|
||||
return x509.UnknownSignatureAlgorithm
|
||||
}
|
||||
}
|
||||
|
||||
// LoadClientCertificate load key/certificate from pem files
|
||||
func LoadClientCertificate(certFile string, keyFile string) (*tls.Certificate, error) {
|
||||
if certFile != "" && keyFile != "" {
|
||||
cert, err := tls.LoadX509KeyPair(certFile, keyFile)
|
||||
if err != nil {
|
||||
log.Critical("Unable to read client certificate from file: %s or key from file: %s", certFile, keyFile)
|
||||
return nil, err
|
||||
}
|
||||
log.Debug("Client certificate loaded ")
|
||||
return &cert, nil
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// CreateTLSConfig creates a tls.Config object from certs and roots
|
||||
func CreateTLSConfig(remoteCAs *x509.CertPool, cert *tls.Certificate) *tls.Config {
|
||||
var certs []tls.Certificate
|
||||
if cert != nil {
|
||||
certs = []tls.Certificate{*cert}
|
||||
}
|
||||
return &tls.Config{
|
||||
Certificates: certs,
|
||||
RootCAs: remoteCAs,
|
||||
}
|
||||
}
|
||||
|
||||
// SerializeSCTList serializes a list of SCTs.
|
||||
func SerializeSCTList(sctList []ct.SignedCertificateTimestamp) ([]byte, error) {
|
||||
list := ctx509.SignedCertificateTimestampList{}
|
||||
for _, sct := range sctList {
|
||||
sctBytes, err := cttls.Marshal(sct)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list.SCTList = append(list.SCTList, ctx509.SerializedSCT{Val: sctBytes})
|
||||
}
|
||||
return cttls.Marshal(list)
|
||||
}
|
||||
|
||||
// DeserializeSCTList deserializes a list of SCTs.
|
||||
func DeserializeSCTList(serializedSCTList []byte) ([]ct.SignedCertificateTimestamp, error) {
|
||||
var sctList ctx509.SignedCertificateTimestampList
|
||||
rest, err := cttls.Unmarshal(serializedSCTList, &sctList)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(rest) != 0 {
|
||||
return nil, cferr.Wrap(cferr.CTError, cferr.Unknown, errors.New("serialized SCT list contained trailing garbage"))
|
||||
}
|
||||
list := make([]ct.SignedCertificateTimestamp, len(sctList.SCTList))
|
||||
for i, serializedSCT := range sctList.SCTList {
|
||||
var sct ct.SignedCertificateTimestamp
|
||||
rest, err := cttls.Unmarshal(serializedSCT.Val, &sct)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(rest) != 0 {
|
||||
return nil, cferr.Wrap(cferr.CTError, cferr.Unknown, errors.New("serialized SCT contained trailing garbage"))
|
||||
}
|
||||
list[i] = sct
|
||||
}
|
||||
return list, nil
|
||||
}
|
||||
|
||||
// SCTListFromOCSPResponse extracts the SCTList from an ocsp.Response,
|
||||
// returning an empty list if the SCT extension was not found or could not be
|
||||
// unmarshalled.
|
||||
func SCTListFromOCSPResponse(response *ocsp.Response) ([]ct.SignedCertificateTimestamp, error) {
|
||||
// This loop finds the SCTListExtension in the OCSP response.
|
||||
var SCTListExtension, ext pkix.Extension
|
||||
for _, ext = range response.Extensions {
|
||||
// sctExtOid is the ObjectIdentifier of a Signed Certificate Timestamp.
|
||||
sctExtOid := asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 11129, 2, 4, 5}
|
||||
if ext.Id.Equal(sctExtOid) {
|
||||
SCTListExtension = ext
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// This code block extracts the sctList from the SCT extension.
|
||||
var sctList []ct.SignedCertificateTimestamp
|
||||
var err error
|
||||
if numBytes := len(SCTListExtension.Value); numBytes != 0 {
|
||||
var serializedSCTList []byte
|
||||
rest := make([]byte, numBytes)
|
||||
copy(rest, SCTListExtension.Value)
|
||||
for len(rest) != 0 {
|
||||
rest, err = asn1.Unmarshal(rest, &serializedSCTList)
|
||||
if err != nil {
|
||||
return nil, cferr.Wrap(cferr.CTError, cferr.Unknown, err)
|
||||
}
|
||||
}
|
||||
sctList, err = DeserializeSCTList(serializedSCTList)
|
||||
}
|
||||
return sctList, err
|
||||
}
|
||||
|
||||
// ReadBytes reads a []byte either from a file or an environment variable.
|
||||
// If valFile has a prefix of 'env:', the []byte is read from the environment
|
||||
// using the subsequent name. If the prefix is 'file:' the []byte is read from
|
||||
// the subsequent file. If no prefix is provided, valFile is assumed to be a
|
||||
// file path.
|
||||
func ReadBytes(valFile string) ([]byte, error) {
|
||||
switch splitVal := strings.SplitN(valFile, ":", 2); len(splitVal) {
|
||||
case 1:
|
||||
return ioutil.ReadFile(valFile)
|
||||
case 2:
|
||||
switch splitVal[0] {
|
||||
case "env":
|
||||
return []byte(os.Getenv(splitVal[1])), nil
|
||||
case "file":
|
||||
return ioutil.ReadFile(splitVal[1])
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown prefix: %s", splitVal[0])
|
||||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("multiple prefixes: %s",
|
||||
strings.Join(splitVal[:len(splitVal)-1], ", "))
|
||||
}
|
||||
}
|
629
vendor/github.com/cloudflare/cfssl/helpers/helpers_test.go
generated
vendored
Normal file
629
vendor/github.com/cloudflare/cfssl/helpers/helpers_test.go
generated
vendored
Normal file
@ -0,0 +1,629 @@
|
||||
package helpers
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/ecdsa"
|
||||
"crypto/elliptic"
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
"crypto/x509/pkix"
|
||||
"encoding/asn1"
|
||||
"encoding/pem"
|
||||
"io/ioutil"
|
||||
"math"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"golang.org/x/crypto/ocsp"
|
||||
|
||||
"github.com/google/certificate-transparency-go"
|
||||
)
|
||||
|
||||
const (
|
||||
testCertFile = "testdata/cert.pem"
|
||||
testCertDERFile = "testdata/cert.der"
|
||||
testBundleFile = "testdata/bundle.pem"
|
||||
testExtraWSCertFile = "testdata/cert_with_whitespace.pem"
|
||||
testExtraWSBundleFile = "testdata/bundle_with_whitespace.pem"
|
||||
testMessedUpBundleFile = "testdata/messed_up_bundle.pem"
|
||||
testMessedUpCertFile = "testdata/messedupcert.pem"
|
||||
testEmptyCertFile = "testdata/emptycert.pem"
|
||||
testPrivateRSAKey = "testdata/priv_rsa_key.pem"
|
||||
testPrivateECDSAKey = "testdata/private_ecdsa_key.pem"
|
||||
testUnsupportedECDSAKey = "testdata/secp256k1-key.pem"
|
||||
testMessedUpPrivateKey = "testdata/messed_up_priv_key.pem"
|
||||
testEncryptedPrivateKey = "testdata/enc_priv_key.pem"
|
||||
testEmptyPem = "testdata/empty.pem"
|
||||
testNoHeaderCert = "testdata/noheadercert.pem"
|
||||
testSinglePKCS7 = "testdata/cert_pkcs7.pem" // openssl crl2pkcs7 -nocrl -out cert_pkcs7.pem -in cert.pem
|
||||
testEmptyPKCS7DER = "testdata/empty_pkcs7.der" // openssl crl2pkcs7 -nocrl -out empty_pkcs7.der -outform der
|
||||
testEmptyPKCS7PEM = "testdata/empty_pkcs7.pem" // openssl crl2pkcs7 -nocrl -out empty_pkcs7.pem -outform pem
|
||||
testMultiplePKCS7 = "testdata/bundle_pkcs7.pem"
|
||||
testPKCS12EmptyPswd = "testdata/emptypasswordpkcs12.p12"
|
||||
testPKCS12Passwordispassword = "testdata/passwordpkcs12.p12"
|
||||
testPKCS12MultipleCerts = "testdata/multiplecerts.p12"
|
||||
testCSRPEM = "testdata/test.csr.pem"
|
||||
testCSRPEMBad = "testdata/test.bad.csr.pem"
|
||||
)
|
||||
|
||||
func TestParseCertificatesDER(t *testing.T) {
|
||||
var password = []string{"password", "", ""}
|
||||
for i, testFile := range []string{testPKCS12Passwordispassword, testPKCS12EmptyPswd, testCertDERFile} {
|
||||
testDER, err := ioutil.ReadFile(testFile)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, _, err := ParseCertificatesDER(testDER, password[i]); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// Incorrect Password for PKCS12 formatted files
|
||||
if _, _, err := ParseCertificatesDER(testDER, "incorrectpassword"); err == nil && i != 2 {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
testDER, err := ioutil.ReadFile(testEmptyPKCS7DER)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// PKCS7 with no certificates
|
||||
if _, _, err := ParseCertificatesDER(testDER, ""); err == nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestKeyLength(t *testing.T) {
|
||||
expNil := 0
|
||||
recNil := KeyLength(nil)
|
||||
if expNil != recNil {
|
||||
t.Fatal("KeyLength on nil did not return 0")
|
||||
}
|
||||
|
||||
expNonsense := 0
|
||||
inNonsense := "string?"
|
||||
outNonsense := KeyLength(inNonsense)
|
||||
if expNonsense != outNonsense {
|
||||
t.Fatal("KeyLength malfunctioning on nonsense input")
|
||||
}
|
||||
|
||||
//test the ecdsa branch
|
||||
ecdsaPriv, _ := ecdsa.GenerateKey(elliptic.P224(), rand.Reader)
|
||||
ecdsaIn, _ := ecdsaPriv.Public().(*ecdsa.PublicKey)
|
||||
expEcdsa := ecdsaIn.Curve.Params().BitSize
|
||||
outEcdsa := KeyLength(ecdsaIn)
|
||||
if expEcdsa != outEcdsa {
|
||||
t.Fatal("KeyLength malfunctioning on ecdsa input")
|
||||
}
|
||||
|
||||
//test the rsa branch
|
||||
rsaPriv, _ := rsa.GenerateKey(rand.Reader, 256)
|
||||
rsaIn, _ := rsaPriv.Public().(*rsa.PublicKey)
|
||||
expRsa := rsaIn.N.BitLen()
|
||||
outRsa := KeyLength(rsaIn)
|
||||
|
||||
if expRsa != outRsa {
|
||||
t.Fatal("KeyLength malfunctioning on rsa input")
|
||||
}
|
||||
}
|
||||
|
||||
func TestExpiryTime(t *testing.T) {
|
||||
// nil case
|
||||
var expNil time.Time
|
||||
inNil := []*x509.Certificate{}
|
||||
outNil := ExpiryTime(inNil)
|
||||
if expNil != outNil {
|
||||
t.Fatal("Expiry time is malfunctioning on empty input")
|
||||
}
|
||||
|
||||
//read a pem file and use that expiry date
|
||||
bytes, _ := ioutil.ReadFile(testBundleFile)
|
||||
certs, err := ParseCertificatesPEM(bytes)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
}
|
||||
expected := time.Date(2014, time.April, 15, 0, 0, 0, 0, time.UTC)
|
||||
out := ExpiryTime(certs)
|
||||
if out != expected {
|
||||
t.Fatalf("Expected %v, got %v", expected, out)
|
||||
}
|
||||
}
|
||||
|
||||
func TestMonthsValid(t *testing.T) {
|
||||
var cert = &x509.Certificate{
|
||||
NotBefore: time.Date(2015, time.April, 01, 0, 0, 0, 0, time.UTC),
|
||||
NotAfter: time.Date(2015, time.April, 01, 0, 0, 0, 0, time.UTC),
|
||||
}
|
||||
|
||||
if MonthsValid(cert) != 0 {
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
cert.NotAfter = time.Date(2016, time.April, 01, 0, 0, 0, 0, time.UTC)
|
||||
if MonthsValid(cert) != 12 {
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
// extra days should be rounded up to 1 month
|
||||
cert.NotAfter = time.Date(2016, time.April, 02, 0, 0, 0, 0, time.UTC)
|
||||
if MonthsValid(cert) != 13 {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
func TestHasValidExpiry(t *testing.T) {
|
||||
// Issue period > April 1, 2015
|
||||
var cert = &x509.Certificate{
|
||||
NotBefore: time.Date(2015, time.April, 01, 0, 0, 0, 0, time.UTC),
|
||||
NotAfter: time.Date(2016, time.April, 01, 0, 0, 0, 0, time.UTC),
|
||||
}
|
||||
|
||||
if !ValidExpiry(cert) {
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
cert.NotAfter = time.Date(2019, time.April, 01, 01, 0, 0, 0, time.UTC)
|
||||
if ValidExpiry(cert) {
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
// Issue period < July 1, 2012
|
||||
cert.NotBefore = time.Date(2009, time.March, 01, 0, 0, 0, 0, time.UTC)
|
||||
if ValidExpiry(cert) {
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
// Issue period July 1, 2012 - April 1, 2015
|
||||
cert.NotBefore = time.Date(2012, time.July, 01, 0, 0, 0, 0, time.UTC)
|
||||
cert.NotAfter = time.Date(2017, time.July, 01, 0, 0, 0, 0, time.UTC)
|
||||
if !ValidExpiry(cert) {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
func TestHashAlgoString(t *testing.T) {
|
||||
if HashAlgoString(x509.MD2WithRSA) != "MD2" {
|
||||
t.Fatal("standin")
|
||||
}
|
||||
if HashAlgoString(x509.MD5WithRSA) != "MD5" {
|
||||
t.Fatal("standin")
|
||||
}
|
||||
if HashAlgoString(x509.SHA1WithRSA) != "SHA1" {
|
||||
t.Fatal("standin")
|
||||
}
|
||||
if HashAlgoString(x509.SHA256WithRSA) != "SHA256" {
|
||||
t.Fatal("standin")
|
||||
}
|
||||
if HashAlgoString(x509.SHA384WithRSA) != "SHA384" {
|
||||
t.Fatal("standin")
|
||||
}
|
||||
if HashAlgoString(x509.SHA512WithRSA) != "SHA512" {
|
||||
t.Fatal("standin")
|
||||
}
|
||||
if HashAlgoString(x509.DSAWithSHA1) != "SHA1" {
|
||||
t.Fatal("standin")
|
||||
}
|
||||
if HashAlgoString(x509.DSAWithSHA256) != "SHA256" {
|
||||
t.Fatal("standin")
|
||||
}
|
||||
if HashAlgoString(x509.ECDSAWithSHA1) != "SHA1" {
|
||||
t.Fatal("standin")
|
||||
}
|
||||
if HashAlgoString(x509.ECDSAWithSHA256) != "SHA256" {
|
||||
t.Fatal("standin")
|
||||
}
|
||||
if HashAlgoString(x509.ECDSAWithSHA384) != "SHA384" {
|
||||
t.Fatal("standin")
|
||||
}
|
||||
if HashAlgoString(x509.ECDSAWithSHA512) != "SHA512" {
|
||||
t.Fatal("standin")
|
||||
}
|
||||
if HashAlgoString(math.MaxInt32) != "Unknown Hash Algorithm" {
|
||||
t.Fatal("standin")
|
||||
}
|
||||
}
|
||||
|
||||
func TestSignatureString(t *testing.T) {
|
||||
if SignatureString(x509.MD2WithRSA) != "MD2WithRSA" {
|
||||
t.Fatal("Signature String functioning improperly")
|
||||
}
|
||||
if SignatureString(x509.MD5WithRSA) != "MD5WithRSA" {
|
||||
t.Fatal("Signature String functioning improperly")
|
||||
}
|
||||
if SignatureString(x509.SHA1WithRSA) != "SHA1WithRSA" {
|
||||
t.Fatal("Signature String functioning improperly")
|
||||
}
|
||||
if SignatureString(x509.SHA256WithRSA) != "SHA256WithRSA" {
|
||||
t.Fatal("Signature String functioning improperly")
|
||||
}
|
||||
if SignatureString(x509.SHA384WithRSA) != "SHA384WithRSA" {
|
||||
t.Fatal("Signature String functioning improperly")
|
||||
}
|
||||
if SignatureString(x509.SHA512WithRSA) != "SHA512WithRSA" {
|
||||
t.Fatal("Signature String functioning improperly")
|
||||
}
|
||||
if SignatureString(x509.DSAWithSHA1) != "DSAWithSHA1" {
|
||||
t.Fatal("Signature String functioning improperly")
|
||||
}
|
||||
if SignatureString(x509.DSAWithSHA256) != "DSAWithSHA256" {
|
||||
t.Fatal("Signature String functioning improperly")
|
||||
}
|
||||
if SignatureString(x509.ECDSAWithSHA1) != "ECDSAWithSHA1" {
|
||||
t.Fatal("Signature String functioning improperly")
|
||||
}
|
||||
if SignatureString(x509.ECDSAWithSHA256) != "ECDSAWithSHA256" {
|
||||
t.Fatal("Signature String functioning improperly")
|
||||
}
|
||||
if SignatureString(x509.ECDSAWithSHA384) != "ECDSAWithSHA384" {
|
||||
t.Fatal("Signature String functioning improperly")
|
||||
}
|
||||
if SignatureString(x509.ECDSAWithSHA512) != "ECDSAWithSHA512" {
|
||||
t.Fatal("Signature String functioning improperly")
|
||||
}
|
||||
if SignatureString(math.MaxInt32) != "Unknown Signature" {
|
||||
t.Fatal("Signature String functioning improperly")
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseCertificatePEM(t *testing.T) {
|
||||
for _, testFile := range []string{testCertFile, testExtraWSCertFile, testSinglePKCS7} {
|
||||
certPEM, err := ioutil.ReadFile(testFile)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if _, err := ParseCertificatePEM(certPEM); err != nil {
|
||||
t.Log(testFile)
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
for _, testFile := range []string{testBundleFile, testMessedUpCertFile, testEmptyPKCS7PEM, testEmptyCertFile, testMultiplePKCS7} {
|
||||
certPEM, err := ioutil.ReadFile(testFile)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if _, err := ParseCertificatePEM(certPEM); err == nil {
|
||||
t.Fatal("Incorrect cert failed to raise error")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseCertificatesPEM(t *testing.T) {
|
||||
// expected cases
|
||||
for _, testFile := range []string{testBundleFile, testExtraWSBundleFile, testSinglePKCS7, testMultiplePKCS7} {
|
||||
bundlePEM, err := ioutil.ReadFile(testFile)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if _, err := ParseCertificatesPEM(bundlePEM); err != nil {
|
||||
t.Log(testFile)
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
// test failure cases
|
||||
// few lines deleted, then headers removed
|
||||
for _, testFile := range []string{testMessedUpBundleFile, testEmptyPKCS7PEM, testNoHeaderCert} {
|
||||
bundlePEM, err := ioutil.ReadFile(testFile)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if _, err := ParseCertificatesPEM(bundlePEM); err == nil {
|
||||
t.Fatal("Incorrectly-formatted file failed to produce an error")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestSelfSignedCertificatePEM(t *testing.T) {
|
||||
testPEM, _ := ioutil.ReadFile(testCertFile)
|
||||
_, err := ParseSelfSignedCertificatePEM(testPEM)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
}
|
||||
|
||||
// a few lines deleted from the pem file
|
||||
wrongPEM, _ := ioutil.ReadFile(testMessedUpCertFile)
|
||||
_, err2 := ParseSelfSignedCertificatePEM(wrongPEM)
|
||||
if err2 == nil {
|
||||
t.Fatal("Improper pem file failed to raise an error")
|
||||
}
|
||||
|
||||
// alter the signature of a valid certificate
|
||||
blk, _ := pem.Decode(testPEM)
|
||||
blk.Bytes[len(blk.Bytes)-10]++ // some hacking to get to the sig
|
||||
alteredBytes := pem.EncodeToMemory(blk)
|
||||
_, err = ParseSelfSignedCertificatePEM(alteredBytes)
|
||||
if err == nil {
|
||||
t.Fatal("Incorrect cert failed to produce an error")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestParsePrivateKeyPEM(t *testing.T) {
|
||||
|
||||
// expected cases
|
||||
testRSAPEM, _ := ioutil.ReadFile(testPrivateRSAKey)
|
||||
_, err := ParsePrivateKeyPEM(testRSAPEM)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
testECDSAPEM, _ := ioutil.ReadFile(testPrivateECDSAKey)
|
||||
_, err = ParsePrivateKeyPEM(testECDSAPEM)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// error cases
|
||||
errCases := []string{
|
||||
testMessedUpPrivateKey, // a few lines deleted
|
||||
testEmptyPem, // empty file
|
||||
testEncryptedPrivateKey, // encrypted key
|
||||
testUnsupportedECDSAKey, // ECDSA curve not currently supported by Go standard library
|
||||
}
|
||||
|
||||
for _, fname := range errCases {
|
||||
testPEM, _ := ioutil.ReadFile(fname)
|
||||
_, err = ParsePrivateKeyPEM(testPEM)
|
||||
if err == nil {
|
||||
t.Fatal("Incorrect private key failed to produce an error")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Imported from signers/local/testdata/
|
||||
const ecdsaTestCSR = "testdata/ecdsa256.csr"
|
||||
|
||||
func TestParseCSRPEM(t *testing.T) {
|
||||
in, err := ioutil.ReadFile(ecdsaTestCSR)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
}
|
||||
|
||||
_, _, err = ParseCSR(in)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
}
|
||||
|
||||
in[12]++
|
||||
_, _, err = ParseCSR(in)
|
||||
if err == nil {
|
||||
t.Fatalf("Expected an invalid CSR.")
|
||||
}
|
||||
in[12]--
|
||||
}
|
||||
|
||||
func TestParseCSRPEMMore(t *testing.T) {
|
||||
csrPEM, err := ioutil.ReadFile(testCSRPEM)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if _, err := ParseCSRPEM(csrPEM); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
csrPEM, err = ioutil.ReadFile(testCSRPEMBad)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if _, err := ParseCSRPEM(csrPEM); err == nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if _, err := ParseCSRPEM([]byte("not even pem")); err == nil {
|
||||
t.Fatal("Expected an invalid CSR.")
|
||||
}
|
||||
}
|
||||
|
||||
// Imported from signers/local/testdata/
|
||||
const rsaOldTestCSR = "testdata/rsa-old.csr"
|
||||
|
||||
func TestParseOldCSR(t *testing.T) {
|
||||
in, err := ioutil.ReadFile(rsaOldTestCSR)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
}
|
||||
|
||||
_, _, err = ParseCSR(in)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Imported from signers/local/testdata/
|
||||
const clientCertFile = "testdata/ca.pem"
|
||||
const clientKeyFile = "testdata/ca_key.pem"
|
||||
|
||||
func TestClientCertParams(t *testing.T) {
|
||||
_, err := LoadClientCertificate(testCertFile, testPrivateRSAKey)
|
||||
if err == nil {
|
||||
t.Fatal("Unmatched cert/key should generate error")
|
||||
}
|
||||
|
||||
cert, err := LoadClientCertificate("", "")
|
||||
if err != nil || cert != nil {
|
||||
t.Fatal("Certificate atempted to loaded with missing key and cert")
|
||||
}
|
||||
cert, err = LoadClientCertificate(clientCertFile, "")
|
||||
if err != nil || cert != nil {
|
||||
t.Fatal("Certificate atempted to loaded with missing key")
|
||||
}
|
||||
cert, err = LoadClientCertificate("", clientKeyFile)
|
||||
if err != nil || cert != nil {
|
||||
t.Fatal("Certificate atempted to loaded with missing cert")
|
||||
}
|
||||
|
||||
cert, err = LoadClientCertificate(clientCertFile, clientKeyFile)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if cert == nil {
|
||||
t.Fatal("cert not created")
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoadPEMCertPool(t *testing.T) {
|
||||
certPool, err := PEMToCertPool([]byte{})
|
||||
if certPool != nil || err != nil {
|
||||
t.Fatal("Empty file name should not generate error or a cert pool")
|
||||
}
|
||||
|
||||
in, err := ioutil.ReadFile(testEmptyPem)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
}
|
||||
certPool, err = PEMToCertPool(in)
|
||||
if certPool != nil {
|
||||
t.Fatal("Empty file should not generate a cert pool")
|
||||
} else if err == nil {
|
||||
t.Fatal("Expected error for empty file")
|
||||
}
|
||||
|
||||
in, err = ioutil.ReadFile(testEmptyCertFile)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
}
|
||||
certPool, err = PEMToCertPool(in)
|
||||
if certPool != nil {
|
||||
t.Fatal("Empty cert should not generate a cert pool")
|
||||
} else if err == nil {
|
||||
t.Fatal("Expected error for empty cert")
|
||||
}
|
||||
|
||||
in, err = ioutil.ReadFile(clientCertFile)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
}
|
||||
certPool, err = PEMToCertPool(in)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
} else if certPool == nil {
|
||||
t.Fatal("cert pool not created")
|
||||
}
|
||||
}
|
||||
|
||||
// sctEquals returns true if all fields of both SCTs are equivalent.
|
||||
func sctEquals(sctA, sctB ct.SignedCertificateTimestamp) bool {
|
||||
if sctA.SCTVersion == sctB.SCTVersion &&
|
||||
sctA.LogID == sctB.LogID &&
|
||||
sctA.Timestamp == sctB.Timestamp &&
|
||||
bytes.Equal(sctA.Extensions, sctB.Extensions) &&
|
||||
sctA.Signature.Algorithm == sctB.Signature.Algorithm &&
|
||||
bytes.Equal(sctA.Signature.Signature, sctA.Signature.Signature) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// NOTE: TestDeserializeSCTList tests both DeserializeSCTList and
|
||||
// SerializeSCTList.
|
||||
func TestDeserializeSCTList(t *testing.T) {
|
||||
// Here we make sure that empty SCT lists return an error
|
||||
emptyLists := [][]byte{nil, {}}
|
||||
for _, emptyList := range emptyLists {
|
||||
_, err := DeserializeSCTList(emptyList)
|
||||
if err == nil {
|
||||
t.Fatalf("DeserializeSCTList(%v) should raise an error\n", emptyList)
|
||||
}
|
||||
}
|
||||
|
||||
// Here we make sure that an SCT list with a zero SCT is deserialized
|
||||
// correctly
|
||||
var zeroSCT ct.SignedCertificateTimestamp
|
||||
serializedSCT, err := SerializeSCTList([]ct.SignedCertificateTimestamp{zeroSCT})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
deserializedSCTList, err := DeserializeSCTList(serializedSCT)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !sctEquals(zeroSCT, (deserializedSCTList)[0]) {
|
||||
t.Fatal("SCTs don't match")
|
||||
}
|
||||
|
||||
// Here we verify that an error is raised when the SCT list length
|
||||
// field is greater than its actual length
|
||||
serializedSCT, err = SerializeSCTList([]ct.SignedCertificateTimestamp{zeroSCT})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
serializedSCT[0] = 15
|
||||
_, err = DeserializeSCTList(serializedSCT)
|
||||
if err == nil {
|
||||
t.Fatalf("DeserializeSCTList should raise an error when " +
|
||||
"the SCT list length field and the list length don't match\n")
|
||||
}
|
||||
|
||||
// Here we verify that an error is raised when the SCT list length
|
||||
// field is less than its actual length
|
||||
serializedSCT[0] = 0
|
||||
serializedSCT[1] = 0
|
||||
_, err = DeserializeSCTList(serializedSCT)
|
||||
if err == nil {
|
||||
t.Fatalf("DeserializeSCTList should raise an error when " +
|
||||
"the SCT list length field and the list length don't match\n")
|
||||
}
|
||||
|
||||
// Here we verify that an error is raised when the SCT length field is
|
||||
// greater than its actual length
|
||||
serializedSCT[0] = 0
|
||||
serializedSCT[1] = 49
|
||||
serializedSCT[2] = 1
|
||||
_, err = DeserializeSCTList(serializedSCT)
|
||||
if err == nil {
|
||||
t.Fatalf("DeserializeSCTList should raise an error when " +
|
||||
"the SCT length field and the SCT length don't match\n")
|
||||
}
|
||||
|
||||
// Here we verify that an error is raised when the SCT length field is
|
||||
// less than its actual length
|
||||
serializedSCT[2] = 0
|
||||
serializedSCT[3] = 0
|
||||
_, err = DeserializeSCTList(serializedSCT)
|
||||
if err == nil {
|
||||
t.Fatalf("DeserializeSCTList should raise an error when " +
|
||||
"the SCT length field and the SCT length don't match\n")
|
||||
}
|
||||
}
|
||||
|
||||
func TestSCTListFromOCSPResponse(t *testing.T) {
|
||||
var response ocsp.Response
|
||||
lst, err := SCTListFromOCSPResponse(&response)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(lst) != 0 {
|
||||
t.Fatal("SCTListFromOCSPResponse should return an empty SCT list for an empty extension")
|
||||
}
|
||||
|
||||
var zeroSCT ct.SignedCertificateTimestamp
|
||||
serializedSCTList, err := SerializeSCTList([]ct.SignedCertificateTimestamp{zeroSCT})
|
||||
if err != nil {
|
||||
t.Fatal("failed to serialize SCT list")
|
||||
}
|
||||
serializedSCTList, err = asn1.Marshal(serializedSCTList)
|
||||
if err != nil {
|
||||
t.Fatal("failed to serialize SCT list")
|
||||
}
|
||||
// The value of Id below is the object identifier of the OCSP Stapling
|
||||
// SCT extension (see section 3.3. of RFC 6962).
|
||||
response.Extensions = []pkix.Extension{{
|
||||
Id: asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 11129, 2, 4, 5},
|
||||
Critical: false,
|
||||
Value: serializedSCTList,
|
||||
}}
|
||||
lst, err = SCTListFromOCSPResponse(&response)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !sctEquals(zeroSCT, lst[0]) {
|
||||
t.Fatal("SCTs don't match")
|
||||
}
|
||||
}
|
53
vendor/github.com/cloudflare/cfssl/helpers/testdata/bundle.pem
generated
vendored
Normal file
53
vendor/github.com/cloudflare/cfssl/helpers/testdata/bundle.pem
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEczCCAl2gAwIBAgIIDARj8BWNsscwCwYJKoZIhvcNAQELMIGMMQswCQYDVQQG
|
||||
EwJVUzETMBEGA1UEChMKQ2xvdWRGbGFyZTEcMBoGA1UECxMTU3lzdGVtcyBFbmdp
|
||||
bmVlcmluZzEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzETMBEGA1UECBMKQ2FsaWZv
|
||||
cm5pYTEdMBsGA1UEAxMUY2xvdWRmbGFyZS1pbnRlci5jb20wHhcNMTQwMzAyMDAw
|
||||
MDAwWhcNMTkwNDAxMDAwMDAwWjCBjDELMAkGA1UEBhMCVVMxEzARBgNVBAoTCkNs
|
||||
b3VkRmxhcmUxHDAaBgNVBAsTE1N5c3RlbXMgRW5naW5lZXJpbmcxFjAUBgNVBAcT
|
||||
DVNhbiBGcmFuY2lzY28xEzARBgNVBAgTCkNhbGlmb3JuaWExHTAbBgNVBAMTFGNs
|
||||
b3VkZmxhcmUtaW50ZXIuY29tMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEIVkjNJGw
|
||||
f3F0XWJH7yQSVtxuoBidi5JNsQ7FhxEQcZEl3b+/1iF60TBY2Yi6KwJuA6nIE73P
|
||||
IXGyfNhThw4D8Ci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U26q34v8wG9U7Jv4fsZJ+RGebDI+TR3QG6Yod06l9oEYZxWXBY7
|
||||
STOs8wuTu3huSnan/IpWnV017Vsc61D5G+QrqcxZdXckt3anZKCF75JpUnJ7vuow
|
||||
TmmHlb8KIMa9mOvcuGX4P6mz8gTi2arl/aL27kj9Q0Jgv/y1ebe2Bx2P9TF6+VND
|
||||
DL3J/vSVlFeqLt2reAIBKnytLwIDAQABo4GIMIGFMA4GA1UdDwEB/wQEAwIApDAS
|
||||
BgNVHRMBAf8ECDAGAQH/AgEBMB0GA1UdDgQWBBTXXUgpaSwO9HOrQBxGqOOSFHsH
|
||||
EDAfBgNVHSMEGDAWgBS4Xu+uZ1C31vMH5Wq+VbNnOg2SPjAfBgNVHREEGDAWghRj
|
||||
bG91ZGZsYXJlLWludGVyLmNvbTALBgkqhkiG9w0BAQsDgYEAfPLKCAHnPzgMYLX/
|
||||
fWznVvOEFAAYZByPFx4QdMBbDZUtxHyvJIBs6PdxrdSuDwSiMqE7qQIi+jzzwGl9
|
||||
fC7vf45B2zCX0OW51QL2oWNBdKlGgB+b2pwyME82lX/Pr7V1GY10u+ep1xdZDnch
|
||||
DaMsXjQQTJu0iuG3qKEuCmUwOmc=
|
||||
-----END CERTIFICATE-----
|
52
vendor/github.com/cloudflare/cfssl/helpers/testdata/bundle_pkcs7.pem
generated
vendored
Normal file
52
vendor/github.com/cloudflare/cfssl/helpers/testdata/bundle_pkcs7.pem
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
-----BEGIN PKCS7-----
|
||||
MIIJOAYJKoZIhvcNAQcCoIIJKTCCCSUCAQExADALBgkqhkiG9w0BBwGgggkLMIIE
|
||||
czCCAl2gAwIBAgIIDARj8BWNsscwCwYJKoZIhvcNAQELMIGMMQswCQYDVQQGEwJV
|
||||
UzETMBEGA1UEChMKQ2xvdWRGbGFyZTEcMBoGA1UECxMTU3lzdGVtcyBFbmdpbmVl
|
||||
cmluZzEWMBQGA1UEBxMNU2FuIEZyYW5jaXN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G3
|
||||
qKEuCmUwOmehADEA
|
||||
-----END PKCS7-----
|
56
vendor/github.com/cloudflare/cfssl/helpers/testdata/bundle_with_whitespace.pem
generated
vendored
Normal file
56
vendor/github.com/cloudflare/cfssl/helpers/testdata/bundle_with_whitespace.pem
generated
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEczCCAl2gAwIBAgIIDARj8BWNsscwCwYJKoZIhvcNAQELMIGMMQswCQYDVQQG
|
||||
EwJVUzETMBEGA1UEChMKQ2xvdWRGbGFyZTEcMBoGA1UECxMTU3lzdGVtcyBFbmdp
|
||||
bmVlcmluZzEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzETMBEGA1UECBMKQ2FsaWZv
|
||||
cm5pYTEdMBsGA1UEAxMUY2xvdWRmbGFyZS1pbnRlci5jb20wHhcNMTQwMzAyMDAw
|
||||
MDAwWhcNMTkwNDAxMDAwMDAwWjCBjDELMAkGA1UEBhMCVVMxEzARBgNVBAoTCkNs
|
||||
b3VkRmxhcmUxHDAaBgNVBAsTE1N5c3RlbXMgRW5naW5lZXJpbmcxFjAUBgNVBAcT
|
||||
DVNhbiBGcmFuY2lzY28xEzARBgNVBAgTCkNhbGlmb3JuaWExHTAbBgNVBAMTFGNs
|
||||
b3VkZmxhcmUtaW50ZXIuY29tMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEIVkjNJGw
|
||||
f3F0XWJH7yQSVtxuoBidi5JNsQ7FhxEQcZEl3b+/1iF60TBY2Yi6KwJuA6nIE73P
|
||||
IXGyfNhThw4D8CiZbackQ/ufgz2DyvxyWFDPzLr7TXeM/0wSp/imoxWeo4GIMIGF
|
||||
MA4GA1UdDwEB/wQEAwIApDASBgNVHRMBAf8ECDAGAQH/AgEBMB0GA1UdDgQWBBRB
|
||||
+YoiUjIm34/wBwHdJGE4Wufs/DAfBgNVHSMEGDAWgBTXXUgpaSwO9HOrQBxGqOOS
|
||||
FHsHEDAfBgN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FeqLt2reAIBKnytLwIDAQABo4GIMIGFMA4GA1UdDwEB/wQEAwIApDAS
|
||||
BgNVHRMBAf8ECDAGAQH/AgEBMB0GA1UdDgQWBBTXXUgpaSwO9HOrQBxGqOOSFHsH
|
||||
EDAfBgNVHSMEGDAWgBS4Xu+uZ1C31vMH5Wq+VbNnOg2SPjAfBgNVHREEGDAWghRj
|
||||
bG91ZGZsYXJlLWludGVyLmNvbTALBgkqhkiG9w0BAQsDgYEAfPLKCAHnPzgMYLX/
|
||||
fWznVvOEFAAYZByPFx4QdMBbDZUtxHyvJIBs6PdxrdSuDwSiMqE7qQIi+jzzwGl9
|
||||
fC7vf45B2zCX0OW51QL2oWNBdKlGgB+b2pwyME82lX/Pr7V1GY10u+ep1xdZDnch
|
||||
DaMsXjQQTJu0iuG3qKEuCmUwOmc=
|
||||
-----END CERTIFICATE-----
|
||||
|
27
vendor/github.com/cloudflare/cfssl/helpers/testdata/ca.pem
generated
vendored
Normal file
27
vendor/github.com/cloudflare/cfssl/helpers/testdata/ca.pem
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEmzCCA4OgAwIBAgIMAMSvNBgypwaaSQ5iMA0GCSqGSIb3DQEBBQUAMIGMMQsw
|
||||
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
|
||||
YW5jaXNjbzETMBEGA1UEChMKQ0ZTU0wgVEVTVDEbMBkGA1UEAxMSQ0ZTU0wgVEVT
|
||||
VCBSb290IENBMR4wHAYJKoZIhvcNAQkBFg90ZXN0QHRlc3QubG9jYWwwHhcNMTIx
|
||||
MjEyMDIxMDMxWhcNMjIxMDIxMDIxMDMxWjCBjDELMAkGA1UEBhMCVVMxEzARBgNV
|
||||
BAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xEzARBgNVBAoT
|
||||
CkNGU1NMIFRFU1QxGzAZBgN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DouGswpu97jyuCYZ3z1a60+a+3C1GwWaJ7Aet
|
||||
Uqm+yLTUrMISsfnDPqJdM1NeqW3jiZ4IgcqJkieCCSpag9Xuzrp9q6rjmePvlQkv
|
||||
qz020JGg6VijJ+c6Tf5y0XqbAhkBTqYtVamu9gEth9utn12EhdNjTZMPKMjjgFUd
|
||||
H0N6yOEuQMl4ky7RxZBM0iPyeob6i4z2LEQilgv9MQ==
|
||||
-----END CERTIFICATE-----
|
28
vendor/github.com/cloudflare/cfssl/helpers/testdata/ca_key.pem
generated
vendored
Normal file
28
vendor/github.com/cloudflare/cfssl/helpers/testdata/ca_key.pem
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCxGnXFJ8gOgP/j
|
||||
QGjgeWzewWfh1q/k2DFtkalXIYXt0kj27R4ScvgFQayw9pQUtYLzcJnG6NQSIR8T
|
||||
Sgpf646GEa/f6PnFJM0zvribZ5KI3ndx1m0rTl2HCr25Lwu2Mo5B43WZDmqaKrEE
|
||||
x2OQqAyxXDmUwKChgqjnuRooXJfN2k1UPOrD6m0daa420NCMrepPkxrTqZg+YgZi
|
||||
EhlgtjugkaD1kRo1HQYjDjMhPklGw2JpJvnBMvBprSf/i8snJWMslxiYkG9laPyD
|
||||
61or4Lgg27+Ma7H5uawL2GrXi1s5pM0Cf80TSo3ygfBxEESp850Rh1mTEjk1Y+Io
|
||||
1b9D4B5dAgMBAAECggEAKHhjcSomDSptTwDo9mLI/h40HudwSlsc8GzYxZBjinUD
|
||||
N2n39T9QbeMUE1xFenX/9qFEgq+xxnLLJx1EQacSapCgIAqdCO/f9HMgvGJumdg8
|
||||
c0cMq1i9Bp7tu+OESZ5D48qWlOM2eQRIb08g8W11eRIaFmPuUPoKnuktkQuXpPJc
|
||||
YbS/+JuA8SDwe6sV0cMCQuS+iHFfeGwWCKrDUkhLwcL3waW3od2XFy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
|
||||
-----END PRIVATE KEY-----
|
BIN
vendor/github.com/cloudflare/cfssl/helpers/testdata/cert.der
generated
vendored
Normal file
BIN
vendor/github.com/cloudflare/cfssl/helpers/testdata/cert.der
generated
vendored
Normal file
Binary file not shown.
13
vendor/github.com/cloudflare/cfssl/helpers/testdata/cert.pem
generated
vendored
Normal file
13
vendor/github.com/cloudflare/cfssl/helpers/testdata/cert.pem
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIB7DCCAZKgAwIBAgIIE/Qz49ebG7kwCgYIKoZIzj0EAwIwTDELMAkGA1UEBhMC
|
||||
VVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28x
|
||||
EDAOBgNVBAoTB2FjbWUuY28wHhcNMTcwNTIzMTk1MTQ0WhcNMTcwODIzMDE1NjQ0
|
||||
WjBMMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN
|
||||
U2FuIEZyYW5jaXNjbzEQMA4GA1UEChMHYWNtZS5jbzBZMBMGByqGSM49AgEGCCqG
|
||||
SM49AwEHA0IABEW8F+k/avvdBm/KRsuDnTZ3p+VuVdsqDF+aD9nIYeOhx5sj574y
|
||||
hEIZOpgbEsi3BvqY63y2jYyPFodf25+CA9GjXjBcMA4GA1UdDwEB/wQEAwIFoDAd
|
||||
BgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAdBgNV
|
||||
HQ4EFgQUzDpu+HN89EC1M8aNl7f0Ln5JnnIwCgYIKoZIzj0EAwIDSAAwRQIgC4/r
|
||||
urbw/pzE3LDA6GpIts6TVyzgftLLEfU2BzQsjp0CIQDo+sn8t7XC6JN4KKRr2ABl
|
||||
ZI+JifgG+2KCy9ln2LxGJQ==
|
||||
-----END CERTIFICATE-----
|
14
vendor/github.com/cloudflare/cfssl/helpers/testdata/cert_pkcs7.pem
generated
vendored
Normal file
14
vendor/github.com/cloudflare/cfssl/helpers/testdata/cert_pkcs7.pem
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
-----BEGIN PKCS7-----
|
||||
MIICHQYJKoZIhvcNAQcCoIICDjCCAgoCAQExADALBgkqhkiG9w0BBwGgggHwMIIB
|
||||
7DCCAZKgAwIBAgIIE/Qz49ebG7kwCgYIKoZIzj0EAwIwTDELMAkGA1UEBhMCVVMx
|
||||
EzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xEDAO
|
||||
BgNVBAoTB2FjbWUuY28wHhcNMTcwNTIzMTk1MTQ0WhcNMTcwODIzMDE1NjQ0WjBM
|
||||
MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2Fu
|
||||
IEZyYW5jaXNjbzEQMA4GA1UEChMHYWNtZS5jbzBZMBMGByqGSM49AgEGCCqGSM49
|
||||
AwEHA0IABEW8F+k/avvdBm/KRsuDnTZ3p+VuVdsqDF+aD9nIYeOhx5sj574yhEIZ
|
||||
OpgbEsi3BvqY63y2jYyPFodf25+CA9GjXjBcMA4GA1UdDwEB/wQEAwIFoDAdBgNV
|
||||
HSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAdBgNVHQ4E
|
||||
FgQUzDpu+HN89EC1M8aNl7f0Ln5JnnIwCgYIKoZIzj0EAwIDSAAwRQIgC4/rurbw
|
||||
/pzE3LDA6GpIts6TVyzgftLLEfU2BzQsjp0CIQDo+sn8t7XC6JN4KKRr2ABlZI+J
|
||||
ifgG+2KCy9ln2LxGJaEAMQA=
|
||||
-----END PKCS7-----
|
15
vendor/github.com/cloudflare/cfssl/helpers/testdata/cert_with_whitespace.pem
generated
vendored
Normal file
15
vendor/github.com/cloudflare/cfssl/helpers/testdata/cert_with_whitespace.pem
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIB7DCCAZKgAwIBAgIIE/Qz49ebG7kwCgYIKoZIzj0EAwIwTDELMAkGA1UEBhMC
|
||||
VVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28x
|
||||
EDAOBgNVBAoTB2FjbWUuY28wHhcNMTcwNTIzMTk1MTQ0WhcNMTcwODIzMDE1NjQ0
|
||||
WjBMMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN
|
||||
U2FuIEZyYW5jaXNjbzEQMA4GA1UEChMHYWNtZS5jbzBZMBMGByqGSM49AgEGCCqG
|
||||
SM49AwEHA0IABEW8F+k/avvdBm/KRsuDnTZ3p+VuVdsqDF+aD9nIYeOhx5sj574y
|
||||
hEIZOpgbEsi3BvqY63y2jYyPFodf25+CA9GjXjBcMA4GA1UdDwEB/wQEAwIFoDAd
|
||||
BgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAdBgNV
|
||||
HQ4EFgQUzDpu+HN89EC1M8aNl7f0Ln5JnnIwCgYIKoZIzj0EAwIDSAAwRQIgC4/r
|
||||
urbw/pzE3LDA6GpIts6TVyzgftLLEfU2BzQsjp0CIQDo+sn8t7XC6JN4KKRr2ABl
|
||||
ZI+JifgG+2KCy9ln2LxGJQ==
|
||||
-----END CERTIFICATE-----
|
||||
|
11
vendor/github.com/cloudflare/cfssl/helpers/testdata/ecdsa256.csr
generated
vendored
Normal file
11
vendor/github.com/cloudflare/cfssl/helpers/testdata/ecdsa256.csr
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
-----BEGIN CERTIFICATE REQUEST-----
|
||||
MIIBgTCCASgCAQAwgYYxCzAJBgNVBAYTAlVTMRMwEQYDVQQKEwpDbG91ZEZsYXJl
|
||||
MRwwGgYDVQQLExNTeXN0ZW1zIEVuZ2luZWVyaW5nMRYwFAYDVQQHEw1TYW4gRnJh
|
||||
bmNpc2NvMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRcwFQYDVQQDEw5jbG91ZGZsYXJl
|
||||
LmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABBn9Ldie6BOcMHezn2dPuYqW
|
||||
z/NoLYMLGNBqhOxUyEidYClI0JW2pWyUgT3A2UazFp1WgE94y7Z+2YlfRz+vcrKg
|
||||
PzA9BgkqhkiG9w0BCQ4xMDAuMCwGA1UdEQQlMCOCDmNsb3VkZmxhcmUuY29tghF3
|
||||
d3djbG91ZGZsYXJlLmNvbTAKBggqhkjOPQQDAgNHADBEAiBM+QRxe8u6rkdr10Jy
|
||||
cxbR6NxrGrNeg5QqiOqF96JEmgIgDbtjd5e3y3I8W/+ih2us3WtMxgnTXfqPd48i
|
||||
VLcv28Q=
|
||||
-----END CERTIFICATE REQUEST-----
|
1
vendor/github.com/cloudflare/cfssl/helpers/testdata/empty.pem
generated
vendored
Normal file
1
vendor/github.com/cloudflare/cfssl/helpers/testdata/empty.pem
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
|
BIN
vendor/github.com/cloudflare/cfssl/helpers/testdata/empty_pkcs7.der
generated
vendored
Normal file
BIN
vendor/github.com/cloudflare/cfssl/helpers/testdata/empty_pkcs7.der
generated
vendored
Normal file
Binary file not shown.
3
vendor/github.com/cloudflare/cfssl/helpers/testdata/empty_pkcs7.pem
generated
vendored
Normal file
3
vendor/github.com/cloudflare/cfssl/helpers/testdata/empty_pkcs7.pem
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
-----BEGIN PKCS7-----
|
||||
MCcGCSqGSIb3DQEHAqAaMBgCAQExADALBgkqhkiG9w0BBwGgAKEAMQA=
|
||||
-----END PKCS7-----
|
2
vendor/github.com/cloudflare/cfssl/helpers/testdata/emptycert.pem
generated
vendored
Normal file
2
vendor/github.com/cloudflare/cfssl/helpers/testdata/emptycert.pem
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
-----END CERTIFICATE-----LSKFSKLF
|
BIN
vendor/github.com/cloudflare/cfssl/helpers/testdata/emptypasswordpkcs12.p12
generated
vendored
Normal file
BIN
vendor/github.com/cloudflare/cfssl/helpers/testdata/emptypasswordpkcs12.p12
generated
vendored
Normal file
Binary file not shown.
30
vendor/github.com/cloudflare/cfssl/helpers/testdata/enc_priv_key.pem
generated
vendored
Normal file
30
vendor/github.com/cloudflare/cfssl/helpers/testdata/enc_priv_key.pem
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: AES-128-CBC,90B8A5792FA2FE75B2053582F3DF394F
|
||||
|
||||
yVY2xuth5fdJBg9gg+6eP3qTsr0CJ2mGEDW6rvYmYuATSRF1hVERrsznxJYjYLaw
|
||||
JHec8FVr78y4aXxI/aFzlxLkS8f12WjTtIhzHwhzgSJDwVOXSRphnLAeHWnhEKLe
|
||||
7kO+vzoTPIc3ECwdvtr6//z2tP1/sac+yIhL6C+x2rS5hFHhmDUXtILPxxfHJCiM
|
||||
qtKiiOZz3W6008CeJMC9ZPlKHDvpq7aIL4rfVP/GkZ+/teQkgWNpMxac7+gWLKuK
|
||||
109v6pu+8KT49D6SMsaZPvAb5PXcIB79ZCPI1JX0V26CKcswba4RHG/h1xifwyAF
|
||||
OIvmK29mmFqbx5GPlUefRUuPwRJKCXFiK6LTdhCwLYodtXde4ibvOFYy4onGoVax
|
||||
I5WVaOhQMqp+mxA6z7odrIvuFcQGixIA+peaaSbpNZSZGuxRvVefcdxPbJ+26Ijs
|
||||
wq8uyalbwhKtjPTPNkMaaYzJdWS7wd2DS4RM9JT8Y1h6NTftCY3c+/txOlt5pQzW
|
||||
T8n+NTd4o+PFOHzMnmEnrtf9Y/SSzXDB2OPCD95YdIXItQDdKcjK0NmnY8GNfkWL
|
||||
G30NJNy3/DR7Sa5u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BD1O/FYJvWoANEwUX
|
||||
-----END RSA PRIVATE KEY-----
|
48
vendor/github.com/cloudflare/cfssl/helpers/testdata/messed_up_bundle.pem
generated
vendored
Normal file
48
vendor/github.com/cloudflare/cfssl/helpers/testdata/messed_up_bundle.pem
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEczCCAl2gAwIBAgIIDARj8BWNsscwCwYJKoZIhvcNAQELMIGMMQswCQYDVQQG
|
||||
EwJVUzETMBEGA1UEChMKQ2xvdWRGbGFyZTEcMBoGA1UECxMTU3lzdGVtcyBFbmdp
|
||||
bmVlcmluZzEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzETMBEGA1UECBMKQ2FsaWZv
|
||||
cm5pYTEdMBsGA1UEAxMUY2xvdWRmbGFyZS1pbnRlci5jb20wHhcNMTQwMzAyMDAw
|
||||
MDAwWhcNMTkwNDAxMDAwMDAwWjCBjDELMAkGA1UEBhMCVVMxEzARBgNVBAoTCkNs
|
||||
b3VkRmxhcmUxHDAaBgNVBAsTE1N5c3RlbXMgRW5naW5lZXJpbmcxFjAUBgNVBAcT
|
||||
FHsHEDAfBgNVHREEGDAWghRjbG91ZGZsYXJlLWludGVyLmNvbTALBgkqhkiG9w0B
|
||||
AQsDggIBACRqAC5EJEe+8ihv1WzCUMEMb7KtS0BqoNbdXE32ia66PgJSQmHcmeJd
|
||||
FI1UjL0DlljTM2tc+8KxR/1/qnKiI+W/D4wFTWOY/JWFOd15q7lXuKGl+8PMkAHF
|
||||
A145JCr6oZoO9G9wUwVUrbmXAbyPCOfzsEQ2+mD9F1ZpoEjzVhtGf0R+vnYrRw8j
|
||||
4WCv5AIcYRAf7HZxbhMILF1bccNlqyUtdH+/MTHXpjkjJjA5KbsHBrAEfjAXkD7c
|
||||
WWOay6m7mVWb3PPFmGorP6t29baEETK9ZTZSrfD9rnExjjUCftWJEn0M4Pp98DvT
|
||||
br6+bg8jwtq73qdyOfNsC/Sod18Uu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Omc=
|
||||
-----END CERTIFICATE-----
|
||||
SDFSDKjkfdlsdfj
|
20
vendor/github.com/cloudflare/cfssl/helpers/testdata/messed_up_priv_key.pem
generated
vendored
Normal file
20
vendor/github.com/cloudflare/cfssl/helpers/testdata/messed_up_priv_key.pem
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEowIBAAKCAQEAvGKyz9ZzIXI/BFrtqbVQMmKQkPZGndyfV3AzeSb2ulbS/s5k
|
||||
yNJMH/jKZiSCvZiJNnW+JNlJrgLxORMmPStPz/N/0L0vCTotQKZUiaBttFgHgobQ
|
||||
LFsbMnumt9It5W/uOwgWI9binuzvqyPXywLlYwOq3jkOmA22ymhflzRrl6a3jzcY
|
||||
hT9evxHl0gV4bN7KZ5p4wK/UUuG1uMEQLw87lUwRRHeW3ZG52VL38+redka+f5pa
|
||||
SGKyG5j0oe1NPLqAjckNgqvDdPMY2gicmCq0VSLzTNpHRsURTUSJvC/iv34vVfba
|
||||
gIYgTvm8BvGbJSlZqP4kEVlOfd3vmB0ttUeoDwIDAQABAoIBAHZdpXCFlA1d1U6N
|
||||
O2s4a01dNOyAcVpa9xtfelgTLU9jomtLj3PG/uHP1oxbQHKUVxKK5JAOnwbg/mQY
|
||||
LhydDCbjHlovpFAt56UJXXCkBoocDYvr3P0huXL80oIJY6EXtR4ONKsMJ5Qn12c2
|
||||
vC3ogey2rzO1sf/EDigbcIR3AWtk1Tx8ZDUooktOFypIsDQgjjxXiURGssAlMPSh
|
||||
6GVgO4JRRG6oRxEna7yDe7izmh/hC5sxSYLsEikCgYEAsBHhb/Qef5obRCSrfFuQ
|
||||
41P7MCtGrXVxKD3iCDGQCzVbEbYGpmZnGsXSaHljp2FtnamaGGEudYziozGKPHjs
|
||||
pbTbsLIDbmNwxz1WcaZ1iyIjtOxcAEqDod8hY4hL6SaxypwTHn4Ydbw2NGzp11Eg
|
||||
Di4SVL82utjycATdKFvBzdsCgYB/3M+GMrt0Sh87rKcQLdL709Kzjcfhvm4HjIbJ
|
||||
GSXGPCZaYMKaXRTdNAjtRKxMawc9qcf0xSBEHL0GkB158TzusDQtjP1anTcYOnl6
|
||||
GsO4bRivp314iNlP4r3S3bIXqBxCGH3HbrvpdPFAN//qjYmAki2lFQZywfvbQOE8
|
||||
oFQHwQKBgHqJkTck2DGlXQIwA7jirLggISXjSPlsG4w4LuhY9ivyNKLUi4x5k1cE
|
||||
bX7SrRtJErQ1WaDN4TFG25xnysi5h+aPinuySatd0XmA5+dE1YjTqqShMO+lUpzi
|
||||
PrOQl6Eva/uw5BDAcUH4AaXTNRvvtXQptUil9qXyOh6fszikA9Mm
|
||||
-----END RSA PRIVATE KEY-----
|
11
vendor/github.com/cloudflare/cfssl/helpers/testdata/messedupcert.pem
generated
vendored
Normal file
11
vendor/github.com/cloudflare/cfssl/helpers/testdata/messedupcert.pem
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIB7jCCAVmgAwIBAgIBADALBgkqhkiG9w0BAQUwJjEQMA4GA1UEChMHQWNtZSBD
|
||||
bzESMBAGA1UEAxMJMTI3LjAuMC4xMB4XDTEyMDkwNzIyMDAwNFoXDTEzMDkwNzIy
|
||||
MDUwNFowJjEQMA4GA1UEChMHQWNtZSBDbzESMBAGA1UEAxMJMTI3LjAuMC4xMIGd
|
||||
MAsGCSqGSIb3DQEBAQOBjQAwgYkCgYEAm6f+jkP2t5q/vM0YAUZZkhq/EAYD+L1C
|
||||
cqhEvLFbu3MCAwEAAaMyMDAwDgYDVR0PAQH/BAQDAgCgMA0GA1UdDgQGBAQBAgME
|
||||
MA8GA1UdIwQIMAaABAECAwQwCwYJKoZIhvcNAQEFA4GBABndWRIcfi+QB9Sakr+m
|
||||
dYnXTgYCnFio53L2Z+6EHTGG+rEhWtUEGhL4p4pzXX4siAnjWvwcgXTo92cafcfi
|
||||
uB7wRfK+NL9CTJdpN6cdL+fiNHzH8hsl3bj1nL0CSmdn2hkUWVLbLhSgWlib/I8O
|
||||
aq+K7aVrgHkPnWeRiG6tl+ZA
|
||||
-----END CERTIFICATE-----
|
BIN
vendor/github.com/cloudflare/cfssl/helpers/testdata/multiplecerts.p12
generated
vendored
Normal file
BIN
vendor/github.com/cloudflare/cfssl/helpers/testdata/multiplecerts.p12
generated
vendored
Normal file
Binary file not shown.
9
vendor/github.com/cloudflare/cfssl/helpers/testdata/noheadercert.pem
generated
vendored
Normal file
9
vendor/github.com/cloudflare/cfssl/helpers/testdata/noheadercert.pem
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
MIIB7jCCAVmgAwIBAgIBADALBgkqhkiG9w0BAQUwJjEQMA4GA1UEChMHQWNtZSBD
|
||||
bzESMBAGA1UEAxMJMTI3LjAuMC4xMB4XDTEyMDkwNzIyMDAwNFoXDTEzMDkwNzIy
|
||||
MDUwNFowJjEQMA4GA1UEChMHQWNtZSBDbzESMBAGA1UEAxMJMTI3LjAuMC4xMIGd
|
||||
MAsGCSqGSIb3DQEBAQOBjQAwgYkCgYEAm6f+jkP2t5q/vM0YAUZZkhq/EAYD+L1C
|
||||
cqhEvLFbu3MCAwEAAaMyMDAwDgYDVR0PAQH/BAQDAgCgMA0GA1UdDgQGBAQBAgME
|
||||
MA8GA1UdIwQIMAaABAECAwQwCwYJKoZIhvcNAQEFA4GBABndWRIcfi+QB9Sakr+m
|
||||
dYnXTgYCnFio53L2Z+6EHTGG+rEhWtUEGhL4p4pzXX4siAnjWvwcgXTo92cafcfi
|
||||
uB7wRfK+NL9CTJdpN6cdL+fiNHzH8hsl3bj1nL0CSmdn2hkUWVLbLhSgWlib/I8O
|
||||
aq+K7aVrgHkPnWeRiG6tl+ZA
|
BIN
vendor/github.com/cloudflare/cfssl/helpers/testdata/passwordpkcs12.p12
generated
vendored
Normal file
BIN
vendor/github.com/cloudflare/cfssl/helpers/testdata/passwordpkcs12.p12
generated
vendored
Normal file
Binary file not shown.
28
vendor/github.com/cloudflare/cfssl/helpers/testdata/priv_rsa_key.pem
generated
vendored
Normal file
28
vendor/github.com/cloudflare/cfssl/helpers/testdata/priv_rsa_key.pem
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEowIBAAKCAQEAvGKyz9ZzIXI/BFrtqbVQMmKQkPZGndyfV3AzeSb2ulbS/s5k
|
||||
yNJMH/jKZiSCvZiJNnW+JNlJrgLxORMmPStPz/N/0L0vCTotQKZUiaBttFgHgobQ
|
||||
LFsbMnumt9It5W/uOwgWI9binuzvqyPXywLlYwOq3jkOmA22ymhflzRrl6a3jzcY
|
||||
hT9evxHl0gV4bN7KZ5p4wK/UUuG1uMEQLw87lUwRRHeW3ZG52VL38+redka+f5pa
|
||||
SGKyG5j0oe1NPLqAjckNgqvDdPMY2gicmCq0VSLzTNpHRsURTUSJvC/iv34vVfba
|
||||
gIYgTvm8BvGbJSlZqP4kEVlOfd3vmB0ttUeoDwIDAQABAoIBAHZdpXCFlA1d1U6N
|
||||
O2s4a01dNOyAcVpa9xtfelgTLU9jomtLj3PG/uHP1oxbQHKUVxKK5JAOnwbg/mQY
|
||||
LhydDCbjHlovpFAt56UJXXCkBoocDYvr3P0huXL80oIJY6EXtR4ONKsMJ5Qn12c2
|
||||
vC3ogey2rzO1sf/EDigbcIR3AWtk1Tx8ZDUooktOFypIsDQgjjxXiURGssAlMPSh
|
||||
1BFz4StRUK4bESaja0GiHwbuxHa+XYEBlK5OqMo/fpWqpgHhV/42+7wdcBMJsMr8
|
||||
rFBe6m+r6TTbLSGJNowyd05XrjoAI35qduckpJ3Voun90i4ynTudjdJ/vHpIqB74
|
||||
qQLFW2ECgYEA+GSRVqobaKKakNUFGmK0I5T5Tikz5f137YXXER6aLtDQNiSrlXNi
|
||||
0aphkC/EfRO3oNvamq5+55bmmgDVoNNPDfpajKz+LZyG8GC2EXlTKO0hZS64KRRl
|
||||
C+bd+ZsYiUDImNVRbIHN82f+BQgsgXlTaWpBOrEqmoePO/J44O4eX3cCgYEAwieq
|
||||
amY4UaY+MhWPJFRK1y9M3hM8+N9N/35CFewQUdFJosC6vVQ4t8jNkSOxVQdgbNwE
|
||||
i/bTBgIwg82JJYbBUPuCVeTT3i6zxymf/FLumrI73URD81IN6FiH1skg0hSFrvs0
|
||||
6GVgO4JRRG6oRxEna7yDe7izmh/hC5sxSYLsEikCgYEAsBHhb/Qef5obRCSrfFuQ
|
||||
41P7MCtGrXVxKD3iCDGQCzVbEbYGpmZnGsXSaHljp2FtnamaGGEudYziozGKPHjs
|
||||
pbTbsLIDbmNwxz1WcaZ1iyIjtOxcAEqDod8hY4hL6SaxypwTHn4Ydbw2NGzp11Eg
|
||||
Di4SVL82utjycATdKFvBzdsCgYB/3M+GMrt0Sh87rKcQLdL709Kzjcfhvm4HjIbJ
|
||||
GSXGPCZaYMKaXRTdNAjtRKxMawc9qcf0xSBEHL0GkB158TzusDQtjP1anTcYOnl6
|
||||
GsO4bRivp314iNlP4r3S3bIXqBxCGH3HbrvpdPFAN//qjYmAki2lFQZywfvbQOE8
|
||||
oFQHwQKBgHqJkTck2DGlXQIwA7jirLggISXjSPlsG4w4LuhY9ivyNKLUi4x5k1cE
|
||||
bX7SrRtJErQ1WaDN4TFG25xnysi5h+aPinuySatd0XmA5+dE1YjTqqShMO+lUpzi
|
||||
PrOQl6Eva/uw5BDAcUH4AaXTNRvvtXQptUil9qXyOh6fszikA9Mm
|
||||
-----END RSA PRIVATE KEY-----
|
||||
|
5
vendor/github.com/cloudflare/cfssl/helpers/testdata/private_ecdsa_key.pem
generated
vendored
Normal file
5
vendor/github.com/cloudflare/cfssl/helpers/testdata/private_ecdsa_key.pem
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
-----BEGIN EC PRIVATE KEY-----
|
||||
MGgCAQEEHCGXsrNo2xfy8+zd4Pzj8rcQ5KqQO43au1t/7nugBwYFK4EEACGhPAM6
|
||||
AASJodCTtj5aYXnWxMiYhwjEgNQJJbNzJFEbsGJX9pCWZC673ammTWFHMjnMPkS/
|
||||
9eU5YeW40BHqfw==
|
||||
-----END EC PRIVATE KEY-----
|
19
vendor/github.com/cloudflare/cfssl/helpers/testdata/rsa-old.csr
generated
vendored
Normal file
19
vendor/github.com/cloudflare/cfssl/helpers/testdata/rsa-old.csr
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
-----BEGIN NEW CERTIFICATE REQUEST-----
|
||||
MIIDCTCCAfMCAQAwgYYxCzAJBgNVBAYTAlVTMRMwEQYDVQQKEwpDbG91ZEZsYXJl
|
||||
MRwwGgYDVQQLExNTeXN0ZW1zIEVuZ2luZWVyaW5nMRYwFAYDVQQHEw1TYW4gRnJh
|
||||
bmNpc2NvMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRcwFQYDVQQDEw5jbG91ZGZsYXJl
|
||||
LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALTWdoYxX4KN51fP
|
||||
WxQAyGH++VsPbfpAoXIbCPXSmU04BvIxyjzpHQ0ChMKkT/2VNcUeFJwk2fCf+ZwU
|
||||
f0raTQTplofwkckE0gEYA3WcEfJp+hbvbTb/2recsf+JE6JACYJe2Uu5wsjtrE5j
|
||||
A+7aT2BEU9RWzBdSy/5281ZfW3PArqcWaf8+RUyA3WRxVWmjmhFsVB+mdNLhCpW0
|
||||
C0QNMYR1ppEZiKVnEdao8gcI5sOvSd+35t8g82aPXcNSPU6jKcx1YNUPX5wgPEmu
|
||||
+anfc9RliQbYqqJYVODgBmV8IR5grw93yTsODoWKtFQ4PKVlnt9CD8AS/iSMQYm3
|
||||
OUogqgMCAwEAAaA/MD0GCSqGSIb3DQEJDjEwMC4wLAYDVR0RBCUwI4IOY2xvdWRm
|
||||
bGFyZS5jb22CEXd3d2Nsb3VkZmxhcmUuY29tMAsGCSqGSIb3DQEBCwOCAQEAl809
|
||||
gk9uZkRK+MJVYDSLjgGR2xqk5qOwnhovnispA7N3Z1GshodJRQa6ngNCKuXIm2/6
|
||||
AxB9kDGK14n186Qq4odXqHSHs8FG9i0zUcBXeLv1rPAKtwKTas/SLmsOpPgWPZFa
|
||||
iYiHHeu4HjOQoF987d7uGRYwc3xfstKwJsEXc12eCw2NH8TM1tJgSc/o6CzIpA91
|
||||
QnZKhx6uGM4xI2gnOaJA1YikNhyFGBuOGMZgd0k2+/IcR2pg0z4pc5oQw1bXLANx
|
||||
anqlA/MDrCM9v9019bRJ73zK8LQ3k/FW61PA9nL7RZ8ku65R+uYcVEdLa8pUeqnH
|
||||
cJZNboDRsItpccZuRQ==
|
||||
-----END NEW CERTIFICATE REQUEST-----
|
5
vendor/github.com/cloudflare/cfssl/helpers/testdata/secp256k1-key.pem
generated
vendored
Normal file
5
vendor/github.com/cloudflare/cfssl/helpers/testdata/secp256k1-key.pem
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
-----BEGIN EC PRIVATE KEY-----
|
||||
MHQCAQEEIJLKycmoCAk4HqlJGdsuFyHsxfIheKsLH91tS/TNP5OOoAcGBSuBBAAK
|
||||
oUQDQgAEBkmL7cvC2cgchzfSuUZPGnzH0FqBtf3kGhSllQiIzGDn4envPXNqp+93
|
||||
V2NZ8VT+Aba4ln2Vbp9gYrKquut5Zg==
|
||||
-----END EC PRIVATE KEY-----
|
15
vendor/github.com/cloudflare/cfssl/helpers/testdata/test.bad.csr.pem
generated
vendored
Normal file
15
vendor/github.com/cloudflare/cfssl/helpers/testdata/test.bad.csr.pem
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
-----BEGIN CERTIFICATE REQUEST-----
|
||||
MIICzDCCAbQCAQAwgYYxCzAJBgNVBAYTAkVOMQ0wCwYDVQQIDARub25lMQ0wCwYD
|
||||
VQQHDARub25lMRIwEAYDVQQKDAlXaWtpcGVkaWExDTALBgNVBAsMBG5vbmUxGDAW
|
||||
BgNVBAMMDyoud2lraXBlZGlhLm9yZzEcMBoGCSqGSIb3DQEJARYNbm9uZUBub25l
|
||||
LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMP/U8RlcCD6E8AL
|
||||
PT8LLUR9ygyygPCaSmIEC8zXGJung3ykElXFRz/Jc/bu0hxCxi2YDz5IjxBBOpB/
|
||||
kieG83HsSmZZtR+drZIQ6vOsr/ucvpnB9z4XzKuabNGZ5ZiTSQ9L7Mx8FzvUTq5y
|
||||
57HhA7ECAwEAAaAAMA0GCSqGSIb3DQEBBAUAA4IBAQBn8OCVOIx+n0AS6WbEmYDR
|
||||
SspR9xOCoOwYfamB+2Bpmt82R01zJ/kaqzUtZUjaGvQvAaz5lUwoMdaO0X7I5Xfl
|
||||
sllMFDaYoGD4Rru4s8gz2qG/QHWA8uPXzJVAj6X0olbIdLTEqTKsnBj4Zr1AJCNy
|
||||
/YcG4ouLJr140o26MhwBpoCRpPjAgdYMH60BYfnc4/DILxMVqR9xqK1s98d6Ob/+
|
||||
3wHFK+S7BRWrJQXcM8veAexXuk9lHQ+FgGfD0eSYGz0kyP26Qa2pLTwumjt+nBPl
|
||||
rfJxaLHwTQ/1988G0H35ED0f9Md5fzoKi5evU1wG5WRxdEUPyt3QUXxdQ69i0C+7
|
||||
-----END CERTIFICATE REQUEST-----
|
||||
|
18
vendor/github.com/cloudflare/cfssl/helpers/testdata/test.csr.pem
generated
vendored
Normal file
18
vendor/github.com/cloudflare/cfssl/helpers/testdata/test.csr.pem
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN CERTIFICATE REQUEST-----
|
||||
MIICzDCCAbQCAQAwgYYxCzAJBgNVBAYTAkVOMQ0wCwYDVQQIDARub25lMQ0wCwYD
|
||||
VQQHDARub25lMRIwEAYDVQQKDAlXaWtpcGVkaWExDTALBgNVBAsMBG5vbmUxGDAW
|
||||
BgNVBAMMDyoud2lraXBlZGlhLm9yZzEcMBoGCSqGSIb3DQEJARYNbm9uZUBub25l
|
||||
LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMP/U8RlcCD6E8AL
|
||||
PT8LLUR9ygyygPCaSmIEC8zXGJung3ykElXFRz/Jc/bu0hxCxi2YDz5IjxBBOpB/
|
||||
kieG83HsSmZZtR+drZIQ6vOsr/ucvpnB9z4XzKuabNGZ5ZiTSQ9L7Mx8FzvUTq5y
|
||||
/ArIuM+FBeuno/IV8zvwAe/VRa8i0QjFXT9vBBp35aeatdnJ2ds50yKCsHHcjvtr
|
||||
9/8zPVqqmhl2XFS3Qdqlsprzbgksom67OobJGjaV+fNHNQ0o/rzP//Pl3i7vvaEG
|
||||
7Ff8tQhEwR9nJUR1T6Z7ln7S6cOr23YozgWVkEJ/dSr6LAopb+cZ88FzW5NszU6i
|
||||
57HhA7ECAwEAAaAAMA0GCSqGSIb3DQEBBAUAA4IBAQBn8OCVOIx+n0AS6WbEmYDR
|
||||
SspR9xOCoOwYfamB+2Bpmt82R01zJ/kaqzUtZUjaGvQvAaz5lUwoMdaO0X7I5Xfl
|
||||
sllMFDaYoGD4Rru4s8gz2qG/QHWA8uPXzJVAj6X0olbIdLTEqTKsnBj4Zr1AJCNy
|
||||
/YcG4ouLJr140o26MhwBpoCRpPjAgdYMH60BYfnc4/DILxMVqR9xqK1s98d6Ob/+
|
||||
3wHFK+S7BRWrJQXcM8veAexXuk9lHQ+FgGfD0eSYGz0kyP26Qa2pLTwumjt+nBPl
|
||||
rfJxaLHwTQ/1988G0H35ED0f9Md5fzoKi5evU1wG5WRxdEUPyt3QUXxdQ69i0C+7
|
||||
-----END CERTIFICATE REQUEST-----
|
||||
|
Reference in New Issue
Block a user