From 02b5961732207cff2fe87a05741743cc722da200 Mon Sep 17 00:00:00 2001 From: Viktor UZLOV Date: Tue, 9 Nov 2021 19:31:52 +0300 Subject: [PATCH] Add SSL mode --- resources/CMakeLists.txt | 1 + src/EFICAS/EFICAS.py | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt index 0983e125..d15f955e 100644 --- a/resources/CMakeLists.txt +++ b/resources/CMakeLists.txt @@ -37,4 +37,5 @@ SET(EFICAS_RESOURCES_FILES INSTALL(FILES ${EFICAS_RESOURCES_FILES} DESTINATION ${SALOME_EFICAS_INSTALL_RES_DATA}) SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/SalomeApp.xml.in ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml INSTALL ${SALOME_EFICAS_INSTALL_RES_DATA}) +SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/SalomeApp.xml.in ${CMAKE_CURRENT_BINARY_DIR}/SalomeAppSL.xml INSTALL ${SALOME_EFICAS_INSTALL_RES_DATA}) SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/EFICASCatalog.xml.in ${CMAKE_CURRENT_BINARY_DIR}/EFICASCatalog.xml INSTALL ${SALOME_EFICAS_INSTALL_RES_DATA}) diff --git a/src/EFICAS/EFICAS.py b/src/EFICAS/EFICAS.py index 967973f6..dfbb3b89 100644 --- a/src/EFICAS/EFICAS.py +++ b/src/EFICAS/EFICAS.py @@ -21,6 +21,7 @@ import EFICAS_ORB__POA import SALOMEDS__POA import SALOME_ComponentPy +import SALOME_Embedded_NamingService_ClientPy class SALOME_DriverPy_i(SALOMEDS__POA.Driver): """ @@ -85,4 +86,11 @@ class EFICAS(EFICAS_ORB__POA.EFICAS_Gen, SALOME_DriverPy_i.__init__( self, 'OTHER' ) # On stocke dans l'attribut _naming_service, une reference sur # le Naming Service CORBA - self._naming_service=SALOME_ComponentPy.SALOME_NamingServicePy_i(self._orb) + # + emb_ns = self._contId.get_embedded_NS_if_ssl() + import CORBA + if CORBA.is_nil(emb_ns): + self._naming_service = SALOME_ComponentPy.SALOME_NamingServicePy_i( self._orb ) + else: + self._naming_service = SALOME_Embedded_NamingService_ClientPy.SALOME_Embedded_NamingService_ClientPy(emb_ns) + # -- 2.39.2