фикс fstream

This commit is contained in:
Данила Селяев 2023-05-25 08:00:20 +04:00
parent 95eec90e5c
commit 9468358a8d

View File

@ -135,14 +135,15 @@ public class Engine
{
fstream = new FileStream(file_path, FileMode.Open);
var signature = Cryptography.SignDataByPrivateCert(fstream.ToString(), private_key_path.GetPrivateCert(pass));
if (Cryptography.VerifySignedDataByCertIssuer(signature, open_key_path.GetPublicCert(), out var data))
fstream.Close();
if (!Cryptography.VerifySignedDataByCertIssuer(signature, open_key_path.GetPublicCert(), out var data))
{
if (data != null)
return false;
return true;
}
else
{
return true;
return false;
}
}
catch (Exception ex)