You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2023/11/06 19:31:55 UTC

[kudu-CR](branch-1.17.x) [util] check if EVP CIPHER CTX new() returns null

Hello Mahesh Reddy, Attila Bukor, Kudu Jenkins,

I'd like you to do a code review. Please visit

    http://gerrit.cloudera.org:8080/20666

to review the following change.


Change subject: [util] check if EVP_CIPHER_CTX_new() returns null
......................................................................

[util] check if EVP_CIPHER_CTX_new() returns null

Per documentation [1], EVP_CIPHER_CTX_new() can return nullptr in case
of a failure.  This patch updates the code to handle such a condition.

I also updated the code to use the traits and ssl_make_unique() for
brevity and uniformity across src/kudu/util and src/kudu/security.

[1] https://www.openssl.org/docs/man1.1.1/man3/EVP_CIPHER_CTX_new.html

Change-Id: Ia41c543325ed1407b5afce5d391a14e4ea0276d1
Reviewed-on: http://gerrit.cloudera.org:8080/20642
Tested-by: Kudu Jenkins
Reviewed-by: Mahesh Reddy <mr...@cloudera.com>
Reviewed-by: Attila Bukor <ab...@apache.org>
(cherry picked from commit 09d185cce0f223feebfa4e2b00f70cb4103fe808)
---
M src/kudu/util/env_posix.cc
1 file changed, 24 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/66/20666/1
-- 
To view, visit http://gerrit.cloudera.org:8080/20666
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.17.x
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia41c543325ed1407b5afce5d391a14e4ea0276d1
Gerrit-Change-Number: 20666
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>

[kudu-CR](branch-1.17.x) [util] check if EVP CIPHER CTX new() returns null

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/20666 )

Change subject: [util] check if EVP_CIPHER_CTX_new() returns null
......................................................................


Patch Set 1: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/20666
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.17.x
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia41c543325ed1407b5afce5d391a14e4ea0276d1
Gerrit-Change-Number: 20666
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Comment-Date: Wed, 08 Nov 2023 02:24:04 +0000
Gerrit-HasComments: No

[kudu-CR](branch-1.17.x) [util] check if EVP CIPHER CTX new() returns null

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/20666 )

Change subject: [util] check if EVP_CIPHER_CTX_new() returns null
......................................................................

[util] check if EVP_CIPHER_CTX_new() returns null

Per documentation [1], EVP_CIPHER_CTX_new() can return nullptr in case
of a failure.  This patch updates the code to handle such a condition.

I also updated the code to use the traits and ssl_make_unique() for
brevity and uniformity across src/kudu/util and src/kudu/security.

[1] https://www.openssl.org/docs/man1.1.1/man3/EVP_CIPHER_CTX_new.html

Change-Id: Ia41c543325ed1407b5afce5d391a14e4ea0276d1
Reviewed-on: http://gerrit.cloudera.org:8080/20642
Tested-by: Kudu Jenkins
Reviewed-by: Mahesh Reddy <mr...@cloudera.com>
Reviewed-by: Attila Bukor <ab...@apache.org>
(cherry picked from commit 09d185cce0f223feebfa4e2b00f70cb4103fe808)
Reviewed-on: http://gerrit.cloudera.org:8080/20666
Reviewed-by: Yingchun Lai <la...@apache.org>
---
M src/kudu/util/env_posix.cc
1 file changed, 24 insertions(+), 9 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Yingchun Lai: Looks good to me, approved

-- 
To view, visit http://gerrit.cloudera.org:8080/20666
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.17.x
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia41c543325ed1407b5afce5d391a14e4ea0276d1
Gerrit-Change-Number: 20666
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mr...@cloudera.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>