[성현모] VPKI 반복 테스트 코드 수정

This commit is contained in:
SHM
2025-04-29 15:31:31 +09:00
parent 6f708d55fd
commit f62f74fa44
17 changed files with 219 additions and 90 deletions

View File

@ -242,18 +242,6 @@ IF fulltextserviceproperty(N'IsFulltextInstalled') = 1
EXECUTE sp_fulltext_database 'enable';
GO
PRINT N'테이블 [dbo].[tVerifyResult]을(를) 만드는 중...';
GO
CREATE TABLE [dbo].[tVerifyResult] (
[cCuid] BIGINT NOT NULL,
[cResult] NCHAR (20) NOT NULL,
PRIMARY KEY CLUSTERED ([cCuid] ASC)
);
GO
PRINT N'테이블 [dbo].[tOcsp]을(를) 만드는 중...';
@ -270,27 +258,13 @@ CREATE TABLE [dbo].[tOcsp] (
GO
PRINT N'테이블 [dbo].[tTbscsr]을(를) 만드는 중...';
PRINT N'테이블 [dbo].[tVerifyResult]을(를) 만드는 중...';
GO
CREATE TABLE [dbo].[tTbscsr] (
[cCuid] BIGINT IDENTITY (1, 1) NOT NULL,
[cIftid] NVARCHAR (100) NOT NULL,
[cMacaddr] NVARCHAR (100) NOT NULL,
[cWmi] NVARCHAR (20) NOT NULL,
[cIdType] NVARCHAR (10) NOT NULL,
[cSupplierId] NVARCHAR (10) NOT NULL,
[cDc] NVARCHAR (20) NOT NULL,
[cTierCode] NVARCHAR (20) NOT NULL,
[cUnitCode] NVARCHAR (20) NOT NULL,
[cPublickey] NVARCHAR (1024) NOT NULL,
[cCertType] NVARCHAR (20) NOT NULL,
[cOriginTbscsr] NVARCHAR (4000) NOT NULL,
[cHashedTbscsr] NVARCHAR (1024) NOT NULL,
[cPcid] NVARCHAR (50) NOT NULL,
[cDn] NVARCHAR (250) NOT NULL,
[cDateTime] DATETIME2 (7) NOT NULL,
CREATE TABLE [dbo].[tVerifyResult] (
[cCuid] BIGINT NOT NULL,
[cResult] NCHAR (20) NOT NULL,
PRIMARY KEY CLUSTERED ([cCuid] ASC)
);
@ -317,6 +291,33 @@ CREATE TABLE [dbo].[tCertificate] (
);
GO
PRINT N'테이블 [dbo].[tTbscsr]을(를) 만드는 중...';
GO
CREATE TABLE [dbo].[tTbscsr] (
[cCuid] BIGINT IDENTITY (1, 1) NOT NULL,
[cIftid] NVARCHAR (100) NOT NULL,
[cMacaddr] NVARCHAR (100) NOT NULL,
[cWmi] NVARCHAR (20) NOT NULL,
[cIdType] NVARCHAR (10) NOT NULL,
[cSupplierId] NVARCHAR (10) NOT NULL,
[cDc] NVARCHAR (20) NOT NULL,
[cTierCode] NVARCHAR (20) NOT NULL,
[cUnitCode] NVARCHAR (20) NOT NULL,
[cPublickey] NVARCHAR (1024) NOT NULL,
[cCertType] NVARCHAR (20) NOT NULL,
[cOriginTbscsr] NVARCHAR (4000) NOT NULL,
[cHashedTbscsr] NVARCHAR (1024) NOT NULL,
[cPcid] NVARCHAR (50) NOT NULL,
[cDn] NVARCHAR (250) NOT NULL,
[cHasCertificate] TINYINT NOT NULL,
[cDateTime] DATETIME2 (7) NOT NULL,
PRIMARY KEY CLUSTERED ([cCuid] ASC)
);
GO
-- 배포된 트랜잭션 로그를 사용하여 대상 서버를 업데이트하는 리팩터링 단계

View File

@ -14,6 +14,7 @@
[cOriginTbscsr] NVARCHAR(4000) NOT NULL,
[cHashedTbscsr] NVARCHAR(1024) NOT NULL,
[cPcid] NVARCHAR(50) NOT NULL,
[cDn]NVARCHAR(250) NOT NULL,
[cDn]NVARCHAR(250) NOT NULL,
[cHasCertificate] TINYINT NOT NULL,
[cDateTime] DATETIME2 NOT NULL
)

View File

@ -25,7 +25,7 @@
"issuer": "vpki.api",
"audience": "vpki",
"accessTokenSecret": "t6zdogyrT0U1bYw3gJvMm3JHmj2Iyawr7O2WKE2truX+MK0l/XNGmpU2ofagdUWBN4DxAUv7c8xSYVv/8abL6A==",
"accessTokenExpires": 60, //minutes
"accessTokenExpires": 1440, //minutes
"refreshTokenSecret": "1vVuoGqIqkStFI3QUXHMr0/yO1feLPnhqcfFGjZyk478+4WY7dhrUjCfVeWjmmSZYgb+rtP0X6ec+3iL35Yezw==",
"refreshTokenExpires": 1440 //minuts, 60*24 (1day)
},

