+2003-11-10 Todd Berman <tberman@gentoo.org>
+
+ * sn.cs: No more OutOfMemoryExceptions if the GetPublicKey returns
+ a new byte[0].
+
2003-10-30 Sebastien Pouliot <spouliot@videotron.ca>
* sn.cs: Fixed strongname generation for small exponents (like 17).
case "-v":
filename = args [i++];
an = AssemblyName.GetAssemblyName (filename);
- byte[] akey = an.GetPublicKey ();
- byte[] pkey = new byte [akey.Length - 12];
- Buffer.BlockCopy (akey, 12, pkey, 0, pkey.Length);
- sn = new StrongName (pkey);
- Verify (filename, sn);
+ try {
+ byte[] akey = an.GetPublicKey ();
+ byte[] pkey = new byte [akey.Length - 12];
+ Buffer.BlockCopy (akey, 12, pkey, 0, pkey.Length);
+ sn = new StrongName (pkey);
+ Verify (filename, sn);
+ } catch {
+ Console.WriteLine (filename + " is not a strongly named assembly");
+ }
break;
case "-vf":
Console.WriteLine ("Unimplemented option");