zeroc-ice 3.7.2 → 3.7.3

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.
Files changed (283) hide show
  1. checksums.yaml +5 -5
  2. data/ext/Config.h +4 -0
  3. data/ext/Operation.cpp +5 -5
  4. data/ext/Properties.cpp +1 -1
  5. data/ext/Proxy.cpp +16 -2
  6. data/ext/Types.cpp +45 -40
  7. data/ext/Util.cpp +1 -1
  8. data/ext/Util.h +10 -8
  9. data/ext/ice/cpp/include/Ice/Config.h +4 -0
  10. data/ext/ice/cpp/include/Ice/FactoryTableInit.h +1 -1
  11. data/ext/ice/cpp/include/Ice/IconvStringConverter.h +4 -3
  12. data/ext/ice/cpp/include/Ice/InputStream.h +4 -4
  13. data/ext/ice/cpp/include/Ice/Optional.h +11 -0
  14. data/ext/ice/cpp/include/Ice/OutgoingAsync.h +1 -1
  15. data/ext/ice/cpp/include/Ice/OutputStream.h +5 -5
  16. data/ext/ice/cpp/include/Ice/Proxy.h +17 -5
  17. data/ext/ice/cpp/include/Ice/StreamHelpers.h +1 -1
  18. data/ext/ice/cpp/include/Ice/Value.h +1 -1
  19. data/ext/ice/cpp/include/IceUtil/Atomic.h +1 -1
  20. data/ext/ice/cpp/include/IceUtil/Config.h +16 -6
  21. data/ext/ice/cpp/include/IceUtil/ConsoleUtil.h +4 -4
  22. data/ext/ice/cpp/include/IceUtil/Optional.h +8 -0
  23. data/ext/ice/cpp/include/IceUtil/OutputUtil.h +17 -14
  24. data/ext/ice/cpp/include/IceUtil/Random.h +1 -1
  25. data/ext/ice/cpp/include/IceUtil/ResourceConfig.h +2 -2
  26. data/ext/ice/cpp/include/IceUtil/ScannerConfig.h +6 -0
  27. data/ext/ice/cpp/include/IceUtil/StringConverter.h +1 -1
  28. data/ext/ice/cpp/include/generated/Ice/BuiltinSequences.h +3 -3
  29. data/ext/ice/cpp/include/generated/Ice/Communicator.h +3 -3
  30. data/ext/ice/cpp/include/generated/Ice/CommunicatorF.h +3 -3
  31. data/ext/ice/cpp/include/generated/Ice/Connection.h +33 -36
  32. data/ext/ice/cpp/include/generated/Ice/ConnectionF.h +3 -3
  33. data/ext/ice/cpp/include/generated/Ice/Current.h +20 -21
  34. data/ext/ice/cpp/include/generated/Ice/Endpoint.h +24 -24
  35. data/ext/ice/cpp/include/generated/Ice/EndpointF.h +3 -3
  36. data/ext/ice/cpp/include/generated/Ice/EndpointTypes.h +3 -3
  37. data/ext/ice/cpp/include/generated/Ice/FacetMap.h +3 -3
  38. data/ext/ice/cpp/include/generated/Ice/Identity.h +4 -5
  39. data/ext/ice/cpp/include/generated/Ice/ImplicitContext.h +3 -3
  40. data/ext/ice/cpp/include/generated/Ice/ImplicitContextF.h +3 -3
  41. data/ext/ice/cpp/include/generated/Ice/Instrumentation.h +15 -15
  42. data/ext/ice/cpp/include/generated/Ice/InstrumentationF.h +3 -3
  43. data/ext/ice/cpp/include/generated/Ice/LocalException.h +27 -93
  44. data/ext/ice/cpp/include/generated/Ice/Locator.h +27 -32
  45. data/ext/ice/cpp/include/generated/Ice/LocatorF.h +3 -3
  46. data/ext/ice/cpp/include/generated/Ice/Logger.h +3 -3
  47. data/ext/ice/cpp/include/generated/Ice/LoggerF.h +3 -3
  48. data/ext/ice/cpp/include/generated/Ice/Metrics.h +75 -79
  49. data/ext/ice/cpp/include/generated/Ice/ObjectAdapter.h +3 -3
  50. data/ext/ice/cpp/include/generated/Ice/ObjectAdapterF.h +3 -3
  51. data/ext/ice/cpp/include/generated/Ice/ObjectFactory.h +3 -3
  52. data/ext/ice/cpp/include/generated/Ice/Plugin.h +3 -3
  53. data/ext/ice/cpp/include/generated/Ice/PluginF.h +3 -3
  54. data/ext/ice/cpp/include/generated/Ice/Process.h +3 -3
  55. data/ext/ice/cpp/include/generated/Ice/ProcessF.h +3 -3
  56. data/ext/ice/cpp/include/generated/Ice/Properties.h +3 -3
  57. data/ext/ice/cpp/include/generated/Ice/PropertiesAdmin.h +9 -9
  58. data/ext/ice/cpp/include/generated/Ice/PropertiesF.h +3 -3
  59. data/ext/ice/cpp/include/generated/Ice/RemoteLogger.h +9 -11
  60. data/ext/ice/cpp/include/generated/Ice/Router.h +22 -22
  61. data/ext/ice/cpp/include/generated/Ice/RouterF.h +3 -3
  62. data/ext/ice/cpp/include/generated/Ice/ServantLocator.h +3 -3
  63. data/ext/ice/cpp/include/generated/Ice/ServantLocatorF.h +3 -3
  64. data/ext/ice/cpp/include/generated/Ice/SliceChecksumDict.h +3 -3
  65. data/ext/ice/cpp/include/generated/Ice/ValueFactory.h +3 -3
  66. data/ext/ice/cpp/include/generated/Ice/Version.h +15 -17
  67. data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfo.h +3 -3
  68. data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfoF.h +3 -3
  69. data/ext/ice/cpp/include/generated/IceSSL/EndpointInfo.h +3 -3
  70. data/ext/ice/cpp/src/Ice/ArgVector.cpp +3 -3
  71. data/ext/ice/cpp/src/Ice/Base64.cpp +11 -12
  72. data/ext/ice/cpp/src/Ice/BatchRequestQueue.cpp +1 -1
  73. data/ext/ice/cpp/src/Ice/Buffer.cpp +2 -2
  74. data/ext/ice/cpp/src/Ice/BuiltinSequences.cpp +3 -3
  75. data/ext/ice/cpp/src/Ice/Communicator.cpp +3 -3
  76. data/ext/ice/cpp/src/Ice/CommunicatorF.cpp +3 -3
  77. data/ext/ice/cpp/src/Ice/CommunicatorI.cpp +19 -0
  78. data/ext/ice/cpp/src/Ice/CommunicatorI.h +5 -0
  79. data/ext/ice/cpp/src/Ice/Connection.cpp +3 -3
  80. data/ext/ice/cpp/src/Ice/ConnectionF.cpp +3 -3
  81. data/ext/ice/cpp/src/Ice/ConnectionI.cpp +31 -16
  82. data/ext/ice/cpp/src/Ice/Current.cpp +3 -3
  83. data/ext/ice/cpp/src/Ice/DispatchInterceptor.cpp +13 -0
  84. data/ext/ice/cpp/src/Ice/DynamicLibrary.cpp +6 -5
  85. data/ext/ice/cpp/src/Ice/Endpoint.cpp +3 -3
  86. data/ext/ice/cpp/src/Ice/EndpointF.cpp +3 -3
  87. data/ext/ice/cpp/src/Ice/EndpointTypes.cpp +3 -3
  88. data/ext/ice/cpp/src/Ice/Exception.cpp +5 -5
  89. data/ext/ice/cpp/src/Ice/FacetMap.cpp +3 -3
  90. data/ext/ice/cpp/src/Ice/HashUtil.h +1 -1
  91. data/ext/ice/cpp/src/Ice/IPEndpointI.cpp +12 -1
  92. data/ext/ice/cpp/src/Ice/Identity.cpp +3 -3
  93. data/ext/ice/cpp/src/Ice/ImplicitContext.cpp +3 -3
  94. data/ext/ice/cpp/src/Ice/ImplicitContextF.cpp +3 -3
  95. data/ext/ice/cpp/src/Ice/Incoming.cpp +2 -0
  96. data/ext/ice/cpp/src/Ice/Initialize.cpp +4 -3
  97. data/ext/ice/cpp/src/Ice/InputStream.cpp +19 -19
  98. data/ext/ice/cpp/src/Ice/Instance.cpp +28 -8
  99. data/ext/ice/cpp/src/Ice/Instrumentation.cpp +3 -3
  100. data/ext/ice/cpp/src/Ice/InstrumentationF.cpp +3 -3
  101. data/ext/ice/cpp/src/Ice/LocalException.cpp +3 -3
  102. data/ext/ice/cpp/src/Ice/Locator.cpp +7 -7
  103. data/ext/ice/cpp/src/Ice/LocatorF.cpp +3 -3
  104. data/ext/ice/cpp/src/Ice/Logger.cpp +3 -3
  105. data/ext/ice/cpp/src/Ice/LoggerAdminI.cpp +1 -7
  106. data/ext/ice/cpp/src/Ice/LoggerF.cpp +3 -3
  107. data/ext/ice/cpp/src/Ice/LoggerI.cpp +6 -0
  108. data/ext/ice/cpp/src/Ice/Metrics.cpp +5 -5
  109. data/ext/ice/cpp/src/Ice/Network.cpp +23 -22
  110. data/ext/ice/cpp/src/Ice/Network.h +1 -1
  111. data/ext/ice/cpp/src/Ice/OSLogLoggerI.cpp +57 -0
  112. data/ext/ice/cpp/src/Ice/OSLogLoggerI.h +40 -0
  113. data/ext/ice/cpp/src/Ice/Object.cpp +9 -7
  114. data/ext/ice/cpp/src/Ice/ObjectAdapter.cpp +3 -3
  115. data/ext/ice/cpp/src/Ice/ObjectAdapterF.cpp +3 -3
  116. data/ext/ice/cpp/src/Ice/ObjectAdapterI.cpp +13 -1
  117. data/ext/ice/cpp/src/Ice/ObjectAdapterI.h +4 -0
  118. data/ext/ice/cpp/src/Ice/ObjectFactory.cpp +3 -3
  119. data/ext/ice/cpp/src/Ice/OutgoingAsync.cpp +1 -1
  120. data/ext/ice/cpp/src/Ice/OutputStream.cpp +24 -24
  121. data/ext/ice/cpp/src/Ice/Plugin.cpp +3 -3
  122. data/ext/ice/cpp/src/Ice/PluginF.cpp +3 -3
  123. data/ext/ice/cpp/src/Ice/Process.cpp +3 -3
  124. data/ext/ice/cpp/src/Ice/ProcessF.cpp +3 -3
  125. data/ext/ice/cpp/src/Ice/Properties.cpp +3 -3
  126. data/ext/ice/cpp/src/Ice/PropertiesAdmin.cpp +4 -4
  127. data/ext/ice/cpp/src/Ice/PropertiesF.cpp +3 -3
  128. data/ext/ice/cpp/src/Ice/PropertyNames.cpp +2 -1
  129. data/ext/ice/cpp/src/Ice/PropertyNames.h +1 -1
  130. data/ext/ice/cpp/src/Ice/Proxy.cpp +6 -0
  131. data/ext/ice/cpp/src/Ice/ProxyFactory.cpp +1 -1
  132. data/ext/ice/cpp/src/Ice/ReferenceFactory.cpp +1 -1
  133. data/ext/ice/cpp/src/Ice/RegisterPluginsInit.cpp +3 -2
  134. data/ext/ice/cpp/src/Ice/RemoteLogger.cpp +3 -3
  135. data/ext/ice/cpp/src/Ice/Router.cpp +6 -6
  136. data/ext/ice/cpp/src/Ice/RouterF.cpp +3 -3
  137. data/ext/ice/cpp/src/Ice/SHA1.cpp +2 -2
  138. data/ext/ice/cpp/src/Ice/Selector.cpp +18 -13
  139. data/ext/ice/cpp/src/Ice/ServantLocator.cpp +3 -3
  140. data/ext/ice/cpp/src/Ice/ServantLocatorF.cpp +3 -3
  141. data/ext/ice/cpp/src/Ice/SliceChecksumDict.cpp +3 -3
  142. data/ext/ice/cpp/src/Ice/StreamSocket.cpp +6 -6
  143. data/ext/ice/cpp/src/Ice/TcpAcceptor.cpp +6 -0
  144. data/ext/ice/cpp/src/Ice/TcpConnector.cpp +5 -0
  145. data/ext/ice/cpp/src/Ice/TcpEndpointI.cpp +5 -0
  146. data/ext/ice/cpp/src/Ice/TcpTransceiver.cpp +5 -0
  147. data/ext/ice/cpp/src/Ice/ThreadPool.cpp +63 -0
  148. data/ext/ice/cpp/src/Ice/ThreadPool.h +10 -2
  149. data/ext/ice/cpp/src/Ice/Timer.cpp +10 -0
  150. data/ext/ice/cpp/src/Ice/UdpEndpointI.cpp +11 -1
  151. data/ext/ice/cpp/src/Ice/UdpTransceiver.cpp +10 -2
  152. data/ext/ice/cpp/src/Ice/ValueFactory.cpp +3 -3
  153. data/ext/ice/cpp/src/Ice/Version.cpp +3 -3
  154. data/ext/ice/cpp/src/Ice/WSTransceiver.cpp +16 -15
  155. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.cpp +3 -3
  156. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.h +3 -3
  157. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.cpp +3 -3
  158. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.h +3 -3
  159. data/ext/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +37 -8
  160. data/ext/ice/cpp/src/IceSSL/CertificateI.cpp +3 -3
  161. data/ext/ice/cpp/src/IceSSL/ConnectionInfo.cpp +3 -3
  162. data/ext/ice/cpp/src/IceSSL/ConnectionInfoF.cpp +3 -3
  163. data/ext/ice/cpp/src/IceSSL/EndpointInfo.cpp +3 -3
  164. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +4 -16
  165. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.h +0 -1
  166. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +40 -3
  167. data/ext/ice/cpp/src/IceSSL/SChannelEngine.cpp +0 -7
  168. data/ext/ice/cpp/src/IceSSL/SChannelEngine.h +0 -2
  169. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +18 -6
  170. data/ext/ice/cpp/src/IceSSL/SSLEngine.cpp +19 -7
  171. data/ext/ice/cpp/src/IceSSL/SSLEngine.h +2 -0
  172. data/ext/ice/cpp/src/IceSSL/SecureTransportCertificateI.cpp +32 -21
  173. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +21 -6
  174. data/ext/ice/cpp/src/IceSSL/SecureTransportUtil.cpp +19 -16
  175. data/ext/ice/cpp/src/IceSSL/Util.cpp +11 -5
  176. data/ext/ice/cpp/src/IceUtil/FileUtil.cpp +1 -1
  177. data/ext/ice/cpp/src/IceUtil/Options.cpp +3 -3
  178. data/ext/ice/cpp/src/IceUtil/OutputUtil.cpp +40 -10
  179. data/ext/ice/cpp/src/IceUtil/Random.cpp +2 -2
  180. data/ext/ice/cpp/src/IceUtil/StringConverter.cpp +5 -5
  181. data/ext/ice/cpp/src/IceUtil/StringUtil.cpp +3 -3
  182. data/ext/ice/cpp/src/IceUtil/Time.cpp +3 -3
  183. data/ext/ice/cpp/src/IceUtil/UUID.cpp +5 -5
  184. data/ext/ice/cpp/src/IceUtil/UtilException.cpp +4 -4
  185. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.cpp +13 -9
  186. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.h +1 -1
  187. data/ext/ice/cpp/src/Slice/Grammar.cpp +8 -0
  188. data/ext/ice/cpp/src/Slice/JavaUtil.cpp +1 -2
  189. data/ext/ice/cpp/src/Slice/MD5I.cpp +8 -0
  190. data/ext/ice/cpp/src/Slice/Parser.cpp +60 -112
  191. data/ext/ice/cpp/src/Slice/Parser.h +27 -1
  192. data/ext/ice/cpp/src/Slice/Preprocessor.cpp +2 -1
  193. data/ext/ice/cpp/src/Slice/PythonUtil.cpp +10 -10
  194. data/ext/ice/cpp/src/Slice/RubyUtil.cpp +1 -1
  195. data/ext/ice/cpp/src/Slice/Scanner.cpp +8 -0
  196. data/ext/ice/cpp/src/Slice/StringLiteralUtil.cpp +11 -6
  197. data/ext/ice/mcpp/Makefile +2 -5
  198. data/ice.gemspec +1 -1
  199. data/lib/Glacier2/Metrics.rb +1 -1
  200. data/lib/Glacier2/PermissionsVerifier.rb +1 -1
  201. data/lib/Glacier2/PermissionsVerifierF.rb +1 -1
  202. data/lib/Glacier2/Router.rb +1 -1
  203. data/lib/Glacier2/RouterF.rb +1 -1
  204. data/lib/Glacier2/SSLInfo.rb +1 -1
  205. data/lib/Glacier2/Session.rb +1 -1
  206. data/lib/Ice/BuiltinSequences.rb +1 -1
  207. data/lib/Ice/Communicator.rb +1 -1
  208. data/lib/Ice/CommunicatorF.rb +1 -1
  209. data/lib/Ice/Connection.rb +1 -1
  210. data/lib/Ice/ConnectionF.rb +1 -1
  211. data/lib/Ice/Current.rb +1 -1
  212. data/lib/Ice/Endpoint.rb +1 -1
  213. data/lib/Ice/EndpointF.rb +1 -1
  214. data/lib/Ice/EndpointTypes.rb +1 -1
  215. data/lib/Ice/FacetMap.rb +1 -1
  216. data/lib/Ice/Identity.rb +1 -1
  217. data/lib/Ice/ImplicitContext.rb +1 -1
  218. data/lib/Ice/ImplicitContextF.rb +1 -1
  219. data/lib/Ice/Instrumentation.rb +1 -1
  220. data/lib/Ice/InstrumentationF.rb +1 -1
  221. data/lib/Ice/LocalException.rb +1 -1
  222. data/lib/Ice/Locator.rb +1 -1
  223. data/lib/Ice/LocatorF.rb +1 -1
  224. data/lib/Ice/Logger.rb +1 -1
  225. data/lib/Ice/LoggerF.rb +1 -1
  226. data/lib/Ice/Metrics.rb +1 -1
  227. data/lib/Ice/ObjectAdapter.rb +1 -1
  228. data/lib/Ice/ObjectAdapterF.rb +1 -1
  229. data/lib/Ice/ObjectFactory.rb +1 -1
  230. data/lib/Ice/Plugin.rb +1 -1
  231. data/lib/Ice/PluginF.rb +1 -1
  232. data/lib/Ice/Process.rb +1 -1
  233. data/lib/Ice/ProcessF.rb +1 -1
  234. data/lib/Ice/Properties.rb +1 -1
  235. data/lib/Ice/PropertiesAdmin.rb +1 -1
  236. data/lib/Ice/PropertiesF.rb +1 -1
  237. data/lib/Ice/RemoteLogger.rb +1 -1
  238. data/lib/Ice/Router.rb +1 -1
  239. data/lib/Ice/RouterF.rb +1 -1
  240. data/lib/Ice/ServantLocator.rb +1 -1
  241. data/lib/Ice/ServantLocatorF.rb +1 -1
  242. data/lib/Ice/SliceChecksumDict.rb +1 -1
  243. data/lib/Ice/ValueFactory.rb +1 -1
  244. data/lib/Ice/Version.rb +1 -1
  245. data/lib/IceBox/IceBox.rb +1 -1
  246. data/lib/IceGrid/Admin.rb +1 -1
  247. data/lib/IceGrid/Descriptor.rb +1 -1
  248. data/lib/IceGrid/Exception.rb +1 -1
  249. data/lib/IceGrid/FileParser.rb +1 -1
  250. data/lib/IceGrid/PluginFacade.rb +1 -1
  251. data/lib/IceGrid/Registry.rb +1 -1
  252. data/lib/IceGrid/Session.rb +1 -1
  253. data/lib/IceGrid/UserAccountMapper.rb +1 -1
  254. data/lib/IcePatch2/FileInfo.rb +1 -1
  255. data/lib/IcePatch2/FileServer.rb +1 -1
  256. data/lib/IceStorm/IceStorm.rb +1 -1
  257. data/lib/IceStorm/Metrics.rb +1 -1
  258. data/slice/Glacier2/Metrics.ice +1 -1
  259. data/slice/Ice/Communicator.ice +57 -25
  260. data/slice/Ice/Connection.ice +14 -14
  261. data/slice/Ice/Current.ice +1 -1
  262. data/slice/Ice/Endpoint.ice +6 -6
  263. data/slice/Ice/EndpointF.ice +1 -1
  264. data/slice/Ice/FacetMap.ice +1 -1
  265. data/slice/Ice/ImplicitContext.ice +6 -6
  266. data/slice/Ice/Instrumentation.ice +6 -6
  267. data/slice/Ice/Logger.ice +6 -6
  268. data/slice/Ice/Metrics.ice +12 -9
  269. data/slice/Ice/ObjectAdapter.ice +43 -31
  270. data/slice/Ice/ObjectFactory.ice +1 -1
  271. data/slice/Ice/Plugin.ice +2 -2
  272. data/slice/Ice/Properties.ice +10 -10
  273. data/slice/Ice/ServantLocator.ice +4 -2
  274. data/slice/Ice/ValueFactory.ice +3 -3
  275. data/slice/IceBT/EndpointInfo.ice +1 -1
  276. data/slice/IceGrid/PluginFacade.ice +4 -4
  277. data/slice/IceIAP/ConnectionInfo.ice +1 -1
  278. data/slice/IceIAP/EndpointInfo.ice +1 -1
  279. data/slice/IceSSL/ConnectionInfo.ice +3 -2
  280. data/slice/IceSSL/ConnectionInfoF.ice +1 -1
  281. data/slice/IceSSL/EndpointInfo.ice +1 -1
  282. data/slice/IceStorm/Metrics.ice +1 -1
  283. metadata +5 -3
