forked from quic-go/quic-go
use a pre-generated test vectors to test hkdfExpandLabel
The only reason we were using qtls.HkdfExpandLabel was to test our own implementation of HKDF-Expand-Label. By using a pre-generated test vector, we won't have to expose this function from qtls any more.
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
"net"
|
||||
"unsafe"
|
||||
|
||||
qtls "github.com/marten-seemann/qtls-go1-15"
|
||||
"github.com/marten-seemann/qtls-go1-15"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -63,11 +63,6 @@ func HkdfExtract(hash crypto.Hash, newSecret, currentSecret []byte) []byte {
|
||||
return qtls.HkdfExtract(hash, newSecret, currentSecret)
|
||||
}
|
||||
|
||||
// HkdfExpandLabel HKDF expands a label
|
||||
func HkdfExpandLabel(hash crypto.Hash, secret, hashValue []byte, label string, L int) []byte {
|
||||
return qtls.HkdfExpandLabel(hash, secret, hashValue, label, L)
|
||||
}
|
||||
|
||||
// AEADAESGCMTLS13 creates a new AES-GCM AEAD for TLS 1.3
|
||||
func AEADAESGCMTLS13(key, fixedNonce []byte) cipher.AEAD {
|
||||
return qtls.AEADAESGCMTLS13(key, fixedNonce)
|
||||
|
||||
@@ -62,11 +62,6 @@ func HkdfExtract(hash crypto.Hash, newSecret, currentSecret []byte) []byte {
|
||||
return qtls.HkdfExtract(hash, newSecret, currentSecret)
|
||||
}
|
||||
|
||||
// HkdfExpandLabel HKDF expands a label
|
||||
func HkdfExpandLabel(hash crypto.Hash, secret, hashValue []byte, label string, L int) []byte {
|
||||
return qtls.HkdfExpandLabel(hash, secret, hashValue, label, L)
|
||||
}
|
||||
|
||||
// AEADAESGCMTLS13 creates a new AES-GCM AEAD for TLS 1.3
|
||||
func AEADAESGCMTLS13(key, fixedNonce []byte) cipher.AEAD {
|
||||
return qtls.AEADAESGCMTLS13(key, fixedNonce)
|
||||
|
||||
Reference in New Issue
Block a user