forked from quic-go/quic-go
rename GetCertUncompressed to GetLeafCert
This commit is contained in:
@@ -83,8 +83,8 @@ func (kd *rsaSigner) GetCertCompressed(sni string) ([]byte, error) {
|
||||
return b.Bytes(), nil
|
||||
}
|
||||
|
||||
// GetCertUncompressed gets the certificate in DER
|
||||
func (kd *rsaSigner) GetCertUncompressed(sni string) ([]byte, error) {
|
||||
// GetLeafCert gets the leaf certificate
|
||||
func (kd *rsaSigner) GetLeafCert(sni string) ([]byte, error) {
|
||||
cert, err := kd.getCertForSNI(sni)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -4,5 +4,5 @@ package crypto
|
||||
type Signer interface {
|
||||
SignServerProof(sni string, chlo []byte, serverConfigData []byte) ([]byte, error)
|
||||
GetCertCompressed(sni string) ([]byte, error)
|
||||
GetCertUncompressed(sni string) ([]byte, error)
|
||||
GetLeafCert(sni string) ([]byte, error)
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ func (h *CryptoSetup) handleCHLO(sni string, data []byte, cryptoData map[Tag][]b
|
||||
h.mutex.Lock()
|
||||
defer h.mutex.Unlock()
|
||||
|
||||
certUncompressed, err := h.scfg.signer.GetCertUncompressed(sni)
|
||||
certUncompressed, err := h.scfg.signer.GetLeafCert(sni)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ func (s *mockSigner) SignServerProof(sni string, chlo []byte, serverConfigData [
|
||||
func (*mockSigner) GetCertCompressed(sni string) ([]byte, error) {
|
||||
return []byte("certcompressed"), nil
|
||||
}
|
||||
func (*mockSigner) GetCertUncompressed(sni string) ([]byte, error) {
|
||||
func (*mockSigner) GetLeafCert(sni string) ([]byte, error) {
|
||||
return []byte("certuncompressed"), nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user