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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
erp5
Commits
b16222ba
Commit
b16222ba
authored
Dec 10, 2019
by
Boxiang Sun
Committed by
Rafael Monnerat
Jan 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable the certification duplication changes in CertificateAuthorityTool
/reviewed-on
nexedi/erp5!1012
parent
10d530d5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
product/ERP5/Tool/CertificateAuthorityTool.py
product/ERP5/Tool/CertificateAuthorityTool.py
+8
-0
No files found.
product/ERP5/Tool/CertificateAuthorityTool.py
View file @
b16222ba
...
...
@@ -188,6 +188,14 @@ class CertificateAuthorityTool(BaseTool):
raise
ValueError
(
"Invalid common name: %r"
%
common_name
)
self
.
_checkCertificateAuthority
()
self
.
_lockCertificateAuthority
()
index
=
open
(
self
.
index
).
read
().
splitlines
()
valid_line_list
=
[
q
for
q
in
index
if
q
.
startswith
(
'V'
)
and
(
'CN=%s/'
%
common_name
in
q
)]
if
len
(
valid_line_list
)
>=
1
:
self
.
_unlockCertificateAuthority
()
raise
ValueError
(
'The common name %r already has a certificate'
'please revoke it before request a new one..'
%
common_name
)
try
:
new_id
=
open
(
self
.
serial
,
'r'
).
read
().
strip
().
lower
()
key
=
os
.
path
.
join
(
self
.
certificate_authority_path
,
'private'
,
...
...
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