yao 0.13.3 → 0.13.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 919bc587d14da66211d65e2b3a9b73b41f458947f9417bdc64d09fc818aafde6
4
- data.tar.gz: b88b52c34a06ba337b3fc84944eb7cb83e496588df76a3b659dedf0e195ffd1a
3
+ metadata.gz: 9ee889ea30a4ed867e8f34bcb5fd185f194b317320fd8f5797f1a7b24b232e66
4
+ data.tar.gz: 745bb13217eb75907e47732b457ac41cd90330f23becb0936e4c13beabdeb6e3
5
5
  SHA512:
6
- metadata.gz: 594a7f34ebd9d3f879377125d8383eb42a50295f668111757e63cdbecc7c40b7f4d43a93e94477a8874f24996d30e813b7f9268d49ba0604aca8f3b980b95687
7
- data.tar.gz: 689b7970f7ac73e37bbb174ac1871e7b56a1c6778da40f3d1e7c5042097b72d6d1fba4059debaff0914b6e95ce953581021fea103d48c967a176c30c2e9e8d2e
6
+ metadata.gz: bddf10dfefb8277e6ad2dda817ab08b54ede238586c1f4fd913b8648a257d4c8e79cb7301976cbf02f5991b4ffd8a0199d7a06db604d21a9f63438dea263801f
7
+ data.tar.gz: 2e572a0ca854f98b118cb081daf3a862b3ad60ffcb7e8e0ba58d35d64cdaf40578a507cdd2b578c05b576be5d61c7d92161e251c03e0d6396fa73384599a2520
@@ -124,13 +124,14 @@ module Yao
124
124
  end
125
125
 
126
126
  # Client Certificate Authentication
127
- if Yao.config.client_cert && Yao.config.client_key
128
- cert = OpenSSL::X509::Certificate.new(File.read(Yao.config.client_cert))
129
- key = OpenSSL::PKey.read(File.read(Yao.config.client_key))
130
- h = {
131
- client_cert: cert,
132
- client_key: key,
133
- }
127
+ if (Yao.config.client_cert && Yao.config.client_key) || Yao.config.ca_cert
128
+ h = {}
129
+ if Yao.config.client_cert && Yao.config.client_key
130
+ cert = OpenSSL::X509::Certificate.new(File.read(Yao.config.client_cert))
131
+ key = OpenSSL::PKey.read(File.read(Yao.config.client_key))
132
+ h[:client_cert] = cert
133
+ h[:client_key] = key
134
+ end
134
135
 
135
136
  h[:ca_file] = Yao.config.ca_cert if Yao.config.ca_cert
136
137
  opt.merge!(ssl: h)
@@ -1,3 +1,3 @@
1
1
  module Yao
2
- VERSION = "0.13.3"
2
+ VERSION = "0.13.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yao
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.3
4
+ version: 0.13.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uchio, KONDO