Commit 887e22dd authored by Patrick Steuer's avatar Patrick Steuer
Browse files

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

parent da89ac0b
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2264,9 +2264,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) {
@@ -2285,6 +2282,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) {