Latest update.
This commit is contained in:
@@ -7,9 +7,16 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/*
|
||||
* AES low level APIs are deprecated for public use, but still ok for internal
|
||||
* use where we're using them to implement the higher level EVP interface, as is
|
||||
* the case here.
|
||||
*/
|
||||
#include "internal/deprecated.h"
|
||||
|
||||
#include "cipher_aes_ocb.h"
|
||||
#include "prov/providercommonerr.h"
|
||||
#include "prov/cipher_aead.h"
|
||||
#include "prov/ciphercommon_aead.h"
|
||||
#include "prov/implementations.h"
|
||||
|
||||
#define AES_OCB_FLAGS AEAD_FLAGS
|
||||
@@ -84,8 +91,8 @@ static ossl_inline int aes_generic_ocb_cipher(PROV_AES_OCB_CTX *ctx,
|
||||
static ossl_inline int aes_generic_ocb_copy_ctx(PROV_AES_OCB_CTX *dst,
|
||||
PROV_AES_OCB_CTX *src)
|
||||
{
|
||||
return (!CRYPTO_ocb128_copy_ctx(&dst->ocb, &src->ocb,
|
||||
&src->ksenc.ks, &src->ksdec.ks));
|
||||
return CRYPTO_ocb128_copy_ctx(&dst->ocb, &src->ocb,
|
||||
&dst->ksenc.ks, &dst->ksdec.ks);
|
||||
}
|
||||
|
||||
/*-
|
||||
@@ -214,6 +221,11 @@ static int aes_ocb_block_update(void *vctx, unsigned char *out, size_t *outl,
|
||||
if (!ctx->key_set || !update_iv(ctx))
|
||||
return 0;
|
||||
|
||||
if (inl == 0) {
|
||||
*outl = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Are we dealing with AAD or normal data here? */
|
||||
if (out == NULL) {
|
||||
buf = ctx->aad_buf;
|
||||
|
||||
Reference in New Issue
Block a user