View File

@ -31,7 +31,7 @@ public partial class VpkiDataDbContext : DbContext
{
modelBuilder.Entity<TCertificate>(entity =>
{
entity.HasKey(e => e.CCuid).HasName("PK__tCertifi__2AA00D94B11718A8");
entity.HasKey(e => e.CCuid).HasName("PK__tCertifi__2AA00D94094D05AF");
entity.ToTable("tCertificate");
@ -71,7 +71,7 @@ public partial class VpkiDataDbContext : DbContext
modelBuilder.Entity<TOcsp>(entity =>
{
entity.HasKey(e => e.CCuid).HasName("PK__tOcsp__2AA00D941E2BA200");
entity.HasKey(e => e.CCuid).HasName("PK__tOcsp__2AA00D942266A4EC");
entity.ToTable("tOcsp");
@ -90,7 +90,7 @@ public partial class VpkiDataDbContext : DbContext
modelBuilder.Entity<TTbscsr>(entity =>
{
entity.HasKey(e => e.CCuid).HasName("PK__tTbscsr__2AA00D94155F4FC3");
entity.HasKey(e => e.CCuid).HasName("PK__tTbscsr__2AA00D94D6B62535");
entity.ToTable("tTbscsr");
@ -105,6 +105,7 @@ public partial class VpkiDataDbContext : DbContext
entity.Property(e => e.CDn)
.HasMaxLength(250)
.HasColumnName("cDn");
entity.Property(e => e.CHasCertificate).HasColumnName("cHasCertificate");
entity.Property(e => e.CHashedTbscsr)
.HasMaxLength(1024)
.HasColumnName("cHashedTbscsr");
@ -142,7 +143,7 @@ public partial class VpkiDataDbContext : DbContext
modelBuilder.Entity<TVerifyResult>(entity =>
{
entity.HasKey(e => e.CCuid).HasName("PK__tVerifyR__2AA00D94A7EE4DE6");
entity.HasKey(e => e.CCuid).HasName("PK__tVerifyR__2AA00D94F7E2869E");
entity.ToTable("tVerifyResult");

View File

@ -35,5 +35,7 @@ public partial class TTbscsr
public string CDn { get; set; } = null!;
public byte CHasCertificate { get; set; }
public DateTime CDateTime { get; set; }
}

View File

@ -558,42 +558,60 @@ namespace VPKI.Library.Services
return derDecStr;
}
public CsrHashedModel SignHashed02(string? csr, AsymmetricCipherKeyPair? keyPair)
public async Task<CsrHashedModel> SignHashed02(string? csr, AsymmetricCipherKeyPair? keyPair)
{
CsrHashedModel hashedCsr = new CsrHashedModel();
if (string.IsNullOrWhiteSpace(csr))
return hashedCsr;
List<byte> vnRHashVal = Convert.FromBase64String(csr).ToList();
List<byte> vnSignedHash = GetBouncyCastleECDSASignedHashKey(vnRHashVal, GetPrivateKeyBC(keyPair), ECDSAType.SHA256WITHECDSA);
List<byte> vnDEREncVal = EncodeDERSignature_02(vnSignedHash);
bool bVerfRst = VerifyHashBC(vnSignedHash, vnRHashVal, GetPublicKeyBC(keyPair), ECDSAType.SHA256WITHECDSA);
await Task.Run(async () => {
List<byte> vnRHashVal = Convert.FromBase64String(csr).ToList();
List<byte> vnSignedHash = GetBouncyCastleECDSASignedHashKey(vnRHashVal, GetPrivateKeyBC(keyPair), ECDSAType.SHA256WITHECDSA);
List<byte> vnDEREncVal = EncodeDERSignature_02(vnSignedHash);
bool bVerfRst = VerifyHashBC(vnSignedHash, vnRHashVal, GetPublicKeyBC(keyPair), ECDSAType.SHA256WITHECDSA);
hashedCsr.SignedCsr = GetKeyBase64Encrypted(vnSignedHash);
hashedCsr.EncodedSignedCsr = GetKeyBase64Encrypted(vnDEREncVal);
hashedCsr.Verify = bVerfRst;
hashedCsr.SignedCsr = GetKeyBase64Encrypted(vnSignedHash);
hashedCsr.EncodedSignedCsr = GetKeyBase64Encrypted(vnDEREncVal);
hashedCsr.Verify = bVerfRst;
var decoded = DecodeDERSignature_02(vnDEREncVal);
Log4net.WriteLine($"SignHashed02 csr::{csr}", LogType.Fatal);
Log4net.WriteLine($"SignHashed02 Public Key::{GetKeyBase64Encrypted(GetPublicKeyBC(keyPair)!.Q.GetEncoded()!.ToList())}", LogType.Fatal);
Log4net.WriteLine($"SignHashed02 SignedCsr::{hashedCsr.SignedCsr}", LogType.Fatal);
Log4net.WriteLine($"SignHashed02 EncodedSignedCsr::{hashedCsr.EncodedSignedCsr}", LogType.Fatal);
var decoded = DecodeDERSignature_02(vnDEREncVal);
await Task.CompletedTask;
});
return hashedCsr;
}
public CsrHashedModel SignHashed20(string? csr, AsymmetricCipherKeyPair? keyPair)
public async Task<CsrHashedModel> SignHashed20(string? csr, AsymmetricCipherKeyPair? keyPair)
{
CsrHashedModel hashedCsr = new CsrHashedModel();
if (string.IsNullOrWhiteSpace(csr))
return hashedCsr;
return hashedCsr;
List<byte> vnRHashVal = Convert.FromBase64String(csr).ToList();
List<byte> vnSignedHash = GetBouncyCastleECDSASignedHashKey(vnRHashVal, GetPrivateKeyBC(keyPair), ECDSAType.NONEWITHECDSA);
List<byte> vnDEREncVal = EncodeDERSignature_20(vnSignedHash);
bool bVerfRst = VerifyHashBC(vnSignedHash, vnRHashVal, GetPublicKeyBC(keyPair), ECDSAType.NONEWITHECDSA);
await Task.Run(async () =>
{
List<byte> vnRHashVal = Convert.FromBase64String(csr).ToList();
List<byte> vnSignedHash = GetBouncyCastleECDSASignedHashKey(vnRHashVal, GetPrivateKeyBC(keyPair), ECDSAType.NONEWITHECDSA);
List<byte> vnDEREncVal = EncodeDERSignature_20(vnSignedHash);
bool bVerfRst = VerifyHashBC(vnSignedHash, vnRHashVal, GetPublicKeyBC(keyPair), ECDSAType.NONEWITHECDSA);
hashedCsr.SignedCsr = GetKeyBase64Encrypted(vnSignedHash);
hashedCsr.EncodedSignedCsr = GetKeyBase64Encrypted(vnDEREncVal);
hashedCsr.Verify = bVerfRst;
Log4net.WriteLine($"SignHashed20 csr::{csr}", LogType.Fatal);
Log4net.WriteLine($"SignHashed20 Public Key::{GetKeyBase64Encrypted(GetPublicKeyBC(keyPair)!.Q.GetEncoded()!.ToList())}", LogType.Fatal);
Log4net.WriteLine($"SignHashed20 bVerfRst::{bVerfRst}", LogType.Fatal);
hashedCsr.SignedCsr = GetKeyBase64Encrypted(vnSignedHash);
hashedCsr.EncodedSignedCsr = GetKeyBase64Encrypted(vnDEREncVal);
hashedCsr.Verify = bVerfRst;
await Task.CompletedTask;
});
return hashedCsr;
}
@ -602,7 +620,7 @@ namespace VPKI.Library.Services
{
var signer = new ECDsaSigner();
signer.Init(true, priKey);
signer.Init(true, priKey);
var anSign = signer.GenerateSignature(vnRHashVal.ToArray());
byte[] signatureBytes = ConvertSignatureToByteArray(anSign);

View File

@ -82,6 +82,7 @@ namespace VPKI.Web.Api.Services
COriginTbscsr = csrOrigin,
CHashedTbscsr = tbaCsrHashed,
CPcid = pcid,
CHasCertificate = 0,
CDn = $"{dn}",
CDateTime = DateTime.Now
@ -159,7 +160,7 @@ namespace VPKI.Web.Api.Services
string cCertType = "prov_v1";
TTbscsr tbscsr = new TTbscsr();
foreach (var csr in await context.TTbscsrs.AsNoTracking().Where(x => x.CCertType == cCertType).OrderByDescending(x => x.CCuid).ToListAsync())
foreach (var csr in await context.TTbscsrs.Where(x => x.CCertType == cCertType && x.CHasCertificate == 0).Take(1000).OrderByDescending(x => x.CCuid).ToListAsync())
{
try
{
@ -177,10 +178,19 @@ namespace VPKI.Web.Api.Services
tbscsr = csr;
break;
}
else
{
var publicKeyPem = $"{_certificateService.ConvertToPEM(Convert.FromBase64String(csr.CPublickey))}";
Log4net.WriteLine($"Failed HashedTbscsr::{csr.CHashedTbscsr}", LogType.Fatal);
Log4net.WriteLine($"Failed Signature::{request.csrsignature}", LogType.Fatal);
Log4net.WriteLine($"Failed PublicKey::{csr.CPublickey}", LogType.Fatal);
Log4net.WriteLine($"Failed PublicKey::{publicKeyPem}", LogType.Fatal);
}
}
catch (Exception e)
{
e.ToString();
{
Log4net.WriteLine($"RequestCertificate Exception::{csr.CHashedTbscsr}", LogType.Error);
Log4net.WriteLine(e);
}
}
@ -239,6 +249,9 @@ namespace VPKI.Web.Api.Services
CDateTime = DateTime.Now
};
await context.AddAsync(certificate);
tbscsr.CHasCertificate = 1;
context.Update(tbscsr);
}
transactionResult = await context.CloseTransactionAsync(transaction);
}
@ -266,7 +279,7 @@ namespace VPKI.Web.Api.Services
else
{
response.status = Status.error.ToString();
response.message += "verify fialed";
response.message += "verify failed";
}
//db error

View File

@ -89,6 +89,7 @@ namespace VPKI.Web.Api.Services
COriginTbscsr = csrOrigin,
CHashedTbscsr = tbaCsrHashed,
CPcid = pcid,
CHasCertificate = 0,
CDn = $"{dn}",
CDateTime = DateTime.Now
@ -170,7 +171,7 @@ namespace VPKI.Web.Api.Services
string cCertType = vpkiType.ToString();
TTbscsr tbscsr = new TTbscsr();
foreach (var csr in await context.TTbscsrs.AsNoTracking().Where(x => x.CCertType == cCertType).OrderByDescending(x => x.CCuid).ToListAsync())
foreach (var csr in await context.TTbscsrs.Where(x => x.CCertType == cCertType && x.CHasCertificate == 0).Take(1000).OrderByDescending(x => x.CCuid).ToListAsync())
{
try
{
@ -188,10 +189,19 @@ namespace VPKI.Web.Api.Services
tbscsr = csr;
break;
}
else
{
var publicKeyPem = $"{_certificateService.ConvertToPEM(Convert.FromBase64String(csr.CPublickey))}";
Log4net.WriteLine($"Failed HashedTbscsr::{csr.CHashedTbscsr}", LogType.Fatal);
Log4net.WriteLine($"Failed Signature::{request.csrsignature}", LogType.Fatal);
Log4net.WriteLine($"Failed PublicKey::{csr.CPublickey}", LogType.Fatal);
Log4net.WriteLine($"Failed PublicKey::{publicKeyPem}", LogType.Fatal);
}
}
catch (Exception e)
{
e.ToString();
Log4net.WriteLine($"RequestCertificate Exception::{csr.CHashedTbscsr}", LogType.Error);
Log4net.WriteLine(e);
}
}
@ -249,6 +259,9 @@ namespace VPKI.Web.Api.Services
CDateTime = DateTime.Now
};
await context.AddAsync(certificate);
tbscsr.CHasCertificate = 1;
context.Update(tbscsr);
}
transactionResult = await context.CloseTransactionAsync(transaction);
}
@ -257,7 +270,7 @@ namespace VPKI.Web.Api.Services
else
{
response.status = Status.error.ToString();
response.message += "verify fialed";
response.message += "verify failed";
}
//db error

View File

@ -2,7 +2,8 @@
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
"Microsoft.AspNetCore": "Warning",
"Microsoft.EntityFrameworkCore.Database": "None"
}
}
}

