Fix osquery mode to skip TLS verification in debug builds (#5482)
Fix osquery mode to skip TLS verification in debug builds (#5482)

Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5482

We allow people using a debug build of osqueryd to skip verification of the server's TLS certificate. This allow people to connect to a devserver, for example, when testing the Graph API endpoints used by osquery.

This mode broke at some point when we stopped defining the `DEBUG` constant when building osqueryd in debug mode. This diff updates the code so that we use the constant `NDEBUG`, which is actually defined for release builds. For example, for OS X, see the build configs at https://fburl.com/ywr1tyuk and https://fburl.com/mte9ajvr.

We also update the code to ensure the command line option `--tls_allow_unsafe` allows a person to connect to a dev server.

Reviewed By: obelisk

Differential Revision: D14260226

fbshipit-source-id: c0f2f1c1f4c8dd5e3e1eaa6e1a52ab2a4ff765d4

hackgnar/osquery,hackgnar/osquery,hackgnar/osquery