@@ -46,7 +46,7 @@ const CertificateOID IceSSL::certificateOIDS[] =
46
46
  const int IceSSL::certificateOIDSSize = sizeof(IceSSL::certificateOIDS) / sizeof(CertificateOID);
47
47
 
48
48
  CertificateReadException::CertificateReadException(const char* file, int line, const string& r) :
49
- ExceptionHelper<CertificateReadException>(file, line),
49
+ IceUtil::ExceptionHelper<CertificateReadException>(file, line),
50
50
  reason(r)
51
51
  {
52
52
  }
@@ -72,7 +72,7 @@ CertificateReadException::ice_clone() const
72
72
  #endif
73
73
 
74
74
  CertificateEncodingException::CertificateEncodingException(const char* file, int line, const string& r) :
75
- ExceptionHelper<CertificateEncodingException>(file, line),
75
+ IceUtil::ExceptionHelper<CertificateEncodingException>(file, line),
76
76
  reason(r)
77
77
  {
78
78
  }
@@ -98,7 +98,7 @@ CertificateEncodingException::ice_clone() const
98
98
  #endif
99
99
 
100
100
  ParseException::ParseException(const char* file, int line, const string& r) :
101
- ExceptionHelper<ParseException>(file, line),
101
+ IceUtil::ExceptionHelper<ParseException>(file, line),
102
102
  reason(r)
