aboutsummaryrefslogtreecommitdiff
path: root/crypto.go
diff options
context:
space:
mode:
Diffstat (limited to 'crypto.go')
-rw-r--r--crypto.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto.go b/crypto.go
index f2ce1d1..917149d 100644
--- a/crypto.go
+++ b/crypto.go
@@ -8,6 +8,7 @@ import (
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
+ "encoding/asn1"
"encoding/base64"
"encoding/pem"
"errors"
@@ -95,6 +96,8 @@ func NewKey(size int) (crypto.PrivateKey, error) {
}
}
+var oidMailAddress = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 1}
+
func NewCSR(key crypto.PrivateKey, altnames, emails []string) (string, error) {
tmpl := x509.CertificateRequest{
Subject: pkix.Name{CommonName: altnames[0]},