Skip to content

Commit 22868ea

Browse files
committed
test: add legacy test
1 parent 09dd9ae commit 22868ea

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Yubico.YubiKey/tests/integration/Yubico/YubiKey/Piv/ImportTests.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,13 @@ public void Import_KeyAndMatchingCert(
112112
[InlineData(KeyType.ECP256, StandardTestDevice.Fw5)]
113113
[InlineData(KeyType.Ed25519, StandardTestDevice.Fw5)]
114114
[Obsolete()]
115-
public void Import_KeyAndMatchingCer2t(
115+
public void Import_with_PivEccPrivateKey_Succeeds(
116116
KeyType keyType,
117117
StandardTestDevice testDeviceType)
118118
{
119119
using var pivSession = GetSession(testDeviceType);
120120
var testPrivateKey = TestKeys.GetTestPrivateKey(keyType);
121-
var piv = testPrivateKey.AsPivPrivateKey();
122-
121+
var piv = new PivEccPrivateKey(testPrivateKey.GetPrivateKey(), keyType.GetPivAlgorithm());
123122
pivSession.ImportPrivateKey(0x90, piv);
124123
}
125124

0 commit comments

Comments
 (0)