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

Feature request: Support full-signing when running on CoreCLR. #8210

Closed
joperezr opened this issue Jan 27, 2016 · 35 comments
Closed

Feature request: Support full-signing when running on CoreCLR. #8210

joperezr opened this issue Jan 27, 2016 · 35 comments

Comments

@joperezr
Copy link
Member

On corefx repo, we started using an Open key to fully sign some of our libraries. This key contains both public and private keys, and can be located here. This worked fine in Windows with the Full MSBuild and x-plat with Mono MSBuild, but it started failing x-plat once we moved to .Net Core MSBuild and the portable compilers. The exception we get is:

CSC : error CS7027: Error signing output with public key from file '.../corefx/Tools/Open.snk' -- Cannot marshal 'return value': Invalid managed [.../corefx/src/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj]

We would really like this issue to get addressed so that we are able to fully sign this libraries in non-Windows builds.

@joperezr
Copy link
Member Author

cc @weshaggard @agocke

@agocke
Copy link
Member

agocke commented Jan 27, 2016

This may be an issue with my snk file parser, I'll take it.

@agocke agocke self-assigned this Jan 27, 2016
@agocke agocke added this to the 1.2 milestone Jan 27, 2016
@agocke
Copy link
Member

agocke commented Feb 1, 2016

Looks like this works in dotnet cli. Can you provide an isolated repro?

@jaredpar jaredpar added the Need More Info The issue needs more information to proceed. label Feb 1, 2016
@joperezr
Copy link
Member Author

@agocke sorry it took so long to respond, sure there is an easy way to repro this exact scenario. If you remove this line from that file, and then try to build the latest corefx in Ubuntu or OSX you should get an exception like the one previously specified. If you need any more info, please let me know.

@jaredpar jaredpar added Bug and removed Need More Info The issue needs more information to proceed. labels Feb 10, 2016
@agocke
Copy link
Member

agocke commented Feb 23, 2016

I looked through the corefx repo. As far as I can tell, you're not actually setting public sign anywhere in the repo, even after disabling that property. Checking the msbuild log, there is no /publicsign parameter being passed. The error message produced is thus the failure of the compiler to real sign on Linux/Mac.

I'm going to close this for now -- if new info is found then we can re-open.

@agocke agocke closed this as completed Feb 23, 2016
@agocke agocke removed their assignment Feb 23, 2016
@weshaggard
Copy link
Member

@agocke I'm a little unclear what you are suggesting. Are you suggesting you cannot repro it or that we are just missing an extra flag we need to pass? Even if there is an extra property that isn't getting set it seems like the error message should be improved.

@agocke
Copy link
Member

agocke commented Feb 29, 2016

@weshaggard You're right about the error message -- I've filed #9288 to address that.

As to this bug, I understood this to be an issue with public sign -- full signing is not currently supported on coreclr. Did you want to re-categorize as a feature request?

@weshaggard
Copy link
Member

Yes we should re-categorize it as a feature request because it is something I think we need to support.

@agocke
Copy link
Member

agocke commented Feb 29, 2016

@weshaggard Do you have a corefx bug we can follow? :) Roslyn currently PInvokes to the CLR for signing support and we'll continue to either use a CLR or CoreFX signing utility for full signing.

@agocke agocke changed the title Exception thrown when trying to pass in a signing key file that contains both public and private keys. Feature request: Support full-signing when running on CoreCLR. Feb 29, 2016
@agocke agocke modified the milestones: Unknown, 1.2 Feb 29, 2016
@tmat
Copy link
Member

tmat commented Feb 29, 2016

Re full signing - we have discussed this already. @jkotas wrote a prototype. I think we can productize that code in the new PE writer.

@agocke agocke reopened this Feb 29, 2016
@joperezr
Copy link
Member Author

@agocke Is there any kind of ETA of when this feature might come online? We are hitting some issues in corefx given that this is not yet supported.

@agocke
Copy link
Member

agocke commented Apr 1, 2016

@joperezr No ETA, sorry.

@agocke
Copy link
Member

agocke commented Apr 1, 2016

@jaredpar Have we costed this at all?

@eerhardt
Copy link
Member

eerhardt commented Sep 2, 2016

@jaredpar - Any plan when this will be fixed? This works with project.json based projects, but doesn't for MSBuild projects.

@jaredpar
Copy link
Member

Update on this: the work to do strong name signing on CoreClr is complete. It did not make the cut off for the Dev15.5 release but will be in the following release. It should be merged in one of the main branches in the next few days.

@jnm2
Copy link
Contributor

jnm2 commented Oct 30, 2017

Thanks! Good to know because I was considering sinking some time into a workaround package.

@ghost
Copy link

ghost commented Nov 17, 2017

strong name signing on CoreClr is complete

Couldn't find any reference to a pull-request, could you provide one?

It should be merged in one of the main branches in the next few days.

Reference to this issue in pull request would be great when that happens. Must be interesting to see work done that took about 23 months. :trollface:

@jaredpar
Copy link
Member

Here is the PR that merged this into the post-dev15.5-contrib branch. This is "master" for our dev15.6 work.

#23061

@nguerrera
Copy link
Contributor

👏

@akoeplinger
Copy link
Member

For the record: the new cross-plat strong name signing provider works fine on Mono too 😄 (tested with Roslyn 2.7.0.62620)

roji added a commit to roji/Npgsql that referenced this issue Mar 26, 2019
Was causing an issue in Npgsql.GeoJson. In any case, it seems that
full signing is now supported everywhere.
(dotnet/roslyn#8210)
roji added a commit to npgsql/npgsql that referenced this issue Mar 26, 2019
Was causing an issue in Npgsql.GeoJson. In any case, it seems that
full signing is now supported everywhere.
(dotnet/roslyn#8210)
picenka21 pushed a commit to picenka21/runtime that referenced this issue Feb 18, 2022
Issue dotnet/roslyn#8210 blocks signing
on unix, but we still need to have the assemblies have the correct
identity so we are simply turning on DelaySigning for those assemblies.


Commit migrated from dotnet/corefx@4d47c2d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests