Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackson Harper <jackson@novell.com>2004-04-28 01:59:21 +0400
committerJackson Harper <jackson@novell.com>2004-04-28 01:59:21 +0400
commit9d360bae6681e685cc732ad27e6abb715337beac (patch)
tree5329cf5fc80083fb3b12bf245ceb99755229170c /mcs/class/Mono.Security
parentbdf3404d76320044374a971290330a6acf79cf70 (diff)
delay sign assemblies with the ecma key
svn path=/trunk/mcs/; revision=26087
Diffstat (limited to 'mcs/class/Mono.Security')
-rwxr-xr-xmcs/class/Mono.Security/Assembly/AssemblyInfo.cs4
-rw-r--r--mcs/class/Mono.Security/Mono.Security/StrongName.cs11
2 files changed, 10 insertions, 5 deletions
diff --git a/mcs/class/Mono.Security/Assembly/AssemblyInfo.cs b/mcs/class/Mono.Security/Assembly/AssemblyInfo.cs
index 1b393e2655e..179e312b1bb 100755
--- a/mcs/class/Mono.Security/Assembly/AssemblyInfo.cs
+++ b/mcs/class/Mono.Security/Assembly/AssemblyInfo.cs
@@ -45,5 +45,5 @@ using System.Runtime.InteropServices;
//[assembly:SecurityPermission (SecurityAction.RequestOptional, UnmanagedCode=true)]
-//[assembly: AssemblyDelaySign (true)]
-//[assembly: AssemblyKeyFile ("")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../ecma.pub")]
diff --git a/mcs/class/Mono.Security/Mono.Security/StrongName.cs b/mcs/class/Mono.Security/Mono.Security/StrongName.cs
index f6fe1e88e04..b95525ba479 100644
--- a/mcs/class/Mono.Security/Mono.Security/StrongName.cs
+++ b/mcs/class/Mono.Security/Mono.Security/StrongName.cs
@@ -408,17 +408,22 @@ namespace Mono.Security {
sn = StrongHash (fs, StrongNameOptions.Signature);
fs.Close ();
}
- if (sn.Hash == null)
+ if (sn.Hash == null) {
+ Console.WriteLine ("hash is null");
return false;
+ }
try {
AssemblyHashAlgorithm algorithm = AssemblyHashAlgorithm.SHA1;
if (tokenAlgorithm == "MD5")
algorithm = AssemblyHashAlgorithm.MD5;
- return Verify (rsa, algorithm, sn.Hash, sn.Signature);
+ bool v = Verify (rsa, algorithm, sn.Hash, sn.Signature);
+ Console.WriteLine ("returning v: " + v);
+ return v;
}
- catch (CryptographicException) {
+ catch (CryptographicException e) {
// no exception allowed
+ Console.WriteLine ("exception: " + e);
return false;
}
}