Trying to sign a request to be sent to the SMEV Gateway. I have an example query where the Transforms element has the following form:

<Transforms> <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <Transform Algorithm="urn://smev-gov-ru/xmldsig/transform"/> <Transforms> 

As far as I understood, the CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED signing mode is not suitable if several Transforms are needed. I began to use CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE. I pass the following XML to CPSigner:

 <request xmlns="http://www.bftcom.com/smevgate/"> ... <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> ... <Reference URI=""> <Transforms> <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <Transform Algorithm="urn://smev-gov-ru/xmldsig/transform"/> </Transforms> .. </Reference> ... </Signature> ... </request> 

On the call to oSignedXml. I remove the transform - everything is correctly signed. Plugin can not work with this algorithm? Through Sharpei I managed to sign it correctly before.

Plugin version 1.2.4, CSP version - 4.0.9939, Chrome browser 65.0.3325.181

    2 answers 2

    No, can not. And at the moment they are not planning to implement this transform in the near future.

      1. Yes, if you use CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED , then the transformation does not need to be specified, the plugin does it itself. Here you can see what happens as a result.
      2. As it was written above, the plugin does not support the transformation urn: // smev-gov-ru / xmldsig / transform (much the regret to a large number of users). Therefore, it remains only to implement it independently, guided by the algorithm from the "Guidelines for working with ESMEV." Globally, it boils down to removing spaces / line breaks and replacing namespaces with ns: <sequence number>. Here is the algorithm for PHP 7.1, but did not personally check