net-tns 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/net/tns/connection.rb +4 -0
- data/lib/net/tns/gem_version.rb +1 -1
- data/lib/net/tti/crypto.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 960f9f3d455d66f315ed56e487b697847a901645
|
4
|
+
data.tar.gz: f6974f868b7ec2eaff1569b53cc1caac04eec1da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efd7ac7d200532d8b204e42b8fbdb413e3ce03f33a601e5b1b5c820ac41d6e558d97fac4d77ebc43987c476adc5b192eb07b423734462c46e5388a6c48e2a86d
|
7
|
+
data.tar.gz: 7eb7c6bce9a5300eda5a73b0974d0aa731cabb7954ca5ace9967e406162dcfcd27f779ba41f55cf20836dea75db886bcf466cf5ddfbd3f29506debda159dc0b4
|
data/lib/net/tns/connection.rb
CHANGED
@@ -127,6 +127,10 @@ module Net
|
|
127
127
|
|
128
128
|
# @param packet [Net::TNS::Packet]
|
129
129
|
def send_tns_packet( packet )
|
130
|
+
if @socket.nil? || @socket.closed?
|
131
|
+
Net::TNS.logger.warn( "Can't send packet to a closed or nil socket!" )
|
132
|
+
return
|
133
|
+
end
|
130
134
|
# Store this in case we get a Resend
|
131
135
|
@tns_last_sent_packet = packet
|
132
136
|
Net::TNS.logger.debug( "Sending packet #{packet.class} (#{packet.num_bytes} bytes)" )
|
data/lib/net/tns/gem_version.rb
CHANGED
data/lib/net/tti/crypto.rb
CHANGED
@@ -152,7 +152,7 @@ module Net::TTI
|
|
152
152
|
|
153
153
|
# Helper function for encryption.
|
154
154
|
def self.openssl_encrypt( cipher, key, iv, data, padding=false )
|
155
|
-
cipher = OpenSSL::Cipher
|
155
|
+
cipher = OpenSSL::Cipher.new( cipher )
|
156
156
|
cipher.encrypt
|
157
157
|
cipher.key = key
|
158
158
|
cipher.iv = iv unless iv.nil?
|
@@ -163,7 +163,7 @@ module Net::TTI
|
|
163
163
|
|
164
164
|
# Helper function for decryption.
|
165
165
|
def self.openssl_decrypt( cipher, key, iv, data, padding=false )
|
166
|
-
cipher = OpenSSL::Cipher
|
166
|
+
cipher = OpenSSL::Cipher.new( cipher )
|
167
167
|
cipher.decrypt
|
168
168
|
cipher.key = key
|
169
169
|
cipher.iv = iv unless iv.nil?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-tns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Woodbury
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-07-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bindata
|