Merge all changes
This commit is contained in:
@@ -319,7 +319,21 @@ public sealed class AttestorVerificationEngineTests
|
||||
}
|
||||
|
||||
private static X509Certificate2 EnsurePrivateKey(X509Certificate2 certificate, ECDsa key)
|
||||
=> certificate.HasPrivateKey ? certificate : certificate.CopyWithPrivateKey(key);
|
||||
{
|
||||
if (certificate.HasPrivateKey)
|
||||
{
|
||||
return certificate;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return certificate.CopyWithPrivateKey(key);
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
return certificate;
|
||||
}
|
||||
}
|
||||
|
||||
private static string ToPem(X509Certificate2 certificate)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user