Skip to content

Restore certificate check compatibility w/ RC2-40-CBC encrypted PKS#12 #466

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

Merged
merged 1 commit into from
Dec 8, 2022
Merged

Restore certificate check compatibility w/ RC2-40-CBC encrypted PKS#12 #466

merged 1 commit into from
Dec 8, 2022

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Dec 7, 2022

The "Check Certificates" GitHub Actions workflow uses OpenSSL to check for problems with the project's signing certificates.

Certificates exported to PKS #12 archive files using older tools may have been encrypted using the "RC2-40-CBC" algorithm.

Due to the availability of more secure modern alternatives, default support for "RC2-40-CBC" encryption was dropped in OpenSSL 3.x.

This project's macOS signing certificate uses "RC2-40-CBC" encryption.

The "Check Certificates" GitHub Actions workflow runs on the ubuntu-latest runner. Previously, this runner used Ubuntu 20.04. This has now changed to Ubuntu 22.04. With the operating system update came an OpenSSL update from 1.1.1f to 3.0.2. This caused the workflow runs to fail on the macOS certificate job:

https://github.com/arduino/arduino-lint/actions/runs/3637814935/jobs/6139263908#step:5:16

Error outputting keys and certificates
80FBB0C5087F0000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:../crypto/evp/evp_fetch.c:349:Global default library context, Algorithm (RC2-40-CBC : 0), Properties ()

Even though no longer done by default, OpenSSL still supports "RC2-40-CBC" encryption via its "legacy" provider. So compatibility with the certificate is restored by adding the -legacy flag to the openssl pkcs12 commands.

This is a sync from the upstream "template" workflow: arduino/tooling-project-assets#294

The "Check Certificates" GitHub Actions workflow uses OpenSSL to check for problems with the project's signing
certificates.

Certificates exported to PKS#12 archive files using older tools may have been encrypted using the "RC2-40-CBC"
algorithm.

Due to the availability of more secure modern alternatives, default support for "RC2-40-CBC" encryption was dropped in
OpenSSL 3.x.

This project's macOS signing certificate uses the "RC2-40-CBC" encryption.

The "Check Certificates" GitHub Actions workflow runs on the `ubuntu-latest` runner. Previously, this runner used Ubuntu
20.04. This has now changed to Ubuntu 22.04. With the operating system update came an OpenSSL update from 1.1.1f to
3.0.2. This caused the workflow runs to fail on the macOS certificate job:

Error outputting keys and certificates
80FBB0C5087F0000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:../crypto/evp/evp_fetch.c:349:Global default library context, Algorithm (RC2-40-CBC : 0), Properties ()

Even though no longer done by default, OpenSSL still supports "RC2-40-CBC" encryption via its "legacy" provider. So
compatibility with the certificate is restored by adding the `-legacy` flag to the `openssl pkcs12` commands.

This is a sync from the upstream "template" workflow:

https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-certificates.yml
@per1234 per1234 added topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project labels Dec 7, 2022
@per1234 per1234 self-assigned this Dec 7, 2022
@per1234 per1234 requested a review from kittaakos December 8, 2022 08:50
Copy link

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good based on the changes made for arduino/arduino-ide#1745. Thank you!

@per1234 per1234 merged commit 47e3845 into arduino:main Dec 8, 2022
@per1234 per1234 deleted the fix-check-certificates branch December 8, 2022 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants