rename GetCERTData to GetCertCompressed

This commit is contained in:
Lucas Clemente
2016-04-15 12:37:23 +02:00
parent bc88949ffb
commit 35a40ac6d8
4 changed files with 7 additions and 7 deletions

View File

@@ -52,8 +52,8 @@ func (kd *KeyData) SignServerProof(chlo []byte, serverConfigData []byte) ([]byte
return rsa.SignPSS(rand.Reader, kd.key, crypto.SHA256, hash.Sum(nil), &rsa.PSSOptions{SaltLength: 32})
}
// GetCERTdata gets the certificate in the format described by the QUIC crypto doc
func (kd *KeyData) GetCERTdata() []byte {
// GetCertCompressed gets the certificate in the format described by the QUIC crypto doc
func (kd *KeyData) GetCertCompressed() []byte {
b := &bytes.Buffer{}
b.WriteByte(1) // Entry type compressed
b.WriteByte(0) // Entry type end_of_list

View File

@@ -21,7 +21,7 @@ var _ = Describe("ProofRsa", func() {
z.Write(cert)
z.Close()
kd := &KeyData{cert: &x509.Certificate{Raw: cert}}
Expect(kd.GetCERTdata()).To(Equal(append([]byte{
Expect(kd.GetCertCompressed()).To(Equal(append([]byte{
0x01, 0x00,
0x08, 0x00, 0x00, 0x00,
}, certZlib.Bytes()...)))