public void TestDkimVerifierDefaults() { var verifier = new DkimVerifier(new DummyPublicKeyLocator(DkimKeys.Public)); Assert.AreEqual(1024, verifier.MinimumRsaKeyLength, "MinimumRsaKeyLength"); Assert.IsFalse(verifier.IsEnabled(DkimSignatureAlgorithm.RsaSha1), "rsa-sha1"); Assert.IsTrue(verifier.IsEnabled(DkimSignatureAlgorithm.RsaSha256), "rsa-sha256"); }
public void TestDkimVerifierEnableDisable() { var verifier = new DkimVerifier(new DummyPublicKeyLocator(DkimKeys.Public)); Assert.IsFalse(verifier.IsEnabled(DkimSignatureAlgorithm.RsaSha1), "initial value"); verifier.Enable(DkimSignatureAlgorithm.RsaSha1); Assert.IsTrue(verifier.IsEnabled(DkimSignatureAlgorithm.RsaSha1), "rsa-sha1 enabled"); verifier.Disable(DkimSignatureAlgorithm.RsaSha1); Assert.IsFalse(verifier.IsEnabled(DkimSignatureAlgorithm.RsaSha1), "rsa-sha1 disabled"); }