-1

I have an XML digital signature, (xmlns="http://www.w3.org/2000/09/xmldsig) and I want to convert this into a PKCS7 signature.

I belive I have to use an ASN.1 encoder such as https://github.com/FGrosse/PHPASN1 but I cannot understand how to create a valid pkcs7/asn.1 signaure with it.

Is this possible?

4

1 回答 1

1

No. It's not posible.

When making a XML signature, the private key is signing a data codification (codified in XML).

You are able to put the information included in this XML signature into a PKCS7 signature (codified in ASN.1). But then, the codification of these data would be different, so the signature wouldn't be valid.

于 2016-11-18T11:03:54.657 回答