feat(batch9): implement f4 ocsp peer validation hooks
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user