Skip to content

fix: use case where RSA to and from JWK would cause an issue #56

fix: use case where RSA to and from JWK would cause an issue

fix: use case where RSA to and from JWK would cause an issue #56

GitHub Actions / Xcode test results succeeded Dec 7, 2024 in 0s

Xcode test results

Testing workspace jose-swift with scheme jose-swift-Package

Summary

TotalSuccess PassedFailure FailedSkipped SkippedExpected Failure Expected Failure⏱️ Time
959500029.48s

Test Summary

ExampleTests

  • Device: Mac mini, 13.7.1 (22H221)
  • SDK: macOS 14.2, 14.2
TestTotalSuccessFailureSkippedExpected Failure
test-class ExampleTests00000

JWATests

  • Device: Mac mini, 13.7.1 (22H221)
  • SDK: macOS 14.2, 14.2
TestTotalSuccessFailureSkippedExpected Failure
test-class C20PTests11000
test-class EdDSATests11000
test-class Secp256k1Tests88000
test-class XC20PTests11000

JWETests

  • Device: Mac mini, 13.7.1 (22H221)
  • SDK: macOS 14.2, 14.2
TestTotalSuccessFailureSkippedExpected Failure
test-class AESTests66000
test-class DirectTests11000
test-class ECDH1PUTests77000
test-class ECDHESTests44000
test-class PBES2Tests44000
test-class RFC7516Tests44000
test-class RFC7520Tests1212000
test-class RSATests22000

JWKTests

  • Device: Mac mini, 13.7.1 (22H221)
  • SDK: macOS 14.2, 14.2
TestTotalSuccessFailureSkippedExpected Failure
test-class JWKThumbprintTests11000

JWSTests

  • Device: Mac mini, 13.7.1 (22H221)
  • SDK: macOS 14.2, 14.2
TestTotalSuccessFailureSkippedExpected Failure
test-class JWSJsonTests77000
test-class JWSTests1515000
test-class RFC7515Tests1010000

JWTTests

  • Device: Mac mini, 13.7.1 (22H221)
  • SDK: macOS 14.2, 14.2
TestTotalSuccessFailureSkippedExpected Failure
test-class JWTTests1111000

Failure Failures

All tests passed 🎉


Code Coverage

Coverage Covered Executable
ExampleTests 72.73 % 3717 5111
  ECDHEncrypter.swift 89.17 % 214 240
  AESDecryptor.swift 86.82 % 112 129
  JWS+Verify.swift 74.17 % 89 120
  DirectDecryptor.swift 84.62 % 55 65
  JWERegisteredFieldsHeader+Helpers.swift 97.50 % 78 80
  JWT.swift 15.38 % 12 78
  ArrayClaim.swift 28.75 % 23 80
  JWS+Json.swift 84.85 % 84 99
  PasswordBasedEncrypter.swift 83.13 % 133 160
  JWTCodable.swift 100.00 % 11 11
  JWK+Codable.swift 91.89 % 68 74
  NumericClaim.swift 100.00 % 3 3
  DefaultJWTClaims+Codable.swift 100.00 % 20 20
  DateClaim.swift 0.00 % 0 3
  IssuedAtClaim.swift 100.00 % 3 3
  AESEncryptor.swift 92.05 % 139 151
  RSAEncrypter.swift 89.00 % 89 100
  IssuerClaim.swift 100.00 % 3 3
  Claims+Codable.swift 87.50 % 77 88
  SubjectClaim.swift 100.00 % 3 3
  MultiEncryptor.swift 93.75 % 90 96
  JWTIdentifierClaim.swift 100.00 % 3 3
  JWERegisteredFieldsHeader.swift 100.00 % 103 103
  StringClaim.swift 100.00 % 3 3
  JWEEncryptionModule.swift 93.75 % 30 32
  JWTRegisteredFieldsClaims.swift 100.00 % 10 10
  JWEEncrypter.swift 46.15 % 18 39
  Base64URL.swift 100.00 % 25 25
  ECDHDecryptor.swift 89.76 % 184 205
  JWT+Encryption.swift 18.69 % 20 107
  JWS.swift 73.53 % 25 34
  MultiDecryptor.swift 43.70 % 59 135
  ECDH1PUDecryptor.swift 89.92 % 214 238
  JWT+Signing.swift 44.12 % 30 68
  Claims.swift 50.00 % 4 8
  JWK+SigningAlgorithm.swift 62.07 % 36 58
  RSADecryptor.swift 85.39 % 76 89
  JWS+JsonFlattened.swift 55.65 % 69 124
  JWS+Sign.swift 55.19 % 149 270
  JWEHelpers.swift 94.74 % 54 57
  JWE+Encrypt.swift 77.40 % 161 208
  JWEParts.swift 100.00 % 22 22
  AudienceClaim.swift 42.86 % 3 7
  ObjectClaim.swift 38.46 % 15 39
  HelperExtensions.swift 83.33 % 10 12
  JWE+Decrypt.swift 54.42 % 80 147
  ECDH1PUEncrypter.swift 89.35 % 277 310
  JWEDecryptor.swift 76.62 % 59 77
  JWKSet.swift 0.00 % 0 26
  JWSRegisteredFieldsHeader.swift 100.00 % 23 23
  AAD.swift 68.42 % 39 57
  DefaultJWEHeaderImpl+Codable.swift 97.59 % 81 83
  JWK+Thumbprint.swift 95.12 % 39 41
  KeyManagementAlgorithm+Family.swift 93.75 % 15 16
  JWT+Verification.swift 25.82 % 79 306
  JWE.swift 94.44 % 34 36
  DirectEncrypter.swift 88.00 % 66 75
  NotBeforeClaim.swift 100.00 % 3 3
  JWTClaimsBuilder.swift 22.67 % 17 75
  ExpirationTimeClaim.swift 100.00 % 3 3
  JWS+Helper.swift 97.22 % 35 36
  JWE+Json.swift 79.55 % 70 88
  BoolClaim.swift 100.00 % 3 3
  JWK.swift 100.00 % 23 23
  DefaultJWSHeaderImpl+Codable.swift 100.00 % 30 30
  PasswordBasedDecryptor.swift 85.96 % 98 114
  DataRepresentable.swift 31.03 % 9 29
  JSONEncoder+JoseEncoder.swift 62.50 % 5 8
