Commit c3c3017c 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 5a6eba84
......@@ -74,14 +74,12 @@ class CaucaseConnector(XMLObject):
if self.getUserCertificate() is None:
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_') as user_key_file:
user_key_file.write(
self.getUserKey() + self.getUserCertificate()
)
# XXX Ensure the file is fully writen
with tempfile.NamedTemporaryFile(prefix='caucase_user_', bufsize=0) as user_key_file:
user_key_file.write(self.getUserKey())
user_key_file.write("\n")
user_key_file.write(self.getUserCertificate())
user_key_file.flush()
user_key_file.seek(0)
return self._getConnection(user_key=user_key_file.name)
def _bootstrapCaucaseConfiguration(self):
......
......@@ -45,9 +45,7 @@
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 78, 9: Unreachable code (unreachable)</string>
</tuple>
<tuple/>
</value>
</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