Smart Card based ssl connection not possible with SunPKCS11 Provider?

Dear all
We use jsse connections with file based Pkcs12 Keystores for longer time.
Now we d'like to replace these .p12 files with SmartCards.
While the jsse 5 reference guide suggests:
"To use a Smartcard as a keystore or trust store, set the javax.net.ssl.keyStoreType and javax.net.ssl.trustStoreType system properties, respectively, to "pkcs11", and set the javax.net.ssl.keyStore and javax.net.ssl.trustStore system properties, respectively, to NONE. To specify the use of a specific provider, use the javax.net.ssl.keyStoreProvider and javax.net.ssl.trustStoreProvider system properties (e.g., "SunPKCS11-joe"). By using these properties, you can configure an application that previously depended on these properties to access a file-based keystore to use a Smartcard keystore with no changes to the application."
this does not work!
In the following Code sequence we get a
java.net.SocketException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_TYPE_INVALID
System.setProperty("javax.net.ssl.trustStoreType", "pkcs11");
System.setProperty("javax.net.ssl.trustStore", "NONE");
System.setProperty("javax.net.ssl.trustStorePassword", pin);
System.setProperty("javax.net.ssl.trustStoreProvider", "SunPKCS11-ACOSTOKEN");
System.setProperty("javax.net.ssl.keyStoreType", "pkcs11");
System.setProperty("javax.net.ssl.keyStore", "NONE");
System.setProperty("javax.net.ssl.keyStorePassword", pin);
System.setProperty("javax.net.ssl.keyStoreProvider", "SunPKCS11-ACOSTOKEN");
SSLSocketFactory factory = (SSLSocketFactory) SSLSocketFactory.getDefault();
SSLSocket socket = (SSLSocket)factory.createSocket(host, 443); // Exception here --> CKR_ATTRIBUTE_TYPE_INVALID
socket.startHandshake();
.Because the SmartCard with the KeyMaterial on it is working with
- IAIK package (JCE + PKCS11Wrapper + SSL)
- FireFox 2
I suggest we do something wrong here.
Has anyone an idea what it might be?
Thanks for yout help
Marcel

