From c2a2b7c87aa976ff34c13d1713647c2316ddc29d Mon Sep 17 00:00:00 2001 From: Felipe Cecagno Date: Thu, 1 Sep 2016 17:56:55 -0300 Subject: [PATCH] enable mconf-decrypter to fetch the recordings even if mconf-live is using a self-signed certificate --- record-and-playback/mconf_decrypter/scripts/mconf-decrypter.rb | 3 +++ .../mconf_decrypter/scripts/mconf-decrypter.yml | 1 + 2 files changed, 4 insertions(+) diff --git a/record-and-playback/mconf_decrypter/scripts/mconf-decrypter.rb b/record-and-playback/mconf_decrypter/scripts/mconf-decrypter.rb index 8d594a9aa3..dd887d3e1d 100755 --- a/record-and-playback/mconf_decrypter/scripts/mconf-decrypter.rb +++ b/record-and-playback/mconf_decrypter/scripts/mconf-decrypter.rb @@ -23,6 +23,7 @@ require '../../core/lib/recordandplayback' require 'rubygems' require 'yaml' require 'net/http' +require 'net/https' require 'rexml/document' require 'open-uri' require 'digest/md5' @@ -36,6 +37,7 @@ mconf_props = YAML::load(File.open('mconf-decrypter.yml')) # these properties must be global variables (starting with $) $private_key = mconf_props['private_key'] $get_recordings_url = mconf_props['get_recordings_url'] +$verify_ssl_certificate = mconf_props['verify_ssl_certificate'] $recording_dir = bbb_props['recording_dir'] $raw_dir = "#{$recording_dir}/raw" $archived_dir = "#{$recording_dir}/status/archived" @@ -45,6 +47,7 @@ def getRequest(url) url_parsed = URI.parse(url) http = Net::HTTP.new(url_parsed.host, url_parsed.port) http.use_ssl = (url_parsed.scheme.downcase == "https") + http.verify_mode = OpenSSL::SSL::VERIFY_NONE if http.use_ssl? && ! $verify_ssl_certificate http.get(url_parsed.request_uri) end diff --git a/record-and-playback/mconf_decrypter/scripts/mconf-decrypter.yml b/record-and-playback/mconf_decrypter/scripts/mconf-decrypter.yml index 74575b5488..0aa9a706a8 100644 --- a/record-and-playback/mconf_decrypter/scripts/mconf-decrypter.yml +++ b/record-and-playback/mconf_decrypter/scripts/mconf-decrypter.yml @@ -1,2 +1,3 @@ get_recordings_url: private_key: /usr/local/bigbluebutton/core/scripts/private.pem +verify_ssl_certificate: true