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
f4801d3c
Commit
f4801d3c
authored
1 year ago
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_certificate_authority: Implement revoke on caucase
parent
d7d9761f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
bt5/erp5_certificate_authority/DocumentTemplateItem/portal_components/document.erp5.CaucaseConnector.py
...eItem/portal_components/document.erp5.CaucaseConnector.py
+4
-1
bt5/erp5_certificate_authority/MixinTemplateItem/portal_components/mixin.erp5.CertificateLoginMixin.py
...tem/portal_components/mixin.erp5.CertificateLoginMixin.py
+4
-3
No files found.
bt5/erp5_certificate_authority/DocumentTemplateItem/portal_components/document.erp5.CaucaseConnector.py
View file @
f4801d3c
...
...
@@ -134,6 +134,9 @@ class CaucaseConnector(XMLObject):
def
getCertificate
(
self
,
csr_id
):
return
self
.
_getAuthenticatedConnection
().
getCertificate
(
csr_id
)
def
revokeCertificate
(
self
,
crt_pem
,
key_pem
=
None
):
if
key_pem
is
None
:
return
self
.
_getAuthenticatedConnection
().
revokeCertificate
(
crt_pem
)
return
self
.
_getConnection
().
revokeCertificate
(
crt_pem
,
key_pem
)
InitializeClass
(
CaucaseConnector
)
This diff is collapsed.
Click to expand it.
bt5/erp5_certificate_authority/MixinTemplateItem/portal_components/mixin.erp5.CertificateLoginMixin.py
View file @
f4801d3c
...
...
@@ -118,12 +118,13 @@ class CertificateLoginMixin:
raise
ValueError
(
"You cannot revoke certificates from prior implementation!"
)
if
self
.
getSourceReference
()
is
not
None
:
raise
NotImplementedError
()
caucase_connector
=
self
.
_getCaucaseConnector
()
crt_pem
=
caucase_connector
.
getCertificate
(
self
.
getSourceReference
())
caucase_connector
.
revokeCertificate
(
crt_pem
)
else
:
raise
ValueError
(
"No certificate found to revoke!"
)
security
.
declareP
ublic
(
'revokeCertificate'
)
security
.
declareP
rivate
(
'revokeCertificate'
)
def
revokeCertificate
(
self
):
"""Revokes existing certificate"""
self
.
_revokeCertificate
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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