o
    vh/                     @   s  d dl Z d dlZd dlmZ d dlmZ d dlmZmZmZm	Z	m
Z
mZmZmZmZmZmZmZmZ d dlmZmZmZmZmZ d dlmZ d dlmZ d dlmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z' d d	l(m)Z)m*Z*m+Z+ d d
l,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4 d dl5m6Z6 d dl7m8Z8 d dl9m:Z: d dl;m<Z<m=Z= ddl>m?Z? ddl@mAZA ddlBmCZCmDZD ddlEmFZF ddlGmHZH ddlImJZJmKZKmLZLmMZMmNZNmOZOmPZP ddlQmRZRmSZSmTZTmUZU g dZVeWeXZYedeNdZZdej[deej\ej]df fddZ^d e_fd!d"Z`d#ejadej[fd$d%Zbd&ej[d'ejcd(eejd d)eeje fd*d+Zf		dnd,ejgd#ejad-ehd.eid/eeS d0ee dee_e_f fd1d2Zjd3ejkde"fd4d5Zl						dod3ejkd6eei d7ee* d8eem d9ee8 d:ee: d;eeS d<eHde	ehef fd=d>Zn	dpd#ejad7e*d<eHd?e)e8 d:ee: dd@fdAdBZoedddddCd3ejkdDeeZ d6eei d7ee* d8eem d<eeH deZfdEdFZpedddddCd3ejkd6eei d7ee* d8eem d<eeH deNfdGdFZpeNdddddfd3ejkd6eei d7ee* d8eem d<eeH d;eeS deZfdHdFZpd,ejgdee fdIdJZq	Kdqd,ejgdLe_deejk fdMdNZrd,ejgdeei fdOdPZsd,ejgdQee* d6eifdRdSZt	dpdTejkd7ee* dUeid;eeS fdVdWZudXeejv dYejad7e*deee< eee1e0e/f  f fdZd[Zwd\eejv dYejad7ee* d]ej[fd^d_Zxddddde?jydfd`eeieejzej{f d3ejkdaee* dQee* dbee* d<eeH d;eeS deOfdcddZ|ededfdgZ}edfdhG didj dje
e} Z~dkee} de~e} fdldmZdS )r    N)	dataclass)datetime)IOAny	AwaitableDictGenericIterableListOptionalTupleTypeTypeVarUnionoverload)algoscmscoretspx509)InvalidSignature)hashes)
CMSExtractionErrorCMSStructuralErrorMultivaluedAttributeErrorNonexistentAttributeErrorSignedDataCertscheck_ess_certidextract_certificate_infoextract_signer_infofind_unique_cms_attributeget_pyca_cryptography_hash)CancelableAsyncIteratorValidationContextfind_valid_path)DisallowedAlgorithmErrorExpiredErrorInvalidCertificateErrorPathBuildingErrorPathValidationErrorRevokedErrorStaleRevinfoErrorValidationError)TimeSlideFailure)ValidationPath)PKIXValidationParams)ACValidationResultasync_validate_ac   )misc)lift_iterable_async   )AdESFailureAdESIndeterminate   )errors)KeyUsageConstraints)CAdESSignerAttributeAssertionsCertifiedAttributesClaimedAttributesRevocationDetailsSignatureStatusStandardCMSSignatureStatusTimestampSignatureStatus)DEFAULT_ALGORITHM_USAGE_POLICYCMSAlgorithmUsagePolicyextract_message_digestvalidate_raw)validate_sig_integrityasync_validate_cms_signaturecollect_timing_infovalidate_tst_signed_dataasync_validate_detached_cmscms_basic_validationcompute_signature_tst_digestextract_tst_dataextract_self_reported_tsextract_certs_for_validationcollect_signer_attr_statusvalidate_algorithm_protectionget_signing_cert_attr
StatusType)boundsigned_attrsreturnc                 C   s$   t | dd}|du rt | dd}|S )a   
    Retrieve the ``signingCertificate`` or ``signingCertificateV2`` attribute
    (giving preference to the latter) from a signature's signed attributes.

    :param signed_attrs:
        Signed attributes.
    :return:
        The value of the attribute, if present, else ``None``.
    T)v2NF)_grab_signing_cert_attr)rU   attr rZ   a/var/www/html/hyperkenya/venv/lib/python3.10/site-packages/pyhanko/sign/validation/generic_cms.pyrR   c   s   rR   rW   c              
   C   sx   |rdnd}|rt jnt j}zt| |}|| W S  ty%   Y d S  ty; } ztj	}t
