Skip to content

Commit 3eea339

Browse files
committed
tests: rename class
1 parent 2705379 commit 3eea339

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

Yubico.YubiKey/tests/integration/Yubico/YubiKey/Scp/ScpTestUtilities.cs renamed to Yubico.YubiKey/tests/integration/Yubico/YubiKey/Piv/FipsTestUtilities.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
using System;
1615
using Xunit;
17-
using Yubico.YubiKey.Piv;
16+
using Yubico.YubiKey.Scp;
1817

19-
namespace Yubico.YubiKey.Scp
18+
namespace Yubico.YubiKey.Piv
2019
{
21-
public static class ScpTestUtilities
20+
public static class FipsTestUtilities
2221
{
2322
public static readonly byte[] FipsPin = {
2423
0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88
@@ -39,9 +38,9 @@ public static void SetFipsApprovedCredentials(PivSession session)
3938
session.ResetApplication();
4039
session.KeyCollector = new Simple39KeyCollector().Simple39KeyCollectorDelegate;
4140

42-
session.TryChangePin(Simple39KeyCollector.CollectPin(), FipsPin, out _);
43-
session.TryChangePuk(Simple39KeyCollector.CollectPuk(), FipsPuk, out _);
44-
session.TryChangeManagementKey(Simple39KeyCollector.CollectMgmtKey(), FipsManagementKey, PivTouchPolicy.Always);
41+
session.TryChangePin(PivSessionIntegrationTestBase.DefaultPin, FipsPin, out _);
42+
session.TryChangePuk(PivSessionIntegrationTestBase.DefaultPuk, FipsPuk, out _);
43+
session.TryChangeManagementKey(PivSessionIntegrationTestBase.DefaultManagementKey, FipsManagementKey, PivTouchPolicy.Always);
4544
Assert.True(session.TryVerifyPin(FipsPin, out _));
4645
}
4746

Yubico.YubiKey/tests/integration/Yubico/YubiKey/Scp/Scp03Tests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,9 @@ public void Scp03_PivSession_TryVerifyPinAndGetMetaData_Succeeds(
388388

389389
if (desiredDeviceType == StandardTestDevice.Fw5Fips)
390390
{
391-
ScpTestUtilities.SetFipsApprovedCredentials(pivSession);
391+
FipsTestUtilities.SetFipsApprovedCredentials(pivSession);
392392

393-
var isVerified = pivSession.TryVerifyPin(ScpTestUtilities.FipsPin, out _);
393+
var isVerified = pivSession.TryVerifyPin(FipsTestUtilities.FipsPin, out _);
394394
Assert.True(isVerified);
395395
}
396396
else
@@ -536,8 +536,8 @@ private byte[] GetValidPin(
536536
byte[] pin;
537537
if (desiredDeviceType == StandardTestDevice.Fw5Fips)
538538
{
539-
ScpTestUtilities.SetFipsApprovedCredentials(testDevice, keyParams);
540-
pin = ScpTestUtilities.FipsPin;
539+
FipsTestUtilities.SetFipsApprovedCredentials(testDevice, keyParams);
540+
pin = FipsTestUtilities.FipsPin;
541541
}
542542
else
543543
{

Yubico.YubiKey/tests/integration/Yubico/YubiKey/Scp/Scp11Tests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public void Scp11b_App_PivSession_Operations_Succeeds(
7777
session.KeyCollector = new Simple39KeyCollector().Simple39KeyCollectorDelegate;
7878
if (desiredDeviceType == StandardTestDevice.Fw5Fips)
7979
{
80-
ScpTestUtilities.SetFipsApprovedCredentials(session);
80+
FipsTestUtilities.SetFipsApprovedCredentials(session);
8181
}
8282

8383
var result = session.GenerateKeyPair(PivSlot.Retired12, KeyType.ECP256, PivPinPolicy.Always);

0 commit comments

Comments
 (0)