strongname

Signing my assembly with a strong name stops it from working

落花浮王杯 提交于 2020-01-01 08:21:20
问题 A colleague of mine created an assembly in VB.net for use with JScript via COM interop. The assembly used to work fine, but we signed it and now it only seems to work on Windows 7 machines. I've tested 2 Windows 7 machines and 2 Windows Vista machines. When we signed the assembly and we try to instantiate the ActiveX object in JScript, an error is returned with no message and only a number: Error: Error number: -2146234304 A search on Google for the error number didn't return much. If we

Signing my assembly with a strong name stops it from working

烂漫一生 提交于 2020-01-01 08:21:09
问题 A colleague of mine created an assembly in VB.net for use with JScript via COM interop. The assembly used to work fine, but we signed it and now it only seems to work on Windows 7 machines. I've tested 2 Windows 7 machines and 2 Windows Vista machines. When we signed the assembly and we try to instantiate the ActiveX object in JScript, an error is returned with no message and only a number: Error: Error number: -2146234304 A search on Google for the error number didn't return much. If we

Does code-signing without strong-naming leave your app open to abuse?

て烟熏妆下的殇ゞ 提交于 2019-12-31 09:16:10
问题 Trying to get my head around authenticode code-signing and strong-naming. Am I right in thinking that if I code-sign an exe that references a few dlls (not strong named) that a malicious user could replace my DLLs and distribute the app in a way that appears as if it's signed by me, but is running their code? Assuming that's true, it seems like you wouldn't really want to sign a .NET app without strong-naming the whole thing, otherwise you're giving people the ability to execute code under

PFX/PKCS12 to SNK conversion for mono

家住魔仙堡 提交于 2019-12-30 06:38:07
问题 This is follow up on Mono xbuild error CS1548 - key file has incorrect format Hi, I have an application that is written in C# using VS2008. At present we are porting this app to Mac using Mono. I have tried to extract the key from the pfx file. First I used `sn -pc key.pfx key.snk` this gave me an error of 'Failed to extract public key for key pair -- Keyset does not exist'. I then used `sn -p key.pfx key.snk` this created the snk file that I wanted. I then in mono selected the project Option

Cryptographic failure while signing assembly '<assemblyname>.dll' – 'Bad Version of Provider'

痞子三分冷 提交于 2019-12-23 19:38:07
问题 I purchased an authenticode certificate from a well known provider. Now I want to strong name an assembly and later on digitally sign it. This is what I've done so far: Extracted public key from pfx by running sn.exe -p keypair.pfx key.snk Checked both "Sign the assembly" and "Delay sign only" checkboxes on project properties signing tab Provided key.snk as keyfile to sign with Extracted public key token by running sn.exe -tP key.snk Disabled strong name verification on my devbox by running

Signing pre-build assemblies

ぐ巨炮叔叔 提交于 2019-12-23 03:21:16
问题 Before I go digging through the IL, hopefully someone has run into this issue before: Trying to sign a third-party assembly (in this case, the latest HtmlAgilityPack). I've done this before with no issues. Doing the usual ildasm => ilasm, but when I go to use my newly-signed assembly, Visual Studio complains it "cannot enumerate resources in the executable". What might cause this? 回答1: I've done it before too. If it's managed only, one pass through Mono.Cecil and Mono.Security can do it. If

Signing pre-build assemblies

南楼画角 提交于 2019-12-23 03:21:01
问题 Before I go digging through the IL, hopefully someone has run into this issue before: Trying to sign a third-party assembly (in this case, the latest HtmlAgilityPack). I've done this before with no issues. Doing the usual ildasm => ilasm, but when I go to use my newly-signed assembly, Visual Studio complains it "cannot enumerate resources in the executable". What might cause this? 回答1: I've done it before too. If it's managed only, one pass through Mono.Cecil and Mono.Security can do it. If

Cannot install assembly to cache?

时光怂恿深爱的人放手 提交于 2019-12-22 05:02:14
问题 I am trying to add an assembly to the cache on Visual Studio 2010 Command Prompt. I get this error "Failure adding assembly to the cache: Attempt to install an assembly without a strong name". I am adding a ListTasks2.dll assembly from a WCF Service App called ListTasks2. I never had this issue with a similarly-named project, so why is it raising an issue now? NOTE: I tried signing it in Visual Studio and it still doesn't work. I wonder if it might be a permission issue. I used different user

How can I see the strong name of my assembly?

折月煮酒 提交于 2019-12-22 02:00:04
问题 I have a project, and I created a strong name key file for it. How can I tell what the strong name of my assembly is? It seems this should be obvious, but I can't find any reference to it. 回答1: You can get the Fully Qualified Name by using a tool like Reflector or ILSpy. Select the assembly and it should be in top of it. For XNA in ILSpy : // C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.dll // Microsoft.Xna.Framework, Version=4.0.0.0

Quite special PublicKey in .NET core assemblies

左心房为你撑大大i 提交于 2019-12-19 05:57:40
问题 I've noticed that core .NET assemblies have PublicKey = 00000000000000000400000000000000. Not only it's shorter then those sn.exe allows to generate (min 384 bits) but also it has a lot of zeros. How to generate signing key with such a fancy public key? 回答1: That's the ECMA Standard defined public key. It's to deal with three conflicting requirements: A mechanism that ensures that assemblies are signed by their creators and could not have been created by a fraudulent other party. That CLI be