示例#1
0
 /// <summary>
 /// Initializes a new instance of the <strong>X509CertificateTrustList</strong> class using the path to a CTL file.
 /// </summary>
 /// <param name="path">The path to a CTL file (*.stl).</param>
 /// <exception cref="ArgumentNullException">
 /// <strong>path</strong> parameter is null or empty.
 /// </exception>
 public X509CertificateTrustList(String path)
 {
     if (String.IsNullOrEmpty(path))
     {
         throw new ArgumentNullException(nameof(path));
     }
     decode(Crypt32Managed.CryptFileToBinary(path));
 }
示例#2
0
 /// <param name="path">Specifies the path to a file that contains either binary or Base64-encoded PKCS#7 message.</param>
 /// <exception cref="ArgumentException"><strong>path</strong> parameter is null or empty string.</exception>
 /// <exception cref="ArgumentNullException">Specified file does not exist.</exception>
 public PKCS7SignedMessage(String path)
 {
     if (String.IsNullOrEmpty(path))
     {
         throw new ArgumentNullException(nameof(path));
     }
     if (!File.Exists(path))
     {
         throw new ArgumentException("The system cannot find the file specified.");
     }
     m_initialize(Crypt32Managed.CryptFileToBinary(path));
 }
示例#3
0
 public void Import(String path)
 {
     Reset();
     m_import(Crypt32Managed.CryptFileToBinary(path));
 }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="X509CRL2"/> class using the path to a CRL file.
 /// </summary>
 /// <param name="path">The path to a CRL file.</param>
 public X509CRL2(String path)
 {
     m_import(Crypt32Managed.CryptFileToBinary(path));
 }
示例#5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="X509CTL"/> class using the path to a CTL file.
 /// </summary>
 /// <param name="path">The path to a CRL file.</param>
 public X509CTL(String path)
 {
     m_import(Crypt32Managed.CryptFileToBinary(path));
     _isGeneric = true;
 }
示例#6
0
 void getBinaryData(String path)
 {
     RawData = Crypt32Managed.CryptFileToBinary(path);
 }
示例#7
0
 /// <summary>
 /// Gets the certificate request format in the specified file. This method allows to determine whether the
 /// certificate request is encoded in a PKCS#10 (native) or PKCS#7 (enveloped) format.
 /// </summary>
 /// <param name="path">Specifies the path to a file.</param>
 /// <returns>The type of the certificate request in the file.</returns>
 public static X509CertificateRequestType GetRequestFormat(String path)
 {
     return(getRequestFormat(Crypt32Managed.CryptFileToBinary(path)));
 }
示例#8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="X509CRL2"/> class using the path to a CRL file.
 /// </summary>
 /// <param name="path">The path to a CRL file.</param>
 public X509CRL2(String path)
 {
     _rawData = Crypt32Managed.CryptFileToBinary(path);
     m_decode();
 }