EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Storage.OpenSession works in SB10 but fails in SB11

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
Posted: 02/04/2014 05:37:15
by Marcel Talamini (Standard support level)
Joined: 01/30/2010
Posts: 15

SB version (previous version:
Development environment: C# framework 4.0

Storage.Count returns 0 in version 11
Storage.Count returns 6 in version 10

Has there been a change that i'm unaware of?

See comments in code:

         // Opening new session
         RO = Storage.Module.get_Slot(cbSlots.SelectedIndex - 1).ReadOnly;
            Session = Storage.OpenSession(cbSlots.SelectedIndex - 1, RO);
                //#VER SB:
                //Storage.Count = 0
                //Storage.ObjectCount = 0                

                //#VER SB:
                //Storage.Count = 6
                //Storage.ObjectCount = 13
            if (!RO)
               Session = Storage.OpenSession(cbSlots.SelectedIndex - 1, true);
         if ((Session != null) && (RequestPassword("PIN request", "Please enter your PIN:", out Pin))){
               Session.Login((int) SBPKCS11Base.Unit.utUser, Pin);
                    //#VER SB:
                    //PKCS#11 error CKR_OPERATION_ACTIVE in function C_FindObjectsInit
               Session = null;
Posted: 02/04/2014 06:25:35
by Ken Ivanov (EldoS Corp.)

Hello Marcel,

Thank you for reporting the problem. We are trying to reproduce the issue locally at the moment, after which we will be able to give you further directions.

Could you please give a bit more details about the issue, in particular:

1) Are you building your project for x86 or x64 target?

2) Does anything change if you switch the target to x64 (x86)? Note that such switch will require you to also switch the PKCS#11 proxy DLL to the one located in the x64 folder.
Posted: 02/04/2014 06:49:50
by Marcel Talamini (Standard support level)
Joined: 01/30/2010
Posts: 15

I tried both x86 and x64, same result.
(used with the corresponding proxy.dll)

Same result with your sample application: Cert Token Demo

An additional question:
Is it possible to automatically point to the correct dll?
assembly.path \ x86 \ SecureBlackbox_PKCS11Proxy.dll
assembly.path \ x64 \ SecureBlackbox_PKCS11Proxy.dll
Posted: 02/04/2014 06:56:45
by Ken Ivanov (EldoS Corp.)

Thank you for checking.

64 bit platforms have individual copies of the System32 directory for x64 and x86 processes. The easiest way to use the proxy DLL automatically is to copy each version to the corresponding copy of the System32 directory.
Posted: 02/04/2014 09:45:00
by Ken Ivanov (EldoS Corp.)


I am afraid we were unable to reproduce the issue with our token zoo. Could you please let us know the exact HSM model you are using?

Besides, could you please check if the CryptoTokenDemo sample exposes the same problem in your environment?
Posted: 02/05/2014 03:02:09
by Marcel Talamini (Standard support level)
Joined: 01/30/2010
Posts: 15


I am using model Omnikey 6121 v2
Same problem with CryptoTokenDemo (x86 and x64)

I've attached a couple of screen prints. If you need more or different information, please let me know.

Posted: 02/05/2014 05:31:47
by Ken Ivanov (EldoS Corp.)

As we were unable to reproduce the problem with our existing devices, we've ordered an Omnikey 6121 token for testing purposes. It should arrive within a couple of days, then we'll be able to have a look inside and find out what's going wrong. We hope to get back to you with some suggestions shortly.
Posted: 02/06/2014 09:18:34
by Ken Ivanov (EldoS Corp.)


While the token is en route to our office, could you please specify the exact name and version of the PKCS#11 driver you are using with it?
Posted: 02/06/2014 09:30:43
by Marcel Talamini (Standard support level)
Joined: 01/30/2010
Posts: 15


Version information
Product name: SafeSign Standard
Product version: 3.0.76 (139df0368a02)

PKCS#11 lib = aetpkss1.dll:

Operating system: 64-bit
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.



Topic viewed 1270 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!