jd|d|d }~ww )Nsigning_certificate_v2signing_certificatez3Wrong cardinality for signing certificate attributeades_subindication)r   SigningCertificateV2SigningCertificater    loaddumpr   r   r7   NO_SIGNING_CERTIFICATE_FOUNDr9   SignatureValidationError)rU   rW   	attr_nameclsvalueeerrrZ   rZ   r[   rX   u   s"   
rX   certc                 C   sN   t |}|d u r
d S |d d }t| |s%tj}tjd| jj d|dd S )Ncertsr   zWSigning certificate attribute does not match selected signer's certificate for subject"z".r^   )rR   r   r7   rd   r9   re   subjecthuman_friendly)rk   rU   rY   certidrj   rZ   rZ   r[   _check_signing_certificate   s   
rp   attrsclaimed_digest_algorithm_objclaimed_signature_algorithm_objclaimed_mac_algorithm_objc                 C   s   zt | d}W n ty   d}Y n ty   tdw |durh|d j}||jkr0td|durL|d j}|du rBtd||jkrLtd|durj|d	 j}|du r^td
||jkrltddS dS dS )a  
    Internal API to validate the CMS algorithm protection attribute
    defined in :rfc:`6211`, if present.

    :param attrs:
        A CMS attribute list.
    :param claimed_digest_algorithm_obj:
        The claimed (i.e. unprotected) digest algorithm value.
    :param claimed_signature_algorithm_obj:
        The claimed (i.e. unprotected) signature algorithm value.
    :param claimed_mac_algorithm_obj:
        The claimed (i.e. unprotected) MAC algorithm value.
    :raises errors.CMSStructuralError:
        if multiple CMS protection attributes are present
    :raises errors.CMSAlgorithmProtectionError:
        if a mismatch is detected
    cms_algorithm_protectionNz4Multiple CMS algorithm protection attributes presentdigest_algorithmzCDigest algorithm does not match CMS algorithm protection attribute.signature_algorithmz<CMS algorithm protection attribute not valid for signed datazFSignature mechanism does not match CMS algorithm protection attribute.mac_algorithmzCCMS algorithm protection attribute not valid for authenticated dataz@MAC mechanism does not match CMS algorithm protection attribute.)r    r   r   r   nativer9   CMSAlgorithmProtectionError)rq   rr   rs   rt   cms_algid_protectionauth_digest_algorithmauth_sig_algorithmauth_mac_algorithmrZ   rZ   r[   rQ      sX   




rQ   signer_infoexpected_content_typeactual_digestalgorithm_usage_policy
time_indicc              
   C   s@  | d }| d }|d j }|durg|j|||jd}	|	s=d|d j  d}
|	jdur3|
d|	j d	7 }
tj|
|	jdu d
|j||d}|sgd|d j  d}
|jdur]|
d|j d	7 }
tj|
|jdu d
| d j }| d }|tj	u r|d}d}|}nx| d 
 }| }d}z
t|||dd W n* ty } z	tj|jtjdd}~w tjy } z	tj|jtjdd}~ww t|| zt|d}W n ttfy   tjdtjdw |j }||krtjd| d| tjdt| }zt||||||||d d}W n ty   d}Y nw |dur||kn|}||fS )ae  
    Validate the integrity of a signature for a particular signerInfo object
    inside a CMS signed data container.

    .. warning::
        This function does not do any trust checks, and is considered
        "dangerous" API because it is easy to misuse.

    :param signer_info:
        A :class:`cms.SignerInfo` object.
    :param cert:
        The signer's certificate.

        .. note::
            This function will not attempt to extract certificates from
            the signed data.
    :param expected_content_type:
        The expected value for the content type attribute (as a Python string,
        see :class:`cms.ContentType`).
    :param actual_digest:
        The actual digest to be matched to the message digest attribute.
    :param algorithm_usage_policy:
        Algorithm usage policy.
    :param time_indic:
        Time indication for the production of the signature.
    :return:
        A tuple of two booleans. The first indicates whether the provided
        digest matches the value in the signed attributes.
        The second indicates whether the signature of the digest is valid.
    rw   rv   	algorithmN)moment
