Issuing PKCS11 token from PKCS12 keystore
===

I'm having trouble issuing certificate to a hard token, What I have is a PKCS12 keystore I have created and want to move it to a hardtoken as a PKCS11.

I can successfully generate keys and certificate and save them in a p12 keystore and can import the p12 file to hardtoken using admin console of this device. 
But when I try to do the final step programatically I have different result.

//Imported p12 file using admin tool what I have in device is:
-Serial number
  -Signature and key exchange usage
      Certificate
      Private Key
      Public key

//Imported all steps programatically
-Serial number
  -Signing &encryption      
      Certificate
      Private Key
 
and the final result is that end user can't use the device for signing.
I'm using SunPKCS11.