send common certificate sets in the client hello

This commit is contained in:
Marten Seemann
2016-12-03 21:01:31 +07:00
parent 44303fcd4b
commit 63f2faec85
6 changed files with 59 additions and 0 deletions

View File

@@ -297,6 +297,11 @@ func (h *cryptoSetupClient) getTags() (map[Tag][]byte, error) {
tags[TagSNI] = []byte(h.hostname)
tags[TagPDMD] = []byte("X509")
ccs := h.certManager.GetCommonCertificateHashes()
if len(ccs) > 0 {
tags[TagCCS] = ccs
}
versionTag := make([]byte, 4, 4)
binary.LittleEndian.PutUint32(versionTag, protocol.VersionNumberToTag(h.version))
tags[TagVER] = versionTag