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; 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; } }