Skip to content
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

[tests] Fix certificate tests after Apple started blocking the Thawte certificate. #19650

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

rolfbjarne
Copy link
Member

@rolfbjarne rolfbjarne commented Dec 15, 2023

The “Thawte SGC CA” certificate we're using for testing is now blocked by
Apple, evaluating trust results in this error:

“Thawte SGC CA” certificate is blocked

So update the mail_google_com certificates to what mail.google.com serves now, and also update the corresponding parent certificates (which have changed).

Then adjust the tests accordingly.

Finally delete all unused certificates from the code.

Fixes these test failures:

MonoTouchFixtures.Security.TrustTest
    [FAIL] Trust_FullChain :   GetTrustResult-2
        Expected: RecoverableTrustFailure
        But was:  FatalTrustFailure
           at MonoTouchFixtures.Security.TrustTest.Trust_FullChain(SecTrust trust, SecPolicy policy, X509CertificateCollection certs) in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 389
           at MonoTouchFixtures.Security.TrustTest.Trust_FullChain() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 321
    [FAIL] Trust2_FullChain :   GetTrustResult-2
        Expected: RecoverableTrustFailure
        But was:  FatalTrustFailure
           at MonoTouchFixtures.Security.TrustTest.Trust_FullChain(SecTrust trust, SecPolicy policy, X509CertificateCollection certs) in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 389
           at MonoTouchFixtures.Security.TrustTest.Trust2_FullChain() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 449

… certificate.

The “Thawte SGC CA” certificate we're using for testing is now blocked by
Apple, evaluating trust results in this error:

> “Thawte SGC CA” certificate is blocked

So update the certificates to today: the mail_google_com certificate, and add
the corresponding two parent certificates (including the root certificate).

Then adjust the tests accordingly.

Finally delete all unused certificates from the code.

Fixes these test failures:

    MonoTouchFixtures.Security.TrustTest
        [FAIL] Trust_FullChain :   GetTrustResult-2
            Expected: RecoverableTrustFailure
            But was:  FatalTrustFailure
               at MonoTouchFixtures.Security.TrustTest.Trust_FullChain(SecTrust trust, SecPolicy policy, X509CertificateCollection certs) in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 389
               at MonoTouchFixtures.Security.TrustTest.Trust_FullChain() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 321
        [FAIL] Trust2_FullChain :   GetTrustResult-2
            Expected: RecoverableTrustFailure
            But was:  FatalTrustFailure
               at MonoTouchFixtures.Security.TrustTest.Trust_FullChain(SecTrust trust, SecPolicy policy, X509CertificateCollection certs) in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 389
               at MonoTouchFixtures.Security.TrustTest.Trust2_FullChain() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 449
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