103
103
  {
104
104
  }
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) ZeroC, Inc. All rights reserved.
3
3
  //
4
4
  //
5
- // Ice version 3.7.2
5
+ // Ice version 3.7.3
6
6
  //
7
7
  // <auto-generated>
8
8
  //
@@ -34,10 +34,10 @@
34
34
  # if ICE_INT_VERSION / 100 != 307
35
35
  # error Ice version mismatch!
36
36
  # endif
37
- # if ICE_INT_VERSION % 100 > 50
37
+ # if ICE_INT_VERSION % 100 >= 50
38
38
  # error Beta header file detected
39
39
  # endif
40
- # if ICE_INT_VERSION % 100 < 2
40
+ # if ICE_INT_VERSION % 100 < 3
41
41
  # error Ice patch level mismatch!
42
42
  # endif
43
43
  #endif
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) ZeroC, Inc. All rights reserved.
3
3
  //
4
4
  //
5
- // Ice version 3.7.2
5
+ // Ice version 3.7.3
6
6
  //
7
7
  // <auto-generated>
8
8
  //
@@ -32,10 +32,10 @@
32
32
  # if ICE_INT_VERSION / 100 != 307
33
33
  # error Ice version mismatch!
34
34
  # endif
35
- # if ICE_INT_VERSION % 100 > 50
35
+ # if ICE_INT_VERSION % 100 >= 50
36
36
  # error Beta header file detected
37
37
  # endif
38
- # if ICE_INT_VERSION % 100 < 2
38
+ # if ICE_INT_VERSION % 100 < 3
39
39
  # error Ice patch level mismatch!
40
40
  # endif
41
41
  #endif
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) ZeroC, Inc. All rights reserved.
3
3
  //
4
4
  //
5
- // Ice version 3.7.2
5
+ // Ice version 3.7.3
6
6
  //
7
7
  // <auto-generated>
8
8
  //
@@ -34,10 +34,10 @@
34
34
  # if ICE_INT_VERSION / 100 != 307
35
35
  # error Ice version mismatch!
36
36
  # endif
37
- # if ICE_INT_VERSION % 100 > 50
37
+ # if ICE_INT_VERSION % 100 >= 50
38
38
  # error Beta header file detected
39
39
  # endif
40
- # if ICE_INT_VERSION % 100 < 2
40
+ # if ICE_INT_VERSION % 100 < 3
41
41
  # error Ice patch level mismatch!
42
42
  # endif
43
43
  #endif
@@ -84,7 +84,7 @@ IceSSL_opensslThreadIdCallback()
84
84
  // On some platforms, pthread_t is a pointer to a per-thread structure.
85
85
  //
86
86
  return reinterpret_cast<unsigned long>(pthread_self());
