Closed vcsjones closed 5 years ago
That's better, but what do you think of something closer to https://github.com/NuGetPackageExplorer/NuGetPackageExplorer/blob/view-authenticode-sigs/PackageViewModel/Types/AuthenticodeSignature.cs
It has a signature object that directly exposes the publisher info, timestamp info, etc?
Null is valid if there isn't one.
The thought was that since all of signature types are the same interface, and in the case of RF3161 timestamps they're actually the same class as a normal signature, It doesn't make sense for timestamps to have publisher info on them. That was the thinking at least.
I can encapsulate the known signatures to be more "concrete" as to what they are and expose things on the types rather than extensions.
A small issue with my current design I intend to correct is that a signature can have multiple time stamps (which I've seen in the wild.. rarely) so Timestamps should be a collection.
Yeah, was thinking about keeping it as simple for people that might not know what kinds of things are in a sig. That an object would represent all of that.
@onovotny updated
Looks better, but still not clear to me why Publisher and Timestamp should be methods? Seems like they could be calculated quickly either on-demand on first access or in the ctor? That also makes it possible to bind in WPF.
That also makes it possible to bind in WPF.
Ah. Wasn't aware you were going to use these as models.
No reason to write a wrapper model if it's not necessary :)
okie doke, properties it is.
:shipit:
@onovotny give https://www.nuget.org/packages/AuthenticodeExaminer/0.2.0 a shot when you got a moment.
@onovotny
Take a look at the new program sample. What do you think of this as a start?
This addresses:
Fixes #2