Please check if $cert->get_PrivateKeyExists() returns 'true' after certificate is loaded from a token.

I’ve noticed there is no Support Access Ticket linked to your user account on EldoS site. Technical Support is provided to customers with the linked Support Access Ticket. You will find your Support Access Ticket together with all the details about how to use it in the registration e-mail that we’ve sent to you upon the purchase.

If you are evaluating the product and don't have a license yet, please let us know and then you can have support according to Basic support level. Basic support level includes answering basic technical questions that appear during product evaluation period. We also offer Premium support for a purchase from https://www.eldos.com/support/calc.php . You can use Premium Support to get higher level of assistance during your evaluation of our products.

You mention the empty file, but your code (the one you posted) contains no calls to do anything or to save anything. Could you please elaborate on what you are actually doing and where's the file involved that you expect to be filled?

This code appears to load the certificate file. However, the script does not generate any error messages and produces an empty file.

At first, does your code is wrapped in try..catch block and there is no exception is thrown by Sign() method?
Then, is your code for loading certificate is placed in the function? If so, then possible $cert variable become invalid because it is owned by $certStorage variable, but $certStorage is freed at the end of block/function before certificate is used. Please, try to make $certStorage variable as global.

if (isset($_POST["sign"]))
{
if (!extension_loaded("sbb") && !function_exists('SBUtils\SetLicenseKey'))
{
print "SecureBlackbox extension is not available, please check that you've set it up correctly";
die;
}

Helpdesk is our easy-to-use individual support system that allows communicating and exchanging sample data with our support personnel privately. You will also get e-mail notifications about updates of your support request.