EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Using PKCS#11 key material in certificate request

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
Posted: 10/15/2015 03:19:15
by Tomasz Sawicki (Standard support level)
Joined: 06/14/2007
Posts: 19

When using the following code, the generated request contains another public key than the one generated by keyMaterial.Generate. What am I doing wrong?

int KeySize = 2048;

TElRSAKeyMaterial keyMaterial = new TElRSAKeyMaterial(Session.CryptoProvider); //from PKCS#11 token

TElCertificateRequest FRequest = new TElCertificateRequest();

//set CSR fields

FRequest.Generate(Algorithm, KeySize, Hash);
Posted: 10/15/2015 03:24:26
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

You should set TElCertificateRequest.PreserveKeyMaterial to 'true' before FRequest.Generate is called: https://www.eldos.com/documentation/sb...erial.html
Posted: 10/15/2015 03:34:42
by Tomasz Sawicki (Standard support level)
Joined: 06/14/2007
Posts: 19

Thanks. It's working now.
I suggest to add this remark to TElCertificateRequest.SetKeyMaterial documentation.
Posted: 10/15/2015 04:23:49
by Eugene Mayevski (Team)

We've updated documentation, thank you. Updated docs will go to SBB 14 release.

Sincerely yours
Eugene Mayevski



Topic viewed 2560 times

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


Back to top

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

Got it!