trisulrp 1.5.8 → 1.6.0
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/VERSION +1 -1
- data/lib/trisulrp/protocol.rb +40 -0
- data/trisulrp.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.6.0
|
data/lib/trisulrp/protocol.rb
CHANGED
@@ -38,6 +38,10 @@ module TrisulRP::Protocol
|
|
38
38
|
# * Trisul is not running in trp mode (see the docs for runmode)
|
39
39
|
# * Using the wrong port ( check netstat to verify trisul remote protocol port - typically 12001)
|
40
40
|
# * The Access Control List does not permit connections from client IP
|
41
|
+
# * The server certificate expired
|
42
|
+
# * The client certificate expired
|
43
|
+
# * The client does not have permissions to connect with that cert
|
44
|
+
# * The private key password is wrong
|
41
45
|
#
|
42
46
|
def connect(server,port,client_cert_file,client_key_file)
|
43
47
|
tcp_sock=TCPSocket.open(server,port)
|
@@ -50,6 +54,42 @@ module TrisulRP::Protocol
|
|
50
54
|
return ssl_sock
|
51
55
|
end
|
52
56
|
|
57
|
+
# Establish a *NONSECURE PLAINTEXT* connection to a Trisul instance
|
58
|
+
#
|
59
|
+
# We highly recommend you to use the TLS connect(..) method, but if
|
60
|
+
# you must use plaintext use this version. This is purposely named
|
61
|
+
# connect_nonsecure(..) to drive home the point that there is no
|
62
|
+
# authentication using client certs, or no encryption.
|
63
|
+
#
|
64
|
+
# You can still use the ACL (Access Control List) to control who connects
|
65
|
+
#
|
66
|
+
#
|
67
|
+
# [server] IP Address or hostname
|
68
|
+
# [port] TRP port, typically 12001 (see trisulConfig.xml)
|
69
|
+
#
|
70
|
+
#
|
71
|
+
# ==== Returns
|
72
|
+
# ==== Yields
|
73
|
+
# a connection object that can be used in subsequent calls
|
74
|
+
#
|
75
|
+
# ==== On error
|
76
|
+
# If a connection cannot be established, an exception is thrown which can point
|
77
|
+
# to the actual cause. The most common causes are
|
78
|
+
#
|
79
|
+
# * Trisul is not running
|
80
|
+
# * Trisul is not running in trp mode (see the docs for runmode)
|
81
|
+
# * Using the wrong port ( check netstat to verify trisul remote protocol port - typically 12001)
|
82
|
+
# * The Access Control List does not permit connections from client IP
|
83
|
+
#
|
84
|
+
def connect_nonsecure(server,port)
|
85
|
+
|
86
|
+
tcp_sock=TCPSocket.open(server,port)
|
87
|
+
yield tcp_sock if block_given?
|
88
|
+
return tcp_sock
|
89
|
+
|
90
|
+
end
|
91
|
+
|
92
|
+
|
53
93
|
# Dispatch request to server & get response
|
54
94
|
# [conn] TRP connection previously opened via TrisulRP::Protocol::connect
|
55
95
|
# [trp_request] a TRP request object, created directly or using the mk_request helper
|
data/trisulrp.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "trisulrp"
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.6.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["vivek"]
|
12
|
-
s.date = "2013-
|
12
|
+
s.date = "2013-12-13"
|
13
13
|
s.description = "This gem deals about the trisul remote protocol"
|
14
14
|
s.email = "vivek_rajagopal@yahoo.com"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trisulrp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-12-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ruby-protocol-buffers
|
@@ -158,7 +158,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
158
158
|
version: '0'
|
159
159
|
segments:
|
160
160
|
- 0
|
161
|
-
hash:
|
161
|
+
hash: 4500533550725413693
|
162
162
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
163
163
|
none: false
|
164
164
|
requirements:
|