Пример #1
0
        private void SetItems()
        {
            SubItems.Clear();

            Text = Key;

            string storeName = _certStoreName == null ? "MY" : _certStoreName;

            string certName = "";

            if ((_hash != null) && (_hash.Length > 0))
            {
                certName = CertUtil.GetCertNameFromStoreAndHash(storeName, _hash);
            }

            SubItems.Add(certName);

            SubItems.Add(storeName);
        }
Пример #2
0
        private void ItemToControls(SslConfigItem item)
        {
            SetGuidText(item.AppId);

            addressTextBox.Text          = item.Address.ToString();
            portTextBox.Text             = item.Port.ToString();
            refreshTimeTextBox.Text      = item.RevocationFreshnessTime.ToString();
            retrievalTimeoutTextBox.Text = item.RevocationUrlRetrievalTimeout.ToString();
            ctlIdTextBox.Text            = item.SslCtlIdentifier;
            ctlStoreTextBox.Text         = item.SslCtlStoreName;

            noRevocationCheckBox.Checked =
                (item.CertCheckMode & HttpApi.ClientCertCheckMode.NoVerifyRevocation) != 0;

            onlyCachedRevocationCheckBox.Checked =
                (item.CertCheckMode & HttpApi.ClientCertCheckMode.CachedRevocationOnly) != 0;

            useFreshnessTimeCheckBox.Checked =
                (item.CertCheckMode & HttpApi.ClientCertCheckMode.UseRevocationFreshnessTime) != 0;

            noUsageCheckCheckBox.Checked =
                (item.CertCheckMode & HttpApi.ClientCertCheckMode.NoUsageCheck) != 0;

            dsMapperCheckBox.Checked   = (item.Flags & HttpApi.SslConfigFlag.UseDSMapper) != 0;
            clientCertCheckBox.Checked = (item.Flags & HttpApi.SslConfigFlag.NegotiateClientCertificates) != 0;
            noRouteCheckBox.Checked    = (item.Flags & HttpApi.SslConfigFlag.DoNotRouteToRawIsapiFilters) != 0;

            string storeName = (item.CertStoreName == null) ? "MY" : item.CertStoreName;

            if ((item.Hash != null) && (item.Hash.Length > 0))
            {
                certStoreTextBox.Text = storeName;
                certHashTextBox.Text  = CertUtil.BytesToHex(item.Hash);
                certNameTextBox.Text  = CertUtil.GetCertNameFromStoreAndHash(storeName, item.Hash);

                _certHashBytes = item.Hash;
            }
        }