Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
abce2ded
Commit
abce2ded
authored
Oct 03, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_certificate_authority: Write the auth certificate properly
Ensure it has a new between the 2
parent
7ac13c10
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
bt5/erp5_certificate_authority/DocumentTemplateItem/portal_components/document.erp5.CaucaseConnector.py
...eItem/portal_components/document.erp5.CaucaseConnector.py
+5
-7
bt5/erp5_certificate_authority/DocumentTemplateItem/portal_components/document.erp5.CaucaseConnector.xml
...Item/portal_components/document.erp5.CaucaseConnector.xml
+1
-3
No files found.
bt5/erp5_certificate_authority/DocumentTemplateItem/portal_components/document.erp5.CaucaseConnector.py
View file @
abce2ded
...
@@ -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
):
...
...
bt5/erp5_certificate_authority/DocumentTemplateItem/portal_components/document.erp5.CaucaseConnector.xml
View file @
abce2ded
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment