forked from quic-go/quic-go
rename GetCERTData to GetCertCompressed
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()...)))
|
||||
|
||||
Reference in New Issue
Block a user