How to use the phpopenssl_pkcs7_sign () function to sign data, openssl_pkcs7_sign () is used, but what I see on the Internet is an English explanation, which is helpless. 1. here I have a certificate in pfx format, but I don't know if it can be used. 2. when using this function, the following error occurs: how to use the php openssl_pkcs7_sign () function?
Openssl_pkcs7_sign () is used to sign the data. However, what I see on the Internet is an English explanation, which is helpless.
1. here I have a certificate in pfx format, but I don't know if it can be used.
2. during use, this function reports the error: openssl_pkcs7_sign () [function. openssl-pkcs7-sign]: error getting private key
Thank you! Online...
------ Solution --------------------
I am also waiting for the arrival of experts with the landlord!
------ Solution --------------------
. PFX-same as. p12
. P12-PKCS #12 file, including the certificate (public key) and private key (password-protected), has a complete certificate chain letter.
Your pfx is PKCS #12, not PKCS #7. You cannot use pkcs7 directly.
------ Solution --------------------
Reference:
. PFX-same as. p12
. P12-PKCS #12 file, including the certificate (public key) and private key (password-protected), has a complete certificate chain letter.
Your pfx is PKCS #12, not PKCS #7. You cannot use pkcs7 directly.
What should pfx do? I now use openssl to convert pfx to pem format. I use many openssl_pkcs7_sign () formats only for pem, and errors will be reported for others. However, the signature result I got is not consistent with the actual result.
------ Solution --------------------
I finally solved the problem and wanted to know the result. I have uploaded the document to csdn. You can download ([PDF file] Bank of China online banking payment signature)
------ Solution --------------------
What should I do if I have no score?