Re-signing old Mac installer packages with new Developer ID Installer cert?

Our product is distributed as a Mac installer package, and it is only distributed by us, not via the Mac App store. Thus, we have Developer ID certificates to sign both the actual software components within the installer package (Developer ID Application With KEXT - since we have a KEXT), and the installer package itself (Developer ID Installer). Our Developer ID certificates are set to expire next month, so we just created new ones which we are switching to. However, we also maintain an archive of older product installer packages on our website for users that need to run earlier releases for some reason (running on older OS, etc). It sounds like we may need to re-sign those older installers with the new Developer ID Installer cert, as the info here makes it sound like those installers will no longer run after the cert expires: https://developer.apple.com/support/certificates/ https://developer.apple.com/support/developer-id/

We’re trying to get a definitive answer on what we need to do, before it’s too late to do it, but some of the behavior of this certificate stuff is a little confusing (also, I did file a DTS request to get clarification on this, and ultimately they referred me to posting here on the dev forums).

Let’s assume all those older installers were signed with our old Developer ID Installer cert, and let’s say that cert expires on 6/1/22. My questions are:

1 ) I assume those installers will now cease to run after 6/1/22, correct? But any installs that ALREADY happened with those installers will continue to work after 6/1/22? This is what the links above suggest, but we specifically want to make sure this is the case for the KEXT, which in those older installers is signed with the older Developer ID Application With KEXT cert which also expires on 6/1/22.

[Related question, is there any reliable way to test this? I assume it would be more complicated than just setting the system date on a test machine past 6/1/22…]

2 ) Assuming it is the case that those old installers will no longer run after 6/1/22, do we just need to re-sign those installer packages with our new Developer ID Installer cert? OR, do we additionally need to re-NOTARIZE the installer packages (assuming they need to run on Catalina or later)?

[Logically it seems like we need to re-notarize after re-signing, and one test seemed to confirm that, while another similar test done by another developer had different results. I think what happened there was that the developer re-signed the installer with the new cert and saved that off (testA.pkg), then uploaded that installer to the notarization service and saved the result w/stapled ticket as a differently named file (testB.pkg). We figured that when running the “only re-signed" installer (testA.pkg), we would get the gatekeeper error, but we didn’t (also spctl reported it as passing notarization). I assume this is because the same binary installer had already been uploaded for notarization, and something in the OS was able to talk to the notary service and detect that this installer (testA.pkg) was the same as the one that had been uploaded for notarization, hence reporting it passed. I guess that is why the note here about testing notarization mentions testing with network connectivity disabled: https://developer.apple.com/forums/thread/130560]

3 ) Assuming we do need to re-notarize the old installers, do we need to do that before the cert that was used to sign the software components within them expires on 6/1/22? I.e. will the process of notarizing a .pkg look inside the package for executable code bundles, and then fail if a bundle was signed with a now-expired cert? For various reasons it would be difficult to break apart these old installers, re-sign their individual software components with the new Developer ID Application cert, and re-package them.

Thanks for any insight!

Accepted Reply

It sounds like we may need to re-sign those older installers with the new Developer ID Installer cert, as the info here makes it sound like those installers will no longer run after the cert expires

The info in that page is out of date. See this post for an explanation of how things currently work. In short, you need to examine your old installer packages to see if they’re flagged with Signed with a trusted timestamp. If so, you don’t need to worry about this.

is there any reliable way to test this? I assume it would be more complicated than just setting the system date on a test machine

And you’d be wrong (-: Disconnecting the machine from the network and then manually setting the date is a valid way to test this.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Replies

It sounds like we may need to re-sign those older installers with the new Developer ID Installer cert, as the info here makes it sound like those installers will no longer run after the cert expires

The info in that page is out of date. See this post for an explanation of how things currently work. In short, you need to examine your old installer packages to see if they’re flagged with Signed with a trusted timestamp. If so, you don’t need to worry about this.

is there any reliable way to test this? I assume it would be more complicated than just setting the system date on a test machine

And you’d be wrong (-: Disconnecting the machine from the network and then manually setting the date is a valid way to test this.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for that information!

TL;DR - So far in my testing it appears that all of our installer packages that we care about actually have the trusted timestamp, and they do appear to be able to install properly on older OS versions even if the Developer ID Installer cert used to sign them has since expired. Yay!

The TL part:

Finally circling back to this, I had to do some digging to understand the details of exactly how we handle our software archives for users. The concerning thing in the linked post was some ambiguity over where the trusted timestamp would apply to older macOS versions... as one of the main reasons for our software archive is to allow folks who are stuck on an older (no longer officially supported by us) macOS version. We provide a chart of which build versions should work with which macOS versions (i.e. versions of our software that we tested/validated with a given OS version). We don't officially support all of these old OS versions; with the current release we only support back to 10.14. But we provide the old builds for people on older OS versions. The software archive chart looks something like so:

macOS version / Tested software versions

macOS Monterey / v10.0.0 and higher

macOS 11 Big Sur / v9.13.1 and higher

macOS 10.15 Catalina / v9.11.1 and higher

macOS 10.14 Mojave / v9.8.0 and higher

macOS 10.13 High Sierra / v9.4.0 through v9.14.5

macOS 10.12 Sierra / v9.0.0 through v9.13.0

OS X 10.11 El Capitan / v8.5 through v9.9.0

OS X 10.10 Yosemite / v8.0 through v9.5.0

OS X 10.9 Mavericks / v7.0 through v9.0.0

[This list actually continues to even older versions! But those generally pre-date when we switched to installer .pkgs, prior to that we were using VISE, and the installer was a standalone .app. Back then things were not even signed too. I doubt there is anyone still using OS versions that old, but the installers for our stuff that works on those OS's are there if necessary... in any case, software and OS versions that old are not affected by this particular issue.]

Obviously this includes a huge number of installer .pkgs. Rather than check all of them, I picked some representative old builds, including one of the oldest .pkg versions that was signed (the Developer ID Installer cert used to sign it had already expired), and tested these builds on Mavericks and Mojave. I also checked pkgutils --check-signature on the installers on those versions. The short answer is, even the super-old pkg signed with the now-expired cert seems to work. Catalina pkgutil reports a trusted timestamp. Mavericks/Mojave reports "signed by a certificate trusted by Mac OS X". This seems to be the equivalent on an older OS for saying the trusted timestamp is there, and indeed seems to trigger the identical check used for Developer ID signed apps, i.e. it allows the install since the .pkg was valid when it was signed. For that case (now-expired cert) the lock icon in the installer reports that the cert has expired, but still says it's valid.

I was kind of surprised to see that such an old installer .pkg reported it was signed with the trusted timestamp, we're talking like 2014 timeframe. Back then I believe our build machines were running Maverics, so those packages were signed with a pretty old version of productsign. But it appears it must have supported the the trusted timestamp thing even back then.

So the net result is that it does appear that all of the installer packages in our software archives that we care about actually do work properly. This is good because while we could pretty easily re-sign the installers, for the ones that are notarized we'd have to re-notarize them. And notarization is a problem for a subset of those installers because they were notarized during the early days of notarization when certain now-hard requirements (that we didn't satisfy at the time) were temporarily relaxed before being enforced later, so those installers will fail notarization. But bottom line, it seems like we don't need to do that, so yay!

This post was also quite helpful:

https://eclecticlight.co/2022/02/08/why-do-installer-packages-expire-but-apps-dont-signing-certificate-and-notarization-oddities/

  • Yay indeed!

Add a Comment