static void Main(string[] args) { var returnCode = MsiTools.VerifyMsiSignature(args[0], args[1]); if (returnCode != CertificateCheckReturnCodes.Success) { throw new DataException(returnCode.ToString()); } }
public void Signed3shape() { var returnCode = MsiTools.VerifyMsiSignature($"{_testProjectFolder}/data/Signed3Shape.dll", "3Shape A/S"); Assert.AreEqual(CertificateCheckReturnCodes.Success, returnCode); }
public void Signed3shapeButWrongDNSName() { var returnCode = MsiTools.VerifyMsiSignature($"{_testProjectFolder}/data/Signed3Shape.dll", "Wrong name"); Assert.AreEqual(CertificateCheckReturnCodes.ValidMsiButSignatureDnsNameMismatch, returnCode); }
public void NotSigned() { var returnCode = MsiTools.VerifyMsiSignature($"{_testProjectFolder}/data/NotSigned.dll", "3Shape A/S"); Assert.AreEqual(CertificateCheckReturnCodes.DoesNotPassAuthenticodeVerification, returnCode); }