JWATests 65.14 % 2265 3477
  P521+KeyAgreement.swift 0.00 % 0 6
  C20PTests.swift 100.00 % 23 23
  AESCBC_SHA512+ContentEncryptor.swift 88.89 % 48 54
  ES256Verifier.swift 62.50 % 10 16
  ES256KVerifier.swift 87.50 % 42 48
  PS256Verifier.swift 0.00 % 0 30
  ES256Signer.swift 85.71 % 6 7
  C20P+ContentEncryption.swift 88.00 % 44 50
  AESGCM+KeyUnwrap.swift 85.00 % 17 20
  RS256Verifier.swift 76.92 % 10 13
  PS256Signer.swift 0.00 % 0 24
  DataKey.swift 31.37 % 32 102
  ECDH1PU+KeyAgreementZ.swift 90.91 % 10 11
  JWKCryptoPresentation.swift 77.92 % 60 77
  ES256KSigner.swift 93.94 % 31 33
  HelperExtensions.swift 83.33 % 10 12
  PS384Verifier.swift 0.00 % 0 30
  ECDHES.swift 90.00 % 9 10
  MockKeyAgreementZ.swift 0.00 % 0 3
  RS384Verifier.swift 0.00 % 0 13
  MockedSigner.swift 0.00 % 0 3
  HS384Verifier.swift 0.00 % 0 6
  HS256Verifier.swift 83.33 % 5 6
  Zip+ContentCompressor.swift 100.00 % 6 6
  RSA+Security.swift 90.00 % 18 20
  ContentCompressionAlgorithm.swift 100.00 % 12 12
  PS384Signer.swift 0.00 % 0 24
  ECDHES+KeyAgreementZ.swift 100.00 % 3 3
  MockKeyDerivation.swift 0.00 % 0 3
  RS256Signer.swift 85.00 % 17 20
  secp256k1+KeyGeneration.swift 0.00 % 0 19
  ES256KTests.swift 100.00 % 194 194
  secp256k1+KeyAgreement.swift 0.00 % 0 6
  ECDH1PU.swift 93.33 % 28 30
  JWK+KeyAgreement.swift 80.77 % 21 26
  AES128GCM+KeyEncryption.swift 95.45 % 21 22
  Base64URL.swift 100.00 % 25 25
  PS512Signer.swift 0.00 % 0 24
  MockContentEncryptor.swift 0.00 % 0 9
  PBE2_SHA256_A128KW+KeyEncryption.swift 86.67 % 13 15
  AESKeyWrapCommonCrypto.swift 0.00 % 0 104
  Curve25519+KeyAgreement.swift 100.00 % 6 6
  PBE2_SHA512_A256KW+KeyEncryption.swift 86.67 % 13 15
  SecKeyExtended.swift 51.49 % 69 134
  AESGCM.swift 100.00 % 20 20
  P256+KeyAgreement.swift 100.00 % 6 6
  AES128GCM+ContentEncryptor.swift 87.80 % 36 41
  RS512Verifier.swift 0.00 % 0 13
  AESKeyUnwrap+KeyUnwrap.swift 73.33 % 11 15
  RS384Signer.swift 0.00 % 0 13
  KeyDerivation.swift 100.00 % 126 126
  JWTCodable.swift 100.00 % 11 11
  EdDSASigner.swift 83.33 % 5 6
  AESCBC_SHA256+ContentEncryptor.swift 88.89 % 48 54
  PS512Verifier.swift 0.00 % 0 30
  ES521Verifier.swift 62.50 % 10 16
  RSA15KeyWrapper+KeyEncryption.swift 81.58 % 31 38
  RS512Signer.swift 0.00 % 0 13
  SigningAlgorithm.swift 70.83 % 51 72
  ConcatKDF.swift 90.67 % 68 75
  P384+KeyGeneration.swift 36.84 % 7 19
  RSAOAEP256KeyUnwrap+KeyUnwrapping.swift 80.77 % 42 52
  HS512Verifier.swift 0.00 % 0 6
  PBE2_SHA384_A192KW+KeyEncryption.swift 86.67 % 13 15
  KeyRepresentable.swift 16.00 % 4 25
  ECDH1PU+KeyDerivation.swift 81.82 % 27 33
  RSAOAEP256KeyWrap+KeyEncryption.swift 81.58 % 31 38
  MockedVerifier.swift 0.00 % 0 3
  ES384Verifier.swift 0.00 % 0 16
  ES521Signer.swift 85.71 % 6 7
  JWK+KeyGeneration.swift 70.59 % 24 34
  KeyEncryptionAlgorithm.swift 94.37 % 134 142
  EdDSATests.swift 100.00 % 15 15
  XC20PTests.swift 100.00 % 23 23
  ContentEncryptionAlgorithm.swift 96.61 % 57 59
  HS256Signer.swift 0.00 % 0 6
  JWKRepresentable.swift 47.89 % 125 261
  MockKeyEncryption.swift 0.00 % 0 6
  ES384Signer.swift 85.71 % 6 7
  JSONEncoder+JoseEncoder.swift 62.50 % 5 8
  PBES2SHA.swift 96.15 % 25 26
  