public_keyzThe algorithm z, is not allowed by the current usage policy.z	 Reason: .)	permanent)r   	signaturerU   TF)rr   rs   rt   r^   content_typezQContent type not found in signature, or multiple content-type attributes present.zContent type z did not match expected value )	prehashedalgorithm_policyr   )ry   signature_algorithm_allowedr   failure_reasonr9   r%   not_allowed_afterdigest_algorithm_allowedr   VOIDuntagrc   rQ   r   re   failure_messager6   FORMAT_FAILURErz   r7   GENERICrp   r    r   r   rD   rE   r   )r   rk   r   r   r   r   rw   digest_algorithm_objmd_algorithmsig_algo_allowedmsgdigest_algo_allowedr   signed_attrs_origembedded_digestr   signed_datarU   ri   r   validintactrZ   rZ   r[   rF      s   '






	



rF   r   c                 C   sP   z	t | }|j}W n ty   tjdtjdw t| }|d }t|| |S )a  
    Extract certificates from a CMS signed data object for validation purposes,
    identifying the signer's certificate in accordance with ETSI EN 319 102-1,
    5.2.3.4.

    :param signed_data:
        The CMS payload.
    :return:
        The extracted certificates.
    z,signer certificate not included in signaturer^   rU   )	r   signer_certr   r9   re   r7   rd   r   rp   )r   	cert_infork   r   rU   rZ   rZ   r[   rO     s   

rO   
raw_digestvalidation_contextstatus_kwargsvalidation_pathpkix_validation_paramsr   key_usage_settingsc                   s   t | }t| }	|	j}
|	j}d}|dur |pt|j}|j}|p$t }|du r+t	}|d }|d j
}|d d j
}| d }|d j
}|du rat|d }t|}t|}|| | }n|d tjurptjdtjd	zt||
||||d
\}}W n ty } ztjd|j tjd	|d}~ww d } } }}|rz3|j| |durt|g}n|j|
}t|
||||dI dH }|j }|j!}|j"p|j#}|j$}W n t%y } zt&j'd|d t(j)}W Y d}~nd}~ww |pi }|du rdn|j*|d< |j|||
||||||d	 |S )z
    Perform basic validation of CMS and PKCS#7 signatures in isolation
    (i.e. integrity and trust checks).

    Internal API.
    Nrw   r   rv   encap_content_infor   contentzKCMS structural error: detached signatures should not have encapsulated datar^   )r   r   r   r   zCMS structural error: )r   pathsr   z&Processing error in validation processexc_infovalidation_time)	r   r   signing_certr   pkcs7_signature_mechanismtrust_problem_indicr   revocation_detailserror_time_horizon)+r   rO   r   other_certsrC   lift_policyr   best_signature_timer#   rB   ry   bytesr!   r   Hashupdatefinalizer   r   r9   re   r6   r   rF   r   r   certificate_registryregister_multipler4   path_builderasync_build_paths_lazyvalidate_cert_usageerror_subindicrevo_detailssuccess_result