87
- # elif defined(__linux) || defined(__sun) || defined(__hpux) || defined(_AIX) || defined(__GLIBC__)
87
+ # elif defined(__linux__) || defined(__sun) || defined(__hpux) || defined(_AIX) || defined(__GLIBC__)
88
88
  //
89
89
  // On Linux, Solaris, HP-UX and AIX, pthread_t is an integer.
90
90
  //
@@ -609,14 +609,14 @@ OpenSSL::SSLEngine::initialize()
609
609
  if(!cert || !SSL_CTX_use_certificate(_ctx, cert))
610
610
  {
611
611
  throw PluginInitializationException(__FILE__, __LINE__,
612
- "IceSSL: unable to establish SSL certificate:\n" +
612
+ "IceSSL: unable to load SSL certificate:\n" +
613
613
  (cert ? sslErrors() : "certificate not found"));
614
614
  }
615
615
 
616
616
  if(!key || !SSL_CTX_use_PrivateKey(_ctx, key))
617
617
  {
618
618
  throw PluginInitializationException(__FILE__, __LINE__,
619
- "IceSSL: unable to establish SSL private key:\n" +
619
+ "IceSSL: unable to load SSL private key:\n" +
620
620
  (key ? sslErrors() : "key not found"));
621
621
  }
622
622
  keyLoaded = true;
@@ -931,22 +931,10 @@ OpenSSL::SSLEngine::destroy()
931
931
  if(_ctx)
932
932
  {
933
933
  SSL_CTX_free(_ctx);
934
+ _ctx = 0;
934
935
  }
935
936
  }
936
937
 
937
- void
938
- OpenSSL::SSLEngine::verifyPeer(const string& address, const IceSSL::ConnectionInfoPtr& info, const string& desc)
939
- {
940
- #if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10002000L
941
- //
942
- // Peer hostname verification is new in OpenSSL 1.0.2 for older versions
943
- // we use IceSSL build in hostname verification.
944
- //
945
- verifyPeerCertName(address, info);
946
- #endif
947
- IceSSL::SSLEngine::verifyPeer(address, info, desc);
948
- }
949
-
950
938
  IceInternal::TransceiverPtr
951
939
  OpenSSL::SSLEngine::createTransceiver(const InstancePtr& instance,
952
940
  const IceInternal::TransceiverPtr& delegate,
@@ -26,7 +26,6 @@ public:
26
26
 
27
27
  virtual void initialize();
28
28
  virtual void destroy();
29
- virtual void verifyPeer(const std::string&, const IceSSL::ConnectionInfoPtr&, const std::string&);
30
29
  virtual IceInternal::TransceiverPtr
31
30
  createTransceiver(const IceSSL::InstancePtr&, const IceInternal::TransceiverPtr&, const std::string&, bool);
32
31
 
@@ -171,22 +171,41 @@ OpenSSL::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal::
171
171
  // Hostname verification was included in OpenSSL 1.0.2
172
172
  //
173
173
  #if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10002000L
174
- if(_engine->getCheckCertName() && !_host.empty() && (sslVerifyMode & SSL_VERIFY_PEER))
174
+ if(_engine->getCheckCertName() && !_host.empty())
175
175
  {
176
176
  X509_VERIFY_PARAM* param = SSL_get0_param(_ssl);
177
177
  if(IceInternal::isIpAddress(_host))
178
178
  {
179
- X509_VERIFY_PARAM_set1_ip_asc(param, _host.c_str());
179
+ if(!X509_VERIFY_PARAM_set1_ip_asc(param, _host.c_str()))
180
+ {
181
+ throw SecurityException(__FILE__, __LINE__, "IceSSL: error setting the expected IP address `"
182
+ + _host + "'");
183
+ }
180
184
  }
181
185
  else
182
186
  {
183
- X509_VERIFY_PARAM_set1_host(param, _host.c_str(), 0);
187
+ if(!X509_VERIFY_PARAM_set1_host(param, _host.c_str(), 0))
188
+ {
189
+ throw SecurityException(__FILE__, __LINE__, "IceSSL: error setting the expected host name `"
190
+ + _host + "'");
191
+ }
184
192
  }
185
193
  }
186
194
  #endif
187
195
 
188
196
  SSL_set_verify(_ssl, sslVerifyMode, IceSSL_opensslVerifyCallback);
189
197
  }
