@@ -2125,6 +2125,8 @@ class RelyingPartyRegistrationSpec
2125
2125
2126
2126
def makeCred (
2127
2127
authDataAndKeypair : Option [(ByteArray , KeyPair )] = None ,
2128
+ credKeyAlgorithm : COSEAlgorithmIdentifier =
2129
+ TestAuthenticator .Defaults .keyAlgorithm,
2128
2130
clientDataJson : Option [String ] = None ,
2129
2131
subject : X500Name = emptySubject,
2130
2132
rdn : Array [AttributeTypeAndValue ] =
@@ -2152,8 +2154,13 @@ class RelyingPartyRegistrationSpec
2152
2154
) = {
2153
2155
val (authData, credentialKeypair) =
2154
2156
authDataAndKeypair.getOrElse(
2155
- TestAuthenticator .createAuthenticatorData(keyAlgorithm =
2156
- COSEAlgorithmIdentifier .ES256
2157
+ TestAuthenticator .createAuthenticatorData(
2158
+ credentialKeypair = Some (
2159
+ TestAuthenticator .Defaults .defaultKeypair(
2160
+ credKeyAlgorithm
2161
+ )
2162
+ ),
2163
+ keyAlgorithm = credKeyAlgorithm,
2157
2164
)
2158
2165
)
2159
2166
@@ -2719,7 +2726,11 @@ class RelyingPartyRegistrationSpec
2719
2726
val (authData, keypair) =
2720
2727
TestAuthenticator .createAuthenticatorData(
2721
2728
aaguid = aaguid,
2722
- keyAlgorithm = COSEAlgorithmIdentifier .ES256 ,
2729
+ credentialKeypair = Some (
2730
+ TestAuthenticator .Defaults .defaultKeypair(
2731
+ COSEAlgorithmIdentifier .ES256
2732
+ )
2733
+ ),
2723
2734
)
2724
2735
val testData = (RegistrationTestData .from _).tupled(
2725
2736
makeCred(
@@ -2743,7 +2754,11 @@ class RelyingPartyRegistrationSpec
2743
2754
val (authData, keypair) =
2744
2755
TestAuthenticator .createAuthenticatorData(
2745
2756
aaguid = aaguidInCred,
2746
- keyAlgorithm = COSEAlgorithmIdentifier .ES256 ,
2757
+ credentialKeypair = Some (
2758
+ TestAuthenticator .Defaults .defaultKeypair(
2759
+ COSEAlgorithmIdentifier .ES256
2760
+ )
2761
+ ),
2747
2762
)
2748
2763
val testData = (RegistrationTestData .from _).tupled(
2749
2764
makeCred(
@@ -2768,12 +2783,7 @@ class RelyingPartyRegistrationSpec
2768
2783
) { attributes : Long =>
2769
2784
val testData = (RegistrationTestData .from _).tupled(
2770
2785
makeCred(
2771
- authDataAndKeypair = Some (
2772
- TestAuthenticator
2773
- .createAuthenticatorData(keyAlgorithm =
2774
- COSEAlgorithmIdentifier .RS256
2775
- )
2776
- ),
2786
+ credKeyAlgorithm = COSEAlgorithmIdentifier .RS256 ,
2777
2787
attributes = Some (attributes & ~ Attributes .SIGN_ENCRYPT ),
2778
2788
)
2779
2789
)
@@ -2793,12 +2803,7 @@ class RelyingPartyRegistrationSpec
2793
2803
whenever(symmetric != TPM_ALG_NULL ) {
2794
2804
val testData = (RegistrationTestData .from _).tupled(
2795
2805
makeCred(
2796
- authDataAndKeypair = Some (
2797
- TestAuthenticator
2798
- .createAuthenticatorData(keyAlgorithm =
2799
- COSEAlgorithmIdentifier .RS256
2800
- )
2801
- ),
2806
+ credKeyAlgorithm = COSEAlgorithmIdentifier .RS256 ,
2802
2807
symmetric = Some (symmetric),
2803
2808
)
2804
2809
)
@@ -2821,12 +2826,7 @@ class RelyingPartyRegistrationSpec
2821
2826
) {
2822
2827
val testData = (RegistrationTestData .from _).tupled(
2823
2828
makeCred(
2824
- authDataAndKeypair = Some (
2825
- TestAuthenticator
2826
- .createAuthenticatorData(keyAlgorithm =
2827
- COSEAlgorithmIdentifier .RS256
2828
- )
2829
- ),
2829
+ credKeyAlgorithm = COSEAlgorithmIdentifier .RS256 ,
2830
2830
scheme = Some (scheme),
2831
2831
)
2832
2832
)
@@ -2846,12 +2846,7 @@ class RelyingPartyRegistrationSpec
2846
2846
) { attributes : Long =>
2847
2847
val testData = (RegistrationTestData .from _).tupled(
2848
2848
makeCred(
2849
- authDataAndKeypair = Some (
2850
- TestAuthenticator
2851
- .createAuthenticatorData(keyAlgorithm =
2852
- COSEAlgorithmIdentifier .ES256
2853
- )
2854
- ),
2849
+ credKeyAlgorithm = COSEAlgorithmIdentifier .ES256 ,
2855
2850
attributes = Some (attributes & ~ Attributes .SIGN_ENCRYPT ),
2856
2851
)
2857
2852
)
@@ -2871,12 +2866,7 @@ class RelyingPartyRegistrationSpec
2871
2866
whenever(symmetric != TPM_ALG_NULL ) {
2872
2867
val testData = (RegistrationTestData .from _).tupled(
2873
2868
makeCred(
2874
- authDataAndKeypair = Some (
2875
- TestAuthenticator
2876
- .createAuthenticatorData(keyAlgorithm =
2877
- COSEAlgorithmIdentifier .ES256
2878
- )
2879
- ),
2869
+ credKeyAlgorithm = COSEAlgorithmIdentifier .ES256 ,
2880
2870
symmetric = Some (symmetric),
2881
2871
)
2882
2872
)
@@ -2897,12 +2887,7 @@ class RelyingPartyRegistrationSpec
2897
2887
whenever(scheme != TPM_ALG_NULL ) {
2898
2888
val testData = (RegistrationTestData .from _).tupled(
2899
2889
makeCred(
2900
- authDataAndKeypair = Some (
2901
- TestAuthenticator
2902
- .createAuthenticatorData(keyAlgorithm =
2903
- COSEAlgorithmIdentifier .ES256
2904
- )
2905
- ),
2890
+ credKeyAlgorithm = COSEAlgorithmIdentifier .ES256 ,
2906
2891
scheme = Some (scheme),
2907
2892
)
2908
2893
)
0 commit comments