PHP implementation of the signature, at hand, there is a PFX file provided by BOC, signed and passed to Java to do signature verification, please God help

Source: Internet
Author: User
Tags pfx file
PHP implementation of the signature, at hand, there is a PFX file provided by BOC, signed and passed to Java to do signature verification, please God help.
The process seems to be useful to X509, PKCS7, signed the string to be passed to the Java signature verification is correct.
I have tried the method:
1, PFX file read the private key with Openssl_pkcs12_read, and then signed with Openssl_sign, the last signature of the data with

Base64_encode for encoding Conversion

2. pfx file converted to PEM, signed with Openssl_pkcs7_sign

The second way to do the signature with the correct signature length and content are known, but it is not find out where the error, so come here to help someone.

If you have done a similar signature, trouble you to point twos, or leave contact information, so that I personally contact you.

------Solution--------------------
The second method.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.