198
+
199
+ //
200
+ // Enable SNI
201
+ //
202
+ if(!_incoming && _engine->getServerNameIndication() && !_host.empty() && !IceInternal::isIpAddress(_host))
203
+ {
204
+ if(!SSL_set_tlsext_host_name(_ssl, _host.c_str()))
205
+ {
206
+ throw SecurityException(__FILE__, __LINE__, "IceSSL: setting SNI host failed `" + _host + "'");
207
+ }
208
+ }
190
209
  }
191
210
 
192
211
  while(!SSL_is_init_finished(_ssl))
@@ -320,6 +339,24 @@ OpenSSL::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal::
320
339
  }
321
340
 
322
341
  _cipher = SSL_get_cipher_name(_ssl); // Nothing needs to be free'd.
342
+ #if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10002000L
343
+ try
344
+ {
345
+ //
346
+ // Peer hostname verification is new in OpenSSL 1.0.2 for older versions
347
+ // We use IceSSL built-in hostname verification.
348
+ //
349
+ _engine->verifyPeerCertName(address, info);
350
+ }
351
+ catch(const SecurityException&)
352
+ {
353
+ _verified = false;
354
+ if(_engine->getVerifyPeer() > 0)
355
+ {
356
+ throw;
357
+ }
358
+ }
359
+ #endif
323
360
  _engine->verifyPeer(_host, ICE_DYNAMIC_CAST(ConnectionInfo, getInfo()), toString());
324
361
 
325
362
  if(_engine->securityTraceLevel() >= 1)
@@ -1273,13 +1273,6 @@ SChannel::SSLEngine::destroy()
1273
1273
  }
1274
1274
  }
1275
1275
 
1276
- void
1277
- SChannel::SSLEngine::verifyPeer(const string& address, const IceSSL::ConnectionInfoPtr& info, const string& desc)
1278
- {
1279
- verifyPeerCertName(address, info);
1280
- IceSSL::SSLEngine::verifyPeer(address, info, desc);
1281
- }
1282
-
1283
1276
  IceInternal::TransceiverPtr
1284
1277
  SChannel::SSLEngine::createTransceiver(const InstancePtr& instance,
1285
1278
  const IceInternal::TransceiverPtr& delegate,
@@ -91,8 +91,6 @@ public:
91
91
  //
92
92
  virtual void destroy();
93
93
 
94
- virtual void verifyPeer(const std::string&, const ConnectionInfoPtr&, const std::string&);
95
-
96
94
  std::string getCipherName(ALG_ID) const;
97
95
 
98
96
  CredHandle newCredentialsHandle(bool);
@@ -746,7 +746,20 @@ SChannel::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal:
746
746
  throw SecurityException(__FILE__, __LINE__, "IceSSL: error reading cipher info:\n" + secStatusToString(err));
747
747
  }
748
748
 
749
- _engine->verifyPeer(_host, ICE_DYNAMIC_CAST(ConnectionInfo, getInfo()), toString());
749
+ ConnectionInfoPtr info = ICE_DYNAMIC_CAST(ConnectionInfo, getInfo());
750
+ try
751
+ {
752
+ _engine->verifyPeerCertName(_host, info);
753
+ }
754
+ catch(const Ice::SecurityException&)
755
+ {
756
+ _verified = false;
757
+ if(_engine->getVerifyPeer() > 0)
758
+ {
759
+ throw;
760
+ }
761
+ }
762
+ _engine->verifyPeer(_host, info, toString());
750
763
  _state = StateHandshakeComplete;
751
764
 
752
765
  if(_instance->engine()->securityTraceLevel() >= 1)
@@ -754,12 +767,11 @@ SChannel::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal:
754
767
  string sslCipherName;
755
768
  string sslKeyExchangeAlgorithm;
756
769
  string sslProtocolName;
757
- SecPkgContext_ConnectionInfo info;
758
- if(QueryContextAttributes(&_ssl, SECPKG_ATTR_CONNECTION_INFO, &info) == SEC_E_OK)
770
+ if(QueryContextAttributes(&_ssl, SECPKG_ATTR_CONNECTION_INFO, &connInfo) == SEC_E_OK)
759
771
  {
760
- sslCipherName = _engine->getCipherName(info.aiCipher);
761
- sslKeyExchangeAlgorithm = _engine->getCipherName(info.aiExch);
762
- sslProtocolName = protocolName(info.dwProtocol);
772
+ sslCipherName = _engine->getCipherName(connInfo.aiCipher);
773
+ sslKeyExchangeAlgorithm = _engine->getCipherName(connInfo.aiExch);
774
+ sslProtocolName = protocolName(connInfo.dwProtocol);
763
775
  }
764
776
 
765
777
  Trace out(_instance->logger(), _instance->traceCategory());
@@ -109,6 +109,12 @@ IceSSL::SSLEngine::initialize()
109
109
  //
110
110
  _checkCertName = properties->getPropertyAsIntWithDefault(propPrefix + "CheckCertName", 0) > 0;
111
111
 