error_pathr   
ValueErrorloggererrorr7   !CERTIFICATE_CHAIN_GENERAL_FAILUREr   )r   r   r   r   r   r   r   r   r   r   rk   r   r   rw   	mechanismr   ecir   rawmd_specmdr   r   ri   ades_statuspathr   r   r   	op_resultrZ   rZ   r[   rK     s   







rK   r   z,CertvalidatorOperationResult[ValidationPath]c                    s,   dt f fdd}t| I dH S )zE
    Low-level certificate validation routine.
    Internal API.
    rV   c                     s0   t  dI d H } | jdkr  | S )N)r   r   r   )r$   pkix_lenvalidate)r   rk   r   r   r   r   rZ   r[   _check9  s   

z#validate_cert_usage.<locals>._checkN)r.   handle_certvalidator_errors)rk   r   r   r   r   r   rZ   r   r[   r   -  s   r   )r   r   r   r   
status_clsc                      d S NrZ   )r   r   r   r   r   r   rZ   rZ   r[   rG   J  s   	rG   c                   r   r   rZ   )r   r   r   r   r   rZ   rZ   r[   rG   V  s   c                    s4   | |}t| |||||dI dH }|di |S )a  
    Validate a CMS signature (i.e. a ``SignedData`` object).

    :param signed_data:
        The :class:`.asn1crypto.cms.SignedData` object to validate.
    :param status_cls:
        Status class to use for the validation result.
    :param raw_digest:
        Raw digest, computed from context.
    :param validation_context:
        Validation context to validate the signer's certificate.
    :param status_kwargs:
        Other keyword arguments to pass to the ``status_class`` when reporting
        validation results.
    :param key_usage_settings:
        A :class:`.KeyUsageConstraints` object specifying which key usages
        must or must not be present in the signer's certificate.
    :param algorithm_policy:
        The algorithm usage policy for the signature validation.

        .. warning::
            This is distinct from the algorithm usage policy used for
            certificate validation, but the latter will be used as a fallback
            if this parameter is not specified.

            It is nonetheless recommended to align both policies unless
            there is a clear reason to do otherwise.
    :return:
        A :class:`.SignatureStatus` object (or an instance of a proper subclass)
    )r   r   NrZ   )default_usage_constraintsrK   )r   r   r   r   r   r   r   eff_key_usage_settingsrZ   rZ   r[   rG   a  s   '	c              	   C   s4   z| d }t |d}|jW S  ttfy   Y dS w )a  
    Extract self-reported timestamp (from the ``signingTime`` attribute)

    Internal API.

    :param signer_info:
        A ``SignerInfo`` value.
    :return:
        The value of the ``signingTime`` attribute as a ``datetime``, or
        ``None``.
    rU   signing_timeN)r    ry   r   r   )r   sastrZ   rZ   r[   rN     s   
rN   Fsignedc              	   C   sR   z|r| d }t |d}n	| d }t |d}|d }|W S  ttfy(   Y dS w )a  
    Extract signed data associated with a timestamp token.

    Internal API.

    :param signer_info:
        A ``SignerInfo`` value.
    :param signed:
        If ``True``, look for a content timestamp (among the signed
        attributes), else look for a signature timestamp (among the unsigned
        attributes).
    :return:
        The ``SignedData`` value found, or ``None``.
    rU   content_time_stampunsigned_attrssignature_time_stamp_tokenr   N)r    r   r   )r   r   r   tstuatst_signed_datarZ   rZ   r[   rM     s   
rM   c                 C   sf   t | }|du r
dS |d }|d jd }|d d j}| d j}t|}t|}|| | S )a.  
    Compute the digest of the signature according to the message imprint
    algorithm information in a signature timestamp token.

    Internal API.

    :param signer_info:
        A ``SignerInfo`` value.
    :return:
        The computed digest, or ``None`` if there is no signature timestamp.
    Nr   r   message_imprinthash_algorithmr   r   )rM   parsedry   r!   r   r   r   r   )r   tst_datar   mitst_md_algorithmsignature_bytestst_md_specr   rZ   rZ   r[   rL     s   


rL   ts_validation_contextc                    s   i }t | }|dur||d< t| dd}|dur7t| }|dus#J t|||I dH }td	i |}||d< t| dd}	|	durVt|	||dI dH }
td	i |
}||d< |S )
a  
    Collect and validate timing information in a ``SignerInfo`` value.
    This includes the ``signingTime`` attribute, content timestamp information
    and signature timestamp information.

    :param signer_info:
        A ``SignerInfo`` value.
    :param ts_validation_context:
        The timestamp validation context to validate against.
    :param raw_digest:
        The raw external message digest bytes (only relevant for the
        validation of the content timestamp token, if there is one)
    Nsigner_reported_dtF)r   timestamp_validityT)expected_tst_imprintcontent_timestamp_validityrZ   )rN   rM   rL   rI   rA   )r   r   r   r   r   r   tst_signature_digesttst_validity_kwargstst_validitycontent_tst_signed_datacontent_tst_validity_kwargscontent_tst_validityrZ   rZ   r[   rH     s8   
rH   r   r   c           
         s   d}| d d }t |tjr|j}t |tjs tjdtj	d|d j
}t }t| |d|i||dI dH }|d	 d
 j
}	||	krVtd|	  d|  d d|d< |S )a  
    Validate the ``SignedData`` of a time stamp token.

    :param tst_signed_data:
        The ``SignedData`` value to validate; must encapsulate a ``TSTInfo``
        value.
    :param validation_context:
        The validation context to validate against.
    :param expected_tst_imprint:
        The expected message imprint value that should be contained in
        the encapsulated ``TSTInfo``.
    :param algorithm_policy:
        The algorithm usage policy for the signature validation.

        .. warning::
            This is distinct from the algorithm usage policy used for
            certificate validation, but the latter will be used as a fallback
            if this parameter is not specified.

            It is nonetheless recommended to align both policies unless
            there is a clear reason to do otherwise.
    :return:
        Keyword arguments for a :class:`.TimeStampSignatureStatus`.
    Nr   r   z'SignedData does not encapsulate TSTInfor^   gen_time	timestamp)r   r   r   r   r   hashed_messagezTimestamp token imprint is z, but expected r   Fr   )
