aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGalen Guyer <galen@galenguyer.com>2022-12-28 17:02:44 -0800
committerGalen Guyer <galen@galenguyer.com>2022-12-28 17:02:44 -0800
commite8834a8d678e591bc30d70595d69c9b38d08de06 (patch)
tree6c71e354f17494f7eda8c2213ae6c1637549a748
parent3f036e0c6f69bd883a54a8cb96f07257602a07c2 (diff)
broadcastify: add option to disable ssl certificate verification
-rw-r--r--docs/CONFIGURE.md47
-rw-r--r--plugins/broadcastify_uploader/broadcastify_uploader.cc12
2 files changed, 36 insertions, 23 deletions
diff --git a/docs/CONFIGURE.md b/docs/CONFIGURE.md
index 48141915..a93ac402 100644
--- a/docs/CONFIGURE.md
+++ b/docs/CONFIGURE.md
@@ -103,29 +103,30 @@ Here is a map of the different sections of the *config.json* file:
### Global Configs
-| Key | Required | Default Value | Type | Description |
-| ----------------------- | :------: | ----------------- | ----------------------------------------------------------- | ------------------------------------------------------------ |
-| ver | ✓ | | number | the version of formatting for the config file. **This should be set to 2**. Trunk Recorder will not start without this set. |
-| sources | ✓ | | array of JSON objects<br />[{}] | An array of JSON formatted [Source Objects](#source-object) that define the different SDRs available. Source Objects are described below. |
-| systems | ✓ | | array of JSON objects<br />[{}] | An array of JSON formatted [System Objects](#system-object) that define the trunking systems that will be recorded. System Objects are described below. |
-| plugins | | | array of JSON objects<br />[{}] | An array of JSON formatted [Plugin Objects](#plugin-object) that define the different plugins to use. Refer to the [Plugin System](notes/PLUGIN-SYSTEM.md) documentation for more details. |
-| defaultMode | | "digital" | **"analog"** or **"digital"** | Default mode to use when a talkgroups is not listed in the **talkgroupsFile**. The options are *digital* or *analog*. The default is *digital*. This argument is global and not system-specific, and only affects `smartnet` trunking systems which can have both analog and digital talkpaths. |
-| captureDir | | current directory | string | The complete path to the directory where recordings should be saved. |
-| callTimeout | | 3 | number | A Call will stop recording and save if it has not received anything on the control channel, after this many seconds. |
-| uploadServer | | | string | The URL for uploading to OpenMHz. The default is an empty string. See the Config tab for your system in OpenMHz to find what the value should be. |
-| broadcastifyCallsServer | | | string | The URL for uploading to Broadcastify Calls. The default is an empty string. Refer to [Broadcastify's wiki](https://wiki.radioreference.com/index.php/Broadcastify-Calls-API) for the upload URL. |
-| | | | | |
-| logFile | | false | **true** / **false** | Save the console output to a file. |
-| frequencyFormat | | "exp" | **"exp" "mhz"** or **"hz"** | the display format for frequencies to display in the console and log file. |
-| controlWarnRate | | 10 | number | Log the control channel decode rate when it falls bellow this threshold. The value of *-1* will always log the decode rate. |
-| statusAsString | | true | **true** / **false** | Show status as strings instead of numeric values |
-| statusServer | | | string | The URL for a WebSocket connect. Trunk Recorder will send JSON formatted update message to this address. HTTPS is currently not supported, but will be in the future. OpenMHz does not support this currently. [JSON format of messages](./notes/STATUS-JSON.md) |
-| broadcastSignals | | true | **true** / **false** | Broadcast decoded signals to the status server. |
-| logLevel | | "info" | **"trace" "debug" "info" "warning" "error"** or **"fatal"** | the logging level to display in the console and log file. The options are *trace*, *debug*, *info*, *warning*, *error* & *fatal*. The default is *info*. |
-| debugRecorder | | true | **true** / **false** | Will attach a debug recorder to each Source. The debug recorder will allow you to examine the channel of a call be recorded. There is a single Recorder per Source. It will monitor a recording and when it is done, it will monitor the next recording started. The information is sent over a network connection and can be viewed using the `udp-debug.grc` graph in GnuRadio Companion |
-| debugRecorderPort | | 1234 | number | The network port that the Debug Recorders will start on. For each Source an additional Debug Recorder will be added and the port used will be one higher than the last one. For example the ports for a system with 3 Sources would be: 1234, 12345, 1236. |
-| debugRecorderAddress | | "127.0.0.1" | string | The network address of the computer that will be monitoring the Debug Recorders. UDP packets will be sent from Trunk Recorder to this computer. The default is *"127.0.0.1"* which is the address used for monitoring on the same computer as Trunk Recorder. |
-| audioStreaming | | false | **true** / **false** | whether or not to enable the audio streaming callbacks for plugins. |
+| Key | Required | Default Value | Type | Description |
+| ---------------------------- | :------: | ----------------- | ----------------------------------------------------------- | ------------------------------------------------------------ |
+| ver | ✓ | | number | the version of formatting for the config file. **This should be set to 2**. Trunk Recorder will not start without this set. |
+| sources | ✓ | | array of JSON objects<br />[{}] | An array of JSON formatted [Source Objects](#source-object) that define the different SDRs available. Source Objects are described below. |
+| systems | ✓ | | array of JSON objects<br />[{}] | An array of JSON formatted [System Objects](#system-object) that define the trunking systems that will be recorded. System Objects are described below. |
+| plugins | | | array of JSON objects<br />[{}] | An array of JSON formatted [Plugin Objects](#plugin-object) that define the different plugins to use. Refer to the [Plugin System](notes/PLUGIN-SYSTEM.md) documentation for more details. |
+| defaultMode | | "digital" | **"analog"** or **"digital"** | Default mode to use when a talkgroups is not listed in the **talkgroupsFile**. The options are *digital* or *analog*. The default is *digital*. This argument is global and not system-specific, and only affects `smartnet` trunking systems which can have both analog and digital talkpaths. |
+| captureDir | | current directory | string | The complete path to the directory where recordings should be saved. |
+| callTimeout | | 3 | number | A Call will stop recording and save if it has not received anything on the control channel, after this many seconds. |
+| uploadServer | | | string | The URL for uploading to OpenMHz. The default is an empty string. See the Config tab for your system in OpenMHz to find what the value should be. |
+| broadcastifyCallsServer | | | string | The URL for uploading to Broadcastify Calls. The default is an empty string. Refer to [Broadcastify's wiki](https://wiki.radioreference.com/index.php/Broadcastify-Calls-API) for the upload URL. |
+| broadcastifySslVerifyDisable | | false | **true** / **false** | Optionally disable SSL verification for Broadcastify uploads, given their apparent habit of letting their SSL certificate expire |
+| | | | | |
+| logFile | | false | **true** / **false** | Save the console output to a file. |
+| frequencyFormat | | "exp" | **"exp" "mhz"** or **"hz"** | the display format for frequencies to display in the console and log file. |
+| controlWarnRate | | 10 | number | Log the control channel decode rate when it falls bellow this threshold. The value of *-1* will always log the decode rate. |
+| statusAsString | | true | **true** / **false** | Show status as strings instead of numeric values |
+| statusServer | | | string | The URL for a WebSocket connect. Trunk Recorder will send JSON formatted update message to this address. HTTPS is currently not supported, but will be in the future. OpenMHz does not support this currently. [JSON format of messages](./notes/STATUS-JSON.md) |
+| broadcastSignals | | true | **true** / **false** | Broadcast decoded signals to the status server. |
+| logLevel | | "info" | **"trace" "debug" "info" "warning" "error"** or **"fatal"** | the logging level to display in the console and log file. The options are *trace*, *debug*, *info*, *warning*, *error* & *fatal*. The default is *info*. |
+| debugRecorder | | true | **true** / **false** | Will attach a debug recorder to each Source. The debug recorder will allow you to examine the channel of a call be recorded. There is a single Recorder per Source. It will monitor a recording and when it is done, it will monitor the next recording started. The information is sent over a network connection and can be viewed using the `udp-debug.grc` graph in GnuRadio Companion |
+| debugRecorderPort | | 1234 | number | The network port that the Debug Recorders will start on. For each Source an additional Debug Recorder will be added and the port used will be one higher than the last one. For example the ports for a system with 3 Sources would be: 1234, 12345, 1236. |
+| debugRecorderAddress | | "127.0.0.1" | string | The network address of the computer that will be monitoring the Debug Recorders. UDP packets will be sent from Trunk Recorder to this computer. The default is *"127.0.0.1"* which is the address used for monitoring on the same computer as Trunk Recorder. |
+| audioStreaming | | false | **true** / **false** | whether or not to enable the audio streaming callbacks for plugins. |
diff --git a/plugins/broadcastify_uploader/broadcastify_uploader.cc b/plugins/broadcastify_uploader/broadcastify_uploader.cc
index 350b5c73..1a32b45d 100644
--- a/plugins/broadcastify_uploader/broadcastify_uploader.cc
+++ b/plugins/broadcastify_uploader/broadcastify_uploader.cc
@@ -18,6 +18,7 @@ struct Broadcastify_System_Key {
struct Broadcastify_Uploader_Data {
std::vector<Broadcastify_System_Key> keys;
std::string bcfy_calls_server;
+ bool ssl_verify_disable;
};
class Broadcastify_Uploader : public Plugin_Api {
@@ -181,6 +182,12 @@ public:
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response_buffer);
+ // broadcastify seems to make a habit out of letting their ssl certs expire
+ if (this->data.ssl_verify_disable) {
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ }
+
curl_multi_add_handle(multi_handle, curl);
curl_multi_perform(multi_handle, &still_running);
@@ -334,6 +341,11 @@ public:
return 1;
}
+ this->data.ssl_verify_disable = cfg.get<bool>("broadcastifySslVerifyDisable", false);
+ if (this->data.ssl_verify_disable) {
+ BOOST_LOG_TRIVIAL(info) << "Broadcastify SSL Verify Disabled";
+ }
+
BOOST_FOREACH (boost::property_tree::ptree::value_type &node, cfg.get_child("systems")) {
boost::optional<boost::property_tree::ptree &> broadcastify_exists = node.second.get_child_optional("broadcastifyApiKey");
if (broadcastify_exists) {