zeroc-ice 3.7.11 → 3.7.12

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 (209) hide show
  1. checksums.yaml +4 -4
  2. data/dist/IceRuby/Communicator.cpp +11 -2
  3. data/dist/IceRuby/Properties.cpp +2 -2
  4. data/dist/IceRuby/Types.cpp +3 -3
  5. data/dist/ice/cpp/include/Ice/InputStream.h +7 -4
  6. data/dist/ice/cpp/include/IceDiscovery/IceDiscovery.h +2 -2
  7. data/dist/ice/cpp/include/IceLocatorDiscovery/IceLocatorDiscovery.h +2 -2
  8. data/dist/ice/cpp/include/IceUtil/Config.h +2 -2
  9. data/dist/ice/cpp/include/IceUtil/ResourceConfig.h +2 -2
  10. data/dist/ice/cpp/include/generated/Glacier2/Metrics.h +2 -2
  11. data/dist/ice/cpp/include/generated/Glacier2/PermissionsVerifier.h +2 -2
  12. data/dist/ice/cpp/include/generated/Glacier2/PermissionsVerifierF.h +2 -2
  13. data/dist/ice/cpp/include/generated/Glacier2/Router.h +2 -2
  14. data/dist/ice/cpp/include/generated/Glacier2/RouterF.h +2 -2
  15. data/dist/ice/cpp/include/generated/Glacier2/SSLInfo.h +2 -2
  16. data/dist/ice/cpp/include/generated/Glacier2/Session.h +2 -2
  17. data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +2 -2
  18. data/dist/ice/cpp/include/generated/Ice/Communicator.h +2 -2
  19. data/dist/ice/cpp/include/generated/Ice/CommunicatorF.h +2 -2
  20. data/dist/ice/cpp/include/generated/Ice/Connection.h +2 -2
  21. data/dist/ice/cpp/include/generated/Ice/ConnectionF.h +2 -2
  22. data/dist/ice/cpp/include/generated/Ice/Current.h +2 -2
  23. data/dist/ice/cpp/include/generated/Ice/Endpoint.h +2 -2
  24. data/dist/ice/cpp/include/generated/Ice/EndpointF.h +2 -2
  25. data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +2 -2
  26. data/dist/ice/cpp/include/generated/Ice/FacetMap.h +2 -2
  27. data/dist/ice/cpp/include/generated/Ice/Identity.h +2 -2
  28. data/dist/ice/cpp/include/generated/Ice/ImplicitContext.h +2 -2
  29. data/dist/ice/cpp/include/generated/Ice/ImplicitContextF.h +2 -2
  30. data/dist/ice/cpp/include/generated/Ice/Instrumentation.h +2 -2
  31. data/dist/ice/cpp/include/generated/Ice/InstrumentationF.h +2 -2
  32. data/dist/ice/cpp/include/generated/Ice/LocalException.h +2 -2
  33. data/dist/ice/cpp/include/generated/Ice/Locator.h +2 -2
  34. data/dist/ice/cpp/include/generated/Ice/LocatorF.h +2 -2
  35. data/dist/ice/cpp/include/generated/Ice/Logger.h +2 -2
  36. data/dist/ice/cpp/include/generated/Ice/LoggerF.h +2 -2
  37. data/dist/ice/cpp/include/generated/Ice/Metrics.h +2 -2
  38. data/dist/ice/cpp/include/generated/Ice/ObjectAdapter.h +2 -2
  39. data/dist/ice/cpp/include/generated/Ice/ObjectAdapterF.h +2 -2
  40. data/dist/ice/cpp/include/generated/Ice/ObjectFactory.h +2 -2
  41. data/dist/ice/cpp/include/generated/Ice/Plugin.h +2 -2
  42. data/dist/ice/cpp/include/generated/Ice/PluginF.h +2 -2
  43. data/dist/ice/cpp/include/generated/Ice/Process.h +2 -2
  44. data/dist/ice/cpp/include/generated/Ice/ProcessF.h +2 -2
  45. data/dist/ice/cpp/include/generated/Ice/Properties.h +2 -2
  46. data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +2 -2
  47. data/dist/ice/cpp/include/generated/Ice/PropertiesF.h +2 -2
  48. data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +2 -2
  49. data/dist/ice/cpp/include/generated/Ice/Router.h +2 -2
  50. data/dist/ice/cpp/include/generated/Ice/RouterF.h +2 -2
  51. data/dist/ice/cpp/include/generated/Ice/ServantLocator.h +2 -2
  52. data/dist/ice/cpp/include/generated/Ice/ServantLocatorF.h +2 -2
  53. data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +2 -2
  54. data/dist/ice/cpp/include/generated/Ice/ValueFactory.h +2 -2
  55. data/dist/ice/cpp/include/generated/Ice/Version.h +2 -2
  56. data/dist/ice/cpp/include/generated/IceBox/IceBox.h +2 -2
  57. data/dist/ice/cpp/include/generated/IceGrid/Admin.h +2 -2
  58. data/dist/ice/cpp/include/generated/IceGrid/Descriptor.h +2 -2
  59. data/dist/ice/cpp/include/generated/IceGrid/Exception.h +2 -2
  60. data/dist/ice/cpp/include/generated/IceGrid/FileParser.h +2 -2
  61. data/dist/ice/cpp/include/generated/IceGrid/PluginFacade.h +2 -2
  62. data/dist/ice/cpp/include/generated/IceGrid/Registry.h +2 -2
  63. data/dist/ice/cpp/include/generated/IceGrid/Session.h +2 -2
  64. data/dist/ice/cpp/include/generated/IceGrid/UserAccountMapper.h +2 -2
  65. data/dist/ice/cpp/include/generated/IcePatch2/FileInfo.h +2 -2
  66. data/dist/ice/cpp/include/generated/IcePatch2/FileServer.h +2 -2
  67. data/dist/ice/cpp/include/generated/IceSSL/ConnectionInfo.h +2 -2
  68. data/dist/ice/cpp/include/generated/IceSSL/ConnectionInfoF.h +2 -2
  69. data/dist/ice/cpp/include/generated/IceSSL/EndpointInfo.h +2 -2
  70. data/dist/ice/cpp/include/generated/IceStorm/IceStorm.h +2 -2
  71. data/dist/ice/cpp/include/generated/IceStorm/Metrics.h +2 -2
  72. data/dist/ice/cpp/src/Ice/BatchRequestQueue.cpp +31 -12
  73. data/dist/ice/cpp/src/Ice/BatchRequestQueue.h +7 -0
  74. data/dist/ice/cpp/src/Ice/CommunicatorI.cpp +10 -0
  75. data/dist/ice/cpp/src/Ice/ConnectionI.cpp +45 -0
  76. data/dist/ice/cpp/src/Ice/IPEndpointI.cpp +6 -0
  77. data/dist/ice/cpp/src/Ice/InputStream.cpp +25 -8
  78. data/dist/ice/cpp/src/Ice/Network.cpp +37 -24
  79. data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +15 -4
  80. data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +1 -0
  81. data/dist/ice/cpp/src/Ice/Reference.cpp +6 -0
  82. data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +3 -1
  83. data/dist/ice/cpp/src/Ice/Selector.cpp +13 -5
  84. data/dist/ice/cpp/src/Ice/Timer.cpp +8 -2
  85. data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +52 -34
  86. data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +79 -13
  87. data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +2 -2
  88. data/dist/ice/cpp/src/Ice/generated/Communicator.cpp +2 -2
  89. data/dist/ice/cpp/src/Ice/generated/CommunicatorF.cpp +2 -2
  90. data/dist/ice/cpp/src/Ice/generated/Connection.cpp +2 -2
  91. data/dist/ice/cpp/src/Ice/generated/ConnectionF.cpp +2 -2
  92. data/dist/ice/cpp/src/Ice/generated/Current.cpp +2 -2
  93. data/dist/ice/cpp/src/Ice/generated/Endpoint.cpp +2 -2
  94. data/dist/ice/cpp/src/Ice/generated/EndpointF.cpp +2 -2
  95. data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +2 -2
  96. data/dist/ice/cpp/src/Ice/generated/FacetMap.cpp +2 -2
  97. data/dist/ice/cpp/src/Ice/generated/Identity.cpp +2 -2
  98. data/dist/ice/cpp/src/Ice/generated/ImplicitContext.cpp +2 -2
  99. data/dist/ice/cpp/src/Ice/generated/ImplicitContextF.cpp +2 -2
  100. data/dist/ice/cpp/src/Ice/generated/Instrumentation.cpp +2 -2
  101. data/dist/ice/cpp/src/Ice/generated/InstrumentationF.cpp +2 -2
  102. data/dist/ice/cpp/src/Ice/generated/LocalException.cpp +2 -2
  103. data/dist/ice/cpp/src/Ice/generated/Locator.cpp +2 -2
  104. data/dist/ice/cpp/src/Ice/generated/LocatorF.cpp +2 -2
  105. data/dist/ice/cpp/src/Ice/generated/Logger.cpp +2 -2
  106. data/dist/ice/cpp/src/Ice/generated/LoggerF.cpp +2 -2
  107. data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +2 -2
  108. data/dist/ice/cpp/src/Ice/generated/ObjectAdapter.cpp +2 -2
  109. data/dist/ice/cpp/src/Ice/generated/ObjectAdapterF.cpp +2 -2
  110. data/dist/ice/cpp/src/Ice/generated/ObjectFactory.cpp +2 -2
  111. data/dist/ice/cpp/src/Ice/generated/Plugin.cpp +2 -2
  112. data/dist/ice/cpp/src/Ice/generated/PluginF.cpp +2 -2
  113. data/dist/ice/cpp/src/Ice/generated/Process.cpp +2 -2
  114. data/dist/ice/cpp/src/Ice/generated/ProcessF.cpp +2 -2
  115. data/dist/ice/cpp/src/Ice/generated/Properties.cpp +2 -2
  116. data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +2 -2
  117. data/dist/ice/cpp/src/Ice/generated/PropertiesF.cpp +2 -2
  118. data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +2 -2
  119. data/dist/ice/cpp/src/Ice/generated/Router.cpp +2 -2
  120. data/dist/ice/cpp/src/Ice/generated/RouterF.cpp +2 -2
  121. data/dist/ice/cpp/src/Ice/generated/ServantLocator.cpp +2 -2
  122. data/dist/ice/cpp/src/Ice/generated/ServantLocatorF.cpp +2 -2
  123. data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +2 -2
  124. data/dist/ice/cpp/src/Ice/generated/ValueFactory.cpp +2 -2
  125. data/dist/ice/cpp/src/Ice/generated/Version.cpp +2 -2
  126. data/dist/ice/cpp/src/IceDiscovery/generated/IceDiscovery/IceDiscovery.h +2 -2
  127. data/dist/ice/cpp/src/IceDiscovery/generated/IceDiscovery.cpp +2 -2
  128. data/dist/ice/cpp/src/IceLocatorDiscovery/generated/IceLocatorDiscovery/IceLocatorDiscovery.h +2 -2
  129. data/dist/ice/cpp/src/IceLocatorDiscovery/generated/IceLocatorDiscovery.cpp +2 -2
  130. data/dist/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +17 -9
  131. data/dist/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +1 -0
  132. data/dist/ice/cpp/src/IceSSL/OpenSSLUtil.cpp +2 -0
  133. data/dist/ice/cpp/src/IceSSL/RFC2253.cpp +1 -1
  134. data/dist/ice/cpp/src/IceSSL/SChannelEngine.cpp +12 -2
  135. data/dist/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +2 -1
  136. data/dist/ice/cpp/src/IceSSL/SSLEngine.cpp +16 -1
  137. data/dist/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +107 -2
  138. data/dist/ice/cpp/src/IceSSL/SecureTransportEngine.h +7 -0
  139. data/dist/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +2 -0
  140. data/dist/ice/cpp/src/IceSSL/SecureTransportUtil.cpp +1 -1
  141. data/dist/ice/cpp/src/IceSSL/TrustManager.cpp +12 -1
  142. data/dist/ice/cpp/src/IceSSL/generated/ConnectionInfo.cpp +2 -2
  143. data/dist/ice/cpp/src/IceSSL/generated/ConnectionInfoF.cpp +2 -2
  144. data/dist/ice/cpp/src/IceSSL/generated/EndpointInfo.cpp +2 -2
  145. data/dist/ice/cpp/src/IceUtil/ConvertUTF.cpp +4 -0
  146. data/dist/ice/cpp/src/IceUtil/FileUtil.cpp +1 -1
  147. data/dist/ice/cpp/src/IceUtil/Time.cpp +4 -4
  148. data/dist/ice/cpp/src/Slice/JavaUtil.cpp +4 -4
  149. data/dist/lib/Glacier2/Metrics.rb +1 -1
  150. data/dist/lib/Glacier2/PermissionsVerifier.rb +1 -1
  151. data/dist/lib/Glacier2/PermissionsVerifierF.rb +1 -1
  152. data/dist/lib/Glacier2/Router.rb +1 -1
  153. data/dist/lib/Glacier2/RouterF.rb +1 -1
  154. data/dist/lib/Glacier2/SSLInfo.rb +1 -1
  155. data/dist/lib/Glacier2/Session.rb +1 -1
  156. data/dist/lib/Ice/BuiltinSequences.rb +1 -1
  157. data/dist/lib/Ice/Communicator.rb +1 -1
  158. data/dist/lib/Ice/CommunicatorF.rb +1 -1
  159. data/dist/lib/Ice/Connection.rb +1 -1
  160. data/dist/lib/Ice/ConnectionF.rb +1 -1
  161. data/dist/lib/Ice/Current.rb +1 -1
  162. data/dist/lib/Ice/Endpoint.rb +1 -1
  163. data/dist/lib/Ice/EndpointF.rb +1 -1
  164. data/dist/lib/Ice/EndpointTypes.rb +1 -1
  165. data/dist/lib/Ice/FacetMap.rb +1 -1
  166. data/dist/lib/Ice/Identity.rb +1 -1
  167. data/dist/lib/Ice/ImplicitContext.rb +1 -1
  168. data/dist/lib/Ice/ImplicitContextF.rb +1 -1
  169. data/dist/lib/Ice/Instrumentation.rb +1 -1
  170. data/dist/lib/Ice/InstrumentationF.rb +1 -1
  171. data/dist/lib/Ice/LocalException.rb +1 -1
  172. data/dist/lib/Ice/Locator.rb +1 -1
  173. data/dist/lib/Ice/LocatorF.rb +1 -1
  174. data/dist/lib/Ice/Logger.rb +1 -1
  175. data/dist/lib/Ice/LoggerF.rb +1 -1
  176. data/dist/lib/Ice/Metrics.rb +1 -1
  177. data/dist/lib/Ice/ObjectAdapter.rb +1 -1
  178. data/dist/lib/Ice/ObjectAdapterF.rb +1 -1
  179. data/dist/lib/Ice/ObjectFactory.rb +1 -1
  180. data/dist/lib/Ice/Plugin.rb +1 -1
  181. data/dist/lib/Ice/PluginF.rb +1 -1
  182. data/dist/lib/Ice/Process.rb +1 -1
  183. data/dist/lib/Ice/ProcessF.rb +1 -1
  184. data/dist/lib/Ice/Properties.rb +1 -1
  185. data/dist/lib/Ice/PropertiesAdmin.rb +1 -1
  186. data/dist/lib/Ice/PropertiesF.rb +1 -1
  187. data/dist/lib/Ice/RemoteLogger.rb +1 -1
  188. data/dist/lib/Ice/Router.rb +1 -1
  189. data/dist/lib/Ice/RouterF.rb +1 -1
  190. data/dist/lib/Ice/ServantLocator.rb +1 -1
  191. data/dist/lib/Ice/ServantLocatorF.rb +1 -1
  192. data/dist/lib/Ice/SliceChecksumDict.rb +1 -1
  193. data/dist/lib/Ice/ValueFactory.rb +1 -1
  194. data/dist/lib/Ice/Version.rb +1 -1
  195. data/dist/lib/IceBox/IceBox.rb +1 -1
  196. data/dist/lib/IceGrid/Admin.rb +1 -1
  197. data/dist/lib/IceGrid/Descriptor.rb +1 -1
  198. data/dist/lib/IceGrid/Exception.rb +1 -1
  199. data/dist/lib/IceGrid/FileParser.rb +1 -1
  200. data/dist/lib/IceGrid/PluginFacade.rb +1 -1
  201. data/dist/lib/IceGrid/Registry.rb +1 -1
  202. data/dist/lib/IceGrid/Session.rb +1 -1
  203. data/dist/lib/IceGrid/UserAccountMapper.rb +1 -1
  204. data/dist/lib/IcePatch2/FileInfo.rb +1 -1
  205. data/dist/lib/IcePatch2/FileServer.rb +1 -1
  206. data/dist/lib/IceStorm/IceStorm.rb +1 -1
  207. data/dist/lib/IceStorm/Metrics.rb +1 -1
  208. data/ice.gemspec +1 -1
  209. metadata +1 -1
