Commit b015c8c3 authored by Aaron Balsara's avatar Aaron Balsara Committed by facebook-github-bot-1

Fix buck build for SSLContext

Summary: D2800746 broke buck with an unsigned/signed compare

Reviewed By: dkgi

Differential Revision: D2835102

fb-gh-sync-id: a0b8311b38a199e089d3ed5a69b12f8f8abe38b1
parent d65b7736
......@@ -204,7 +204,7 @@ void SSLContext::loadCertificateFromBufferPEM(folly::StringPiece cert) {
}
int written = BIO_write(bio.get(), cert.data(), cert.size());
if (written != cert.size()) {
if (written <= 0 || static_cast<unsigned>(written) != cert.size()) {
throw std::runtime_error("BIO_write: " + getErrors());
}
......@@ -244,7 +244,7 @@ void SSLContext::loadPrivateKeyFromBufferPEM(folly::StringPiece pkey) {
}
int written = BIO_write(bio.get(), pkey.data(), pkey.size());
if (written != pkey.size()) {
if (written <= 0 || static_cast<unsigned>(written) != pkey.size()) {
throw std::runtime_error("BIO_write: " + getErrors());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment