* StrongName.cs: New test cases to verify signatures from streams.
Patch from Dave Hillier <daveh@lindenlab.com>
svn path=/trunk/mcs/; revision=101824
+2008-04-25 Sebastien Pouliot <sebastien@ximian.com>
+
+ * StrongName.cs: New test cases to verify signatures from streams.
+ Patch from Dave Hillier <daveh@lindenlab.com>
+
2008-03-10 Stephane Delcroix <sdelcroix@novell.com>
* Uri.cs: port the changes I did in System.Uri in r97844.
public bool Verify (string fileName)
{
- StrongNameSignature sn;
+ bool result = false;
using (FileStream fs = File.OpenRead (fileName)) {
- sn = StrongHash (fs, StrongNameOptions.Signature);
+ result = Verify (fs);
fs.Close ();
}
+ return result;
+ }
+
+ public bool Verify (Stream stream)
+ {
+ StrongNameSignature sn = StrongHash (stream, StrongNameOptions.Signature);
if (sn.Hash == null) {
return false;
}