コード例 #1
0
        /// <summary>
        /// Store the RSA for the specified RA.
        /// </summary>
        /// <param name="rsa">The certificate to store.</param>
        /// <param name="recoveryAgnt">The host the certificate belongs to.</param>
        /// <param name="persist">If true save in store.</param>
        public static void StoreRARSA(string rsa, string recoveryAgnt, bool persist)
        {
            log.Debug("RSA string before store {0}", rsa);
            UTF8Encoding utf8 = new UTF8Encoding();

            byte[] rsabytes = utf8.GetBytes(rsa);
            SecurityStore.StorePPKData(rsabytes, recoveryAgnt, persist, true, true, RSAType);
        }
コード例 #2
0
        /// <summary>
        /// Store the certificate for the specified host.
        /// </summary>
        /// <param name="certificate">The certificate to store.</param>
        /// <param name="host">The host the certificate belongs to.</param>
        /// <param name="persist">If true save in store.</param>
        public static void StoreCertificate(byte[] certificate, string host, bool persist)
        {
            string uriHost = GetHostFromUri(host);

            if (certificate.Length == 0)
            {
                log.Info("StoreCertificate either null or empty");
            }
            SecurityStore.StorePPKData(certificate, uriHost, persist, true, false, CertType);
        }
コード例 #3
0
 /// <summary>
 /// Store the certificate for the specified RA.
 /// </summary>
 /// <param name="certificate">The certificate to store.</param>
 /// <param name="recoveryAgnt">The host the certificate belongs to.</param>
 /// <param name="persist">If true save in store.</param>
 public static void StoreRACertificate(byte[] certificate, string recoveryAgnt, bool persist)
 {
     SecurityStore.StorePPKData(certificate, recoveryAgnt, persist, true, true, CertType);
 }