View File

@ -2,7 +2,8 @@
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
"Microsoft.AspNetCore": "Warning",
"Microsoft.EntityFrameworkCore.Database": "None"
}
},
"AllowedHosts": "*"

View File

@ -113,12 +113,13 @@
CreateCsrHash(ecdsa);
}
public void OnClickSignedHash()
public async Task OnClickSignedHash()
{
SignedHash();
await SignedHash();
await InvokeAsync(StateHasChanged);
}
private void SignedHash()
private async Task SignedHash()
{
if (TbscsrContainer.KeyPair != null && TbscsrContainer.ResponseTbscsr.data != null)
{
@ -129,12 +130,12 @@
{
ecdsa = ECDSAType.SHA256WITHECDSA.ToString();
var pKey = TbscsrContainer.PublicKey;
CertificateContainer.CsrHashed = CertificateService.SignHashed02(TbscsrContainer.ResponseTbscsr.data.hashedtbscsr, TbscsrContainer.KeyPair);
CertificateContainer.CsrHashed = await CertificateService.SignHashed02(TbscsrContainer.ResponseTbscsr.data.hashedtbscsr, TbscsrContainer.KeyPair);
}
else if (TbscsrContainer.VpkiType == VpkiType.prov_cert || TbscsrContainer.VpkiType == VpkiType.vehicle_cert)
{
ecdsa = ECDSAType.NONEWITHECDSA.ToString();
CertificateContainer.CsrHashed = CertificateService.SignHashed20(TbscsrContainer.ResponseTbscsr.data.hashedtbscsr, TbscsrContainer.KeyPair);
CertificateContainer.CsrHashed = await CertificateService.SignHashed20(TbscsrContainer.ResponseTbscsr.data.hashedtbscsr, TbscsrContainer.KeyPair);
}
CreateCsrHash(ecdsa);
@ -161,7 +162,7 @@
}
}
public void OnClickGenerateCertificate()
public async Task OnClickGenerateCertificate()
{
CertificateContainer.RequestCertificate.csrsignature = CertificateContainer.CsrHashed.EncodedSignedCsr;
if (TbscsrContainer.VpkiType == VpkiType.prov_cert || TbscsrContainer.VpkiType == VpkiType.vehicle_cert)
@ -170,6 +171,8 @@
}
CertificateContainer.StrRequest = $"{CertificateContainer.RequestCertificate.ToJson()}";
await InvokeAsync(StateHasChanged);
}
public async Task OnClickSendCertificate()
@ -210,6 +213,7 @@
TbscsrContainer.StrResponse = $"Request Context Error{Environment.NewLine}{ex.Message}";
}
await InvokeAsync(StateHasChanged);
DialogService.CloseIndicator();
}
}

