Commit 2341db5c authored by Patrick Steuer's avatar Patrick Steuer
Browse files

s390x assembly pack: allow specifying the tag after aad in aes-ccm



67c81ec3 forgot about s390x

Signed-off-by: default avatarPatrick Steuer <patrick.steuer@de.ibm.com>

Reviewed-by: default avatarTim Hudson <tjh@openssl.org>
Reviewed-by: default avatarShane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8971)

(cherry picked from commit 887e22dd)
parent 408cb4c8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2216,9 +2216,6 @@ static int s390x_aes_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
    if (!cctx->aes.ccm.iv_set)
        return -1;

    if (!enc && !cctx->aes.ccm.tag_set)
        return -1;

    if (out == NULL) {
        /* Update(): Pass message length. */
        if (in == NULL) {
@@ -2237,6 +2234,10 @@ static int s390x_aes_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
        return len;
    }

    /* The tag must be set before actually decrypting data */
    if (!enc && !cctx->aes.ccm.tag_set)
        return -1;

    /* Update(): Process message. */

    if (!cctx->aes.ccm.len_set) {