Skip to content

Enable SHA1 signing for CentOS Stream 9#15289

Merged
mthalman merged 3 commits intodotnet:mainfrom
mthalman:sb3202
Jan 19, 2023
Merged

Enable SHA1 signing for CentOS Stream 9#15289
mthalman merged 3 commits intodotnet:mainfrom
mthalman:sb3202

Conversation

@mthalman
Copy link
Member

The VMR CI build for CentOS Stream 9 is failing with a cryptographic exception:

Interop+Crypto+OpenSslCryptographicException: error:03000098:digital envelope routines::invalid digest [/vmr/src/source-build-reference-packages/artifacts/source-build/self/src/src/referencePackages/src/system.drawing.common/4.7.2/System.Drawing.Common.4.7.2.csproj::TargetFramework=net461]

This is caused by the use of OpenSSL 3.0 in CentOS Stream 9 which has SHA1 disabled by default. Since strong naming is being used in the build, it requires SHA1. Ideally we'd be able to use public signing which avoid the need for SHA1 but that work is still pending (dotnet/source-build#2907).

This error does not occur in the release/7.0.1xx branch because it's referencing an older version of CentOS Stream 9 that hadn't yet updated to use this version of OpenSSL.

For now, we can explicitly enable SHA1 by setting OPENSSL_ENABLE_SHA1_SIGNATURES=1.

Fixes dotnet/source-build#3202

cc @omajid

Copy link
Member

@MichaelSimons MichaelSimons left a comment

Choose a reason for hiding this comment

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

Approved with one comment for consideration.

container: ${{ parameters.centOSStream9Container }}
bootstrapPrep: false # 🚫
enablePoison: false # 🚫
enableSha1Signing: true # ✅
Copy link
Member

Choose a reason for hiding this comment

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

The convention used has been to specify all parameters in all legs. It was done to make it easier to see the differences between the various legs and to support configuration changes (including duplicating a leg and tweaking it).

This option feels a bit different in that it should only be used on CentOSStream legs but I see value in continuing the current pattern. I don't feel strongly about this though.

Copy link
Member

Choose a reason for hiding this comment

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

If other distros specify enableSha1Signing: false, a reader could infer that Sha1 signing is disabled on those platforms; it's not.

I generally dislike negative variable names but in this case maybe something like overrideDistroDisablingSha1 might be more accurate if we are going to set it to false for other entries in our build matrix?

Copy link
Member

Choose a reason for hiding this comment

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

forceSha1Signing is an option too?

@mthalman mthalman requested review from MichaelSimons and omajid and removed request for omajid January 18, 2023 13:46
excludeSdkContentTests: true # ✅
excludeOmniSharpTests: true # ✅
runOnline: true # ✅
buildFromArchive: false # 🚫
Copy link
Member

Choose a reason for hiding this comment

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

Would you mind alphabetizing this list? It was at one point and recently got out of order.

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.

[main] CI build failure in CentOSStream9_Offline_x64 leg

4 participants