@@ -23,8 +23,16 @@
23
23
  #include <IceSSL/SSLEngine.h>
24
24
  #include <IceSSL/Util.h>
25
25
 
26
+ #include <Ice/UUID.h>
27
+
26
28
  #include <regex.h>
27
29
 
30
+ #include <cerrno>
31
+ #include <climits>
32
+ #include <cstring>
33
+ #include <unistd.h>
34
+ #include <vector>
35
+
28
36
  // Disable deprecation warnings from SecureTransport APIs
29
37
  #include <IceUtil/DisableWarnings.h>
30
38
 
@@ -816,6 +824,50 @@ IceSSL::SecureTransport::upCast(IceSSL::SecureTransport::SSLEngine* p)
816
824
  return p;
817
825
  }
818
826
 
827
+ namespace
828
+ {
829
+
830
+ #if defined(ICE_USE_SECURE_TRANSPORT_MACOS)
831
+ //
832
+ // Create a private temporary directory to hold a short-lived keychain, and return its path. Uses
833
+ // confstr(_CS_DARWIN_USER_TEMP_DIR) rather than $TMPDIR so the location can't be redirected through
834
+ // the process environment.
835
+ //
836
+ string
837
+ createTemporaryKeychainDirectory()
838
+ {
839
+ char base[PATH_MAX];
840
+ size_t len = confstr(_CS_DARWIN_USER_TEMP_DIR, base, sizeof(base));
841
+ if(len == 0 || len > sizeof(base))
842
+ {
843
+ int error = errno;
844
+ ostringstream os;
845
+ os << "IceSSL: confstr(_CS_DARWIN_USER_TEMP_DIR) failed";
846
+ if(error != 0)
847
+ {
848
+ os << ": " << strerror(error);
849
+ }
850
+ throw PluginInitializationException(__FILE__, __LINE__, os.str());
851
+ }
852
+
853
+ string tmpl = string(base) + "ice-keychain-XXXXXX";
854
+ vector<char> buffer(tmpl.begin(), tmpl.end());
855
+ buffer.push_back('\0');
856
+
857
+ const char* dir = mkdtemp(&buffer[0]);
858
+ if(dir == 0)
859
+ {
860
+ int error = errno;
861
+ ostringstream os;
862
+ os << "IceSSL: mkdtemp failed: " << strerror(error);
863
+ throw PluginInitializationException(__FILE__, __LINE__, os.str());
864
+ }
865
+ return dir;
866
+ }
867
+ #endif
868
+
869
+ }
870
+
819
871
  IceSSL::SecureTransport::SSLEngine::SSLEngine(const Ice::CommunicatorPtr& communicator) :
