фикс fstream
This commit is contained in:
parent
95eec90e5c
commit
9468358a8d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user