Update API to support RHEL cert bundle

This commit is contained in:
The Unnamed Engineer
2025-06-10 12:37:33 -04:00
parent f1953c45e7
commit 4d3163740a
2 changed files with 15 additions and 1 deletions

View File

@@ -2,7 +2,7 @@ name: Build Launcher Binary
on:
push:
branches: [ master ]
branches: [ master, test ]
workflow_dispatch:
jobs:

View File

@@ -1,5 +1,19 @@
class W3DHub
class Api
# Detect CA bundle path for Excon
def self.ca_bundle_path
redhat_path = '/etc/pki/tls/certs/ca-bundle.crt'
debian_path = '/etc/ssl/certs/ca-certificates.crt'
[redhat_path, debian_path].find { |path| File.exist?(path) }
end
# Set Excon default CA file if found
ca_file = ca_bundle_path
if ca_file
Excon.defaults[:ssl_ca_file] = ca_file
end
LOG_TAG = "W3DHub::Api".freeze
API_TIMEOUT = 30 # seconds