Nvidia drivers packages: which package generates the public key for UEFI?

Currently on a working laptop with Nvidia Optimus; installed drivers by following this:
https://en.opensuse.org/SDB:NVIDIA_drivers

It once happened that, when running system updates, there were Nvidia updates as well, so installed them.
However there was a detail I had forgot: I had booted the system with UEFI secure boot disabled. This caused that no public key was generated in /var/lib/nvidia-pubkeys, thus no prompt for enrolling new key at reboot.
This had no consequence when booting with secure boot disabled; but when enabling it, either X server did not start at all and just direct to tty, or it did start but perhaps with several “errors” such as Nvidia offloading with the __NV* variables not working.

What I had to do is boot with secure boot enabled and force reinstallation of all Nvidia packages with “zypper in -f”. Fortunately this seemed to fix the whole issue.

But now my doubt is, which specific Nvidia package(s) is/are responsible of actually generating the public key at /var/lib/nvidia-pubkeys ?

Thanks again.

It is done in NVIDIA package post-install script.

Sorry, but which package?

If you mean, which packages includes the der-File, its the kmp package.

rpm -ql https://download.nvidia.com/opensuse/leap/15.4/x86_64/nvidia-gfxG06-kmp-default-525.60.11_k5.14.21_150400.22-lp154.15.2.x86_64.rpm | grep -i mok
/var/lib/nvidia-pubkeys/MOK-nvidia-gfxG06-525.60.11-default.der

No, it does not include this file - it is ghost file which is generated when package is installed. But yes, it is done in post-install script of KMP package.

Ah, I see…