Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// See the LICENSE.txt file in the project root for more information.

using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using Azure;
using Azure.CodeSigning;
using Azure.CodeSigning.Models;
Expand All @@ -21,12 +20,12 @@ public RSATrustedSigning(
CertificateProfileClient client,
string accountName,
string certificateProfileName,
X509Certificate2 certificate)
RSA rsaPublicKey)
{
_client = client;
_accountName = accountName;
_certificateProfileName = certificateProfileName;
_rsaPublicKey = certificate.GetRSAPublicKey()!;
_rsaPublicKey = rsaPublicKey;
}

protected override void Dispose(bool disposing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ public async Task<X509Certificate2> GetCertificateAsync(CancellationToken cancel
public async Task<RSA> GetRsaAsync(CancellationToken cancellationToken)
{
using X509Certificate2 certificate = await GetCertificateAsync(cancellationToken);
return new RSATrustedSigning(_client, _accountName, _certificateProfileName, certificate);
RSA rsaPublicKey = certificate.GetRSAPublicKey()!;
return new RSATrustedSigning(_client, _accountName, _certificateProfileName, rsaPublicKey);
}
}
}