Strong name signature could not be verified
Closed this issue · 15 comments
I get the error message "Strong name signature could not be verified" when using XmppDotNet.Core in a MVC .NET Framework project.
The verification in a VS Developer Command Prompt fails:
>sn.exe -v .\XmppDotNet.Core.dll
Microsoft (R) .NET Framework Strong Name Utility Version 4.0.30319.0
Copyright (c) Microsoft Corporation. All rights reserved.
Failed to verify assembly -- Strong name validation failed.
It also happens for all other DLLs : XmppDotNet.dll etc.
How can it be fixed?
Legacy .NET (.NET Framework 4.8, for one of the projects, where I see the error).
If I clone the repository, build (Debug) then I also receive valid DLL files.
If I include the nuget in the project, then the resulting XMPPDotNet DLLs are not valid.
is it using then the netStandard 2.0 or 2.1 builds?
The nugets are just getting build from the CI, but using a very recent netCore version.
It is using the netstandard2.0 build. But using "sn -v" all versions (also .NET 6 & 8) in the packages/XmppDotNet.3.2.2/lib/ folder seem to be invalid (packages/XmppDotNet.3.2.2/lib/net8.0/XmppDotNet.dll, packages/XmppDotNet.3.2.2/lib/netstandard2.1/XmppDotNet.dll, etc.)
its possible that its related to this line:
Line 5 in 80e6f0c
Because the CI runs on Linux.
Would need to research this in more.....
Yes, seems possible.
Seems like the DLLs get downloaded from here: https://api.nuget.org/v3-flatcontainer/xmppdotnet.core/3.2.2/xmppdotnet.core.3.2.2.nupkg
This is an archive and can be opened. The containing DLLs seem to be not signed correctly.
its possible that its related to this line:
Line 5 in 80e6f0c
Because the CI runs on Linux. Would need to research this in more.....
Seems like the 'normal' signing on Linux was a problem in the past. But it is possible for several years now.
see dotnet/roslyn#8210
ya signing is not really used anymore that much on netcore.
However, I a pushed a branch and updated the CI to use a Windows image instead of Ubuntu.
You can checkout the CI builds here and give feedback:
https://www.myget.org/feed/Packages/xmppdotnet
Ci build XmppDotNet 3.2.3-ci-24060-64 is build on Linux with PublicSign enabled. Does noo work
Ci build XmppDotNet 3.2.3-ci-24060-63 is build on Windows with PublicSign enabled and works
The feed should be public under this URI:
https://www.myget.org/F/xmppdotnet/api/v3/index.json
you should test version 3.2.3-ci-24060-63 which was build on Windows.
The very latest version 3.2.3-ci-24060-64 does not work because its build on Linux where the signing does not work
I will update Ci to use Windows again later today and generate new packages.
Will then decide later on what to do with signing.