27 lines
768 B
C#
27 lines
768 B
C#
// SPDX-License-Identifier: BUSL-1.1
|
|
// Sprint: SPRINT_4100_0006_0002 - eIDAS Crypto Plugin Tests
|
|
using StellaOps.Cryptography;
|
|
using StellaOps.TestKit;
|
|
using Xunit;
|
|
|
|
namespace StellaOps.Cryptography.Plugin.EIDAS.Tests;
|
|
|
|
public partial class EidasCryptoProviderTests
|
|
{
|
|
[Trait("Category", TestCategories.Unit)]
|
|
[Fact]
|
|
public void ExportPublicJsonWebKey_ReturnsStubJwk()
|
|
{
|
|
var keyRef = new CryptoKeyReference("test-key-local");
|
|
var signer = _provider.GetSigner("ECDSA-P256", keyRef);
|
|
|
|
var jwk = signer.ExportPublicJsonWebKey();
|
|
|
|
Assert.NotNull(jwk);
|
|
Assert.Equal("EC", jwk.Kty);
|
|
Assert.Equal("P-256", jwk.Crv);
|
|
Assert.Equal("sig", jwk.Use);
|
|
Assert.Equal("test-key-local", jwk.Kid);
|
|
}
|
|
}
|