Skip to content

Commit 2b1ab09

Browse files
authored
Restore certificate check compatibility w/ RC2-40-CBC encrypted PKS#12 (#156)
The "Check Notarization 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 Notarization 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 40B7B766147F0000: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
1 parent ea7b9ed commit 2b1ab09

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: .github/workflows/check-notarization-certificates.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ jobs:
5656
(
5757
openssl pkcs12 \
5858
-in "${{ env.CERTIFICATE_PATH }}" \
59-
-noout -passin env:CERTIFICATE_PASSWORD
59+
-legacy \
60+
-noout \
61+
-passin env:CERTIFICATE_PASSWORD
6062
) || (
6163
echo "::error::Verification of ${{ matrix.certificate.identifier }} failed!!!"
6264
exit 1
@@ -84,6 +86,7 @@ jobs:
8486
openssl pkcs12 \
8587
-in "${{ env.CERTIFICATE_PATH }}" \
8688
-clcerts \
89+
-legacy \
8790
-nodes \
8891
-passin env:CERTIFICATE_PASSWORD
8992
) | (

0 commit comments

Comments
 (0)