Code cleanup

This commit is contained in:
Kun Deng
2022-08-27 20:35:34 -04:00
parent e5bea187f4
commit 665407aac5
12 changed files with 4 additions and 464 deletions
+1 -8
View File
@@ -8,7 +8,6 @@ using Org.BouncyCastle.OpenSsl;
namespace Icarus.Certs
{
public class SigningIssuerCertificate : IDisposable
{
private readonly RSACryptoServiceProvider _rsa;
@@ -18,7 +17,6 @@ namespace Icarus.Certs
_rsa = new RSACryptoServiceProvider();
}
// public or private key?
public RsaSecurityKey GetIssuerSigningKey(string publicKeyPath)
{
var file = publicKeyPath;
@@ -47,22 +45,17 @@ namespace Icarus.Certs
public class SigningAudienceCertificate : IDisposable
{
// private readonly RSA _rsa;
private readonly RSACryptoServiceProvider _rsa;
public SigningAudienceCertificate()
{
_rsa = new RSACryptoServiceProvider();
}
// public or private key?
public SigningCredentials GetAudienceSigningKey(string keyPath)
{
// string privateXmlKey = System.IO.File.ReadAllText("./private_key.xml");
// rsa.FromXmlString(privateXmlKey);
var file = keyPath;
var publicKey = System.IO.File.ReadAllText(file);
// var rsa = new RSACryptoServiceProvider();
using (var reader = System.IO.File.OpenText(file))
{