[crypto] Fail all operations for the null public-key algorithm

The null crypto algorithms are intended to do nothing: the null digest
algorithm accepts all input and generates a zero-length digest, and
the null cipher algorithm simply copies the input unmodifed to the
output.

The null public-key algorithm currently does nothing successfully.
Unlike the null digest and cipher algorithms, the null public-key
algorithm's methods are never called.

Change the null public-key algorithm to fail all operations, thereby
allowing its methods to be used as stubs by algorithms such as ECDSA
that do not implement all of the possible public-key operations.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2026-04-29 15:05:20 +01:00
parent df4eec8cfb
commit 8c7c084e0f
3 changed files with 8 additions and 38 deletions
+1
View File
@@ -449,6 +449,7 @@ FILE_SECBOOT ( PERMITTED );
#define ERRFILE_efi_cacert ( ERRFILE_OTHER | 0x00670000 )
#define ERRFILE_ecdhe ( ERRFILE_OTHER | 0x00680000 )
#define ERRFILE_ecdsa ( ERRFILE_OTHER | 0x00690000 )
#define ERRFILE_crypto_null ( ERRFILE_OTHER | 0x006a0000 )
/** @} */