|
|
|
@ -4,33 +4,19 @@ package main
|
|
|
|
|
import (
|
|
|
|
|
|
|
|
|
|
"crypto/ecdsa"
|
|
|
|
|
|
|
|
|
|
"crypto/ed25519"
|
|
|
|
|
|
|
|
|
|
"crypto/elliptic"
|
|
|
|
|
|
|
|
|
|
"crypto/rand"
|
|
|
|
|
|
|
|
|
|
"crypto/rsa"
|
|
|
|
|
|
|
|
|
|
"crypto/x509"
|
|
|
|
|
|
|
|
|
|
"crypto/x509/pkix"
|
|
|
|
|
|
|
|
|
|
"encoding/pem"
|
|
|
|
|
|
|
|
|
|
"log"
|
|
|
|
|
|
|
|
|
|
"math/big"
|
|
|
|
|
|
|
|
|
|
"net"
|
|
|
|
|
|
|
|
|
|
"os"
|
|
|
|
|
|
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -72,7 +58,7 @@ func ZMakecert() {
|
|
|
|
|
|
|
|
|
|
validFor := time.Duration(3650 * 24 * time.Hour)
|
|
|
|
|
|
|
|
|
|
isCA := false
|
|
|
|
|
isCA := true
|
|
|
|
|
|
|
|
|
|
rsaBits := 4096
|
|
|
|
|
|
|
|
|
@ -186,7 +172,12 @@ func ZMakecert() {
|
|
|
|
|
|
|
|
|
|
Subject: pkix.Name{
|
|
|
|
|
|
|
|
|
|
Organization: []string{"ZangTumb SMTP Server Department"},
|
|
|
|
|
Organization: []string{"ZangTumb Internal CA"},
|
|
|
|
|
Country: []string{"00"},
|
|
|
|
|
Province: []string{"5a622d3c-f218-11eb-9a03-0242ac130003"},
|
|
|
|
|
Locality: []string{"8927f2fa-f218-11eb-9a03-0242ac130003"},
|
|
|
|
|
StreetAddress: []string{"8927f3ea-f218-11eb-9a03-0242ac130003"},
|
|
|
|
|
PostalCode: []string{"666"},
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|