Alexey Serbin has posted comments on this change.

Change subject: [security] sign/verify data using RSA key pair
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/5805/2/src/kudu/security/openssl_util.cc
File src/kudu/security/openssl_util.cc:

PS2, Line 436: default:
             :       CHECK(false) << "unsupported digest operation";
> nope, because then we'd have to have a 'default:', and then we don't get co
But at least there will be run-time error, right?


PS2, Line 440:   const void* mdata = reinterpret_cast<const void*>(data.data());
             :   auto membio = ssl_make_unique(BIO_new_mem_buf(
             : #if OPENSSL_VERSION_NUMBER < 0x10002000L
             :       const_cast<void*>(mdata),
             : #else
             :       mdata,
             : #endif
             :       data.size()));
             :   BIO* inp = BIO_push(bmd.get(), membio.get());
             :   while (true) {
             :     unsigned char buf[1024];
             :     const int rc = BIO_read(inp, buf, sizeof(buf));
             :     if (rc < 0) {
             :       return Status::RuntimeError(Substitute("error reading 
data: $0",
             :                                              
GetOpenSSLErrors()));
             :     }
             :     if (rc == 0) {
             :       break;
             :     }
             :   }
> hrm, why not? also, our use case is only signing short token strings (on th
Hundred of bytes were too much for RSA-related functions.  Oh, wait -- that was 
not envelope-based stuff.  Hopefully, with EVP it should be all right.


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

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

Reply via email to