@@ -56,27 +56,20 @@ public void Attest_Imported_ThrowsException(
56
56
[ InlineData ( KeyType . RSA3072 , StandardTestDevice . Fw5 ) ]
57
57
[ InlineData ( KeyType . RSA4096 , StandardTestDevice . Fw5 ) ]
58
58
[ InlineData ( KeyType . ECP256 , StandardTestDevice . Fw5 ) ]
59
- [ InlineData ( KeyType . ECP384 , StandardTestDevice . Fw5 ) ]
59
+ [ InlineData ( KeyType . Ed25519 , StandardTestDevice . Fw5 ) ]
60
60
public void AttestGenerated (
61
61
KeyType keyType ,
62
62
StandardTestDevice deviceType )
63
63
{
64
64
TestDeviceType = deviceType ;
65
-
66
65
const byte slotNumber = PivSlot . Retired1 ;
67
- _ = Session . GenerateKeyPair (
68
- slotNumber , keyType , PivPinPolicy . Never , PivTouchPolicy . Never ) ;
66
+ Session . GenerateKeyPair ( slotNumber , keyType , PivPinPolicy . Never , PivTouchPolicy . Never ) ;
69
67
70
- X509Certificate2 ? cert = null ;
71
- try
72
- {
73
- cert = Session . CreateAttestationStatement ( slotNumber ) ;
74
- Assert . NotEqual ( 1 , cert . Version ) ;
75
- }
76
- finally
77
- {
78
- cert ? . Dispose ( ) ;
79
- }
68
+ // If this test fails, it's possible the attestation key or cert is missing or broken.
69
+ // In that case, run LoadAttestationPair(KeyType, true) to fix the problem.
70
+ var cert = Session . CreateAttestationStatement ( slotNumber ) ;
71
+
72
+ Assert . NotEqual ( 1 , cert . Version ) ;
80
73
}
81
74
82
75
[ Theory ]
@@ -86,7 +79,7 @@ public void GetAttestationCert_ReturnsCert(
86
79
{
87
80
TestDeviceType = deviceType ;
88
81
89
- LoadAttestationPair ( KeyType . ECP384 , true ) ;
82
+ LoadAttestationPair ( KeyType . ECP256 , true ) ;
90
83
91
84
X509Certificate2 ? cert = null ;
92
85
try
0 commit comments