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

Signed assemblies #425

Closed
Intelligence4 opened this issue Aug 14, 2020 · 7 comments
Closed

Signed assemblies #425

Intelligence4 opened this issue Aug 14, 2020 · 7 comments
Assignees
Labels
continuous integration (cc: ci) Workflow process for proper build, testing, and deployment of new code developer experience Impacts how developers are using this product

Comments

@Intelligence4
Copy link

In some development scenarios, i.e. COM add-ins for Office, all assemblies must be signed. Up until now I have been able to sign your assembly myself. However, new changes to how nuget works and store packages does not allow that possibility anymore. Would it be possible to provide your ExtendedXmlSerializer as a signed assembly?

@issue-label-bot
Copy link

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

@Mike-E-angelo Mike-E-angelo added continuous integration (cc: ci) Workflow process for proper build, testing, and deployment of new code developer experience Impacts how developers are using this product labels Aug 14, 2020
@Mike-E-angelo
Copy link
Member

Oh man, @Intelligence4 that's a good one. I recall v1 was signed, but when we looked into signing v2 assemblies (discussed in #52), it unveiled some complications. Primarily, it was discovered that signing assemblies was really no longer a recommendation for .NET packages.

However, that doesn't mean I am totally against it. I guess it boils down to how complicated it is and what is involved. I would assume it means creating a key and if that costs anything? I would need to investigate and collect some more information.

To start, if you can provide any resources on your side I can look into it further. Specifically, I am interested in NuGet's changes and any related resources/recommendations around them. A quick search didn't turn up anything obvious for me.

@Intelligence4
Copy link
Author

Intelligence4 commented Aug 14, 2020 via email

@Mike-E-angelo Mike-E-angelo self-assigned this Aug 14, 2020
@Mike-E-angelo
Copy link
Member

Obviously signing the ExtendedXmlSerializer would cause us the least amount of work.

Yeah I hear you @Intelligence4 this would be nice to have. The trick though is that the least amount of work for you means a good amount of work for me. 😁

I took a preliminary look into it. There are several issues with some notes:

  • I would have to find out how to create another nupkg: ExtendedXmlSerializer.Signed. The trick here is leveraging the existing ExtendedXmlSerializer.csproj file and basically copy its contents (using all its classes/configuration) while kicking out another nupkg that only contains .NET Framework versions and is then subsequently signed.
  • Create new NuGet entry. I am not entirely familiar with this as I did not make the original one. Might not be too big of a deal, however.
  • Updating AppVeyor CI script to post the new package to the proper place. Maybe this is not a big deal either as right now it is configured for *.nupkg so as long as the package is registered on NuGet it should post.

Do you by chance happen to have another repository/project that has this working as you expect it? The challenge here is that it would need to be a repository/project that works nicely with both .NET Core and .NET Framework, and kicking out a signed nupkg that is for the .NET Framework versions only.

If you have something that I can reference, and it's basically something that can be copy/pasted/configured, this could be doable. Otherwise, as per #383 my time/focus is really only limited here for bug fixes and maintenance for the foreseeable future.

@Mike-E-angelo
Copy link
Member

Mike-E-angelo commented Aug 14, 2020

OK @Intelligence4 I poked around this some more and figured something out. Not sure if it will work, but might be promising.

Looks like AppVeyor detects the nupkg just fine and adds it to the artifacts. Please check out the nupkg that contains the signed assembly here:

https://ci.appveyor.com/project/ExtendedXmlSerializer/extendedxmlserializer/builds/34662089/artifacts

Note that during the build process, I get several warnings:

1>CSC : warning CS8002: Referenced assembly 'LightInject, Version=6.2.0.0, Culture=neutral, PublicKeyToken=null' does not have a strong name.
1>CSC : warning CS8002: Referenced assembly 'Sprache, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null' does not have a strong name.

So, not sure if this will be an issue, but it's a starting point.

@Intelligence4
Copy link
Author

Intelligence4 commented Aug 17, 2020 via email

@Mike-E-angelo
Copy link
Member

BTW when one assembly in the chain remains unsigned then the MS-Office “security” model will not load the offending assembly/sub assembly. Simple put, all of your linked assemblies must also be signed including the 3rd party ones. Unfortunately, this puts you in the same position that we are in.

That was my concern and understanding, hoping to be proven wrong. Well, we gave it a shot and got as far as we could. This may also prove valuable for someone else who wants to have a signed version, too. Well, at least they will get to the bad news quicker. 😭

Alright, thanks for bringing this up and too bad we couldn't get it to happen. Please do let me know of any other questions/concerns/issues you do find and I will do my best to help you out. Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
continuous integration (cc: ci) Workflow process for proper build, testing, and deployment of new code developer experience Impacts how developers are using this product
Projects
None yet
Development

No branches or pull requests

2 participants