public CertificateObject(string StoreLocation, string StoreName, SerializableCertificate Certificate) { this.StoreLocation = StoreLocation; this.StoreName = StoreName; this.Certificate = Certificate; ResultType = RESULT_TYPE.CERTIFICATE; }
public Signature(AuthenticodeInfo authenticodeInfo) { if (authenticodeInfo != null) { IsAuthenticodeValid = authenticodeInfo.IsAuthenticodeValid; SignedHash = authenticodeInfo.SignedHash; SignerSerialNumber = authenticodeInfo.SignerSerialNumber; SigningCertificate = new SerializableCertificate(authenticodeInfo.SigningCertificate); } }
public Signature(AuthenticodeInfo authenticodeInfo) { if (authenticodeInfo != null) { IsAuthenticodeValid = authenticodeInfo.IsAuthenticodeValid; SignedHash = Convert.ToBase64String(authenticodeInfo.SignedHash); SignerSerialNumber = authenticodeInfo.SignerSerialNumber; SigningCertificate = new SerializableCertificate(authenticodeInfo.SigningCertificate); } else { IsAuthenticodeValid = false; } }
public Signature(AuthenticodeInfo authenticodeInfo) { if (authenticodeInfo != null) { IsAuthenticodeValid = authenticodeInfo.IsAuthenticodeValid; if (authenticodeInfo.SignedHash is byte[] hash) { SignedHash = Convert.ToBase64String(hash); } SignerSerialNumber = authenticodeInfo.SignerSerialNumber; if (authenticodeInfo.SigningCertificate is X509Certificate2 cert) { SigningCertificate = new SerializableCertificate(cert); } } else { IsAuthenticodeValid = false; } }