@@ -56,22 +56,22 @@ abstract class EcdsaTest(provider: CryptographyProvider) : AlgorithmTest<ECDSA>(
56
56
57
57
).forEach { (curve, rawSignatureSize, derSignatureSizes, publicKeySize, privateKeySizes) ->
58
58
if (! supportsCurve(curve)) {
59
- println ( " Skipping size test for unsupported curve: ${curve.name} " )
59
+ logger.log { " Skipping size test for unsupported curve: ${curve.name} " }
60
60
return @forEach
61
61
}
62
62
63
- println ( " \n Running size test for curve: ${curve.name} " )
63
+ logger.log { " \n Running size test for curve: ${curve.name} " }
64
64
val keyPair = algorithm.keyPairGenerator(curve).generateKey()
65
65
66
66
val actualPublicKeySize = keyPair.publicKey.encodeToByteString(EC .PublicKey .Format .DER ).size
67
- println ( " Got ${curve.name} public key size: $actualPublicKeySize (expected $publicKeySize )" )
67
+ logger.log { " Got ${curve.name} public key size: $actualPublicKeySize (expected $publicKeySize )" }
68
68
assertEquals(
69
69
publicKeySize,
70
70
actualPublicKeySize,
71
71
" Public key size mismatch for ${curve.name} , expected: $publicKeySize , but got $actualPublicKeySize "
72
72
)
73
73
val actualPrivateKeySize = keyPair.privateKey.encodeToByteString(EC .PrivateKey .Format .DER ).size
74
- println ( " Got ${curve.name} private key size: $actualPrivateKeySize (allowed $privateKeySizes )" )
74
+ logger.log { " Got ${curve.name} private key size: $actualPrivateKeySize (allowed $privateKeySizes )" }
75
75
assertContains(
76
76
privateKeySizes,
77
77
actualPrivateKeySize,
@@ -80,7 +80,7 @@ abstract class EcdsaTest(provider: CryptographyProvider) : AlgorithmTest<ECDSA>(
80
80
81
81
generateDigests { digest, _ ->
82
82
if (! supportsDigest(digest)) {
83
- println ( " Skipping digest $digest for curve ${curve.name} " )
83
+ logger.log { " Skipping digest $digest for curve ${curve.name} " }
84
84
return @generateDigests
85
85
}
86
86
@@ -150,7 +150,7 @@ abstract class EcdsaTest(provider: CryptographyProvider) : AlgorithmTest<ECDSA>(
150
150
@Test
151
151
fun testFunctions () = testWithAlgorithm {
152
152
if (! supportsFunctions()) {
153
- println ( " Skipping function test because functions are not supported by provider" )
153
+ logger.log { " Skipping function test because functions are not supported by provider" }
154
154
return @testWithAlgorithm
155
155
}
156
156
@@ -164,21 +164,21 @@ abstract class EcdsaTest(provider: CryptographyProvider) : AlgorithmTest<ECDSA>(
164
164
EC .Curve .brainpoolP512r1,
165
165
).forEach { curve ->
166
166
if (! supportsCurve(curve)) {
167
- println ( " Skipping function test for unsupported curve: ${curve.name} " )
167
+ logger.log { " Skipping function test for unsupported curve: ${curve.name} " }
168
168
return @forEach
169
169
}
170
- println ( " Running function test for curve: ${curve.name} " )
170
+ logger.log { " Running function test for curve: ${curve.name} " }
171
171
172
172
val keyPair = algorithm.keyPairGenerator(curve).generateKey()
173
173
174
174
generateDigests { digest, _ ->
175
175
if (! supportsDigest(digest)) {
176
- println ( " Skipping digest $digest for curve ${curve.name} " )
176
+ logger.log { " Skipping digest $digest for curve ${curve.name} " }
177
177
return @generateDigests
178
178
}
179
179
180
180
ECDSA .SignatureFormat .entries.forEach { format ->
181
- println ( " Testing format $format for ${curve.name} / ${digest.name} " )
181
+ logger.log { " Testing format $format for ${curve.name} / ${digest.name} " }
182
182
val signatureGenerator = keyPair.privateKey.signatureGenerator(digest, format)
183
183
val signatureVerifier = keyPair.publicKey.signatureVerifier(digest, format)
184
184
0 commit comments