Details

Test Details

ExampleTestsback

ExampleTests back

SuccessFailureSkippedExpected Failure⏱️
0 (0%)0 (0%)0 (0%)0 (0%)0.00s

All tests passed 🎉

JWATestsback

C20PTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testC20PCycle()

EdDSATests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testEdDSACycle()

Secp256k1Tests back

SuccessFailureSkippedExpected Failure⏱️
8 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testNotNormalizedBouncyCastleSignatureValidation()
Successtest-method testSecp256k1BouncyCastleSignatureVerify()
Successtest-method testSecp256k1BouncyCastleSignatureVerifyFailIfFeatureNotActive()
Successtest-method testSecp256k1Cycle()
Successtest-method testSecp256k1CycleDerSignature()
Successtest-method testSecp256k1CycleInvertedRS()
Successtest-method testSecp256k1JSLibrarySignatureVerifyFailIfFeatureNotActive()
Successtest-method testSecp256k1SignatureFromJSLibrary()

XC20PTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testXC20PCycle()

JWETestsback

AESTests back

SuccessFailureSkippedExpected Failure⏱️
6 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testAES128Cycle()
Successtest-method testAES128GCMCycle()
Successtest-method testAES192Cycle()
Successtest-method testAES192GCMCycle()
Successtest-method testAES256Cycle()
Successtest-method testAES256GCMCycle()

DirectTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testDirectCycle()

ECDH1PUTests back

SuccessFailureSkippedExpected Failure⏱️
7 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testECDH1PUA128KWCycle()
Successtest-method testECDH1PUA192KWCycle()
Successtest-method testECDH1PUA256KW_C20PCycle()
Successtest-method testECDH1PUA256KW_XC20PCycle()
Successtest-method testECDH1PUA256KWCurve25519Cycle()
Successtest-method testECDH1PUA256KWCycle()
Successtest-method testECDH1PUCycle()

ECDHESTests back