📚 [PR Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Windows Integration Tests passed 💻

All Windows Integration Tests passed.

Pipeline on Agent
Hash: 02db1f9a7ab4cae074e990f070397bf9578fbcf6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Windows Integration Tests passed 💻

All Windows Integration Tests passed.

Pipeline on Agent
Hash: 02db1f9a7ab4cae074e990f070397bf9578fbcf6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

📚 [PR Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Tests on macOS M1 - Mac Ventura (13.0) passed 💻

All tests on macOS M1 - Mac Ventura (13.0) passed.

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻

All tests on macOS M1 - Mac Big Sur (11.5) passed.

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

Legacy Xamarin (No breaking changes)
  • iOS (no change detected)
  • tvOS (no change detected)
  • watchOS (no change detected)
  • macOS (no change detected)
NET (empty diffs)
  • iOS: (empty diff detected)
  • tvOS: (empty diff detected)
  • MacCatalyst: (empty diff detected)
  • macOS: (empty diff detected)

✅ API diff vs stable

Legacy Xamarin (No breaking changes)
.NET (No breaking changes)
Legacy Xamarin (stable) vs .NET

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 02db1f9a7ab4cae074e990f070397bf9578fbcf6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: simulator tests

0 tests crashed, 1 tests failed, 234 tests passed.

Failures

❌ monotouch tests

1 tests failed, 40 tests passed.
  • monotouch-test/Mac [dotnet]/Release [dotnet]: Failed (Test run failed.
    Tests run: 2777 Passed: 2685 Inconclusive: 3 Failed: 1 Ignored: 91)

Html Report (VSDrops) Download

Successes

✅ bcl: All 69 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 7 tests passed. Html Report (VSDrops) Download
✅ framework: All 8 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 7 tests passed. Html Report (VSDrops) Download
✅ install_source: All 1 tests passed. Html Report (VSDrops) Download
✅ introspection: All 8 tests passed. Html Report (VSDrops) Download
✅ linker: All 65 tests passed. Html Report (VSDrops) Download
✅ mac_binding_project: All 1 tests passed. Html Report (VSDrops) Download
✅ mmp: All 2 tests passed. Html Report (VSDrops) Download
✅ mononative: All 6 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ mtouch: All 1 tests passed. Html Report (VSDrops) Download
✅ xammac: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 8 tests passed. Html Report (VSDrops) Download
✅ xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: 02db1f9a7ab4cae074e990f070397bf9578fbcf6 [PR build]

@rolfbjarne
Copy link
Member Author

Test failure is unrelated: https://github.com/xamarin/maccore/issues/868

@rolfbjarne rolfbjarne merged commit eddde60 into xamarin:main Dec 18, 2023
41 of 43 checks passed
@rolfbjarne rolfbjarne deleted the fix-broken-trust branch December 18, 2023 13:13
@rolfbjarne
Copy link
Member Author

/sudo backport release/8.0.1xx

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Backport Job to branch release/8.0.1xx Created! The magic is happening here

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Oh no! Backport failed! Please see https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=8826430 for more details.

rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this pull request Dec 18, 2023
…locking the Thawte certificate.

The “Thawte SGC CA” certificate we're using for testing is now blocked by
Apple, evaluating trust results in this error:

> “Thawte SGC CA” certificate is blocked

So update the mail_google_com certificates to what mail.google.com serves now, and also update the corresponding parent certificates (which have changed).

Then adjust the tests accordingly.

Finally delete all unused certificates from the code.

Fixes these test failures:

    MonoTouchFixtures.Security.TrustTest
        [FAIL] Trust_FullChain :   GetTrustResult-2
            Expected: RecoverableTrustFailure
            But was:  FatalTrustFailure
               at MonoTouchFixtures.Security.TrustTest.Trust_FullChain(SecTrust trust, SecPolicy policy, X509CertificateCollection certs) in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 389
               at MonoTouchFixtures.Security.TrustTest.Trust_FullChain() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 321
        [FAIL] Trust2_FullChain :   GetTrustResult-2
            Expected: RecoverableTrustFailure
            But was:  FatalTrustFailure
               at MonoTouchFixtures.Security.TrustTest.Trust_FullChain(SecTrust trust, SecPolicy policy, X509CertificateCollection certs) in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 389
               at MonoTouchFixtures.Security.TrustTest.Trust2_FullChain() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 449

Backport of xamarin#19650.
mandel-macaque pushed a commit that referenced this pull request Dec 18, 2023
…locking the Thawte certificate. (#19665)

The “Thawte SGC CA” certificate we're using for testing is now blocked
by
Apple, evaluating trust results in this error:

> “Thawte SGC CA” certificate is blocked

So update the mail_google_com certificates to what mail.google.com
serves now, and also update the corresponding parent certificates (which
have changed).

Then adjust the tests accordingly.

Finally delete all unused certificates from the code.

Fixes these test failures:

    MonoTouchFixtures.Security.TrustTest
        [FAIL] Trust_FullChain :   GetTrustResult-2
            Expected: RecoverableTrustFailure
            But was:  FatalTrustFailure
at MonoTouchFixtures.Security.TrustTest.Trust_FullChain(SecTrust trust,
SecPolicy policy, X509CertificateCollection certs) in
/Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line
389
at MonoTouchFixtures.Security.TrustTest.Trust_FullChain() in
/Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line
321
        [FAIL] Trust2_FullChain :   GetTrustResult-2
            Expected: RecoverableTrustFailure
            But was:  FatalTrustFailure
at MonoTouchFixtures.Security.TrustTest.Trust_FullChain(SecTrust trust,
SecPolicy policy, X509CertificateCollection certs) in
/Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line
389
at MonoTouchFixtures.Security.TrustTest.Trust2_FullChain() in
/Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line
449

Backport of #19650.
@rolfbjarne
Copy link
Member Author

/sudo backport release/7.0.3xx

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Backport Job to branch release/7.0.3xx Created! The magic is happening here

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Oh no! Backport failed! Please see https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=8913267 for more details.

rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this pull request Jan 12, 2024
… certificate. (xamarin#19650)

The “Thawte SGC CA” certificate we're using for testing is now blocked by
Apple, evaluating trust results in this error:

> “Thawte SGC CA” certificate is blocked

So update the mail_google_com certificates to what mail.google.com serves now, and also update the corresponding parent certificates (which have changed).

Then adjust the tests accordingly.

Finally delete all unused certificates from the code.

Fixes these test failures:

    MonoTouchFixtures.Security.TrustTest
        [FAIL] Trust_FullChain :   GetTrustResult-2
            Expected: RecoverableTrustFailure
            But was:  FatalTrustFailure
               at MonoTouchFixtures.Security.TrustTest.Trust_FullChain(SecTrust trust, SecPolicy policy, X509CertificateCollection certs) in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 389
               at MonoTouchFixtures.Security.TrustTest.Trust_FullChain() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 321
        [FAIL] Trust2_FullChain :   GetTrustResult-2
            Expected: RecoverableTrustFailure
            But was:  FatalTrustFailure
               at MonoTouchFixtures.Security.TrustTest.Trust_FullChain(SecTrust trust, SecPolicy policy, X509CertificateCollection certs) in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 389
               at MonoTouchFixtures.Security.TrustTest.Trust2_FullChain() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 449
rolfbjarne added a commit that referenced this pull request Jan 15, 2024
…locking the Thawte certificate. (#19800)

The “Thawte SGC CA” certificate we're using for testing is now blocked by
Apple, evaluating trust results in this error:

> “Thawte SGC CA” certificate is blocked

So update the mail_google_com certificates to what mail.google.com serves now, and also update the corresponding parent certificates (which have changed).

Then adjust the tests accordingly.

Finally delete all unused certificates from the code.

Fixes these test failures:

    MonoTouchFixtures.Security.TrustTest
        [FAIL] Trust_FullChain :   GetTrustResult-2
            Expected: RecoverableTrustFailure
            But was:  FatalTrustFailure
               at MonoTouchFixtures.Security.TrustTest.Trust_FullChain(SecTrust trust, SecPolicy policy, X509CertificateCollection certs) in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 389
               at MonoTouchFixtures.Security.TrustTest.Trust_FullChain() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 321
        [FAIL] Trust2_FullChain :   GetTrustResult-2
            Expected: RecoverableTrustFailure
            But was:  FatalTrustFailure
               at MonoTouchFixtures.Security.TrustTest.Trust_FullChain(SecTrust trust, SecPolicy policy, X509CertificateCollection certs) in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 389
               at MonoTouchFixtures.Security.TrustTest.Trust2_FullChain() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/Security/TrustTest.cs:line 449

Backport of #19650.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants