Jump to content

openssl_pkcs7_sign() error creating PKCS7 structure!


CarbonCopy

Recommended Posts

I am building my own shopping cart that has to work in a situation where all shell functions are disabled and Apache is in a chroot environment (Created with mod_chroot). Everything works great for PHP and the shopping cart EXCEPT for the encryption standards. I found a really nice script that had been working before the chroot jail, and now it is broken. I do not know what the error means or how to fix it. Any ideas people?

 

Warning: openssl_pkcs7_sign() [function.openssl-pkcs7-sign]: error creating PKCS7 structure! in /www/developers.northernlightstechnology.ca/sandbox/clients/1212532950/wordpress/wp-cart/openssl/openssl.php on line 186

 

The nice script for encryption i am using can be found at the below link:

 

http://developer.paypal-portal.com/pdn/attachments/pdn/ewp/87/1/paypalewp.php

Link to comment
Share on other sites

I am building my own shopping cart that has to work in a situation where all shell functions are disabled and Apache is in a chroot environment (Created with mod_chroot). Everything works great for PHP and the shopping cart EXCEPT for the encryption standards. I found a really nice script that had been working before the chroot jail, and now it is broken. I do not know what the error means or how to fix it. Any ideas people?

 

Warning: openssl_pkcs7_sign() [function.openssl-pkcs7-sign]: error creating PKCS7 structure! in /www/developers.northernlightstechnology.ca/sandbox/clients/1212532950/wordpress/wp-cart/openssl/openssl.php on line 186

 

Either the temporary dir used by the script or /dev/{u,}random, are not available within the jail.

Link to comment
Share on other sites

When the error occurs the following "debug" code produces no output

 

ini_set("display_errors","on");
error_reporting( E_ALL );

for ($i = 0; $i < 100; $i++) {
openssl_public_encrypt ("BBBBBBBBBBBBBBBBBBBBBB",$strong,file_get_contents($MY_CERT_FILE));	
openssl_private_decrypt($strong,$dec,file_get_contents($MY_KEY_FILE));
echo $dec . "<br />";
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.