SuccessFailureSkippedExpected Failure⏱️
4 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testECDHESA256KW_C20PCycle()
Successtest-method testECDHESA256KW_XC20PCycle()
Successtest-method testECDHESA256KWCycle()
Successtest-method testECDHESCycle()

PBES2Tests back

SuccessFailureSkippedExpected Failure⏱️
4 (100%)0 (0%)0 (0%)0 (0%)29.17s
Successtest-method testJWEPBES2_HS512_A256KW()
Successtest-method testPBES2_HS256_A128KW()
Successtest-method testPBES2_HS384_A192KW()
Successtest-method testPBES2_HS512_A256KW()

RFC7516Tests back

SuccessFailureSkippedExpected Failure⏱️
4 (100%)0 (0%)0 (0%)0 (0%)0.07s
Successtest-method testA_1_7()
Successtest-method testA_1()
Successtest-method testA_3()
Successtest-method testA_4()

RFC7520Tests back

SuccessFailureSkippedExpected Failure⏱️
12 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testSection_5_10()
Successtest-method testSection_5_11()
Successtest-method testSection_5_12()
Successtest-method testSection_5_13()
Successtest-method testSection_5_1()
Successtest-method testSection_5_2()
Successtest-method testSection_5_4()
Successtest-method testSection_5_5()
Successtest-method testSection_5_6()
Successtest-method testSection_5_7()
Successtest-method testSection_5_8()
Successtest-method testSection_5_9()

RSATests back

SuccessFailureSkippedExpected Failure⏱️
2 (100%)0 (0%)0 (0%)0 (0%)0.18s
Successtest-method testRSAOAEP256Cycle()
Successtest-method testRSAOAEPCycle()

JWKTestsback

JWKThumbprintTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method test_RFC8037_Appendix_A_3()

JWSTestsback

JWSJsonTests back

SuccessFailureSkippedExpected Failure⏱️
7 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testJsonSerializationOneKeyES256_OtherES521()
Successtest-method testJsonSerializationOneKeyOnlyEdDSA()
Successtest-method testJsonSerializationOneKeyOnlyES256()
Successtest-method testJsonSerializationTrueES256Verification_FailES521VerificationWithRandomKey()
Successtest-method testJsonSerializationTwoKeysES256()
Successtest-method testJsonSerializationVerificationFalseWhenKeyHasNoKid()
Successtest-method testJsonSerializationVerificationTrueWhenKeyIsValidWithoutKidAndValidateAllTrue()

JWSTests back

SuccessFailureSkippedExpected Failure⏱️
15 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testAutomaticHeaderAlgorithmES256()
Successtest-method testAutomaticHeaderAlgorithmES256K()
Successtest-method testAutomaticHeaderAlgorithmES384()
Successtest-method testAutomaticHeaderAlgorithmES521()
Successtest-method testEdDSASigningWithDataKey()
Successtest-method testES256KSigningWithDataKey()
Successtest-method testES256SigningWithDataKey()
Successtest-method testES256SigningWithSecKey()
Successtest-method testES384SigningWithDataKey()
Successtest-method testES512SigningWithDataKey()
Successtest-method testJWSTamperedAlgorithm()
Successtest-method testJWSTamperedHeader()
Successtest-method testJWSTamperedPayload()
Successtest-method testJWSUnencodedPayloadCompactString()
Successtest-method testWrongAlgKeySigningWithDataKey()

RFC7515Tests back

SuccessFailureSkippedExpected Failure⏱️
10 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testJWS_RFC7515_A1_2()
Successtest-method testJWS_RFC7515_A2_1_1()
Successtest-method testJWS_RFC7515_A2_1()
Successtest-method testJWS_RFC7515_A3_1_1()
Successtest-method testJWS_RFC7515_A3_1()
Successtest-method testJWS_RFC7515_A4_1_1()
Successtest-method testJWS_RFC7515_A4_1()
Successtest-method testJWS_RFC7515_A5()
Successtest-method testJWS_RFC7515_A6()
Successtest-method testJWS_RFC7515_A7()

JWTTestsback

JWTTests back

SuccessFailureSkippedExpected Failure⏱️
11 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testClaims()
Successtest-method testFailAudienceValidation()
Successtest-method testFailExpirationValidation()
Successtest-method testFailIssuedAtValidation()
Successtest-method testFailIssuerValidation()
Successtest-method testFailNotBeforeValidation()
Successtest-method testJWE()
Successtest-method testJWTClaims()
Successtest-method testParseSignedJWT()
Successtest-method testSignAndVerify()
Successtest-method testSingleClaim()