Skip to content

Commit

Permalink
Record peer chain in Config structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
shuque committed Jul 14, 2020
1 parent 2a4dea4 commit 088cc04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type Config struct {
Okdane bool // DANE authentication result
Okpkix bool // PKIX authentication result
TLSA *TLSAinfo // TLSA RRset information
PeerChain []*x509.Certificate // Peer Certificate Chain
VerifiedChains [][]*x509.Certificate // Verified server Certificate Chains
}

Expand Down
1 change: 1 addition & 0 deletions tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func verifyServer(rawCerts [][]byte,
certs[i] = cert
}

daneconfig.PeerChain = certs
daneconfig.VerifiedChains, err = verifyChain(certs, tlsconfig, true)
if err == nil {
daneconfig.Okpkix = true
Expand Down

0 comments on commit 088cc04

Please sign in to comment.