112
+ //
113
+ // CheckCertName > 1 enables SNI, the SNI extension applies to client connections,
114
+ // indicating the hostname to the server (must be DNS hostname, not an IP address).
115
+ //
116
+ _serverNameIndication = properties->getPropertyAsIntWithDefault(propPrefix + "CheckCertName", 0) > 1;
117
+
112
118
  //
113
119
  // VerifyDepthMax establishes the maximum length of a peer's certificate
114
120
  // chain, including the peer's certificate. A value of 0 means there is
@@ -201,19 +207,19 @@ IceSSL::SSLEngine::verifyPeerCertName(const string& address, const ConnectionInf
201
207
  if(!certNameOK)
202
208
  {
203
209
  ostringstream ostr;
204
- ostr << "IceSSL: certificate validation failure: "
205
- << (isIpAddress ? "IP address mismatch" : "Hostname mismatch");
210
+ ostr << "IceSSL: ";
211
+ if(_verifyPeer > 0)
212
+ {
213
+ ostr << "ignoring ";
214
+ }
215
+ ostr << "certificate verification failure " << (isIpAddress ? "IP address mismatch" : "Hostname mismatch");
206
216
  string msg = ostr.str();
207
217
  if(_securityTraceLevel >= 1)
208
218
  {
209
219
  Trace out(_logger, _securityTraceCategory);
210
220
  out << msg;
211
221
  }
212
-
213
- if(_verifyPeer > 0)
214
- {
215
- throw SecurityException(__FILE__, __LINE__, msg);
216
- }
222
+ throw SecurityException(__FILE__, __LINE__, msg);
217
223
  }
218
224
  }
219
225
  }
@@ -263,6 +269,12 @@ IceSSL::SSLEngine::getCheckCertName() const
263
269
  return _checkCertName;
264
270
  }
265
271
 
272
+ bool
273
+ IceSSL::SSLEngine::getServerNameIndication() const
274
+ {
275
+ return _serverNameIndication;
276
+ }
277
+
266
278
  int
267
279
  IceSSL::SSLEngine::getVerifyPeer() const
