mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
添加证书验证容错
This commit is contained in:
parent
7dfb9952dd
commit
faf789c139
@ -292,7 +292,15 @@ namespace VPet_Simulator.Windows
|
|||||||
if (LoadedDLL.Contains(path))
|
if (LoadedDLL.Contains(path))
|
||||||
continue;
|
continue;
|
||||||
LoadedDLL.Add(path);
|
LoadedDLL.Add(path);
|
||||||
X509Certificate2 certificate = new X509Certificate2(tmpfi.FullName);
|
X509Certificate2 certificate;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
certificate = new X509Certificate2(tmpfi.FullName);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
certificate = null;
|
||||||
|
}
|
||||||
if (certificate != null)
|
if (certificate != null)
|
||||||
{
|
{
|
||||||
if (certificate.Subject == "CN=\"Shenzhen Lingban Computer Technology Co., Ltd.\", O=\"Shenzhen Lingban Computer Technology Co., Ltd.\", L=Shenzhen, S=Guangdong Province, C=CN, SERIALNUMBER=91440300MA5H8REU3K, OID.2.5.4.15=Private Organization, OID.1.3.6.1.4.1.311.60.2.1.1=Shenzhen, OID.1.3.6.1.4.1.311.60.2.1.2=Guangdong Province, OID.1.3.6.1.4.1.311.60.2.1.3=CN"
|
if (certificate.Subject == "CN=\"Shenzhen Lingban Computer Technology Co., Ltd.\", O=\"Shenzhen Lingban Computer Technology Co., Ltd.\", L=Shenzhen, S=Guangdong Province, C=CN, SERIALNUMBER=91440300MA5H8REU3K, OID.2.5.4.15=Private Organization, OID.1.3.6.1.4.1.311.60.2.1.1=Shenzhen, OID.1.3.6.1.4.1.311.60.2.1.2=Guangdong Province, OID.1.3.6.1.4.1.311.60.2.1.3=CN"
|
||||||
@ -306,11 +314,6 @@ namespace VPet_Simulator.Windows
|
|||||||
SuccessLoad = false;
|
SuccessLoad = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (authtype != "")
|
|
||||||
{
|
|
||||||
authtype = "[签名]".Translate();
|
|
||||||
//Intro += $"\nSubject:{certificate.Subject}\nIssuer:{certificate.Subject}";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user