feat(release): add reproducible signed artifacts (#19)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Text.Json;
|
||||
using FinalFactory.Rendezvous.Client;
|
||||
using FinalFactory.Rendezvous.Contracts;
|
||||
|
||||
@@ -22,6 +23,20 @@ public sealed class TraversalTokenCodecTests
|
||||
Assert.DoesNotContain(encoded, decoded.ToString(), StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ConnectionTicketMatchesTheVersionedV1Vector()
|
||||
{
|
||||
using JsonDocument vector = JsonDocument.Parse(ContractTestFiles.Read("connection-ticket.json"));
|
||||
JsonElement root = vector.RootElement;
|
||||
JoinAttemptId attemptId = new(Guid.Parse(root.GetProperty("attemptId").GetString()!));
|
||||
string authenticator = root.GetProperty("derivedAuthenticator").GetString()!;
|
||||
|
||||
string ticket = NatIntroductionTokenCodec.Encode(attemptId, authenticator);
|
||||
|
||||
Assert.Equal(root.GetProperty("connectionTicket").GetString(), ticket);
|
||||
Assert.Equal(root.GetProperty("digest").GetString(), NatIntroductionTokenCodec.ComputeDigest(ticket));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IntroductionTokenRejectsNonCanonicalOrAlteredFields()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user