View File

@ -112,10 +112,12 @@
}
//mac address
public void OnClickRandomMacaddresss()
public async Task OnClickRandomMacaddresss()
{
var randomMac = CreateRandomMacAddress();
TbscsrContainer.RequestTbscsr.cnInfo.macaddr = randomMac;
await InvokeAsync(StateHasChanged);
}
private string CreateRandomMacAddress()
@ -127,12 +129,13 @@
}
//generate key
public void OnClickGenerateKey()
public async Task OnClickGenerateKey()
{
GenerateKey();
await GenerateKey();
await InvokeAsync(StateHasChanged);
}
private void GenerateKey()
private async Task GenerateKey()
{
if (TbscsrContainer.ISOType == VpkiIsoType.ISO15118_02)
{
@ -159,6 +162,8 @@
var publicKey = (ECPublicKeyParameters)TbscsrContainer.KeyPair.Public;
SetKeyPairString();
await Task.CompletedTask;
}
private void SetKeyPairString()
@ -170,10 +175,12 @@
}
//request tbscsr
public void OnClickGenerateTbscsr()
public async Task OnClickGenerateTbscsr()
{
TbscsrContainer.RequestTbscsr.publickey = TbscsrContainer.PublicKey;
TbscsrContainer.StrRequest = $"{TbscsrContainer.RequestTbscsr.ToJson()}";
await InvokeAsync(StateHasChanged);
}
public async Task OnClickSendTbscsr()
@ -215,6 +222,7 @@
Log4net.WriteLine(ex);
TbscsrContainer.StrResponse = $"Request Context Error{Environment.NewLine}{ex.Message}";
}
await InvokeAsync(StateHasChanged);
DialogService.CloseIndicator();
}
}

