[Mono-dev] [Patch] Mono.Security.StrongName.Verify: added a stream overload

Sebastien Pouliot sebastien.pouliot at gmail.com
Fri Apr 25 10:24:22 EDT 2008


Hey,

On Fri, 2008-04-25 at 15:08 +0100, Dave Hillier wrote:
> Hi there,
> 
> I've never asked for commit rights, so I presume I don't have them.

right :)

> For future reference, what's wrong with the line endings?

-                               AssemblyHashAlgorithm algorithm = AssemblyHashAlgorithm.SHA1;
-                               if (tokenAlgorithm == "MD5")
-                                       algorithm = AssemblyHashAlgorithm.MD5;
-                               return Verify (rsa, algorithm, sn.Hash, sn.Signature);
-                       }
-                       catch (CryptographicException) {
-                               // no exception allowed
-                               return false;
-                       }
+                                AssemblyHashAlgorithm algorithm = AssemblyHashAlgorithm.SHA1;
+                                if (tokenAlgorithm == "MD5")
+                                        algorithm = AssemblyHashAlgorithm.MD5;
+                                return Verify (rsa, algorithm, sn.Hash, sn.Signature);
+                        }
+                        catch (CryptographicException) {
+                                // no exception allowed
+                                return false;
+                        }      
+                       

Same code but it's part of the diff. So your editor either changed the
line endings (which could be non-consistent in the file) or it could be
a space-versus-tab issue too (since the alignment looks strange).

If the original file is bad (e.g. non-consistent line endings) then I'll
fix it in a separate commit (it makes reviewing SVN history easier).

> If you can commit it for me that would be great.

will do

> Thanks for your help,

you did the hard part (but it actually looks like it was easier than I
expected ;-)

Sebastien

> Dave
> 
> 
> On 25 Apr 2008, at 15:08, Sebastien Pouliot wrote:
> 
> > Hello Dave,
> >
> > It looks ok, except maybe for the ?line endings? on the last few lines
> > of the diff.
> >
> > Do you have commit rights ? If so check the last part issue before
> > committing. Otherwise tell me and I'll check that before committing.
> >
> > Thanks!
> > Sebastien
> >
> > On Fri, 2008-04-25 at 14:27 +0100, Dave Hillier wrote:
> >> Hi,
> >>
> >> I have added an overload to Mono.Security.StrongName.Verify which
> >> takes a Stream rather than a file name. This allows me to verify byte
> >> code I have already loaded in memory, saving an unnecessary write to
> >> disc. I have preserved the old interface and refactored the code so
> >> they both use the same path.
> >>
> >> I have attached the patch which contains the changes to StrongName.cs
> >> and StrongNameTest.cs
> >>
> >>
> >> Cheers,
> >>
> >> Dave
> >>
> >>
> >>
> >> _______________________________________________
> >> Mono-devel-list mailing list
> >> Mono-devel-list at lists.ximian.com
> >> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
> 



More information about the Mono-devel-list mailing list