Exemplo n.º 1
0
 public CertificateObject(string StoreLocation, string StoreName, SerializableCertificate Certificate)
 {
     this.StoreLocation = StoreLocation;
     this.StoreName     = StoreName;
     this.Certificate   = Certificate;
     ResultType         = RESULT_TYPE.CERTIFICATE;
 }
Exemplo n.º 2
0
 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;
     }
 }