-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Receipt validation tests fail with invalid certificate chain #90
Comments
Oh, that’s unfortunate. Happens in my project as well. Is there a way to re-sign the same receipt files or does one have to collect new ones? Also, have you thought about a way to circumvent the logic of reporting invalid certificates just for tests? |
Unfortunately I think we have to collect new ones if the goal is to test if If you do want to resign it, you would probably need a (trusted) valid certificate + private key to start with, resign the receipts somehow and put it in the AppReceiptValidator parameters Conceptually though, I think it should be enough to update the tests in the let result = AppReceiptValidator().validateReceipt(parameters: .init().with {
// this test uses a receipt of which a certificate has expired, we just want to check the parsing part so we can neglect this here
$0.signatureValidation = .skip
…
}) |
That’s a great hint, thanks! I’ll probably collect as many new receipts as I can and fall back to skipping signature checks for all the other test cases. |
Related: #89
Some of the example receipts used in the tests are signed by now expired certificates, leading the tests to fail.
Ideally the example receipts should be updated.
The text was updated successfully, but these errors were encountered: