Alexey Serbin has posted comments on this change.

Change subject: Use Traits to avoid duplicate code in SSL wrappers
......................................................................


Patch Set 3:

(2 comments)

Thank you for doing this.  I was thinking to do that at some point as well, but 
then it slipped.  Now it looks better.

Just a couple of questions.

http://gerrit.cloudera.org:8080/#/c/5767/3/src/kudu/security/ca/cert_management.cc
File src/kudu/security/ca/cert_management.cc:

PS3, Line 83: free
Would it make sense to add 'allocate' as  well?


PS3, Line 135:   switch (format) {
             :     case DataFormat::DER:
             :       CERT_RET_NOT_OK(Traits::write_der(bio, obj), "error 
exporting DER format");
             :       break;
             :     case DataFormat::PEM:
             :       CERT_RET_NOT_OK(Traits::write_pem(bio, obj), "error 
exporting PEM format");
             :       break;
             :   }
It's still possible to pass something non-expected:

enum class A { first = 0, second = 1 };
A x = static_cast<A>(100);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If1c44857358fc82f2694dff021b9f2ac3641313a
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes

Reply via email to