Daniel Becker has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/22419


Change subject: IMPALA-13705: Environment specific errors in 
test_encryption_exprs
......................................................................

IMPALA-13705: Environment specific errors in test_encryption_exprs

IMPALA-13039 added support for the aes_encrypt() and aes_decrypt()
functions, where the user can choose the AES operation mode. Currently
if the user chooses a mode that is not supported by the OpenSSL library
at runtime, we fall back to a supported mode. There are two issues
related to this:

1. If the mode chosen by the user requires a 16 byte encryption key but
   the fallback mode needs a 32 byte one, we will read past the provided
   buffer.
2. If the tests are run in an environment where some modes are not
   supported, we will get incorrect results. This can for example be the
   case with GCM.

The first problem is solved by disabling falling back to a supported
mode in case of aes_encrypt() and aes_decrypt(). If the mode is not
supported, an error is returned instead. Note that this does not affect
the case when the user explicitly specifies NULL as the operation mode -
a default encoding will still be chosen in that case.

The second problem is solved by dividing the test queries into separate
files based on operation mode. Each operation mode is tested first and
the corresponding tests are only run if the mode is supported.

Change-Id: I27146cda4fa41965de35821315738e5502d1b018
---
M be/src/exprs/string-functions-ir.cc
M be/src/exprs/string-functions.cc
M be/src/util/openssl-util.cc
D testdata/workloads/functional-query/queries/QueryTest/encryption_exprs.test
A 
testdata/workloads/functional-query/queries/QueryTest/encryption_exprs_aes_128_ecb.test
A 
testdata/workloads/functional-query/queries/QueryTest/encryption_exprs_aes_128_gcm.test
A 
testdata/workloads/functional-query/queries/QueryTest/encryption_exprs_aes_256_cfb.test
A 
testdata/workloads/functional-query/queries/QueryTest/encryption_exprs_aes_256_ctr.test
A 
testdata/workloads/functional-query/queries/QueryTest/encryption_exprs_aes_256_ecb.test
A 
testdata/workloads/functional-query/queries/QueryTest/encryption_exprs_aes_256_gcm.test
A 
testdata/workloads/functional-query/queries/QueryTest/encryption_exprs_unsupported.test
M tests/query_test/test_exprs.py
12 files changed, 522 insertions(+), 471 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/19/22419/1
--
To view, visit http://gerrit.cloudera.org:8080/22419
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I27146cda4fa41965de35821315738e5502d1b018
Gerrit-Change-Number: 22419
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Becker <[email protected]>

Reply via email to