From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D50554297D for ; Tue, 18 Apr 2023 16:56:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD3E0410EA; Tue, 18 Apr 2023 16:56:23 +0200 (CEST) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mails.dpdk.org (Postfix) with ESMTP id 46DDE4014F for ; Tue, 18 Apr 2023 16:56:23 +0200 (CEST) Received: by mail-wm1-f42.google.com with SMTP id m39-20020a05600c3b2700b003f170e75bd3so944171wms.1 for ; Tue, 18 Apr 2023 07:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; t=1681829783; x=1684421783; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=2CViSyFCkxMoVhClgDlvQvINQ2EqCt3aXqU/hHN+W7Q=; b=AMxq3oGveHNvIEm/QgKwJaeXPRxrw8LgdbojFMz0svmtqVk4loyoe9f0rPBTVApRs0 10GG0wxahvVPsfcfe9zshUuh42lMvy9gFudZfwizXHa5MTTF8x+y9cCyeHpoe2wikg7E ihneVvU11o+zESkOyt7xJ17E5lbWnIWT9yUDjEDuxAE8EC6NvtDxZ8yiqfaxnFBvfNat Ql0XOCzKIgXDcZ+Py1010VnT6XF2tt8ZX+8E9UpdPKiR42+DInmHjvOJ5SgcMcuke//y UmIqupiwXOYF1zmR7i40Ielf0Jp95F6EliaDr8yJwINDbALOslBhPS/M+dmy1tN/H1wx KqqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681829783; x=1684421783; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2CViSyFCkxMoVhClgDlvQvINQ2EqCt3aXqU/hHN+W7Q=; b=Qg7yfeJqfMdQlSWINanOjYx0XiWWvkhefSrESH/yhNDiisszPBiybv3LDPjMEZn+TQ ZldB8lACkaCdcvOo1Lx19cRva0t54kfCLGMPhXdQ2a+KO1RbFNDhd5CJjcvLRbGHORIe GS9LWsa+3H64eAjQDzIXhjDCxHxHThuNMjRVZMqGqQepUwvToR19zNKCbOu0vFr0+XCw D7sSgp8bd/DwfwZbOpCCDBzKZdgJ+iIVV7T3Myj/waBj4aYJICgj5B9/jvKT5P46nzQo a7vY16QZBw4X7kIP3I0eqnqqhv5MpZUSfNLdoIR0w+aw4CHPzBwpkRlajLfww2z2z/8r YjpQ== X-Gm-Message-State: AAQBX9dI+ZurRIAnay4C/CsJlS55qloUv23c806vZc4O6ywXOH9HaQny mHb9gV4VWg++plasdvCsJkhWWA== X-Google-Smtp-Source: AKy350ZXJMyVGcdggXVSUczQMkgy5k5OwC2B6k9rC2Sa+6anXrjlfa3hZwdeyGlTpWVXHgB8I94Uiw== X-Received: by 2002:a1c:7706:0:b0:3ed:3033:496d with SMTP id t6-20020a1c7706000000b003ed3033496dmr12692849wmi.0.1681829782926; Tue, 18 Apr 2023 07:56:22 -0700 (PDT) Received: from arion.dev.6wind.com ([185.13.181.2]) by smtp.gmail.com with ESMTPSA id q9-20020a1ce909000000b003ee20b4b2dasm15053932wmc.46.2023.04.18.07.56.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Apr 2023 07:56:22 -0700 (PDT) From: Didier Pallard To: dev@dpdk.org Cc: stable@dpdk.org, Kai Ji , Daniel Mrzyglod , Tomasz Kulasek , Michal Kobylinski , Pablo de Lara , Slawomir Mrozowicz Subject: [PATCH] crypto/openssl: do not build useless workaround Date: Tue, 18 Apr 2023 16:56:19 +0200 Message-Id: <20230418145619.2648068-1-didier.pallard@6wind.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org This workaround was needed before version 1.0.1f. Do not build it for versions >= 1.1. Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library") Signed-off-by: Didier Pallard Cc: stable@dpdk.org --- drivers/crypto/openssl/rte_openssl_pmd.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index e00db0facba5..a11885df8255 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -1195,8 +1195,11 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset, int srclen, uint8_t *aad, int aadlen, uint8_t *iv, uint8_t *dst, uint8_t *tag, EVP_CIPHER_CTX *ctx) { - int len = 0, unused = 0; + int len = 0; +#if OPENSSL_VERSION_NUMBER < 0x10100000L + int unused = 0; uint8_t empty[] = {}; +#endif if (EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, iv) <= 0) goto process_auth_encryption_gcm_err; @@ -1210,9 +1213,11 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset, srclen, ctx, 0)) goto process_auth_encryption_gcm_err; +#if OPENSSL_VERSION_NUMBER < 0x10100000L /* Workaround open ssl bug in version less then 1.0.1f */ if (EVP_EncryptUpdate(ctx, empty, &unused, empty, 0) <= 0) goto process_auth_encryption_gcm_err; +#endif if (EVP_EncryptFinal_ex(ctx, dst, &len) <= 0) goto process_auth_encryption_gcm_err; @@ -1274,8 +1279,11 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset, int srclen, uint8_t *aad, int aadlen, uint8_t *iv, uint8_t *dst, uint8_t *tag, EVP_CIPHER_CTX *ctx) { - int len = 0, unused = 0; + int len = 0; +#if OPENSSL_VERSION_NUMBER < 0x10100000L + int unused = 0; uint8_t empty[] = {}; +#endif if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, 16, tag) <= 0) goto process_auth_decryption_gcm_err; @@ -1292,9 +1300,11 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset, srclen, ctx, 0)) goto process_auth_decryption_gcm_err; +#if OPENSSL_VERSION_NUMBER < 0x10100000L /* Workaround open ssl bug in version less then 1.0.1f */ if (EVP_DecryptUpdate(ctx, empty, &unused, empty, 0) <= 0) goto process_auth_decryption_gcm_err; +#endif if (EVP_DecryptFinal_ex(ctx, dst, &len) <= 0) return -EFAULT; -- 2.30.2