social_stream-presence 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ejabberd/ejabberd_files.zip +0 -0
- data/ejabberd/ejabberd_scripts/reset_connection_script +6 -3
- data/ejabberd/ejabberd_scripts/rest_api_client_script +5 -2
- data/ejabberd/ejabberd_scripts/synchronize_presence_script +6 -3
- data/ejabberd/mod_sspresence/mod_sspresence.beam +0 -0
- data/lib/social_stream/presence/version.rb +1 -1
- data/lib/social_stream/presence/xmpp_server_order.rb +12 -2
- data/lib/tasks/presence/installer.rake +4 -2
- metadata +3 -3
data/ejabberd/ejabberd_files.zip
CHANGED
Binary file
|
@@ -6,8 +6,6 @@
|
|
6
6
|
|
7
7
|
require 'logger'
|
8
8
|
require 'rest_client'
|
9
|
-
require 'openssl'
|
10
|
-
require 'digest/md5'
|
11
9
|
|
12
10
|
|
13
11
|
path = "/var/log/ejabberd/scripts.log"
|
@@ -34,7 +32,7 @@ end
|
|
34
32
|
$secure_rest_api = getOption("secure_rest_api=")
|
35
33
|
$pass = getOption("ejabberd_password=")
|
36
34
|
$scripts_path = getOption("scripts_path=")
|
37
|
-
$script_title = "Reset Connection
|
35
|
+
$script_title = "Reset Connection Script"
|
38
36
|
|
39
37
|
|
40
38
|
def log(title,text)
|
@@ -194,6 +192,9 @@ def sendHttpRequest(url,params,encrypted_params)
|
|
194
192
|
|
195
193
|
|
196
194
|
if $secure_rest_api == "true"
|
195
|
+
#Require libraries
|
196
|
+
require 'openssl'
|
197
|
+
|
197
198
|
xmpp_private_key_path = $scripts_path + "/rsa_keys/xmpp_rsa_key_private.pem";
|
198
199
|
web_public_key_path = $scripts_path + "/rsa_keys/web_rsa_key_public.pem";
|
199
200
|
xmpp_private_key = OpenSSL::PKey::RSA.new(File.read(xmpp_private_key_path))
|
@@ -241,6 +242,8 @@ end
|
|
241
242
|
|
242
243
|
|
243
244
|
def calculateHash(request_params)
|
245
|
+
require 'digest/md5'
|
246
|
+
|
244
247
|
unless request_params
|
245
248
|
request_params = {};
|
246
249
|
end
|
@@ -6,8 +6,6 @@
|
|
6
6
|
|
7
7
|
require 'logger'
|
8
8
|
require 'rest_client'
|
9
|
-
require 'openssl'
|
10
|
-
require 'digest/md5'
|
11
9
|
|
12
10
|
|
13
11
|
path = "/var/log/ejabberd/scripts.log"
|
@@ -194,6 +192,9 @@ def sendHttpRequest(url,params,encrypted_params)
|
|
194
192
|
|
195
193
|
|
196
194
|
if $secure_rest_api == "true"
|
195
|
+
#Require libraries
|
196
|
+
require 'openssl'
|
197
|
+
|
197
198
|
xmpp_private_key_path = $scripts_path + "/rsa_keys/xmpp_rsa_key_private.pem";
|
198
199
|
web_public_key_path = $scripts_path + "/rsa_keys/web_rsa_key_public.pem";
|
199
200
|
xmpp_private_key = OpenSSL::PKey::RSA.new(File.read(xmpp_private_key_path))
|
@@ -241,6 +242,8 @@ end
|
|
241
242
|
|
242
243
|
|
243
244
|
def calculateHash(request_params)
|
245
|
+
require 'digest/md5'
|
246
|
+
|
244
247
|
unless request_params
|
245
248
|
request_params = {};
|
246
249
|
end
|
@@ -6,8 +6,6 @@
|
|
6
6
|
|
7
7
|
require 'logger'
|
8
8
|
require 'rest_client'
|
9
|
-
require 'openssl'
|
10
|
-
require 'digest/md5'
|
11
9
|
|
12
10
|
|
13
11
|
path = "/var/log/ejabberd/scripts.log"
|
@@ -34,7 +32,7 @@ end
|
|
34
32
|
$secure_rest_api = getOption("secure_rest_api=")
|
35
33
|
$pass = getOption("ejabberd_password=")
|
36
34
|
$scripts_path = getOption("scripts_path=")
|
37
|
-
$script_title = "Synchronize Presence
|
35
|
+
$script_title = "Synchronize Presence Script"
|
38
36
|
|
39
37
|
|
40
38
|
def log(title,text)
|
@@ -194,6 +192,9 @@ def sendHttpRequest(url,params,encrypted_params)
|
|
194
192
|
|
195
193
|
|
196
194
|
if $secure_rest_api == "true"
|
195
|
+
#Require libraries
|
196
|
+
require 'openssl'
|
197
|
+
|
197
198
|
xmpp_private_key_path = $scripts_path + "/rsa_keys/xmpp_rsa_key_private.pem";
|
198
199
|
web_public_key_path = $scripts_path + "/rsa_keys/web_rsa_key_public.pem";
|
199
200
|
xmpp_private_key = OpenSSL::PKey::RSA.new(File.read(xmpp_private_key_path))
|
@@ -241,6 +242,8 @@ end
|
|
241
242
|
|
242
243
|
|
243
244
|
def calculateHash(request_params)
|
245
|
+
require 'digest/md5'
|
246
|
+
|
244
247
|
unless request_params
|
245
248
|
request_params = {};
|
246
249
|
end
|
Binary file
|
@@ -5,8 +5,6 @@ require 'xmpp4r/client'
|
|
5
5
|
require 'xmpp4r/message'
|
6
6
|
require 'net/ssh'
|
7
7
|
require 'net/sftp'
|
8
|
-
require 'openssl'
|
9
|
-
require 'digest/md5'
|
10
8
|
|
11
9
|
|
12
10
|
module SocialStream
|
@@ -238,6 +236,9 @@ module SocialStream
|
|
238
236
|
return "Keys path not exists"
|
239
237
|
end
|
240
238
|
|
239
|
+
#Require libraries
|
240
|
+
require 'openssl'
|
241
|
+
|
241
242
|
web_public_key_path=keysPath+"/web_rsa_key_public.pem"
|
242
243
|
web_private_key_path=keysPath+"/web_rsa_key_private.pem"
|
243
244
|
xmpp_public_key_path=keysPath+"/xmpp_rsa_key_public.pem"
|
@@ -386,6 +387,9 @@ module SocialStream
|
|
386
387
|
when true
|
387
388
|
#Authorization using asymmetric RSA keys
|
388
389
|
begin
|
390
|
+
#Require libraries
|
391
|
+
require 'openssl'
|
392
|
+
|
389
393
|
presence_root = File.expand_path("../../../../", __FILE__)
|
390
394
|
xmpp_public_key_path = presence_root + "/rsa_keys/xmpp_rsa_key_public.pem";
|
391
395
|
xmpp_public_key = OpenSSL::PKey::RSA.new(File.read(xmpp_public_key_path))
|
@@ -425,6 +429,9 @@ module SocialStream
|
|
425
429
|
|
426
430
|
|
427
431
|
def calculateHash(params)
|
432
|
+
#Require libraries
|
433
|
+
require 'digest/md5'
|
434
|
+
|
428
435
|
if params
|
429
436
|
params.delete("password")
|
430
437
|
params.delete("controller")
|
@@ -446,6 +453,9 @@ module SocialStream
|
|
446
453
|
when true
|
447
454
|
#Secure Mode
|
448
455
|
begin
|
456
|
+
#Require libraries
|
457
|
+
require 'openssl'
|
458
|
+
|
449
459
|
if params[:encrypted_params]
|
450
460
|
presence_root = File.expand_path("../../../../", __FILE__)
|
451
461
|
web_private_key_path = presence_root + "/rsa_keys/web_rsa_key_private.pem";
|
@@ -66,8 +66,10 @@ namespace :presence do
|
|
66
66
|
output = SocialStream::Presence::XmppServerOrder::executeCommands(commands)
|
67
67
|
puts output
|
68
68
|
|
69
|
-
|
70
|
-
|
69
|
+
if SocialStream::Presence.secure_rest_api
|
70
|
+
#Generate RSA Keys
|
71
|
+
Rake::Task["presence:install:generate_RSA_keys"].execute
|
72
|
+
end
|
71
73
|
|
72
74
|
puts "Installation complete"
|
73
75
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 7
|
9
|
+
version: 0.1.7
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Aldo Gordillo
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-12-
|
17
|
+
date: 2011-12-14 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|