6 ms·
For the ignorant among us, what would expiration do then?
by makmanalp 9y ago
For the ignorant among us, what would expiration do then?
- bdhess 9y agoPrevent signatures made after the expiration date from being accepted.
- IncRnd 9y agoIt's not an expiration on the signed executable but an expiration on the ability of the certificate to sign an executable.
- josteink 9y agoThis is the exact right answer. And for this to work at all, the signature needs a timestamp so that the OS can know that the certificate was valid at the time of signing. But for some reason (signtool.exe, etc) makes it really hard to get this done properly. This is especially true in a CI-setting, where this is one of those areas where signing and timestamping essentially makes a reliably and deterministic process (compiling code) into a unreliable and non-deterministic process, because builds can now fail randomly based on the state of a online timestamping service. Getting this done properly is a lot more work than you at first would think. I can see why lots of developers shy away from learning about this, even more so implementing it, when they can spend their time delivering value... And new builds which won't expire for another 2 years.
- ryanlol 9y ago>This is especially true in a CI-setting, where this is one of those areas where signing and timestamping essentially makes a reliably and deterministic process (compiling code) into a unreliable and non-deterministic process, because builds can now fail randomly based on the state of a online timestamping service. Why are you signing your drivers during development? If not, how is the "unreliability" of timestamping services an issue? You probably can't push your stuff to prod without timestamps anyway.
- josteink 9y agoI was referring to Windows code-signing in general, not drivers in particular. This kind of problem affects regular customer-facing applications too, and that's where I've worked hard to minimize the issues caused by the need for timestamping, while still doing things properly. (That is, if timestamping fails, the build SHOULD fail)
- ryanlol 9y agoTo me it hardly sounds like a problem for code-signing in general either. You presumably don't need to sign your binaries during development, so you'll only be signing them when pushing updates to prod. I don't know how often and how urgently you usually do that, but it sounds like a small delay in pushing out prod builds caused by a timestamp server issue wouldn't be much of a problem to most orgs.
- josteink 9y agoIt’s often a nesting/dependency problem which is hard to solve after the fact. A website may depend on libraries, which depends on other libraries. They must all be signed. They are all interlinked against a known version during build, and signing them after linking may not be an option. The website may offer a download, which is probably a setup file of sorts, which must be signed. It will of course contain binaries, which must be signed too. The website itself may also be something packaged in another setup file, which too must be signed. Now how do you “just” sign something like that before releasing to prod? You don’t. Signing (and time stamping!) must be a intergrated part of every step of the build process. It takes more work than you would expect to get this done properly, systematically and reliably for every part of your build process. It does take effort and expertise. That said, for certain build-types (like pure CI) we disable things like timestamping. We’re not crazy :)
- IncRnd 9y ago> Getting this done properly is a lot more work than you at first would think. It doesn't take a lot more work than I think. > But for some reason (signtool.exe, etc) makes it really hard to get this done properly. In our experience, signtool doesn't make this "really hard to get this done properly". The CI for our primary product uses a remote server for timestamping at signing. While that server doesn't go down constantly, it does go down at least once a month. This is not an artifact of signtool but the vendor. To have security it is far better to have something fail and not sign than to sign incorrectly. The opposite, get it done attitude at all costs, was the likely cause of this article having been written about Oculus. In this case the cost was signing something incorrectly, due to a misunderstanding of the very basics of certificates, and bricking the already working primary product of the company. Microsoft has a mode for loading unsigned drivers. Every Windows developer should already know about this. If a junior developer without this knowledge is in control of a critical build process, that's the problem not signtool. I've met far too many people who treat a lack of security knowledge as a positive or a badge of honor of some kind. It's not a positive, it's something undesirable and a loss-leader for employers.