-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding remote config/logging capabilities to Windows build #2469
Adding remote config/logging capabilities to Windows build #2469
Conversation
Can one of the osquery admins reply with "ok to test" to kick off a build... |
2 similar comments
Can one of the osquery admins reply with "ok to test" to kick off a build... |
Can one of the osquery admins reply with "ok to test" to kick off a build... |
@yying updated the pull request - view changes |
@yying updated the pull request - view changes |
@yying updated the pull request - view changes |
ok to test |
@yying updated the pull request - view changes |
@@ -27,7 +29,9 @@ std::string platformAsctime(const struct tm* timeptr) { | |||
return ""; | |||
} | |||
|
|||
return std::string(buffer.data(), buffer.size()); | |||
std::string time(buffer.data()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, avoid time
as a local variable name.
std::string expected; | ||
if (isPlatform(PlatformType::TYPE_WINDOWS)) { | ||
expected = std::string( | ||
"\x1F\x8B\b\0\0\0\0\0\x2\v\xED\xC4\xB1\r\0\0\x4\0\xB0s\xC5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit there's only 1 character difference? Maybe we can use some concatenation?
std::string expected = "\x1F\x8B\b\0\0\0\0\0\x2";
expected += (isPlatform(PlatformType::TYPE_WINDOWS)) ? "\v" : "\x3";
expected += ...
@yying updated the pull request - view changes |
@yying updated the pull request - view changes |
@yying updated the pull request - view changes |
options.openssl_certificate(server_certificate_file_); | ||
|
||
// On Windows, we cannot set openssl_certificate to a directory | ||
if (status.type() == fs::regular_file) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should include an else
and a LOG(WARNING)
.
@@ -10,6 +10,40 @@ | |||
|
|||
#pragma once | |||
|
|||
// Our third-party version of cpp-netlib uses OpenSSL APIs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe /*
.
/// Suppressing warning C4005: 'ASIO_ERROR_CATEGORY_NOEXCEPT': macro redefinition | ||
#pragma warning(disable: 4005) | ||
|
||
// Suppressing warning C4244: 'argument': conversion from '__int64' to 'long', possible loss of data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, ///
for consistency.
#ifdef WIN32 | ||
#pragma warning(pop) | ||
|
||
// We need to reinclude this to re-enable boost's warning suppression |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, same
Ok, one last round of changes and this looks good. |
@yying updated the pull request - view changes |
Enabled remote config and logging capabilities using TLS.
For remote TLS logging and/or filesystem logging to work correctly, a glog with a bug fix (google/glog#123).
Closes #2425
Closes #2426