improved tls selfsigned

master 1.0.1
LowEel 1 year ago
parent 90b8ece611
commit 885df1c4ab
  1. 2
      run.sh
  2. 23
      tls.go

@ -12,7 +12,7 @@ export RECIPIENTS="./recipients.conf.example"
export MAILFOLDER="mail"
##MAIN
export USETLS="false"
export USETLS="true"
##RUN

@ -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"},
},

Loading…
Cancel
Save