Skip to content

Commit

Permalink
Fix policy identifier reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthiasValvekens committed Nov 18, 2023
1 parent 8874d25 commit 71e76f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pyhanko/sign/validation/ades.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,6 @@ async def _build_and_past_validate_cert(
cert: x509.Certificate,
validation_policy_spec: CertValidationPolicySpec,
validation_data_handlers: ValidationDataHandlers,
init_control_time: Optional[datetime] = None,
) -> Tuple[ValidationPath, datetime]:
path_builder = PathBuilder(
trust_manager=validation_policy_spec.trust_manager,
Expand All @@ -1153,7 +1152,7 @@ async def _build_and_past_validate_cert(
path=cand_path,
validation_policy_spec=validation_policy_spec,
validation_data_handlers=validation_data_handlers,
init_control_time=init_control_time,
init_control_time=None,
)
)
current_subindication = past_result.error_subindic
Expand Down
2 changes: 1 addition & 1 deletion pyhanko/sign/validation/report/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def _summarise_attrs(
# sig_policy_identifier (SASigPolicyIdentifierType)
try:
sig_policy_ident: cades_asn1.SignaturePolicyIdentifier = (
find_cms_attribute(signed_attrs, 'signature_policy_identifier')
find_cms_attribute(signed_attrs, 'signature_policy_identifier')[0]
)
actual_policy_ident = sig_policy_ident.chosen
# we don't support implicit policies (or at least not now)
Expand Down

0 comments on commit 71e76f2

Please sign in to comment.