Skip to content

Commit

Permalink
Revert "Use same Subject of CA as the MITM certificate Subject"
Browse files Browse the repository at this point in the history
This reverts commit 60626ae.
  • Loading branch information
ErikPelli committed Jan 16, 2025
1 parent 3e6a85f commit c55bc48
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions internal/signer/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"crypto/sha256"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"fmt"
"math/big"
"math/rand"
Expand Down Expand Up @@ -52,9 +53,11 @@ func SignHost(ca tls.Certificate, hosts []string) (cert *tls.Certificate, err er
template := x509.Certificate{
SerialNumber: big.NewInt(int64(generated)),
Issuer: x509ca.Subject,
Subject: x509ca.Subject,
NotBefore: start,
NotAfter: end,
Subject: pkix.Name{
Organization: []string{"GoProxy untrusted MITM proxy Inc"},
},
NotBefore: start,
NotAfter: end,

KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
Expand Down

0 comments on commit c55bc48

Please sign in to comment.