summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md11
-rw-r--r--lib/oxidized/source/http.rb1
2 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9ca6854..a1aee03 100644
--- a/README.md
+++ b/README.md
@@ -506,6 +506,17 @@ source:
X-Auth-Token: 'somerandomstring'
```
+You can also pass `no_check_certificate = true` if you want to disable ssl certificate verification:
+
+```
+source:
+ default: http
+ http:
+ url: https://url/api
+ scheme: https
+ no_check_certificate: true
+```
+
### Output: File
Parent directory needs to be created manually, one file per device, with most recent running config.
diff --git a/lib/oxidized/source/http.rb b/lib/oxidized/source/http.rb
index dc1c0b7..6f16aee 100644
--- a/lib/oxidized/source/http.rb
+++ b/lib/oxidized/source/http.rb
@@ -20,6 +20,7 @@ class HTTP < Source
uri = URI.parse(@cfg.url)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true if uri.scheme == 'https'
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE if uri.no_check_certificate == true
# map headers
headers = {}