copper-cti 2.2.0 → 2.2.1
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.
- checksums.yaml +4 -4
- data/src/code/CTI/Driver.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bdc1a034fce227086d332c5f0de96a4fda464442f9ec1586bcbc1fcde6d60c06
|
|
4
|
+
data.tar.gz: 8131a473ea3f300397a2603f07c7a7d9a890572e09faecce445edb0442a85e41
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 31f5a83fe4a9380078bcc44ced068b65e3a1e68627ddff1188430b70291284d3ac5c6a411dabfdf863da732897842977eb512739688493f9a6bba5409e35bba7
|
|
7
|
+
data.tar.gz: f50c4487944b75701948e7234c6b3912e3af7fc2f80163f2a4fd83097de442e25ca33d6950c1efa3d7a8bd056eeea2d56ba791debe72d48d08e5f563e50b2cd4
|
data/src/code/CTI/Driver.rb
CHANGED
|
@@ -48,11 +48,17 @@ options:: 接続オプション
|
|
|
48
48
|
require 'openssl'
|
|
49
49
|
ctx = OpenSSL::SSL::SSLContext.new
|
|
50
50
|
ctx.set_params # 既定のCAと VERIFY_PEER を入れる
|
|
51
|
+
# 試験用の逃げ道: options の 'insecure' が真なら証明書を検証しない
|
|
52
|
+
# (自己署名の試験サーバー向け。本番では相手が誰かを確かめないまま
|
|
53
|
+
# 話すことになるので使わない。他言語版の Java --insecure / .NET ?insecure=1 /
|
|
54
|
+
# Node.js rejectUnauthorized:false に相当。2026-09-20)
|
|
55
|
+
insecure = [true, 'true', '1', 1].include?(options['insecure'] || options[:insecure])
|
|
56
|
+
ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE if insecure
|
|
51
57
|
io = OpenSSL::SSL::SSLSocket.new(io, ctx)
|
|
52
58
|
io.hostname = host # SNI
|
|
53
59
|
io.sync_close = true
|
|
54
60
|
io.connect
|
|
55
|
-
io.post_connection_check(host) # 証明書の名前がホストと一致するか
|
|
61
|
+
io.post_connection_check(host) unless insecure # 証明書の名前がホストと一致するか
|
|
56
62
|
end
|
|
57
63
|
session = Session.new(io, options)
|
|
58
64
|
if block
|