Lines Matching full:x509
17 "crypto/x509"
18 "crypto/x509/pkix"
53 return &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(k)}
55 b, err := x509.MarshalECPrivateKey(k)
113 template := x509.Certificate{
121 KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,
122 ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
137 template.KeyUsage |= x509.KeyUsageCertSign
140 derBytes, err := x509.CreateCertificate(rand.Reader, &template, &template, publicKey(priv), priv)