Integrate new fake package and doppel into proxy

This commit is contained in:
9seconds
2026-03-12 19:07:11 +01:00
parent 37f8d18be5
commit bb49c6a55d
8 changed files with 76 additions and 85 deletions
@@ -100,7 +100,12 @@ func (suite *ParseClientHelloSnapshotTestSuite) TestSnapshotOk() {
connMock := suite.makeConn(snapshot.GetFull())
defer connMock.AssertExpectations(t)
hello, err := fake.ReadClientHello(connMock, suite.secret, TolerateTime)
hello, err := fake.ReadClientHello(
connMock,
suite.secret.Key[:],
suite.secret.Host,
TolerateTime,
)
require.NoError(t, err)
assert.Equal(t, snapshot.GetRandom(), hello.Random[:])
@@ -131,7 +136,12 @@ func (suite *ParseClientHelloSnapshotTestSuite) TestSnapshotBad() {
connMock := suite.makeConn(snapshot.GetFull())
defer connMock.AssertExpectations(t)
_, err = fake.ReadClientHello(connMock, suite.secret, TolerateTime)
_, err = fake.ReadClientHello(
connMock,
suite.secret.Key[:],
suite.secret.Host,
TolerateTime,
)
assert.ErrorIs(t, err, fake.ErrBadDigest)
})
}