Purpose: Sign my own packages and my own kernel extensions. “My own” in the context means “what I wrote or what I chose elsewhere, recompiled myself from my sources and want to install it on my machine.
Problem: Mavericks does not accept my signature with Code Signing Failure: code signature is invalid (but loads kext), Yosemite won't even load it.
I have my own CA and code signing certificates. I was able to successfully sign the code and configure policies that would allow you to install and execute the code signed by the specified certificates - codesign and spctl , as you see in the output below. However, this does not seem to apply to kext (kernel extensions) - kextutil claims that the signature is not valid. Here's the output I get:
$ codesign --verify -vvvv /opt/local/Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext /opt/local/Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext: valid on disk /opt/local/Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext: satisfies its Designated Requirement $ spctl -a -vvv -t exec /opt/local/Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext /opt/local/Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext: accepted source=XXXXXCode origin=XXXXXCoder $ spctl -a -vvv -t install /opt/local/Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext /opt/local/Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext: accepted source=XXXXXInstall origin=XXXXXCoder $ kextutil -tn /opt/local/Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext Diagnostics for /opt/local/Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext: Code Signing Failure: code signature is invalid /opt/local/Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext appears to be loadable (including linkage for on-disk libraries).
In Mavericks, this kext is loaded with a warning message, on Yosemite this will not happen.
I noticed here and in the Apple CA CPS Developer ID that the certificate must have the following extension: ( 1.2.840.113635.100.6.1.18 ) to designate it as a kext signature certificate. I do not have it. I suspect this is the cause of my problem, but I don’t know how to solve it. There is no type option in spctl to create a policy that designates a given certificate as kext signing.
How to add this extension (preferably to Keychain key support, although an OpenSSL-based solution would be great too) without paying an annual "$ 100 Apple usage fee"?
Mouse source share