Issues with calling more than one PKCS11 instance

Hi all,
I've more or less identified exactly what the problem is, so I'm wondering if this is a bug that will be fixed. I have multiple PKCS11 providers, one that uses NSS in fips mode and one that uses a library for a smart card. This is the sample code I'm using:
KeyStore ks = KeyStore.getInstance("PKCS11","SunPKCS11-smartcard");
KeyStore ts = KeyStore.getInstance("PKCS11","SunPKCS11-NSSfips");
ks.load(null,"12345");
ts.load(null,"12345abcd");
What a lot of debugging has shown me is that when I make that first ks.load call, in the P11KeyStore class, a static variable, CKA_TRUSTED_SUPPORTED gets set to false, which prevents me from loading trusted certs in the second call (ts.load). It's fine if I call them in reverse order, because that static variable gets set after I get all my trusted certs but later in the program another class makes that call and fails. I think this should be a bug. The CKA_TRUSTED_SUPPORTED variable never gets reset to true even if it is a valid attribute.
Edited by: 929934 on Apr 24, 2012 11:16 AM

Please disregard.
I placed the function filter() in the event.result as a
second line in the function that load the arraycollection for my
datagrid.

Similar Messages

  • Problem with starting more than one SwingWorker

    Hello
    I wonder if anyone could tell me if there are known problems with starting more than one SwingWorker thread at once?
    In response to an action the user performs, I need to obtain several lists of things from the server. This includes a couple of server-calls, and I want to do the server calls in a thread outside the awt-event thread. So I start a couple of SwingWorker-threads. This works fine sometimes, but not always. Sometimes code in some of the SwingWorkers finished method does not update the ui. I can see that the correct calls are made, but the ui is still not updated correctly. The problem seems to be related to the sequence of when the different thread are finished. For instance, if the sequence is like this:
    SwingWorker1.construct
    SwingWorker2.construct
    SwingWorker1.finished
    SwingWorker2.finished
    Things go fine, but if the sequence is:
    SwingWorker1.construct
    SwingWorker1.finished
    SwingWorker2.construct
    SwingWorker2.finished
    the ui-updates in SwingWorker1.finished is not done correctly.
    Can anyone help me with this?

    This is the point:
    In one SwingWorker thread you have 1 construct method, and 1 finish method - which are both invoked once.
    Therefore you only have one opportunity to update the gui in that thread. This forces you to use many threads if you want regular updates, which I try to avoid.
    Therefore, the solution!
    Have a loop in the construct method that executes the algorithm accordingly, updating the gui accordingly at regular times, maintaining just the 1 thread - becomes easier and nicer for the programmer and the JVM.
    The finish method in this case is to update the gui when all iterations are finished.
    There is nothing wrong with this. Just because you have a finish method that is called in the event-dispatching thread doesn't mean that all your update code must be in there.
    What you MUST ensure is that ALL your update code is executed in the event-dispatching thread, that is the most important thing. After all, SwingWorker is just a helper class, not the gospel template of how to update a gui.

  • Problem with printing more than one page (ghostscript broken?)

    Hello,
    since one of the last package updates I have problems with printing more than one page. The print problems occurs as well with pdf files as well with printing websites. I use an actual KDE system with commercial turboprint printer driver. The first page always prints fine, but all consecutive pages are corrupted.  As from a similar problem some months ago, I assume a broken ghostscript package. I tried to downgrade ghostscript to check that, but I get depency problems:
    root@arch32 dieter]# ls -l /var/cache/pacman/pkg/ghostscript-*
    -rw-r--r-- 1 root root  9906288 21. Mär 2010  /var/cache/pacman/pkg/ghostscript-8.71-3-i686.pkg.tar.xz
    -rw-r--r-- 1 root root 11402624  8. Okt 22:44 /var/cache/pacman/pkg/ghostscript-9.00-1-i686.pkg.tar.xz
    [root@arch32 dieter]# pacman -U /var/cache/pacman/pkg/ghostscript-8.71-3-i686.pkg.tar.xz
    Löse Abhängigkeiten auf...
    Suche nach Zwischen-Konflikten...
    Fehler: Konnte den Vorgang (Kann Abhängigkeiten nicht erfüllen) nicht vorbereiten
    :: libspectre: benötigt ghostscript>=9.00
    [root@arch32 dieter]#
    Anyone else having printing problems or a solution for my problem?
    Thanks, Dieter

    This may not be related but I had a problem printing a pdf today whereby the second page got corrupted. The same pdf had printed fine several months ago. I realised that (long story) for some reason I had switched drivers (HP printer) from hpijs to hpcups. I installed the printer again as a "new" printer using the hpijs driver and it printed properly this time.
    So it may be that the bug causes issues with some drivers. You could try an alternative driver for the printer as temporary workaround?

  • Startup issue when having more than one database on machine

    Startup issue when having more than one database on machine:
    I’ve installed two databases.
    When I shutdown one of the database and try to start it up using
    Startup pfile=’…location..’;
    I get ora-12514: TNS: listener does not currently know of service rquirest in connect descriptor
    when I try it again after 3 seconds, I get a new error, ora-01041: internal error. Hostdef extension doesn’t exist
    Shutdown and Startup gave no problems when I had one database. Why am I getting problems when I have two databases?
    I’m using: show parameter pfile|spfile; to make sure I have the right parameter locations, so the error shouldn’t be from location.
    I’ve never installed two databases on one machine, so maybe I’m making a first-timer’s error.
    Anyone know how to get this working, i.e. starting and stopping DB without issues?
    Using oracle 11gR2 on Windows 7 64bit, all is working normal.
    Thanks,
    Ayman
    Edited by: aymanzone on Jun 15, 2011 9:27 AM

    aymanzone wrote:
    my oracle_sid is set to the name of one of my databases
    echo %oracle_sid%
    shows me the name of my first database.
    Still not working though.
    When I start the services of both databases using Services, I can connect and run queries from both of the database.
    Edited by: aymanzone on Jun 15, 2011 11:47 AMFirstly ... the Oracle Service for the instance should be started for the DB you are trying to connect or start.
    Next ... from the command prompt:
    set oracle_sid=<Instance_Name>
    sqlplus sys as sysdba
    startup pfile='location of the respective db pfile'
    Now, if you want to start or connect to another DB which is on the same server (again assuming the Service is STARTED) ...
    From the same command prompt session or other ....
    set oracle_sid=<Other_Instance_Name>
    sqlplus sys as sysdba
    startup pfile='location of the respective db pfile'
    Edited by: Srikanth on Jun 16, 2011 12:27 AM

  • One Goods Issue document for more than one delivery

    Hi
    I would like to know if it's possibile to post one goods issue relative to more than one delivery. Generally the relationship between goods issue and delivery is one to one but we have the necessity to create one global goods issue relative to more than one delivery. Do you know if it's possible? How can we do?
    Thank you very much for your attention
    Andrea

    Hi Andrea.,
                        I dont think it is possible in standard SAp functionality,it may be possible with some technical changes
    REWARD if helpfull
    Thanks & Regards
    Narayana

  • Problem with Assigning more than one value to GROUP dynamically

    Hi,
    I have a problem with assigning more than one value to GROUP varible dynamically.
    I am able to assign only one value dynamically through Initialization block
    I have even tried with the ROW-WISE initialization blocks..
    using this query..
    SELECT 'GROUP', G.GROUP_NAME
    FROM GROUP_MAP G
    WHERE G.USER_NAME = ':USER'
    if GROUP_1, GROUP_2 are two groups to be associated,
    through this, i'm getting " GROUP_1;GROUP_2 " into GROUP variable ( seen from Narative view )
    And the properties and securities of this Groups are not inherited.
    Please let me know if there is any other way to Populate the GROUP variable dynamically with more than one value.
    Thank you.,

    Hi,
    i finally got in this way..
    i had created a function which takes USER_NAME as input and returns a string that contains the GROUP names with semicolon delimeted..
    Though it is same as that of ROW-WISE initialization,
    the properties of those groups are also being inherited..
    Now, i can assign more than one groups and its properties to a user dynamically.

  • More than one Portal instance on the same database

    Is it possible to have more than one Portal instance on the same database?

    Yes this is possible. We have run 2 separate portal instances on our test database successfully.

  • Time capsule issues backing up more than one MacBook Pro

    Hi all,
    i'm having an issue with a new 3Gb Time Capsule i've just bought and put online, I wonder if someone would be able to help please.
    I am trying to back up 3 MacBooks, a 2011 macbook pro, a 2012 macbook pro and a 2012 Macbook Air, they are all running Mountain Lion.
    My main macbook has worked fine and I have backed up the drive a few times without any real issue, however when I try and back up one of the other two onto the same Time Capsule, I get the error, "the backup disk image "/volumes/data/.sparsebundle" could not be accessed"
    I've had a look around all the forums to see if I can see a potential problem and fix, however I can't find anywhere that says it works fine for the first backup but not for any other ones!?
    The only other option I have seen is to completely remove the data backup and start again, but I don't really want to do that unless theres no other options.
    Hope you can help, thanks in advance.
    Oh and one other thing which i've seen, is that you can't backup more than one system unless you re-partition the Time Capsule!? Surely this isn't correct???

    You do not have to partition the TC.. indeed you cannot..
    But the issue with Lion or ML losing the sparsebundle is now as common as dust in a drought.
    Yes, it can do a backup then fail to do another.. and there is no reason for it other than poor networking on later OS.
    Reboot the TC.. and maybe the whole network. Reminds you of that initial support question for another OS.. did you turn it off and on again...??
    http://pondini.org/TM/Troubleshooting.html
    Read C12 and C17.
    Welcome to ML.

  • Calling more than one action at a time in fault policy file

    hi
    can any one tell me how to refer two actions at a time in faultpoicies.xml file . To make it clear to you i want to call both rethrow action and human intervention action after retry . please refer below faultpolicy file
    <?xml version="1.0" encoding="windows-1252" ?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <faultPolicy version="2.0.1" id="BpelFaultMechanism"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:bindingFault">
    <condition>
    <action ref="retry-action"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="retry-action">
    <retry>
    <retryCount>4</retryCount>
    <retryInterval>2</retryInterval>
    <retryFailureAction ref="rethrow-action"/>
    </retry>
    </Action>
    <Action id="human-intervention-action">
    <humanIntervention/>
    </Action>
    <Action id="rethrow-action">
    <rethrowFault/>
    </Action>
    </Actions>
    </faultPolicy>
    </faultPolicies>
    please reply asap
    Regards
    siva

    Hi FRNzzz!! wrote:
    hi i am using oracle 10g database.
    can it be possible ?
    in if condition we can have more than one variable in one condition
    if a=100 then
    b:=200;
    c:=300;
    end if; how it will be in case statement ? i have searched lot on internet but didnt get
    case
    when a=100 then 200, 300 ... ???
    thanksnot sure if I got your question correctly, is this what you are looking for?
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2      a number := 100;
      3      b number;
      4      c number;
      5  begin
      6      case
      7        when a = 100 then
      8          b := 200;
      9          c := 300;
    10        when a = 0 then
    11          b := 300;
    12          c := 400;
    13        else
    14          b := 0;
    15          c := 0;
    16      end case;
    17  dbms_output.put_line('a :'||a||' b :'||b||' c :'||c);
    18* end;
    SQL> /
    a :100 b :200 c :300
    PL/SQL procedure successfully completed.

  • Can you call more than one person on skype?

    When you are on Skype can you video chat with more than one person / conference call?

    Yes. Microsoft owns Skype. So signing in with a Microsoft Account will log you into skype on that account.
    You can initiate a multi part conference call from a computer opt an iPad that is looged on using a Microsoft Account.
    Buit you can also start a peer to peer call from your iPad.

  • ITune Album Artwork issue - There are more than one for a song

    Hi,
    I've done this before....having a couple of artwork for one song. It was back when I used iTune 3 or so. Now that I'm using iTune 7. I can't seem to find a way to add more than one artwork to a song. I tried the iTune's help, which says I can just drag another artwork into the song's artwork box. But, that would replace the artwork I had earlier.
    Anyone knows a way to add more than one artwork to a song? I'm using 10.4.9 if that helps.
    Thanks,
    DFguy.

    Hi guys,
    Thanks for the advice. I tried both in file info and the artwork box (while playing the file) and they both work. I sware to god that they both did NOT work before. That's why I had to post this stupid questions. I don't know why it didn't work before. Maybe because I selected the artwork that's already there? Anyway, now that this issue is solved, I'm very happy!
    Thanks again,
    DFguy.

  • Problem calling more than one instance of a dll from TestStand

    Hi,
    I've posted this message in the LabWindows forum a few days ago and haven't gotten any answer. I have made a DLL with the evaluation version of LabWindows 7.1 to connect to a Telnet server and perform various commands. This DLL is used with TestStand 3.1 . In TestStand, I have to connect simultaneously to the same Telnet server twice to start an application with both of those connection, with different parameters. I use Threads in TestStand to call the DLL and everything seems to be fine on that side. I enter the DLL at the same time for both threads but it seems that the 1st thread waits until the 2nd thread is at the end of the function before he executes the InetTelnetOpen command to start the Telnet session. Is it normal that we can only have one Telnet connection at a time?
    To see that I've placed some time stamps in a log. For the first Thread, almost a minute passes by between the first 2 time stamps but in the 2nd thread it take less than a second.
    Yet, they both wait for eachother to exit the DLL as the time stamp at the end of the execution is the same.
    I really need some enlightenment here ;-)
    Louis
    Attachments:
    TelnetTest.txt ‏3 KB

    Tiwi,
    The blocking that InetTelnetRunScript does is probably there for a reason. That method is probably not safe for multiple threads to call into at the same time. There is likely another way to do what you are trying to do that can be done in parallel. Perhaps with lower-level telnet function calls. I recommend you post to the CVI forum asking if there is another way to do what you are trying to do from multiple threads in parallel. This does not sound like a teststand issue. If you are calling into your dll from multiple testand threads, then the code in your dll function is being executed in parallel. The cvi function you are calling however, might not be reentrant (reentrant means able to be called by multiple threads in parallel) so it is making one of your threads block until the other completes. I suspect there is a different way to do what you are trying to do that will not have this problem, but I think the changes that you will need to make will be in the dll and not on the teststand side. I recommend you post to the CVI group and explain what you are trying to accomplish and see if they have a solution for you.
    Hope this helps,
    -Doug
    P.S. Each process on the Windows operating system (of which teststand is one) can only load one copy of any particular dll at a time. Also, loading multiple copies is not something that would be likely to solve the problem you are running into. One possibility is to use the call executable step type and create an executable that does what your dll function does, but that is probably not the best solution and might still end up blocking at the same location. The best solution is probably to use an alternate method of accomplishing whatever you are trying to do with the telnet function you are calling that does not have the limitations of that function.

  • SSO with more than one Apex Instance

    I have an application server (10ASgR2) which is integrated with an apex instance...
    can i integrate the same app server with another instance of apex or there can be only one instance of apex(HTML_DB) integrated with application server(SSO)??

    You can register any number of partner applications with a login server.
    Scott

  • SchemaFactory.newSchema can't be called more than one with the same sources

    I am using Java 5 or Java 6. Did you already observed such behavior? Seems a bug but I didn't find a Bug ID match.
    // Create an array of sources
    final InputStream xsd = new FileInputStream("src/xml.xsd");
    StreamSource[] sources = new StreamSource[1];
    sources[0] = new StreamSource(xsd);
    // Create the Schema Factory       
    final SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); // Create a schema
    Schema schema1 = schemaFactory.newSchema(sources);
    // Create a second schema, it will throw an Excepion
    Schema schema2 = schemaFactory.newSchema(sources);
    If you are creating a new array of sources before to create the second schema, it works fine. It seems that SchemaFactory.newSchema is making the passed sources as not "reusable"
    Thrown Exception :
    Exception in thread "main" org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:2245)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchema(XSDHandler.java:1590)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:438)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:556)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:523)
    at com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl.newSchema(SchemaFactoryImpl.java:206)
    at javaapplication5.Main.main(Main.java:55)

    I've looked further into the matter and the problem is that the newSchema() method closes the underlying input stream, as a result of which there is no way to reuse the same source object if it is based on an input stream. There's another alternative: if it is not necessary for you to provide the schemas in an array, you can use the "newSchema(URL schema)" method. The advantage of using an URL object is that it can hold a reference to files inside a jar file.

  • URGENT! Help with creating more than one linked button

    Hi!
    Could someone help a newbie with trying to figure out this.
    I work in Flash CS3, AS3.
    I've created a button that links to another webpage by using this code (the code is added to a separate layer):
    import flash.events.MouseEvent;
    steud.addEventListener(MouseEvent.CLICK, onMouseClick);
    function onMouseClick(e:MouseEvent):void
      var request:URLRequest = new URLRequest("http://www.xx.html");
      navigateToURL(request, "_blank");
    It works just fine, but the problem is that I want to add more buttons (and links) to it, and thats where I get stuck. When I try just adding a new layer and adding the code there, everything stops working. I've also tried copy/pasting the code beneath the first one, with no results.
    Does anyone know?
    /J

    I will try
    I've modified this tutorial http://www.tutcity.com/view/create-a-sliding-content-with-back-and-forward-navigation.2394 7.html and the intent is to make a sliding menue that contains images of plants that link to the url of the plant. I've got buttons (with a mouse over effect that shows the name of the plant), and in AS2 I could use GetURL to link an invisible button to the URL, but to create the sliding effect, I had to use AS3. I've understood that GetURL doesn't work in AS3.
    In scene 1 I have three layers; content, arrows and actions.
    The actionscript looks like this:
    // File downloaded from www.riacodes.com
    import com.greensock.*;
    var arrayX :Array = [0,-800,-1600,-2400,-3200,-4000,-4800];
    var currentIndex : Number = 0;
    left_mc.addEventListener(MouseEvent.CLICK,navigate);
    right_mc.addEventListener(MouseEvent.CLICK,navigate);
    left_mc.buttonMode = true;
    right_mc.buttonMode = true;
    checkArrows();
    function navigate(e:MouseEvent):void{
    if(e.currentTarget == left_mc) currentIndex --;
    else currentIndex ++;
    checkArrows();
    TweenLite.to(content_mc,.5 ,{x:arrayX[currentIndex]});
    function checkArrows():void{
    if(currentIndex == 0) left_mc.visible = false;
    else if (currentIndex == arrayX.length - 1) right_mc.visible = false;
    else{
    left_mc.visible = true;
    right_mc.visible= true;
    On the content layer I have the backgroundimages that slides as a movieclip.
    If I doubleclick on the movieclip I have two layers, one with the bakground images and the invisible buttons, and one layer where I've put the script:
    import flash.events.MouseEvent;
    JC.addEventListener(MouseEvent.CLICK, onMouseClick);
    function onMouseClick(e:MouseEvent):void
      var request:URLRequest = new URLRequest("http://www.blomsterbolaget.se/vaxtsidor/Dracaena_fragrans_JC.html");
      navigateToURL(request, "_blank");
    JC is the instance name of one of my buttons. So far everything works, but I want to add linking to another button, and I'm not sure how to do this correctly. When I've created the invisible buttons, I've drawn a square, converted it to a button, named it, and named the instance name. Changed the Alpha to 0. I've also added an On mouse over effect, but I don't think that has anything to do with this.
    Hope you can help med!
    /J

Maybe you are looking for

  • How can I change order of email accounts in Mail on Mountain Lion?

    In Mail on Mountain Lion I have only two email accounts, but the wrong one has been set as default (because it was an account I had overlooked and added later). I cannot find how to change the order of the email accounts. One possibility is to delete

  • IPhone no longer syncs with iTunes

    I upgraded my computer to Leopard today and everything seems to be working properly. However, when I plug in my iPhone it doesn't start and show up in iTunes. Is there something I've missed?

  • IPhone 5 apple logo flashing when on charge.

    My iPhone 5 randomly turned off last night and I was unable to turn it on. I then plugged it into a charger and the apple logo appeared and then went again. This flashing has been happening continuously - black screen for 5 seconds, apple logo for 10

  • How to display the Get info window for a file or folder

    Hello, How can I display the Get Info window for a file or folder using Applescript - instead of selecting it in the finder and using Command-I ? Thanks. lenpartico

  • Can I throw exception in constructor?

    I just want to add some constraints on the object. I'm thinking to add the constraints to the constructor, when every time create a new object , check first. If obey the rule, that's fine. If not, just throw it? Can I do like this way?? e.g Class Dis