Closed tternes closed 7 years ago
This doesn't appear to be an OS issue, but possibly a 32/64 bit issue. The following test pass was done against iOS 9 with the same device (iPhone 4S) failing:
https://travis-ci.org/tternes/JSONWebToken.swift/jobs/105309981
JWT seems to use CryptoSwift, so it's probably due to a CryptoSwift issue.
I think it could well be a problem CryptoSwift, I haven't had chance to look into it and confirm. If anyone does I'd really appreciate it.
I think the problem boils down to the test assuming the order elements in the dictionary will be serialized - which happens to be different on different devices. For example, { "name" : "John", "age" : 27 }
and { "age" : 27, "name" : "John" }
are equivalent in terms of data, but their HMAC values will be very different, since the string versions are different.
I think this is probably a matter of pursuing a slightly different strategy for these tests.
The
testEncodingJWT
test fails on iOS 8 (via Travis):https://travis-ci.org/tternes/JSONWebToken.swift/jobs/105298771