Form1.cs

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Security.Cryptography.X509Certificates;
using System.IO;
using System.Security.Cryptography;

namespace WindowsFormsAppPfs
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void buttonSelectMarkcert_Click(object sender, EventArgs e)
        {
            OpenFileDialog of = new OpenFileDialog();
            if (of.ShowDialog() == DialogResult.OK)
            {
                labelMakeCertPath.Text = of.FileName;
            }
        }

        private void buttonCreatPfx_Click(object sender, EventArgs e)
        {
            string MakeCert = labelMakeCertPath.Text;
            string x509Name = "CN="+textBoxCnName.Text.Trim();   
            string param = " -pe -ss my -n \"" + x509Name + "\" " ;   
            Process p = Process.Start(MakeCert, param);   
            p.WaitForExit();   
            p.Close();   
            MessageBox.Show("创建完毕!");   

        }

        private void buttonSelectExportPfxPath_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog fb = new FolderBrowserDialog();
            if (fb.ShowDialog() == DialogResult.OK)
            {
                labelExportPfxPath.Text = fb.SelectedPath;
            }
        }

        private void buttonExportPfxPath_Click(object sender, EventArgs e)
        {
            X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);   
            store.Open(OpenFlags.ReadWrite);   
            X509Certificate2Collection storecollection = (X509Certificate2Collection)store.Certificates;   
            foreach (X509Certificate2 x509 in storecollection)   
            {   
                if (x509.Subject == "CN="+textBoxCnName.Text.Trim())   
                {   
后面还有 139 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。