820
872
  IceSSL::SSLEngine(communicator),
821
873
  _certificateAuthorities(0),
@@ -825,6 +877,28 @@ IceSSL::SecureTransport::SSLEngine::SSLEngine(const Ice::CommunicatorPtr& commun
825
877
  {
826
878
  }
827
879
 
880
+ IceSSL::SecureTransport::SSLEngine::~SSLEngine()
881
+ {
882
+ #if defined(ICE_USE_SECURE_TRANSPORT_MACOS)
883
+ if(!_temporaryKeychainDir.empty())
884
+ {
885
+ //
886
+ // Remove the temporary keychain and its enclosing directory created by initialize(). The
887
+ // cleanup lives in the destructor (not destroy()) so it also runs when initialize() throws
888
+ // after the directory has been created.
889
+ //
890
+ _chain.reset(0);
891
+ const string keychainPath = _temporaryKeychainDir + "/ice.keychain";
892
+ UniqueRef<SecKeychainRef> keychain;
893
+ if(SecKeychainOpen(keychainPath.c_str(), &keychain.get()) == noErr && keychain.get())
894
+ {
895
+ SecKeychainDelete(keychain.get());
896
+ }
897
+ rmdir(_temporaryKeychainDir.c_str());
898
+ }
899
+ #endif
900
+ }
901
+
828
902
  //
829
903
  // Setup the engine.
830
904
  //
@@ -890,6 +964,19 @@ IceSSL::SecureTransport::SSLEngine::initialize()
890
964
 
891
965
  if(!certFile.empty())
892
966
  {
967
+ #if defined(ICE_USE_SECURE_TRANSPORT_MACOS)
968
+ if(keychain.empty())
969
+ {
970
+ //
971
+ // Import the certificate into a temporary keychain rather than the user's login keychain.
972
+ // A private key in the login keychain cannot complete a forward-secret (ECDHE) handshake on
973
+ // the server side. The keychain and its enclosing directory are removed by the destructor.
974
+ //
975
+ _temporaryKeychainDir = createTemporaryKeychainDirectory();
976
+ keychain = _temporaryKeychainDir + "/ice.keychain";
977
+ keychainPassword = Ice::generateUUID();
978
+ }
979
+ #endif
893
980
  vector<string> files;
894
981
  if(!IceUtilInternal::splitString(certFile, IceUtilInternal::pathsep, files) || files.size() > 2)
895
982
  {
@@ -1021,9 +1108,10 @@ IceSSL::SecureTransport::SSLEngine::initialize()
1021
1108
  }
1022
1109
 
1023
1110
  //
1024
- // The default min protocol version is set to TLS1.0 to avoid security issues with SSLv3
1111
+ // The default min protocol version is TLS 1.2. SecureTransport otherwise negotiates down to TLS
1112
+ // 1.0 on macOS. An explicit IceSSL.ProtocolVersionMin setting still takes precedence.
1025
1113
  //
1026
- const string protocolVersionMin = properties->getPropertyWithDefault("IceSSL.ProtocolVersionMin", "tls1_0");
1114
+ const string protocolVersionMin = properties->getPropertyWithDefault("IceSSL.ProtocolVersionMin", "tls1_2");
1027
1115
  if(!protocolVersionMin.empty())
1028
1116
  {
1029
1117
  _protocolVersionMin = parseProtocol(protocolVersionMin);
@@ -1110,6 +1198,23 @@ IceSSL::SecureTransport::SSLEngine::newContext(bool incoming)
1110
1198
  throw SecurityException(__FILE__, __LINE__, "IceSSL: error while setting ciphers:\n" + sslErrorToString(err));
1111
1199
  }
1112
1200
  }
1201
+ else
1202
+ {
1203
+ //
1204
+ // When no ciphers are explicitly configured, enable only forward-secret cipher suites
1205
+ // (ECDHE key exchange with AES-GCM). SecureTransport's own default set otherwise includes
1206
+ // static-RSA suites (no forward secrecy) and 3DES (SWEET32).
1207
+ //
1208
+ const SSLCipherSuite ciphers[] = {
1209
+ TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
1210
+ TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
1211
+ TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
1212
+ TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384};
1213
+ if((err = SSLSetEnabledCiphers(ssl, ciphers, sizeof(ciphers) / sizeof(SSLCipherSuite))))
1214
+ {
1215
+ throw SecurityException(__FILE__, __LINE__, "IceSSL: error while setting ciphers:\n" + sslErrorToString(err));
1216
+ }
1217
+ }
1113
1218
 
1114
1219
  if((err = SSLSetSessionOption(ssl, incoming ? kSSLSessionOptionBreakOnClientAuth :
1115
1220
  kSSLSessionOptionBreakOnServerAuth,
@@ -24,6 +24,7 @@ class SSLEngine : public IceSSL::SSLEngine
24
24
  public:
25
25
 
26
26
  SSLEngine(const Ice::CommunicatorPtr&);
27
+ virtual ~SSLEngine();
27
28
 
28
29
  virtual void initialize();
29
30
  virtual void destroy();
@@ -41,6 +42,12 @@ private:
41
42
  IceInternal::UniqueRef<CFArrayRef> _certificateAuthorities;
42
43
  IceInternal::UniqueRef<CFArrayRef> _chain;
43
44
 
45
+ #if defined(ICE_USE_SECURE_TRANSPORT_MACOS)
46
+ // Path of the temporary directory holding the imported certificate's keychain, removed by the
47
+ // destructor. Empty when IceSSL.Keychain is set or no certificate is configured.
48
+ std::string _temporaryKeychainDir;
49
+ #endif
50
+
44
51
  SSLProtocol _protocolVersionMax;
45
52
  SSLProtocol _protocolVersionMin;
46
53
 
@@ -643,6 +643,8 @@ IceSSL::SecureTransport::TransceiverI::TransceiverI(const IceSSL::InstancePtr& i
643
643
  _incoming(incoming),
644
644
  _delegate(delegate),
645
645
  _connected(false),
646
+ _tflags(0),
647
+ _trustError(IceSSL::ICE_ENUM(TrustError, NoError)),
646
648
  _verified(false),
647
649
  _buffered(0)
648
650
  {
@@ -365,7 +365,7 @@ loadPrivateKey(const string& file, SecCertificateRef cert, SecKeychainRef keycha
365
365
  for(CFIndex i = 0; i < count; ++i)
366
366
  {
367
367
  SecKeychainItemRef itemRef =
368
- static_cast<SecKeychainItemRef>(const_cast<void*>(CFArrayGetValueAtIndex(items.get(), 0)));
368
+ static_cast<SecKeychainItemRef>(const_cast<void*>(CFArrayGetValueAtIndex(items.get(), i)));
369
369
  if(SecKeyGetTypeID() == CFGetTypeID(itemRef))
370
370
  {
371
371
  key.retain(reinterpret_cast<SecKeyRef>(itemRef));
@@ -128,7 +128,18 @@ TrustManager::verify(const ConnectionInfoPtr& info, const std::string& desc)
128
128
  //
129
129
  if(info->certs.size() != 0)
130
130
  {
131
- DistinguishedName subject = info->certs[0]->getSubjectDN();
131
+ DistinguishedName subject = DistinguishedName(list<pair<string, string> >());
132
+ try
133
+ {
134
+ subject = info->certs[0]->getSubjectDN();
135
+ }
136
+ catch(const ParseException& ex)
137
+ {
138
+ Ice::Warning warn(_communicator->getLogger());
139
+ warn << "IceSSL: unable to parse certificate DN:\n" << ex.reason;
140
+ return false;
141
+ }
142
+
132
143
  if(_traceLevel > 0)
133
144
  {
134
145
  Ice::Trace trace(_communicator->getLogger(), "Security");
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) ZeroC, Inc. All rights reserved.
3
3
  //
4
4
  //
5
- // Ice version 3.7.11
5
+ // Ice version 3.7.12
6
6
  //
7
7
  // <auto-generated>
8
8
  //
@@ -37,7 +37,7 @@
37
37
  # if ICE_INT_VERSION % 100 >= 50
38
38
  # error Beta header file detected
39
39
  # endif
40
- # if ICE_INT_VERSION % 100 < 11
40
+ # if ICE_INT_VERSION % 100 < 12
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.11
5
+ // Ice version 3.7.12
6
6
  //
7
7
  // <auto-generated>
8
8
  //
@@ -35,7 +35,7 @@
35
35
  # if ICE_INT_VERSION % 100 >= 50
36
36
  # error Beta header file detected
37
37
  # endif
38
- # if ICE_INT_VERSION % 100 < 11
38
+ # if ICE_INT_VERSION % 100 < 12
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.11
5
+ // Ice version 3.7.12
6
6
  //
7
7
  // <auto-generated>
8
8
  //
@@ -37,7 +37,7 @@
37
37
  # if ICE_INT_VERSION % 100 >= 50
38
38
  # error Beta header file detected
39
39
  # endif
40
- # if ICE_INT_VERSION % 100 < 11
40
+ # if ICE_INT_VERSION % 100 < 12
41
41
  # error Ice patch level mismatch!
42
42
  # endif
43
43
  #endif
@@ -61,6 +61,10 @@ using namespace IceUtil;
61
61
  #ifdef __GNUC__
62
62
  //# pragma GCC diagnostic push
63
63
  # pragma GCC diagnostic ignored "-Wold-style-cast"
64
+ // Several switch statements in this file fall through on purpose, and C++98 has no fallthrough attribute.
65
+ # if !defined(__clang__) && __GNUC__ >= 7
66
+ # pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
67
+ # endif
64
68
  #endif
65
69
 
66
70
  namespace IceUtilInternal
@@ -417,7 +417,7 @@ IceUtilInternal::FileLock::FileLock(const std::string& path) :
417
417
  _fd(-1),
418
418
  _path(path)
419
419
  {
420
- _fd = ::open(path.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
420
+ _fd = ::open(path.c_str(), O_RDWR | O_CREAT | O_NOFOLLOW, S_IRUSR | S_IWUSR);
421
421
  if(_fd < 0)
422
422
  {
423
423
  throw IceUtil::FileLockException(__FILE__, __LINE__, errno, _path);
@@ -144,7 +144,7 @@ IceUtil::Time::now(Clock clock)
144
144
  }
145
145
  return Time(tv.tv_sec * ICE_INT64(1000000) + tv.tv_usec);
146
146
  #elif defined(__APPLE__)
147
- return Time(static_cast<IceUtil::Int64>(mach_absolute_time() * machMultiplier));
147
+ return Time(static_cast<IceUtil::Int64>(static_cast<double>(mach_absolute_time()) * machMultiplier));
148
148
  #else
149
149
  struct timespec ts;
150
150
  if(clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
@@ -224,13 +224,13 @@ IceUtil::Time::toMicroSeconds() const
224
224
  double
225
225
  IceUtil::Time::toSecondsDouble() const
226
226
  {
227
- return _usec / 1000000.0;
227
+ return static_cast<double>(_usec) / 1000000.0;
228
228
  }
229
229
 
230
230
  double
231
231
  IceUtil::Time::toMilliSecondsDouble() const
232
232
  {
233
- return _usec / 1000.0;
233
+ return static_cast<double>(_usec) / 1000.0;
234
234
  }
235
235
 
236
236
  double
@@ -303,5 +303,5 @@ Time::Time(Int64 usec) :
303
303
  std::ostream&
304
304
  IceUtil::operator<<(std::ostream& out, const Time& tm)
305
305
  {
306
- return out << tm.toMicroSeconds() / 1000000.0;
306
+ return out << static_cast<double>(tm.toMicroSeconds()) / 1000000.0;
307
307
  }
@@ -2460,11 +2460,11 @@ Slice::JavaCompatGenerator::writeDictionaryMarshalUnmarshalCode(Output& out,
2460
2460
  {
2461
2461
  out << nl << "if(" << v << " == null)";
2462
2462
  out << sb;
2463
- out << nl << "ostr.writeSize(0);";
2463
+ out << nl << stream << ".writeSize(0);";
2464
2464
  out << eb;
2465
2465
  out << nl << "else";
2466
2466
  out << sb;
2467
- out << nl << "ostr.writeSize(" << v << ".size());";
2467
+ out << nl << stream << ".writeSize(" << v << ".size());";
2468
2468
  string keyObjectS = typeToObjectString(key, TypeModeIn, package);
2469
2469
  string valueObjectS = typeToObjectString(value, TypeModeIn, package);
2470
2470
  out << nl << "for(java.util.Map.Entry<" << keyObjectS << ", " << valueObjectS << "> e : " << v
@@ -4454,11 +4454,11 @@ Slice::JavaGenerator::writeDictionaryMarshalUnmarshalCode(Output& out,
4454
4454
  {
4455
4455
  out << nl << "if(" << v << " == null)";
4456
4456
  out << sb;
4457
- out << nl << "ostr.writeSize(0);";
4457
+ out << nl << stream << ".writeSize(0);";
4458
4458
  out << eb;
4459
4459
  out << nl << "else";
4460
4460
  out << sb;
4461
- out << nl << "ostr.writeSize(" << v << ".size());";
4461
+ out << nl << stream << ".writeSize(" << v << ".size());";
4462
4462
  string keyObjectS = typeToObjectString(key, TypeModeIn, package);
4463
4463
  string valueObjectS = typeToObjectString(value, TypeModeIn, package);
4464
4464
  out << nl;
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #
@@ -3,7 +3,7 @@
3
3
  # Copyright (c) ZeroC, Inc. All rights reserved.
4
4
  #
5
5
  #
6
- # Ice version 3.7.11
6
+ # Ice version 3.7.12
7
7
  #
8
8
  # <auto-generated>
9
9
  #