View File

@ -0,0 +1,66 @@
@page "/vpki/utils"
@using System.Security.Cryptography
<h3>Utils</h3>
<AuthorizeView Roles="@($"{UserRole.Admin.ToString()},{UserRole.SuperUser.ToString()}")">
<Authorized Context="AuthContext">
<div style="width:50%;">
<div>
<RadzenLabel Text="Public Key"></RadzenLabel>
<RadzenTextArea Style="width:500px;" @bind-Value="@PubicKey"></RadzenTextArea>
</div>
<div
<RadzenLabel Text="Hashed Csr"></RadzenLabel>
<RadzenTextArea Style="width:500px;" @bind-Value="@HashdCsr"></RadzenTextArea>
</div>
<div
<RadzenLabel Text="Siganture"></RadzenLabel>
<RadzenTextArea Style="width:500px;" @bind-Value="@Signature"></RadzenTextArea>
</div>
<div
<RadzenButton Text="Verify02" Click="@OnClickVerify02"></RadzenButton>
<RadzenButton Text="Verify20" Click="@OnClickVerify20"></RadzenButton>
<RadzenLabel Text="@IsVerify.ToString()"></RadzenLabel>
</div>
</div>
</Authorized>
<NotAuthorized>
<RadzenLabel Text="Not Authorized"></RadzenLabel>
</NotAuthorized>
</AuthorizeView>
@code {
private string PubicKey = string.Empty;
private string HashdCsr = string.Empty;
private string Signature = string.Empty;
private bool IsVerify = false;
private async Task OnClickVerify02()
{
using (ECDsa ecdsa = ECDsa.Create(ECCurve.NamedCurves.nistP256))
{
//var publicKeyPem = $"{_certificateService.ConvertToPEM(Convert.FromBase64String(csr.CPublickey))}";
ecdsa.ImportSubjectPublicKeyInfo(Convert.FromBase64String(PubicKey), out _);
var hachedTbsCsr = Convert.FromBase64String(HashdCsr);
IsVerify = ecdsa.VerifyHash(hachedTbsCsr, Convert.FromBase64String($"{Signature}"));
}
await Task.Delay(1);
}
private async Task OnClickVerify20()
{
using (ECDsa ecdsa = ECDsa.Create(ECCurve.NamedCurves.nistP521))
{
//var publicKeyPem = $"{_certificateService.ConvertToPEM(Convert.FromBase64String(csr.CPublickey))}";
ecdsa.ImportSubjectPublicKeyInfo(Convert.FromBase64String(PubicKey), out _);
var hachedTbsCsr = Convert.FromBase64String(HashdCsr);
IsVerify = ecdsa.VerifyHash(hachedTbsCsr, Convert.FromBase64String($"{Signature}"));
}
await Task.Delay(1);
}
}

