feat(batch9): implement f4 ocsp peer validation hooks

This commit is contained in:
Joseph Doherty
2026-02-28 12:34:38 -05:00
parent 87b4363eeb
commit 41b01743fd
6 changed files with 573 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
using Shouldly;
using ZB.MOM.NatsNet.Server;
using ZB.MOM.NatsNet.Server.Auth.CertificateIdentityProvider;
namespace ZB.MOM.NatsNet.Server.Tests.Auth.CertificateIdentityProvider;
@@ -36,4 +37,18 @@ public sealed class CertificateIdentityProviderTests
var decoded = Convert.FromBase64String(unescaped);
decoded.ShouldBe(data);
}
[Fact]
public void ParseOCSPPeer_UnknownField_ReturnsError()
{
Dictionary<string, object?> map = new()
{
["unexpected"] = true,
};
var (config, err) = OcspHandler.ParseOCSPPeer(map);
config.ShouldBeNull();
err.ShouldNotBeNull();
}
}