Hi all, I'm experiencing a problem using SunPKCS11 as a keystore provider for SSL.
String pkcs11config = "name = " + "bit4id" + "\nlibrary = " + "c:/windows/system32/bit4p11.dll";
byte[] pkcs11configBytes = pkcs11config.getBytes();
ByteArrayInputStream configStream = new ByteArrayInputStream(
pkcs11configBytes);
AuthProvider pkcs11Provider = new sun.security.pkcs11.SunPKCS11(
configStream);
pkcs11Provider.setCallbackHandler(new MyGuiCallbackHandler());
if (Security.getProvider(pkcs11Provider.getName()) != null) {
Security.removeProvider(pkcs11Provider.getName());
Security.insertProviderAt(pkcs11Provider, 2);
//Security.insertProviderAt(pkcs11Provider, 1);
System.setProperty("javax.net.ssl.keyStoreProvider",
pkcs11Provider.getName());
System.setProperty("javax.net.ssl.keyStoreType",
"PKCS11");
System.setProperty("javax.net.ssl.keyStore",
"NONE");
SSLContext sslcont = SSLContext.getInstance("SSL");
sslcont.init(null/*KM*/, tmS, rng);
If i use KM (KeyManager[] containing a KeyStore.getInstance("PKCS11")) everything works fine, but if I try to initialize the sslcontext using the default keyStoreProvider (just commenting out KM, and without any other modification to the code), it uses SUN instead of PKCS11, even if I set the system property javax.net.ssl.keyStore* (as you can see in my code)
Can anyone help me?
Masimaybe you an past the piece of code where you initialize things?
Thank's in advance and happy new year,
Patrizio

Similar Messages

  • OPC Server Connection not possible (with LabView 7.0 it is working)

    We have used LabView 7.0 to view OPC items on a remote server (Windows CE).
    On WindowsCE it's not possible to browse the remote registry, therefore we
    make the registry settings on the client Computer and are setting the
    "RemoteServerName". For LabView 7.0 it was working.
    With LabView 7.1 when we try the same with the sample "Browse to OPC Item.vi"
    we get the Message Box "NI Network Browser Error!" "This OPC Server does not support
    the interface: IOPCBrowseServerAddressSpace error code - 0x80070005 Access denied!"
    Has any one an idea what has changed since LabView 7.0.
    The OPC Server has also an OPCEnum running. Is there any way to read this information?
    Here are the whole registry setting for the local machine to connet to remot OPC-Server:
    REGEDIT4
    [HKEY_CLASSES_ROOT\AppID\{4841A238-5E78-48AB-A9ED-666AD68F4841}]
    @="Inficon Quadrupol Massenspektrometer DA"
    "AuthenticationLevel"=dword:00000000
    "RemoteServerName"="192.168.0.206"
    [HKEY_CLASSES_ROOT\Inficon.Quadrupol.Massenspektrometer.DA]
    @="Inficon Quadrupol Massenspektrometer DA"
    [HKEY_CLASSES_ROOT\Inficon.Quadrupol.Massenspektrometer.DA\CLSID]
    @="{4841A238-5E78-48AB-A9ED-666AD68F4841}"
    [HKEY_CLASSES_ROOT\Inficon.Quadrupol.Massenspektrometer.DA\OPC]
    [HKEY_CLASSES_ROOT\Inficon.Quadrupol.Massenspektrometer.DA\OPC\Vendor]
    @="Inficon"
    [HKEY_CLASSES_ROOT\CLSID\{4841A238-5E78-48AB-A9ED-666AD68F4841}]
    @="Inficon Quadrupol Massenspektrometer DA"
    "AppID"="{4841A238-5E78-48AB-A9ED-666AD68F4841}"
    [HKEY_CLASSES_ROOT\CLSID\{4841A238-5E78-48AB-A9ED-666AD68F4841}\Implemented Categories]
    [HKEY_CLASSES_ROOT\CLSID\{4841A238-5E78-48AB-A9ED-666AD68F4841}\Implemented Categories\{63D5F432-CFE4-11D1-B2C8-0060083BA1FB}]
    [HKEY_CLASSES_ROOT\CLSID\{4841A238-5E78-48AB-A9ED-666AD68F4841}\Implemented Categories\{CC603642-66D7-48F1-B69A-B625E73652D7}]
    [HKEY_CLASSES_ROOT\CLSID\{4841A238-5E78-48AB-A9ED-666AD68F4841}\ProgID]
    @="Inficon.Quadrupol.Massenspektrometer.DA"
    [HKEY_CLASSES_ROOT\CLSID\{4841A238-5E78-48AB-A9ED-666AD68F4841}\VersionIndependentProgID]
    @="Inficon.Quadrupol.Massenspektrometer.DA"
    Regards, Robert

    Hi Robert
    LabVIEW 7.1 implements some new security features dealing with DCOM that were not in 7.0. Windows is moving in this direction, and National Instruments decided to follow suit. 7.1 requires a certain level of authentication from the server. If this is the issue in your case, it can be resolved with the following steps (this is for Windows XP; CE will probably be different):
    1. On the computer hosting your OPC server select "Start >> Settings >> Control Panel >> Administrative Tools >> Component Services.
    2. On the tree on the left, expand "Component Services >> Computers >> My Computer >> DCOM Config.
    3. Your OPC server should be registered as one of these items. Right-click on your server and select "Properties."
    4. On the "General" tab, change the "Authentication Level" to "Connect."
    If this property is already set to Connect or Default (and the default setting is Connect) then this will have no effect.
    You can also try checking some of the other settings:
    1. On the computer hosting your OPC server select "Start >> Settings >> Control Panel >> Administrative Tools >> Component Services.
    2. On the tree on the left, expand "Component Services >> Computers >> My Computer
    3. Right-click on My Computer and select "Properties."
    4. On the "Default Properties" tab, make sure "Default Impersonation Level" is set to "Identify."
    You may also want to look at the "COM Security" tab to make sure your computer has the right permissions.
    If all else fails, you can try adding the line "ole.AuthnLevel = 1" to the LabVIEW.ini file. This should reverse some of the changes to 7.1.
    regards
    Manuel Wielander
    National Instruments

  • When I connect my iPhone 5 to my laptop and iTunes, I can't play movies from the iPhone on my computer.Why is that? Can I do this or it's not possible with iPhone5? With my iPod it's no problem.

    When I connect my iPhone 5 to my laptop and iTunes, I can't play movies from the iPhone on my computer.Why is that? Can I do this or it's not possible with iPhone5? With my iPod it's no problem.

    Reinstall iTunes. Make sure you follow the instructions in this support document to the letter. http://support.apple.com/kb/HT1923.
    You may have some problems because Apple has not certified that everything works with Windows 8 yet.

  • Multiple usage of Source System is not possible with installed DMIS version on source

    Hello folks!
    I`ve got a problem trying to adjust the Data Replication to SAP BW (on HANA) using SAP LT Replication Server.
    I`ve deleted one connection and after that I`m trying to create new one through  Configuration & Monitoring Dashboard (transaction LTR) with the same source / target systems.
    As result when on the second step (Specify Source System) I specify RFC destination of the source system it appears an error with text
    "Multiple usage of Source System is not possible with installed DMIS version on source".
    But there`s no any adjusted connection in system now..
    Please, help me to understand  how to fix that problem, I can`t find a solution

    Hi,
    When you say that you 'deleted one connection', did you delete the RFC connection or the SLT Configuration? If it is not a real multiple usage scenario, then deactivate the 'allow multiple usage' flag, else install the correct DMIS version on both SLT and source.
    Thanks
    kris

  • Non-cumulative initialization is not possible with historical data

    Hi all,
    While loading inventory cube.. 0IC_C03  .. after loading 2LIS_03_BX request get sucessful. while compress that request No Marker update. i getting following error msg.
    <b>Non-cumulative initialization is not possible with historical data</b>     
    Regards
    siva.

    You sure you didn't use BF instead of BX?  This messge indicates that you have historical data in your cube whereas BX only loads a fixed state at a specific point in time...  Or maybe, did you initialize BX twice in R/3 without deleting the previous init, I don't know if that could cause that error but it's another possibility.

  • Apple ipad2 is recognized bei itunes in "wartungszustand". when i click reset on itunes and itunes tries to reset the ipad i get the information not possible with code 3194

    Apple ipad2 is recognized bei itunes in "wartungszustand". when i click reset on itunes and itunes tries to reset the ipad i get the information not possible with code 3194

    See if this helps : http://support.apple.com/kb/TS3694#error3194

  • Goods movement not possible with mvmt type 991

    Hi,
                As per requirement I need to create a GR for Purchase order wise. I tried to create using BAPI BAPI_GOODSMVT_CREATE but It returns the error message.
    error:  Goods movement not possible with mvmt type 991
    LOOP AT gt_outtab1.
      gt_outtab1-gr_wght       =   gt_outtab1-gr_wght.
       MOVE: gt_outtab1-matnr            TO gt_item-material,
              gt_zseed_po_qty-werks       TO gt_item-plant,
              gt_zseed_po_qty-lgort       TO gt_item-stge_loc,
             '901'                        TO gt_item-move_type,
              gt_outtab1-gr_wght          TO gt_item-entry_qnt,
              'B'                         TO gt_item-mvt_ind,
              '1'                         TO gt_item-stck_type,
              v_lifnr                     TO gt_item-vendor,
              gt_outtab1-ebeln            TO gt_item-po_number,
              gt_outtab1-ebelp            TO gt_item-po_item.
    APPEND gt_item.
    ENDLOOP.
    CLEAR gt_item.
      LOOP AT gt_outtab3 WHERE bqty IS NOT INITIAL.
        MOVE: gt_outtab3-bmatnr           TO gt_item-material,
              gt_zseed_po_qty-werks        TO gt_item-plant,
              gt_zseed_po_qty-lgort      TO gt_item-stge_loc,
             '991'                        TO gt_item-move_type,
              gt_outtab3-bqty             TO gt_item-entry_qnt,
              ''                          TO gt_item-mvt_ind,
              '1'                         TO gt_item-stck_type,
              v_lifnr                     TO gt_item-vendor.
        APPEND gt_item.
      ENDLOOP.
    CLEAR gt_item.
      LOOP AT gt_outtab3 WHERE pqty IS NOT INITIAL.
        MOVE: gt_outtab3-bmatnr           TO gt_item-material,
             gt_zseed_po_qty-werks        TO gt_item-plant,
              gt_zseed_po_qty-lgort      TO gt_item-stge_loc,
             '942'                        TO gt_item-move_type,
              gt_outtab3-pqty             TO gt_item-entry_qnt,
              ''                          TO gt_item-mvt_ind,
              '1'                         TO gt_item-stck_type,
              v_lifnr                     TO gt_item-vendor.
        APPEND gt_item.
      ENDLOOP.
    ***********Call goods movement BAPI
      CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
        EXPORTING
          goodsmvt_header  = gs_header
          goodsmvt_code    = gs_code
        IMPORTING
          goodsmvt_headret = gs_headret
          materialdocument = gs_retmtd
          matdocumentyear  = gs_year
        TABLES
          goodsmvt_item    = gt_item
          return           = gt_return. 
    so could you please let me know which are the parameters I need to pass to create GR?
    regards,
    tarun

    Hi,
    Go to T.code OMJJ . Give your your movement type 991. Check the allowed transaction and all the details  in your left hand side and the settings done.
    Thanks
    Arbind

  • Goods movement not possible with movement type 702

    Hi experts,
    I have created a new movement type 702 (a copy of 602) for return delivery from customer.
    When I create delivery I did not face any issue. However while doing post goods issue, I get error
    "Goods Movement not possible with mvmt type 702."
    Is there any configuration missing for post goods issue?
    Please advise.
    Thanks,
    Pri

    DEAR,
    AFTER CHECKING IN "OMJJ" ...SEE WHETHER YOU HAVE NOT BLOCKED THIS MOVEMENT...
    ALSO SEE IN OPTION WHETHER ALL TRANSACTIONS HAVE BEEN ENTERED LIKE
    "MI01"
    "MI02"
    "MI31"
    "MI07"
    "MI37"
    WE ARE PERFOMING THIS ACTIVITY USUALY SO PLZ PERFORM IT,,WE ACTUALLY BLOCK THIS MOVT TYPE AFTER ARE PHYSICAL INVENTORY...
    OR EVEN IF THESE DOESNT WORK..
    GO TO "SU01" IN WHICH PUT THE USER ID AND CHECK IN AUTHORISATION WHICH PROFILE IS ASSIGNED TO IT..
    REGARDS
    REWA

  • I need to generate a still shot from from a video. I would like to accomplish this task using a single application. If this is not possible with my MacBook Pro as purchased from Apple, please recommend which applications I can purchase.

    I need to generate a still shot from from a video I made with my camera. I would like to accomplish this task using a single application. If this is not possible with my MacBook Pro as purchased from Apple, please recommend which applications I can purchase that include this feature. Thanks in advance.

    For FREE do the following:
    When you get to othe part of the video you want a still shot from, put the video on pause. 
    Take a screen shot:  Apple>Shift>4 - which will produce a cross hair so you can manually select which part of the video you want.Check inside either your Applications or Utility folder for an app called Grab.  Will do the above with just a single click.
    If you still want to purchase software, suggest that you do a Google & MacUpdate search.  This way, you can find exactly what you want. 

  • Camera connection not working with my camera

    Camera connect not working with my Sony boggie camera

    The Bloggie will not work because it draws too much power from the USB port on the iPad.  The solution is to interpose a powered USB hub between the Bloggie and the iPad - connect the Bloggie to the powered hub, then connect the hub to the ipad accessory.  Works fine with my 3D Bloggie.

  • KANBAN - STO (error : Goods movement not possible with mvmt type 351)

    Hi,
    I have configured KANBAN STO in the system which is working fine.
    I am able to empty the bin and create STO (purchase orders)
    But when I select a bin and try to make it full, system gives error message:
    "Goods movement not possible with mvmt type 351"
    In KANBAN STO replenishment strategy, I have used movement type 101,
    I m little confused from where this 351 movement type is coming from.
    Please help resolvethis issue.
    Pavan

    Hi,
    Below is the entire message:
    Goods movement not possible with mvmt type 351
    Message no. M7096
    Diagnosis
    You have entered a movement type that has not been defined for this transaction/event.
    Procedure
    Choose another movement type.
    You can choose the movement type as follows:
    If you know the movement type, enter it directly in the Movement type field.
    Choose the movement type via the menu option Movement type.
    Choose the required movement type from the possible entries.
    If you do not find a suitable movement type, exit this function and choose a different goods movement from the Inventory Management menu.
    Pavan

  • Goods movement not possible with mvmt type 961

    hi all,
    i got a error as  Goods movement not possible with mvmt type 961
    Can any body help me to know whether i can create GR for mvmt type  961.
    mvmt type 961 is for third party transfer

    Getting errors while using PI_GOODSMVT_CREATE' with 561+K

  • Goods movement not possible with mvmt type 561-error

    Dear All,
    I am using bapi BAPI_GOODSMVT_CREATE for goods movement. i am gettining Goods movement not possible with mvmt type 561 error.
    please suggest me. i am using serial number also.
    regards,
    satish

    Getting errors while using PI_GOODSMVT_CREATE' with 561+K

  • 'Goods movement not possible with mvmt type 102'

    Dear Experts,
    I have to reverse the GR and I am using BAPI -> BAPI_GOODSMVT_CREATE and passing below information but I am getting error message as 'Goods movement not possible with mvmt type 102'. Could any one please tell me what would be the possible reasons to get this error and how can I fix this.
    goodsmvt_header-PSTNG_DATE = 20110705
    goodsmvt_header-DOC_DATE = 20110705
    goodsmvt_code-GM_CODE = 06
    goodsmvt_item-PLANT = 1400
    goodsmvt_item-MOVE_TYPE = 102 <<< Reversal movement type
    goodsmvt_item-ENTRY_QNT = 02
    goodsmvt_item-ENTRY_UOM = SET
    goodsmvt_item-PO_NUMBER = W299999508
    goodsmvt_item-PO_ITEM = 0010
    goodsmvt_item-MVT_IND = B
    goodsmvt_item-XSTOB = ''. << space to use reversal types
    Thanks in Advance
    Venkat

    Hi Please provide Material Document, Document Year and Posting date as shown below
    MATDOCUMENTYEAR = DOC_YEAR.
    GOODSMVT_PSTNG_DATE = POSTING_DATE.
    MATERIALDOCUMENT = MAT_DOC
    CALL FUNCTION 'BAPI_GOODSMVT_CANCEL'
        EXPORTING
          MATERIALDOCUMENT          = MATERIALDOCUMENT
          MATDOCUMENTYEAR           = MATDOCUMENTYEAR
          GOODSMVT_PSTNG_DATE       = GOODSMVT_PSTNG_DATE
        GOODSMVT_PR_UNAME         =
       IMPORTING
         GOODSMVT_HEADRET          = WA_GOODSMVT_HEADRET
        TABLES
          RETURN                    = IT_RETURN
        GOODSMVT_MATDOCITEM       =
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT = 'X'.

  • Some futures in bpel which are not possible with ESB and vice versa

    Can anyone please tell me some futures in bpel which are not possible with ESB and For some features available in ESB that are absence in BPEL?

    I think you've mistaken the meaning of both technologies. ESB actually works as a part of BPEL, for instance you can create partner link from any esb service.
    ESB service can only expose data or retrieve and process (transform) them from another service. BPEL is using services like ESB as a source and adds decision making functionality which is not present in ESB.

Maybe you are looking for

  • How do I know if my account is active and working

    I paid my annual fee to keep my spybot -webroot active. The icon disappeared. How do I know if I am still protected? Where do I look to see if my computer is being scanned etc. Not sure what my status is

  • Is Acrobat 9 Pro updating in the suite?

    I've got the Master Collection and routinely check for updates for all the CS4 applications. But Acrobat 9 Pro is not updating automatically. I had to manually download several updates for this (I don't use this app regularly). Should it be auto upda

  • Unable to disable cookies in FF 3.6.10 in some web sites

    Both cookies boxes are unchecked in FF 3.6.8. Enter some web sites which over-ride my [no cookies allowed] settings and write unlimited cookies to my hard disk. What is procedure to block and avoid these unwanted cookies ? In the past my system has r

  • Partner Function in Project Definition Level

    Hi All I understand that it is possible to determine what are the partner functions available to the project based on the value indicated in the partner determination field of the project. The list of partner functions to be available are maintained

  • CS2 Installation won't launch

    I reinstalled CS2 but for the time being just Illustrator from the package. That was successful up until the point that I tried to launch or open the program. I get the following pop-up box every time: Microsoft Visual C++ Runtime Library Runtime Err