mirror of
https://github.com/ipxe/ipxe
synced 2026-07-06 15:51:30 +03:00
[crypto] Allow cipher_setiv() to return an error
GCM ciphers can accept initialisation vectors of any length. Move the responsibility for checking the initialisation vector length from the caller into the implementation of cipher_setiv(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -67,10 +67,11 @@ int cipher_null_setkey ( struct cipher_algorithm *cipher __unused,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cipher_null_setiv ( struct cipher_algorithm *cipher __unused,
|
||||
void *ctx __unused, const void *iv __unused,
|
||||
size_t ivlen __unused ) {
|
||||
int cipher_null_setiv ( struct cipher_algorithm *cipher __unused,
|
||||
void *ctx __unused, const void *iv __unused,
|
||||
size_t ivlen __unused ) {
|
||||
/* Do nothing */
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cipher_null_encrypt ( struct cipher_algorithm *cipher __unused,
|
||||
|
||||
Reference in New Issue
Block a user