View File

@ -23,11 +23,11 @@
<RadzenTabs>
<Tabs>
@foreach (var vpkiType in Enum.GetValues(typeof(VpkiType)))
{
{
if (DicTbscsrContainer.TryGetValue((VpkiType)vpkiType, out var outTbscsr) == true &&
DicCertificateContainer.TryGetValue((VpkiType)vpkiType, out var outCertificate) == true &&
DicVerifyResultContainer.TryGetValue((VpkiType)vpkiType, out var outVeryfiResult) == true)
{
{
<RadzenTabsItem Text="@vpkiType.ToString()">
<div @key=@vpkiType>
<!--CSR-->
@ -73,25 +73,25 @@
while (true)
{
//tbscsr
await Task.Delay(3000);
await Task.Delay(10000);
if (isAutoRun == false)
continue;
await InvokeAsync(() => refVPKIApiTbscsr.OnClickRandomMacaddresss());
await Task.Delay(100);
await InvokeAsync(() => refVPKIApiTbscsr.OnClickGenerateKey());
await Task.Delay(100);
await InvokeAsync(() => refVPKIApiTbscsr.OnClickGenerateTbscsr());
await Task.Delay(100);
await InvokeAsync(async() => await refVPKIApiTbscsr.OnClickRandomMacaddresss());
await Task.Delay(300);
await InvokeAsync(async() => await refVPKIApiTbscsr.OnClickGenerateKey());
await Task.Delay(300);
await InvokeAsync(async() => await refVPKIApiTbscsr.OnClickGenerateTbscsr());
await Task.Delay(300);
await InvokeAsync(async () => await refVPKIApiTbscsr.OnClickSendTbscsr());
await Task.Delay(2000);
await Task.Delay(10000);
//certificate
await InvokeAsync(() => refVPKIApiCertificate.OnClickSignedHash());
await Task.Delay(100);
await InvokeAsync(() => refVPKIApiCertificate.OnClickGenerateCertificate());
await Task.Delay(100);
await InvokeAsync(async() => await refVPKIApiCertificate.OnClickSignedHash());
await Task.Delay(300);
await InvokeAsync(async() => await refVPKIApiCertificate.OnClickGenerateCertificate());
await Task.Delay(300);
await InvokeAsync(async () => await refVPKIApiCertificate.OnClickSendCertificate());
cnt += 1;