Fixes broken unittest

pull/8/head
Kjell Tore Fossbakk 2019-03-01 10:06:04 +01:00
parent f788f64fd0
commit 45159fdca6
1 changed files with 6 additions and 3 deletions

View File

@ -203,7 +203,8 @@ func TestJA3(t *testing.T) {
for _, etlsrecord := range tls.Handshake {
if etlsrecord.ETLSHandshakeMsgType == 1 {
// Populate Client Hello related fields
tlss.PopulateClientHello(etlsrecord.ETLSHandshakeClientHello, "", "", "", "", time.Now())
tlss.PopulateClientHello(etlsrecord.ETLSHandshakeClientHello)
tlss.SetTimestamp(time.Now())
tlss.D4Fingerprinting("ja3")
t.Logf("%v", tlss.Record.JA3)
t.Logf("%v", tlss.Record.JA3Digest)
@ -279,7 +280,8 @@ func TestGreaseClientHelloExtensionExlusion(t *testing.T) {
for _, etlsrecord := range tls.Handshake {
if etlsrecord.ETLSHandshakeMsgType == 1 {
// Populate Client Hello related fields
tlss.PopulateClientHello(etlsrecord.ETLSHandshakeClientHello, "", "", "", "", time.Now())
tlss.PopulateClientHello(etlsrecord.ETLSHandshakeClientHello)
tlss.SetTimestamp(time.Now())
tlss.D4Fingerprinting("ja3")
t.Logf("%v", tlss.Record.JA3Digest)
if strings.Index(tlss.Record.JA3, "2570") != -1 {
@ -312,7 +314,8 @@ func TestGreaseClientHelloCipherExlusion(t *testing.T) {
for _, etlsrecord := range tls.Handshake {
if etlsrecord.ETLSHandshakeMsgType == 1 {
// Populate Client Hello related fields
tlss.PopulateClientHello(etlsrecord.ETLSHandshakeClientHello, "", "", "", "", time.Now())
tlss.PopulateClientHello(etlsrecord.ETLSHandshakeClientHello)
tlss.SetTimestamp(time.Now())
tlss.D4Fingerprinting("ja3")
if strings.Index(tlss.Record.JA3, "2570") != -1 {
t.Logf("GREASE values should not end up in JA3\n")