isinstancer   ParsableOctetStringr   r   TSTInfor9   re   r6   r   ry   rA   r   rK   r   warninghex)
r   r   r   r   tst_infotst_info_bytesr   ku_settingsr   tst_imprintrZ   rZ   r[   rI     s8   
	rI   acsr   c                    s~    fdd| D }g }g }t |D ]&}z
||I d H  W q tttfy: } z|| W Y d }~qd }~ww ||fS )Nc                    s   g | ]	}t | d qS ))holder_cert)r1   ).0acr   r   rZ   r[   
<listcomp>g  s    z+process_certified_attrs.<locals>.<listcomp>)asyncioas_completedappendr(   r)   r'   )r  r   r   jobsresultsr9   jobri   rZ   r  r[   process_certified_attrs]  s$   
r  sd_attr_certificatessd_signed_attrsc              
      s  zt |d}W n! ty   d }Y n ty) } ztjt|tjd|d }~ww i }d }d }|d ur|d }	t	t
|	tjsB|	nd}
|d }d}t
|tjsqdd |D }t|t|k}|d urqt|||}|I d H \}}|d ur{t|}nd }|pt
|d	 tj }|d ur|rtd
 t|
|||d|d< |d urt| ||I d H \}}|r|| |r|| t||d< ||d< |S )Nsigner_attributes_v2r^   claimed_attributesrZ   certified_attributes_v2Fc                 S   s   g | ]
}|j d kr|jqS )	attr_cert)namechosen)r  rY   rZ   rZ   r[   r    s
    
z.collect_signer_attr_status.<locals>.<listcomp>signed_assertionszCAdES signer attributes with externally certified assertions for which no validation method is available. This may affect signature semantics in unexpected ways.)claimed_attrscertified_attrsac_validation_errsunknown_attrs_presentcades_signer_attrsac_attrsr  )r    r   r   r9   re   strr6   r   r=   from_iterabler   r   Voidlenr  r<   from_resultsr   r   r;   extend)r  r   r   r  signer_attrsri   resultcades_ac_resultscades_ac_errorsclaimed_asn1claimedcertified_asn1unknown_cert_attrs	cades_acsval_job	certifiedunknown_attrs
ac_results	ac_errorsrZ   rZ   r[   rP   y  s   




rP   
input_datasigner_validation_contextac_validation_contextc	                    s  |du r|}t |}	|	d d j}
tt|
}t| tr$||  n t| tj	tj
fr7|t| d  nt|}tj|| ||d | }t|	||dI dH }t|}t||||||dI dH }t|}|durs|j|j |t|j|j||	d d	I dH  td
i |S )a  
    .. versionadded: 0.9.0

    .. versionchanged: 0.11.0
        Added ``ac_validation_context`` param.

    Validate a detached CMS signature.

    :param input_data:
        The input data to sign. This can be either a :class:`bytes` object,
        a file-like object or a :class:`cms.ContentInfo` /
        :class:`cms.EncapsulatedContentInfo` object.

        If a CMS content info object is passed in, the `content` field
        will be extracted.
    :param signed_data:
        The :class:`cms.SignedData` object containing the signature to verify.
    :param signer_validation_context:
        Validation context to use to verify the signer certificate's trust.
    :param ts_validation_context:
        Validation context to use to verify the TSA certificate's trust, if
        a timestamp token is present.
        By default, the same validation context as that of the signer is used.
    :param ac_validation_context:
        Validation context to use to validate attribute certificates.
        If not supplied, no AC validation will be performed.

        .. note::
            :rfc:`5755` requires attribute authority trust roots to be specified
            explicitly; hence why there's no default.
    :param algorithm_policy:
        The algorithm usage policy for the signature validation.

        .. warning::
            This is distinct from the algorithm usage policy used for
            certificate validation, but the latter will be used as a fallback
            if this parameter is not specified.

            It is nonetheless recommended to align both policies unless
            there is a clear reason to do otherwise.
    :param key_usage_settings:
        Key usage parameters for the signer.
    :param chunk_size:
        Chunk size to use when consuming input data.
    :param max_read:
        Maximal number of bytes to read from the input stream.
    :return:
        A description of the signature's status.
    Nrv   r   r   )max_read)r   r   )r   r   r   r   r   rU   )r  r   r   r  rZ   )r   ry   r   r   r!   r   r   r   r   ContentInfoEncapsulatedContentInfo	bytearrayr3   chunked_digestr   rH   r@   r   rK   r   r   r   r   rP   attribute_certsr   )r2  r   r3  r   r4  r   r   
