strongname

.NET OpenSource projects and strong named assemblies?

可紊 提交于 2019-11-28 08:06:28
I am currently thinking about open-sourcing a project of mine and am in the process of preparing the source code and project structure to be released to the public. Now I got one question: how should I handle the signature key for my assemblies? Should I create a new key for the open-source version and publish it along with the other files to the SVN repository? Should I leave the key out and everyone who wants to compile the code should generate his own key? How do you handle this? I feel a little bit uncomfortable with releasing a signature key to the public. Jon Skeet For Protocol Buffers ,

Do I need to publish the public key from .snk file?

ⅰ亾dé卋堺 提交于 2019-11-28 01:20:42
From the description of sn.exe utility and this question I see that a copy of the public key is added to every assembly signed with the strong name. This is enough to validate that the assembly binary has not been altered. But how does one verify that given assembly was really signed with some given keypair and compiled by a given company? Anyone could generate his own keypair, produce some assembly and sign it with his keypair. Do I need to publish the public key so that those who want to verify the assembly origin could compare the public keys? if so, what is the best way to do so? No, you

Checking an assembly for a strong name

浪子不回头ぞ 提交于 2019-11-27 18:02:28
Is it possible to check if a dynamically loaded assembly has been signed with a specific strong name? Is it enough / secure to compare the values returned from AssemblyName.GetPublicKey() method? Assembly loaded = Assembly.LoadFile(path); byte[] evidenceKey = loaded.GetName().GetPublicKey(); if (evidenceKey != null) { byte[] internalKey = Assembly.GetExecutingAssembly().GetName().GetPublicKey(); if (evidenceKey.SequenceEqual(internalKey)) { return extension; } } Can't this be spoofed? I am not sure if the SetPublicKey() method has any effect on a built assembly, but even the MSDN documentation

Is it possible to replace a reference to a strongly-named assembly with a “weak” reference?

▼魔方 西西 提交于 2019-11-27 14:21:45
I'm writing a .NET tool that requires the SQL Server SMO library. I don't care if it's the version from Server 2005 (9.0), 2008 (10.0) or 2008 R2 (probably 10.5, didn't check). The SMO library is installed together SQL Server, so I can safely assume that on any system with SQL Server installed, some version of the SMO library is available as well. Unfortunately, the SMO libraries are strongly-named: If I add a reference to SMO 9.0 in my project, it will fail ( FileNotFoundException ) if only SMO 10.0 is present on the customer's system, and vice versa. Is there some way to tell the compiler

snk vs. code signing certificate

烈酒焚心 提交于 2019-11-27 13:53:24
问题 In my organization we use snk files with strong names assemblies. We generate the snk ourselves. In addition we use a code signing signature on the binaries. We get the pfx from Verisign. What is the difference between these two processes? Isn't it a problem that the snk is not recevied from Verisign also? 回答1: The snk and pfx are used for two different purposes. The snk is used for strong-naming, which uses a key pair to uniquely identify an assembly. The pfx is for code signing, which is a

How can I profile Signed Assemblies with VS 2010 or VS 2013

别等时光非礼了梦想. 提交于 2019-11-27 11:10:49
问题 I have a website that uses AjaxControlToolkit.dll and Log4Net.dll. When I try to run the performance profiling tool in VS 2010 on it it gives me the following warning: AjaxControlToolkit.dll is signed and instrumenting it will invalidate its signature. If you proceed without a post-instrument event to re-sign the binary it may not load correctly. Now, if I choose the option to continue without re-signing, the profiling starts but the assembly doesn't load and gives an ASP.NET exception. 回答1:

What is a .snk for?

爷,独闯天下 提交于 2019-11-27 10:03:47
What is a .snk file for? I know it stands for Strongly Named Key , but all explanations of what it is and how it works goes over my head. Is there any simple explanation on how a strongly named key is used and how it works? Blair Conrad The .snk file is used to apply a strong name to a .NET assembly . such a strong name consists of a simple text name, version number, and culture information (if provided)—plus a public key and a digital signature. The SNK contains a unique key pair - a private and public key that can be used to ensure that you have a unique strong name for the assembly. When

“Unable to find manifest signing certificate in the certificate store” - even when add new key

怎甘沉沦 提交于 2019-11-27 09:38:59
问题 I cannot build projects with a strong name key signing - the message in the title always comes up. Yes the project was initially copied over from another machine. However even if I add a new key via the Signing tab in Project Properties, this error is still shown. I have tried running Visual Studio as an Administrator and have tried manually adding the keys to Windows Certificate Store. Help! Edit: I don't get this error with a new project, but I'd quite like to get this existing project

Anything wrong with NOT signing a .NET assembly?

ぃ、小莉子 提交于 2019-11-27 09:20:30
问题 One of my colleagues is very keen on signing assemblies. He literally tries to sign anything. Even when we use assemblies from Microsoft that are not signed, he will take the source code, sign it and then ask other developers to use his copy instead. I can understand the basic idea behind signing an assembly: to ensure a particular assembly is not compromised by some dodgy hacker. So if we are a software development company, we should sign our assembly before releasing some .NET library to

How to force WPF to use resource URIs that use assembly strong name? Argh!

风流意气都作罢 提交于 2019-11-27 07:52:10
O.k, this is really irritating, I had noticed previously that the code generated by WPF for loading XAML resources did not appear to use strong names and therefore may be problematic for scenarios where you need to support side by side versions of WPF assemblies. This has turned out to be the case, and it's now causing me problems - I have a plug-in system which is supposed to support side by side installation of plugins which differ only in their version numbers (their assembly versions). This of course can be supported by .NET since assemblies are determined to have different identities even