test(backend): parallelize isolated fixtures [CI] [SKIP TESTS]
This commit is contained in:
1 parent
77d8404f59
commit
238046d959
29 files changed
+84
-66
No files matched your search
@@ -11,11 +11,26 @@ namespace MoShiro.Backend.Tests;
|
||||
public sealed class TestReleaseKey : IReleaseKey
|
||||
{
|
||||
private static readonly ECDsa s_key = ECDsa.Create(ECCurve.NamedCurves.nistP256);
|
||||
private static readonly object s_gate = new();
|
||||
|
||||
public static TestReleaseKey Instance { get; } = new();
|
||||
|
||||
public string Pem => s_key.ExportSubjectPublicKeyInfoPem();
|
||||
public string Pem
|
||||
{
|
||||
get
|
||||
{
|
||||
lock (s_gate)
|
||||
{
|
||||
return s_key.ExportSubjectPublicKeyInfoPem();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static string Sign(string manifest) =>
|
||||
Convert.ToBase64String(s_key.SignData(Encoding.UTF8.GetBytes(manifest), HashAlgorithmName.SHA256, DSASignatureFormat.Rfc3279DerSequence));
|
||||
public static string Sign(string manifest)
|
||||
{
|
||||
lock (s_gate)
|
||||
{
|
||||
return Convert.ToBase64String(s_key.SignData(Encoding.UTF8.GetBytes(manifest), HashAlgorithmName.SHA256, DSASignatureFormat.Rfc3279DerSequence));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user