diff --git a/run.sh b/run.sh index ee6fa9f..af38f00 100755 --- a/run.sh +++ b/run.sh @@ -12,7 +12,7 @@ export RECIPIENTS="./recipients.conf.example" export MAILFOLDER="mail" ##MAIN -export USETLS="false" +export USETLS="true" ##RUN diff --git a/tls.go b/tls.go index a4c8538..3167d36 100644 --- a/tls.go +++ b/tls.go @@ -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"}, },