diff options
author | Matt Caswell <matt@openssl.org> | 2022-10-04 15:59:06 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2022-10-12 15:53:31 +0100 |
commit | 2a354d54632cccf7d76130712d068a3ef188a356 (patch) | |
tree | 0d04fdce4950f013a90405fe8efdd4a91c698de2 /ssl/record/methods/ktls_meth.c | |
parent | 757ef3bab02e976500ffd2b1ae2229ed62f85a61 (diff) |
Add a post encryption processing step
For example in this we add the MAC if we are doing encrypt-then-mac.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19343)
Diffstat (limited to 'ssl/record/methods/ktls_meth.c')
-rw-r--r-- | ssl/record/methods/ktls_meth.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ssl/record/methods/ktls_meth.c b/ssl/record/methods/ktls_meth.c index bd694a8948..6715e1c65d 100644 --- a/ssl/record/methods/ktls_meth.c +++ b/ssl/record/methods/ktls_meth.c @@ -501,6 +501,16 @@ static int ktls_prepare_for_encryption(OSSL_RECORD_LAYER *rl, return 1; } +static int ktls_post_encryption_processing(OSSL_RECORD_LAYER *rl, + size_t mac_size, + OSSL_RECORD_TEMPLATE *templ, + WPACKET *thispkt, + SSL3_RECORD *thiswr) +{ + /* The kernel does anything that is needed, so nothing to do here */ + return 1; +} + static struct record_functions_st ossl_ktls_funcs = { ktls_set_crypto_state, ktls_cipher, @@ -517,7 +527,8 @@ static struct record_functions_st ossl_ktls_funcs = { NULL, ktls_prepare_record_header, NULL, - ktls_prepare_for_encryption + ktls_prepare_for_encryption, + ktls_post_encryption_processing }; const OSSL_RECORD_METHOD ossl_ktls_record_method = { |