facho/cli.py: se elimina print que genera basura
FossilOrigin-Name: f375ae38ebe1191ef47709762e8299774e1346226a86a379065a866e5a0d6e47
This commit is contained in:
		@@ -222,7 +222,7 @@ def sign_xml(private_key, passphrase, xmlfile, ssl=True, use_cache_policy=False)
 | 
			
		||||
    from facho import fe
 | 
			
		||||
    if use_cache_policy:
 | 
			
		||||
        warnings.warn("xades using cache policy")
 | 
			
		||||
    print(use_cache_policy)
 | 
			
		||||
 | 
			
		||||
    signer = fe.DianXMLExtensionSigner(private_key, passphrase=passphrase, mockpolicy=use_cache_policy)
 | 
			
		||||
    document = open(xmlfile, 'r').read().encode('utf-8')
 | 
			
		||||
    print(signer.sign_xml_string(document))
 | 
			
		||||
 
 | 
			
		||||
@@ -219,7 +219,7 @@ class DianXMLExtensionSigner(FachoXMLExtension):
 | 
			
		||||
 | 
			
		||||
        id_keyinfo = "xmldsig-%s-KeyInfo" % (id_uuid)
 | 
			
		||||
        xmlsig.template.add_reference(
 | 
			
		||||
            signature, xmlsig.constants.TransformSha256, uri="#%s" % (id_keyinfo),
 | 
			
		||||
            signature, xmlsig.constants.TransformSha256, uri="#%s" % (id_keyinfo), name="xmldsig-%s-ref1" % (id_uuid),
 | 
			
		||||
        )
 | 
			
		||||
        ki = xmlsig.template.ensure_key_info(signature, name=id_keyinfo)
 | 
			
		||||
        data = xmlsig.template.add_x509_data(ki)
 | 
			
		||||
@@ -240,11 +240,11 @@ class DianXMLExtensionSigner(FachoXMLExtension):
 | 
			
		||||
        xades.template.add_claimed_role(props, "supplier")
 | 
			
		||||
 | 
			
		||||
        
 | 
			
		||||
        props_ref = xmlsig.template.add_reference(
 | 
			
		||||
            props, xmlsig.constants.TransformSha256, uri="#%s" % (id_props),
 | 
			
		||||
        )
 | 
			
		||||
        props_ref.set('Type', "http://uri.etsi.org/01903#SignedProperties")        
 | 
			
		||||
        xmlsig.template.add_transform(props_ref, xmlsig.constants.TransformEnveloped)
 | 
			
		||||
        #props_ref = xmlsig.template.add_reference(
 | 
			
		||||
        #    props, xmlsig.constants.TransformSha256, uri="#%s" % (id_props),
 | 
			
		||||
        #)
 | 
			
		||||
        #props_ref.set('Type', "http://uri.etsi.org/01903#SignedProperties")        
 | 
			
		||||
        #xmlsig.template.add_transform(props_ref, xmlsig.constants.TransformSha256)
 | 
			
		||||
        
 | 
			
		||||
        xml.append(signature)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user