forked from quic-go/quic-go
read certificate chain from SHLO
This commit is contained in:
@@ -25,6 +25,7 @@ type cryptoSetupClient struct {
|
||||
stk []byte
|
||||
sno []byte
|
||||
diversificationNonce []byte
|
||||
certManager *crypto.CertManager
|
||||
}
|
||||
|
||||
var _ crypto.AEAD = &cryptoSetupClient{}
|
||||
@@ -45,6 +46,7 @@ func NewCryptoSetupClient(
|
||||
connID: connID,
|
||||
version: version,
|
||||
cryptoStream: cryptoStream,
|
||||
certManager: &crypto.CertManager{},
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -100,6 +102,13 @@ func (h *cryptoSetupClient) handleREJMessage(cryptoData map[Tag][]byte) error {
|
||||
}
|
||||
}
|
||||
|
||||
if crt, ok := cryptoData[TagCERT]; ok {
|
||||
err := h.certManager.SetData(crt)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user