tests fixes and sprints work
This commit is contained in:
@@ -321,7 +321,7 @@ internal sealed class FixChainAttestationService : IFixChainAttestationService
|
||||
try
|
||||
{
|
||||
// Parse envelope
|
||||
var envelope = JsonSerializer.Deserialize<DsseEnvelopeDto>(envelopeJson);
|
||||
var envelope = JsonSerializer.Deserialize<DsseEnvelopeDto>(envelopeJson, EnvelopeJsonOptions);
|
||||
if (envelope is null)
|
||||
{
|
||||
return Task.FromResult(new FixChainVerificationResult
|
||||
@@ -334,14 +334,18 @@ internal sealed class FixChainAttestationService : IFixChainAttestationService
|
||||
// Validate payload type
|
||||
if (envelope.PayloadType != "application/vnd.in-toto+json")
|
||||
{
|
||||
issues.Add($"Unexpected payload type: {envelope.PayloadType}");
|
||||
return Task.FromResult(new FixChainVerificationResult
|
||||
{
|
||||
IsValid = false,
|
||||
Issues = [$"Unexpected payload type: {envelope.PayloadType}"]
|
||||
});
|
||||
}
|
||||
|
||||
// Decode and parse payload
|
||||
var payloadBytes = Convert.FromBase64String(envelope.Payload);
|
||||
var statementJson = Encoding.UTF8.GetString(payloadBytes);
|
||||
|
||||
var statement = JsonSerializer.Deserialize<FixChainStatement>(statementJson);
|
||||
var statement = JsonSerializer.Deserialize<FixChainStatement>(statementJson, EnvelopeJsonOptions);
|
||||
if (statement is null)
|
||||
{
|
||||
return Task.FromResult(new FixChainVerificationResult
|
||||
|
||||
Reference in New Issue
Block a user