kextload of notarized kext shows error on mojave 10.14.6

I signed my kext and uploaded it to


xcrun altool --notarize-app --primary-bundle-id "bundle.id" --username "username@blah.com" --password "mypassword" --file tobenotarized.kext


I got a mail saying that Your Mac software has been notarized. You can now export this software and distribute it directly to users.


So i stapled the ticket using


xcrun stapler staple tobenotarized.kext


But whenever i try loading it with
sudo kextload tobenotarized.kext


It gives me

kext failed to load - (libkern/kext) system policy prevents loading; check the system/kernel logs for errors or try kextutil(8).


I tried to check with following command

spctl -a -vv -t install tobenotarized.kext


It says

tobenotarized.kext: accepted

source=Notarized Developer ID

origin=Developer ID Application: myteam name and id


I even checked the certificates by

codesign -d --extract-certificates tobenotarized.kext

it shows the correct extension and certificate.


How can i check it more or debug it more ?? I am missing something obvious ?


UPDATE :-


Kext loads fine when i disable hardened runtime but whenever i enable hardened runtime and then try to load kext with kextutil i get this error. Possible reasons for that, if anyone can guide me,, i have been stuck at this for 3-4 days now.

Replies

i have been stuck at this for 3-4 days now.

I don’t have an answer for you off the top of my head. As you’re working on released software, my recommendation is that you request official support by opening a DTS tech support incident.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"