On Thu, Mar 27, 2025 at 01:02:27AM +0530, Sudhakar Kuppusamy wrote: > From: Daniel Axtens <d...@axtens.net> > > The way gcry_rsa and friends (the asymmetric ciphers) are loaded for the > pgp module is a bit quirky. > > include/grub/crypto.h contains: > extern struct gcry_pk_spec *grub_crypto_pk_rsa; > > commands/pgp.c contains the actual storage: > struct gcry_pk_spec *grub_crypto_pk_rsa; > > And the module itself saves to the storage in pgp.c: > GRUB_MOD_INIT(gcry_rsa) > { > grub_crypto_pk_rsa = &_gcry_pubkey_spec_rsa; > } > > This is annoying: gcry_rsa now has a dependency on pgp! > > We want to be able to bring in gcry_rsa without bringing in PGP, > so move the storage to crypto.c. > > Previously, gcry_rsa depended on pgp and mpi. Now it depends on > crypto and mpi. As pgp depends on crypto, this doesn't add any new > module dependencies using the PGP verfier. > > [FWIW, the story is different for the symmetric ciphers. cryptodisk > and friends (zfs encryption etc) use grub_crypto_lookup_cipher_by_name() > to get a cipher handle. That depends on grub_ciphers being populated > by people calling grub_cipher_register. import_gcry.py ensures that the > symmetric ciphers call it.] > > Signed-off-by: Daniel Axtens <d...@axtens.net> > Signed-off-by: Sudhakar Kuppusamy <sudha...@linux.ibm.com> > Reviewed-by: Stefan Berger <stef...@linux.ibm.com> > Reviewed-by: Vladimir Serbinenko <phco...@gmail.com> > Reviewed-by: Avnish Chouhan <avn...@linux.ibm.com>
Reviewed-by: Daniel Kiper <daniel.ki...@oracle.com> Daniel _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel