Skip to content

Commit

Permalink
Rimosso check not allowed per email_address , migliorata leggibilità …
Browse files Browse the repository at this point in the history
…output in caso di errore del check
  • Loading branch information
nunzionapoli committed May 31, 2022
1 parent 9ea66d6 commit 816f0f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spid_compliant_certificates/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
_min = 5

# micro version
_mic = 1
_mic = 2

# release level (alpha, beta, rc, final)
_rel = 'final'
Expand Down
4 changes: 2 additions & 2 deletions spid_compliant_certificates/validator/checks/subject_dn.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
NOT_ALLOWED_ATTRS = [
OID_INITIALS,
OID_NAME,
x509.OID_EMAIL_ADDRESS,
# x509.OID_EMAIL_ADDRESS, # è ammesso(deve solo essere impersonale)
x509.OID_GIVEN_NAME,
x509.OID_PSEUDONYM,
x509.OID_SURNAME,
Expand All @@ -59,7 +59,7 @@ def subject_dn(subj: x509.Name, sector: str) -> List[Tuple[bool, str, Any]]:

# check if not allowed attrs are present
for attr in NOT_ALLOWED_ATTRS:
msg = f'SubjectDN must not contain name attribute [{attr._name}, {attr.dotted_string}]' # noqa
msg = f'SubjectDN must not contain {attr._name} attribute [{attr.dotted_string}]' # noqa
val = attr not in subj_attrs
res = SUCCESS if val else FAILURE
checks.append((res, msg, val))
Expand Down

0 comments on commit 816f0f7

Please sign in to comment.