EldoS | Feel safer!

Software components for data protection, secure storage and transfer

sign an xml file with the library in php

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#34161
Posted: 07/30/2015 18:33:05
by Ken Ivanov (EldoS Corp.)

Hi Sergio,

I am afraid your last message is not exactly clear to understand.

Generally, if you need to create a CAdES-BES signature, please use TElSignedCMSMessage and TElCAdESSignatureProcessor components. TElXAdESSigner only works with XAdES format and native XML-based signing. It will product a valid XML on output, not p7m.

Alternatively, you might consider using TElMessageSigner class. It implements a very basic form of CAdES (CAdES-BES) only, yet it might be useful in certain scenarios.

Ken
#34179
Posted: 08/03/2015 18:11:31
by Sergio  (Basic support level)
Joined: 06/30/2015
Posts: 11

Thank you in advance for all

while I run the test, I get the following message:

Setting SBB license key failed with message:
SecureBlackbox time-limited license key has expired. Please use evaluation license key to continue evaluation.

my need is this:

- The user fills out a form
- The system generates an XML file
- The xml file must be with CAdES-BES
- The signed file, can be downloaded or sent

from the previous example, I was inspired to load the XML file and so far there are no problems.

I followed the example, this:
https://www.eldos.com/security/articles/7882.php?page=all

I do not understand how I can sign the file with CAdES-BES

// Creating NEW signed message.
$ CMS-> CreateNew (SourceStream, 0, sourceStream.Length);

here I should upload the file ?! right ?!

// Saving the CMS.
CmsStream FileStream = new FileStream ("signature-BES.bin" FileMode.Create);

here should save the file signed ?! right ?!

FileStream method is not in the library.
#34182
Posted: 08/04/2015 01:26:27
by Eugene Mayevski (EldoS Corp.)

Quote
dasty wrote:


Setting SBB license key failed with message: SecureBlackbox time-limited license key has expired. Please use evaluation license key to continue evaluation.


You can request the trial key using the form on https://www.eldos.com/sbb/keyreq/.

Vsevolod will answer your technical questions later today.


Sincerely yours
Eugene Mayevski
#34183
Posted: 08/04/2015 02:43:32
by Vsevolod Ievgiienko (EldoS Corp.)

Quote
// Creating NEW signed message.
$ CMS-> CreateNew (SourceStream, 0, sourceStream.Length);
here I should upload the file ?! right ?!

Yes - SourceStream should contain a file to sign.

Quote
// Saving the CMS.
CmsStream FileStream = new FileStream ("signature-BES.bin" FileMode.Create);
here should save the file signed ?! right ?!

The code above is for .NET. You should use TElMemoryStream/TElFileStream in PHP edition. Signed message can be saved to stream using TElCMSMessage.Save method.
#34184
Posted: 08/04/2015 04:52:17
by Vsevolod Ievgiienko (EldoS Corp.)

BTW, you can use our PGP samples as a tutorial on how to work with streams. The samples are located in \Samples\OpenPGPBlackbox folder.
#34204
Posted: 08/06/2015 19:43:23
by Sergio  (Basic support level)
Joined: 06/30/2015
Posts: 11

I'm stuck, because I see more and the following message

Setting SBB License Key failed with message:
Time-limited SecureBlackbox license key has expired. Please use evaluation license key to continue evaluation.

I contacted support as directed by Eugene,
I downloaded library again

and I've tried:
- With the key provided from assistance,
- With the key provided in the downloaded file with a new library

but nevertheless, I see always the message.
#34206
Posted: 08/07/2015 03:21:07
by Vsevolod Ievgiienko (EldoS Corp.)

Please check that only one key is passed to SetLicenseKey in your code.
#34207
Posted: 08/07/2015 19:21:34
by Sergio  (Basic support level)
Joined: 06/30/2015
Posts: 11

I solved,
I set the key, both in php.ini, both in php script,
and rightly he blocked.
Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.

Reply

Statistics

Topic viewed 8385 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!