268
280
  {
@@ -63,6 +63,7 @@ public:
63
63
  void setPassword(const std::string& password);
64
64
 
65
65
  bool getCheckCertName() const;
66
+ bool getServerNameIndication() const;
66
67
  int getVerifyPeer() const;
67
68
  int securityTraceLevel() const;
68
69
  std::string securityTraceCategory() const;
@@ -83,6 +84,7 @@ private:
83
84
  PasswordPromptPtr _prompt;
84
85
 
85
86
  bool _checkCertName;
87
+ bool _serverNameIndication;
86
88
  int _verifyDepthMax;
87
89
  int _verifyPeer;
88
90
  int _securityTraceLevel;
@@ -2,6 +2,12 @@
2
2
  // Copyright (c) ZeroC, Inc. All rights reserved.
3
3
  //
4
4
 
5
+ //
6
+ // Disable deprecation warnings for SecCertificateCopyNormalizedIssuerContent and
7
+ // SecCertificateCopyNormalizedSubjectContent
8
+ //
9
+ #include <IceUtil/DisableWarnings.h>
10
+
5
11
  #include <IceSSL/Plugin.h>
6
12
  #include <IceSSL/SecureTransport.h>
7
13
  #include <IceSSL/CertificateI.h>
@@ -77,7 +83,11 @@ class ASN1Parser
77
83
  {
78
84
  public:
79
85
 
80
- ASN1Parser(CFDataRef data) : _data(CFDataGetBytePtr(data)), _length(CFDataGetLength(data)), _p(_data), _next(0)
86
+ ASN1Parser(CFDataRef data) :
87
+ _data(CFDataGetBytePtr(data)),
88
+ _length(static_cast<size_t>(CFDataGetLength(data))),
89
+ _p(_data),
90
+ _next(0)
81
91
  {
82
92
  }
83
93
 
@@ -164,7 +174,7 @@ public:
164
174
  parseUTF8String()
165
175
  {
166
176
  int length = parseLength(0);
167
- string v(reinterpret_cast<const char*>(_p), length);
177
+ string v(reinterpret_cast<const char*>(_p), static_cast<size_t>(length));
168
178
  _p += length;
169
179
  return v;
170
180
  }
@@ -293,8 +303,8 @@ getX509Name(SecCertificateRef cert, CFTypeRef key)
293
303
  if(property)
294
304
  {
295
305
  CFArrayRef dn = static_cast<CFArrayRef>(CFDictionaryGetValue(property.get(), kSecPropertyKeyValue));
296
- int size = CFArrayGetCount(dn);
297
- for(int i = 0; i < size; ++i)
306
+ CFIndex size = CFArrayGetCount(dn);
307
+ for(CFIndex i = 0; i < size; ++i)
298
308
  {
299
309
  CFDictionaryRef dict = static_cast<CFDictionaryRef>(CFArrayGetValueAtIndex(dn, i));
300
310
  rdnPairs.push_front(make_pair(
@@ -317,9 +327,9 @@ getX509AltName(SecCertificateRef cert, CFTypeRef key)
317
327
  if(property)
318
328
  {
319
329
  CFArrayRef names = static_cast<CFArrayRef>(CFDictionaryGetValue(property.get(), kSecPropertyKeyValue));
320
- int size = CFArrayGetCount(names);
330
+ CFIndex size = CFArrayGetCount(names);
321
331
 
322
- for(int i = 0; i < size; ++i)
332
+ for(CFIndex i = 0; i < size; ++i)
323
333
  {
324
334
  CFDictionaryRef dict = static_cast<CFDictionaryRef>(CFArrayGetValueAtIndex(names, i));
325
335
 
@@ -341,7 +351,7 @@ getX509AltName(SecCertificateRef cert, CFTypeRef key)
341
351
  {
342
352
  CFArrayRef section = (CFArrayRef)v;
343
353
  ostringstream os;
344
- for(int j = 0, count = CFArrayGetCount(section); j < count;)
354
+ for(CFIndex j = 0, count = CFArrayGetCount(section); j < count;)
345
355
  {
346
356
  CFDictionaryRef d = (CFDictionaryRef)CFArrayGetValueAtIndex(section, j);
347
357
 
@@ -434,7 +444,7 @@ SecureTransportCertificateI::getAuthorityKeyIdentifier() const
434
444
  if(property)
435
445
  {
436
446
  CFTypeRef type = 0;
437
- CFTypeRef value;
447
+ CFTypeRef value = 0;
438
448
  if(CFDictionaryGetValueIfPresent(property.get(), kSecPropertyKeyType, &type))
439
449
  {
440
450
  if(CFEqual(type, kSecPropertyTypeSection))
@@ -453,8 +463,8 @@ SecureTransportCertificateI::getAuthorityKeyIdentifier() const
453
463
  {
454
464
  CFDataRef data = static_cast<CFDataRef>(
455
465
  CFDictionaryGetValue(static_cast<CFDictionaryRef>(value), kSecPropertyKeyValue));
456
- keyid.resize(CFDataGetLength(data));
457
- memcpy(&keyid[0], CFDataGetBytePtr(data), CFDataGetLength(data));
466
+ keyid.resize(static_cast<size_t>(CFDataGetLength(data)));
467
+ memcpy(&keyid[0], CFDataGetBytePtr(data), static_cast<size_t>(CFDataGetLength(data)));
458
468
  }
459
469
  }
460
470
  }
@@ -473,7 +483,7 @@ SecureTransportCertificateI::getSubjectKeyIdentifier() const
473
483
  if(property)
474
484
  {
475
485
  CFTypeRef type = 0;
476
- CFTypeRef value;
486
+ CFTypeRef value = 0;
477
487
  if(CFDictionaryGetValueIfPresent(property.get(), kSecPropertyKeyType, &type))
478
488
  {
479
489
  if(CFEqual(type, kSecPropertyTypeSection))
@@ -492,8 +502,8 @@ SecureTransportCertificateI::getSubjectKeyIdentifier() const
492
502
  {
493
503
  CFDataRef data = static_cast<CFDataRef>(
494
504
  CFDictionaryGetValue(static_cast<CFDictionaryRef>(value), kSecPropertyKeyValue));
495
- keyid.resize(CFDataGetLength(data));
496
- memcpy(&keyid[0], CFDataGetBytePtr(data), CFDataGetLength(data));
505
+ keyid.resize(static_cast<size_t>(CFDataGetLength(data)));
506
+ memcpy(&keyid[0], CFDataGetBytePtr(data), static_cast<size_t>(CFDataGetLength(data)));
497
507
  }
498
508
  }
499
509
  }
@@ -574,7 +584,7 @@ SecureTransportCertificateI::encode() const
574
584
  ostringstream os;
575
585
  os << "-----BEGIN CERTIFICATE-----\n";
576
586
  os << IceInternal::Base64::encode(data);
577
- os << "-----END CERTIFICATE-----\n";
587
+ os << "\n-----END CERTIFICATE-----\n";
578
588
  return os.str();
579
589
  #else // macOS
580
590
  UniqueRef<CFDataRef> exported;
@@ -583,7 +593,8 @@ SecureTransportCertificateI::encode() const
583
593
  {
584
594
  throw CertificateEncodingException(__FILE__, __LINE__, sslErrorToString(err));
585
595
  }
586
- return string(reinterpret_cast<const char*>(CFDataGetBytePtr(exported.get())), CFDataGetLength(exported.get()));
596
+ return string(reinterpret_cast<const char*>(CFDataGetBytePtr(exported.get())),
597
+ static_cast<size_t>(CFDataGetLength(exported.get())));
587
598
  #endif
588
599
  }
589
600
 
@@ -805,23 +816,23 @@ IceSSL::SecureTransport::CertificatePtr
805
816
  IceSSL::SecureTransport::Certificate::decode(const std::string& encoding)
806
817
  {
807
818
  #ifdef ICE_USE_SECURE_TRANSPORT_IOS
808
- string::size_type size, startpos, endpos = 0;
809
- startpos = encoding.find("-----BEGIN CERTIFICATE-----", endpos);
819
+ string::size_type size = 0;
820
+ string::size_type startpos = 0;
821
+ startpos = encoding.find("-----BEGIN CERTIFICATE-----", 0);
810
822
  if(startpos != string::npos)
811
823
  {
812
824
  startpos += sizeof("-----BEGIN CERTIFICATE-----");
813
- endpos = encoding.find("-----END CERTIFICATE-----", startpos);
825
+ string::size_type endpos = encoding.find("-----END CERTIFICATE-----", startpos);
814
826
  size = endpos - startpos;
815
827
  }
816
828
  else
817
829
  {
818
830
  startpos = 0;
819
- endpos = string::npos;
820
831
  size = encoding.size();
821
832
  }
822
833
 
823
834
  vector<unsigned char> data(IceInternal::Base64::decode(string(&encoding[startpos], size)));
824
- UniqueRef<CFDataRef> certdata(CFDataCreate(kCFAllocatorDefault, &data[0], data.size()));
835
+ UniqueRef<CFDataRef> certdata(CFDataCreate(kCFAllocatorDefault, &data[0], static_cast<CFIndex>(data.size())));
825
836
  SecCertificateRef cert = SecCertificateCreateWithData(0, certdata.get());
826
837
  if(!cert)
827
838
  {
@@ -833,7 +844,7 @@ IceSSL::SecureTransport::Certificate::decode(const std::string& encoding)
833
844
  UniqueRef<CFDataRef> data(
834
845
  CFDataCreateWithBytesNoCopy(kCFAllocatorDefault,
835
846
  reinterpret_cast<const UInt8*>(encoding.c_str()),
836
- encoding.size(), kCFAllocatorNull));
847
+ static_cast<CFIndex>(encoding.size()), kCFAllocatorNull));
837
848
 
838
849
  SecExternalFormat format = kSecFormatUnknown;
839
850
  SecExternalItemType type = kSecItemTypeCertificate;