You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2024/02/07 21:14:44 UTC
[Impala-ASF-CR] IMPALA-12418: Include crypto functions supported by Hive
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/20447 )
Change subject: IMPALA-12418: Include crypto functions supported by Hive
......................................................................
Patch Set 8:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/20447/8/be/src/exprs/string-functions-ir.cc
File be/src/exprs/string-functions-ir.cc:
http://gerrit.cloudera.org:8080/#/c/20447/8/be/src/exprs/string-functions-ir.cc@1829
PS8, Line 1829: EVP_CIPHER_CTX* cipher_ctx = EVP_CIPHER_CTX_new();
nit for here and elsewhere: it seems Impala has already imported handy C++-style wrappers for this sort of things in be/src/kudu/util/openssl_util.h
Those are std::unique_ptr-based wrappers. So, instead of dealing with raw pointers and calling EVP_CIPHER_CTX_free() tediously at every fork of the control path, instead it might be just
auto ctx = ssl_make_unique(EVP_CIPHER_CTX_new());
Similar to other OpenSSL entities allocated on the heap (keys, BIO objects, etc.).
http://gerrit.cloudera.org:8080/#/c/20447/8/be/src/exprs/string-functions-ir.cc@1839
PS8, Line 1839: ctx->SetError("EVP_EncryptInit_ex() failed");
: EVP_CIPHER_CTX_free(cipher_ctx);
: return -1;
: }
nit for here and elsewhere: this could be reduced into a single line when using a macro that calls SetError() on 'ctx'.
--
To view, visit http://gerrit.cloudera.org:8080/20447
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3902f2b1d95da4d06995cbd687e79c48e16190c9
Gerrit-Change-Number: 20447
Gerrit-PatchSet: 8
Gerrit-Owner: Anonymous Coward <pr...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Anonymous Coward <pr...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Comment-Date: Wed, 07 Feb 2024 21:14:44 +0000
Gerrit-HasComments: Yes