chunk_sizer5  r   rv   htemp_bufdigest_bytesr   r   rZ   rZ   r[   rJ     sV   =

rJ   
ResultTypeT)	covariant)frozenc                   @   s^   e Zd ZU dZee ed< dZee ed< dZ	ee
 ed< dZee ed< dZee ed< dS )CertvalidatorOperationResultzB
    Internal class to inspect error data from certvalidator.
    r   Nr   r   r   r   )__name__
__module____qualname____doc__r   r?  __annotations__r   r>   r   r   r   r.   r   r7   rZ   rZ   rZ   r[   rB  L  s   
 rB  coroc              
      s  d}d }}z	t | I dH dW S  ty. } ztj|j|d tj}W Y d}~n1d}~w tyK } ztj|j|d tj}W Y d}~nd}~w t	yj } ztj|j|d tj
}|j}W Y d}~nd}~w ty } z tj|j|d |j}|jdu rtj}ntj}|j}W Y d}~nd}~w ty } z5|j}t|j |j}|jrtj}n|jrtj}td|j|jd}ntj}td|j|jd}W Y d}~nd}~w ty } ztjd|d tj}W Y d}~nod}~w ty } z!|j}t|j |j}|js|jrtj}ntj}W Y d}~nBd}~w ty= } z|j}tj|j|d tj}W Y d}~n"d}~w t yZ } ztj|j|d tj}W Y d}~nd}~ww t d||||dS )	z
    Internal error handling function that maps certvalidator errors
    to AdES status indications.

    :param coro:
    :return:
    N)r   r   F)
ca_revokedrevocation_daterevocation_reasonTzFailed to build path)r   r   r   r   r   )!rB  r'   r   r   failure_msgr7   CHAIN_CONSTRAINTS_FAILUREr-   NO_POEr+   	TRY_LATERtime_cutoffr%   original_pathbanned_sinceCRYPTO_CONSTRAINTS_FAILURE!CRYPTO_CONSTRAINTS_FAILURE_NO_POEr*   revocation_dtis_side_validationr   
is_ee_certREVOKED_NO_POEr>   reasonREVOKED_CA_NO_POEr(   NO_CERTIFICATE_CHAIN_FOUNDr&   
expired_dtOUT_OF_BOUNDS_NO_POEr)   r,   )rH  time_horizonr   r   ri   r   rZ   rZ   r[   r   Y  s   

r   )NN)NNNNNNr   )F)r  loggingdataclassesr   r   typingr   r   r   r   r   r	   r
   r   r   r   r   r   r   
asn1cryptor   r   r   r   r   cryptography.exceptionsr   cryptography.hazmat.primitivesr   pyhanko.sign.generalr   r   r   r   r   r   r   r   r    r!   pyhanko_certvalidatorr"   r#   r$   pyhanko_certvalidator.errorsr%   r&   r'   r(   r)   r*   r+   r,    pyhanko_certvalidator.ltv.errorsr-   pyhanko_certvalidator.pathr.   !pyhanko_certvalidator.policy_declr/   pyhanko_certvalidator.validater0   r1   	pdf_utilsr3   pdf_utils.miscr4   ades.reportr6   r7    r9   settingsr:   statusr;   r<   r=   r>   r?   r@   rA   utilsrB   rC   rD   rE   __all__	getLoggerrC  r   rS   CMSAttributesra   r`   rR   boolrX   Certificaterp   DigestAlgorithmSignedDigestAlgorithmHmacAlgorithmrQ   
SignerInfor  r   rF   
SignedDatarO   dictrK   r   rG   rN   rM   rL   rH   rI   AttributeCertificateV2r  rP   DEFAULT_CHUNK_SIZEr6  r7  rJ   r?  rB  r   rZ   rZ   rZ   r[   <module>   s   <0(
$	



K

 )
!	


 

6

!
9
>

h

k