Commit 12ef743a authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_certificate_authority: Write the auth certificate properly

  Ensure it has a new between the 2
parent 15a3c8f6
...@@ -74,14 +74,12 @@ class CaucaseConnector(XMLObject): ...@@ -74,14 +74,12 @@ class CaucaseConnector(XMLObject):
if self.getUserCertificate() is None: if self.getUserCertificate() is None:
raise ValueError("You need to set the User Key and Certificate!") raise ValueError("You need to set the User Key and Certificate!")
return self._getConnection(user_key="/srv/slapgrid/slappart19/tmp/couscous") with tempfile.NamedTemporaryFile(prefix='caucase_user_', bufsize=0) as user_key_file:
with tempfile.NamedTemporaryFile(prefix='caucase_user_') as user_key_file: user_key_file.write(self.getUserKey())
user_key_file.write( user_key_file.write("\n")
self.getUserKey() + self.getUserCertificate() user_key_file.write(self.getUserCertificate())
)
# XXX Ensure the file is fully writen
user_key_file.flush() user_key_file.flush()
user_key_file.seek(0)
return self._getConnection(user_key=user_key_file.name) return self._getConnection(user_key=user_key_file.name)
def _bootstrapCaucaseConfiguration(self): def _bootstrapCaucaseConfiguration(self):
......
...@@ -45,9 +45,7 @@ ...@@ -45,9 +45,7 @@
<item> <item>
<key> <string>text_content_warning_message</string> </key> <key> <string>text_content_warning_message</string> </key>
<value> <value>
<tuple> <tuple/>
<string>W: 78, 9: Unreachable code (unreachable)</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment