@@ -13,6 +13,7 @@ import (
1313type tls1prfTest struct {
1414 hash func () hash.Hash
1515 secret []byte
16+ label []byte
1617 seed []byte
1718 out []byte
1819}
@@ -27,7 +28,8 @@ var tls1prfTests = []tls1prfTest{
2728 },
2829 []byte {
2930 0x74 , 0x65 , 0x73 , 0x74 , 0x20 , 0x6c , 0x61 , 0x62 ,
30- 0x65 , 0x6c ,
31+ 0x65 , 0x6c },
32+ []byte {
3133 0xa0 , 0xba , 0x9f , 0x93 , 0x6c , 0xda , 0x31 , 0x18 ,
3234 0x27 , 0xa6 , 0xf7 , 0x96 , 0xff , 0xd5 , 0x19 , 0x8c ,
3335 },
@@ -55,7 +57,8 @@ var tls1prfTests = []tls1prfTest{
5557 },
5658 []byte {
5759 0x74 , 0x65 , 0x73 , 0x74 , 0x20 , 0x6c , 0x61 , 0x62 ,
58- 0x65 , 0x6c ,
60+ 0x65 , 0x6c },
61+ []byte {
5962 0xcd , 0x66 , 0x5c , 0xf6 , 0xa8 , 0x44 , 0x7d , 0xd6 ,
6063 0xff , 0x8b , 0x27 , 0x55 , 0x5e , 0xdb , 0x74 , 0x65 ,
6164 },
@@ -90,6 +93,8 @@ var tls1prfTests = []tls1prfTest{
9093 []byte {
9194 0x74 , 0x65 , 0x73 , 0x74 , 0x20 , 0x6c , 0x61 , 0x62 ,
9295 0x65 , 0x6c ,
96+ },
97+ []byte {
9398 0xd4 , 0x64 , 0x0e , 0x12 , 0xe4 , 0xbc , 0xdb , 0xfb ,
9499 0x43 , 0x7f , 0x03 , 0xe6 , 0xae , 0x41 , 0x8e , 0xe5 ,
95100 },
@@ -128,7 +133,7 @@ func TestTLS1PRF(t *testing.T) {
128133 t .Skip ("TLS 1.2 PRF is not supported" )
129134 }
130135 for i , tt := range tls1prfTests {
131- out , err := openssl .TLS1PRF (tt .secret , tt .seed , len (tt .out ), tt .hash )
136+ out , err := openssl .TLS1PRF (tt .secret , tt .label , tt . seed , len (tt .out ), tt .hash )
132137 if err != nil {
133138 t .Errorf ("test %d: error deriving TLS 1.2 PRF: %v." , i , err )
134139 }
0 commit comments