Berndt,
>Is it really enough to compare the public key from the application to be
>launched with the public key of the launcher applicatin itself? I mean, the
>public key is just public and anyone could use it when they sign their
>assemblies and I won't get the security check that I am after.
The private key is used to sign the assembly.
Personally I'd set up a new appdomain, with a strict policy
(SetAppDomainPolicy) that only allows your code to run.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Berndt Johansson - 10 Jun 2004 07:50 GMT
Hi Mattias,
So, you would recommend to setup a new appdomain with a strongname
membership condition binding to the public key of our own signed assemblies?
As I understand it, this relies on the fact that the signing of assemblies
using a private key can only yield one public key and that there are no ways
to have two different private keys that generates the same signed public. If
this is the case, then comparing the assemblies public keys would be
sufficient, right? If someone had manipulated the manifest to have the same
public key, then the runtime would refuse to execute the modified assembly.
Am I jumping into wrong conclusions here or is this the way it works?
/Berndt
> Berndt,
>
[quoted text clipped - 9 lines]
>
> Mattias