Someone please review...Is this a bug in SSLEngine?

I have been dealing with this for days and finally wrote a JUnit test just against the SSLEngine itself. I am about to file a bug report, but can someone please verify that they are having the same problem.
Basically, on a rehanshake, just after a Runnable is retrieved and before it is run, the SSLEngine will not unwrap data. Here is an excerpt from the unit test....
          result = server.unwrap(encPacket, unencrPacket);
          assertEquals(HandshakeStatus.NEED_TASK, result.getHandshakeStatus());
          assertEquals(Status.OK, result.getStatus());     
          r = serverEngine.getDelegatedTask(); //get task but don't run it yet...wait until after decrypt of real data
          ByteBuffer dataOut = ByteBuffer.allocate(server.getSession().getApplicationBufferSize());
          dataOut.clear();
          helper.doneFillingBuffer(encData);
          log.fine("datain1="+encData+" out="+dataOut);
          result = serverEngine.unwrap(encData, dataOut);
          log.fine("datain2="+encData+" out="+dataOut);
          assertEquals(HandshakeStatus.NEED_TASK, result.getHandshakeStatus());
          assertEquals(Status.OK, result.getStatus());
FINE: datain1=java.nio.HeapByteBuffer[pos=0 lim=37 cap=16665] out=java.nio.HeapByteBuffer[pos=0 lim=16384 cap=16384]
Jul 4, 2005 3:45:50 PM biz.xsoftware.impl.nio.secure.test.TestNewAsynchSSLEngine testRawSSLEngine
FINE: datain2=java.nio.HeapByteBuffer[pos=0 lim=37 cap=16665] out=java.nio.HeapByteBuffer[pos=0 lim=16384 cap=16384]Notice the status of the engine is still status=OK and handshake=NEED_TASK after trying to read the data that came in after the Runnable was retrieved. The log statements log that the encData was not even read from and the dataOut was not read to. Here are the logs proving that encData and dataOut wasn't touched at all.......
FINE: datain1=java.nio.HeapByteBuffer[pos=0 lim=37 cap=16665] out=java.nio.HeapByteBuffer[pos=0 lim=16384 cap=16384]
Jul 4, 2005 3:45:50 PM biz.xsoftware.impl.nio.secure.test.TestNewAsynchSSLEngine testRawSSLEngine
FINE: datain2=java.nio.HeapByteBuffer[pos=0 lim=37 cap=16665] out=java.nio.HeapByteBuffer[pos=0 lim=16384 cap=16384]This may be "by design" such that data backs up until the Runnable is run which in myopinion is slightly dangerous.
Full code of JUnit test(not real implementation code, just reproduction of problem with SSLEngine unit test) can be found at
http://forum.java.sun.com/thread.jspa?threadID=641529&tstart=0
thanks,
dean

actually, I was thinking the status after trying to
unwrap my application data would have been...
handShakeState = NEED_TASK (since Runnable hadn't
been run yet).
status = BUFFER_UNDERFLOW or OK(depending on if the
application data had been decrypted or the engine
needed more data to decrypt the packet)
It seemed they had enough status to handle this
situation to me but I could be missing something else.You are right about this: I was thinking more about the internal SSLEngine state-machine states, if it really is a state machine. So, I have now had a look and there is an internal RENEGOTIATE state which is supposed to allow concurrent data and re-handshake, and from a very quick look at Sun's code this should work for both input and output of app data during renegotiation, so I am going to have another look at your code ...
One thing, the engine won't receive data in between the 2nd-last and the last WRAP of a re-handshake: this would be a TLS protocol violation (the Finished message must immediately follow the change_cipher_spec message).
I also found the following comment in the output code which I will risk Sun's wrath by quoting:
     * If we have a task outstanding, this MUST be done before
     * doing any more wrapping, because we could be in the middle
     * of receiving a handshake message, for example, a finished
     * message which would change the ciphers.
     */

Similar Messages

  • Hi there, I cannot seem to convert my iTunes MP4 songs to MP3 - can someone please assist in this regard?

    Hi there, I cannot seem to convert my iTunes MP4 songs to MP3 - can someone please assist in this regard?

    Hello @MK,
    This functionality has been moved under the File menu in iTunes 11, where you will find a submenu labelled "Create New Version." From here you can choose the format you would like it converted to. Do keep in mind that most music purchased from the iTunes Store (unless they're iTunes Plus purchases) cannot be converted.
    iTunes 11 for Mac: Save a copy of a song in a new file format
    http://support.apple.com/kb/PH12167
    Cheers,
    Allen

  • SOMEONE PLEASE HELP ME THIS IS MY FIRST TIME DOING THIS MY IPOD IS DISABLED AND IT SAID CONNECT TO I TUNES I DID THAT AND ITS NOT WORKING HELP ME PLEASE AND THANK U

    SOMEONE PLEASE HELP ME THIS IS MY FIRST TIME DOING THIS MY IPOD IS DISABLED AND IT SAID CONNECT TO I TUNES I DID THAT AND ITS NOT WORKING HELP ME PLEASE AND THANK U

    Please turn off your caps lock.
    See http://support.apple.com/kb/HT1212.

  • My "fn" button is stuck on only revealing mission control in Lion. With this problem none of my "f" keys will work nor can I hold "fn" and delete to delete text in opposite direction. Can someone please help with this?

    My "fn" button is stuck on only revealing mission control in Lion. With this problem none of my "f" keys will work nor can I hold "fn" and delete to delete text in opposite direction. Can someone please help with this?

    Following the fix here worked for me:
    https://discussions.apple.com/message/15680566#15680566
    except my plist file was in ~/Library instead of /Library.
    -Scott

  • I have just started using WD external hard drives, I use it to save my movies and music on. On more than one occasion, when I connect to my MacBook it erases everything on had on there. Can someone please help with this problem?

    I have just started using WD external hard drives, I use it to save my movies and music on. On more than one occasion, when I connect it to my MacBook it erases everything I had save on the hard drive. Can someone please help me with this problem? I am super tired of having to put all of my movies and music on the hard drive just to have it erased again. The products I am using are WD 4TB My Book and 2 TB My Passport external hard drives. When it happens, there is always an icon that reads, EFI, along with the My Book icon. Thank you for your assisstance.

    dwgar1322 wrote:
    I have just started using WD external hard drives, I use it to save my movies and music on. On more than one occasion, when I connect it to my MacBook it erases everything I had save on the hard drive. Can someone please help me with this problem? I am super tired of having to put all of my movies and music on the hard drive just to have it erased again. The products I am using are WD 4TB My Book and 2 TB My Passport external hard drives. When it happens, there is always an icon that reads, EFI, along with the My Book icon. Thank you for your assisstance.
    Yes, you have WD software installed  REMOVE IT !! 
    WD has warned its customers about their huge mistake that their software doesnt work on Mavericks and causes data loss.
    (also dont use WD drives anymore)
    Read all about it here:
    https://discussions.apple.com/thread/5475136?start=255&tstart=0
    See their website on removing the destructive WD software here:
    http://community.wd.com/t5/External-Drives-for-Mac/External-Drives-for-Mac-Exper iencing-Data-Loss-with-Maverick-OS/td-p/613775
    Western Digital External Hard Drives Experiencing Data Loss On OS X Mavericks
    http://www.cultofmac.com/252826/western-digital-external-hard-drives-experiencin g-data-loss-on-os-x-mavericks/

  • Could someone please sketch out this simple script for me?

    Could someone please sketch out a simple java script for me. I will have a document with one background
    layer and a layer set (group) called "Analyze" that consists of 63 adjustment layers. The layer names in that "Analyze" group(folder) will be
    "01" ...through "63" with 01 on the bottom and 63 at the top. Initially, all of the adjustment layers will be invisible and  the
    group will be closed (not expanded). I need a simple  script that will check for the first invisible layer in that group
    and make it visible without selecting that layer nor expanding the group. The script has to check
    for the first invisible layer every time it runs because other actions may have turned off a layer in the set.
    The point of this is so I can hotkey flipping on the layers one at a time without expanding the set or
    changing focus off the  background. It seems it should be a simple loop, but I just can't wrap  my head
    around all the objects (e.g. Layer as opposed to Layers  and  Artlayer as opposed to Artlayers)
    and the constants constants.
    for (i = 63; i>0; i--){                 /* I have found layer indexes 0 are the topmost layer */
      if( layerset[i] == INVISIBLE){
               layerset[i] = VISIBLE;
                  break;
    Could someone please write me a simple script that would do this?
    Edit I found this and its very close to what I need:
    var doc = app.activeDocument;
    for(var i = 0 ; i < doc.layers.length;i++){
      doc.layers[i].visible = (i % 2 == 0);
    From here : Function to show/hide layer with Photoshop script (JSX) - Stack Overflow
    In my case I would rewrite it to this
    for(var i = 62; i >=0; i--){
         if(  !doc.layers[i].visible){
              doc.layers[i].visible =TRUE;
              break;
    My problem is I just need  to traverse the layers in my layerset "Analyze"
    How do  I reference just those? Is there a doc.layersets["Analyze"].layers[i].visible = TRUE?
    Message was edited by: Shawn Laughlin To add more information

    Well this works:
    var doc = app.activeDocument;
    var analyze = doc.layerSets.getByName("Analyze").layers
    for(var i = 62 ; i >= 0; i --){
        if (!analyze[i].visible){
            analyze[i].visible =1;
            break;
    Hard to believe TRUE is not a constant in java.

  • HT201209 HOW CAN I ACCESS MY ITUNES CREDIT DOLLARS TO BUY A LIFE  ON CANDY CRUSH???WILL SOMEONE PLEASE ANSWER ME THIS QUESTION?

    WILL SOMEONE PLEASE TELL ME HOW I CAN ACCESS MY ITUNES CREDIT DOLLARS TO BUY A LIFE FOR CANDY CRUSH???

    There is no need to shout.
    What happens when you to try to buy it ? If you have a balance on your account then that should be automatically used, you can't/don't need to specify how it's charged.

  • Can someone try and reproduce this possible bug with DBMS_JOB.run

    11.2.0.2 EE
    OEL5
    getting an IO dump from what looks like entire shared pool. A call to a procedure using dbms_job.run shows the dump in the plan.
    Be interested to see if anyone is on 11.2.0.3 on OEL can reproduce. thanks.
    sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.2.0 Production on Tue Jan 8 16:44:33 2013
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning and Automatic Storage Management options
    SQL>
    SQL> ALTER Sesssion SET EVENTS '10046 trace name context forever, level 12';
    System altered.
    /* create a small proc that takes in a var and does nothing except set a variable */
    SQL>  
    SQL>   create procedure io_test ( v_in number)
      2  IS
      3     v_variable    varchar2(10);
      4    begin
      5     null;
      6  END;  
      7   
      8   
    Procedure created.
    /* flush the shared pool to simulate a start */
    SQL> alter system flush shared_pool;
    System altered.
    /* set our tracefile id */
    SQL> alter session set tracefile_identifier=err_test;    
    Session altered.
    /* call the proc from a dbms_job submission */
    SQL>   declare
      2    v_job_no  number;
      3    begin
      4     Dbms_Job.SUBMIT ( job  => v_job_no
      5                    , what => 'sys.io_test('  || 1234 || ');');
      6       Dbms_Job.RUN (v_job_no);
      7     end;   
      8  /  
    PL/SQL procedure successfully completed.
    SQL> tkprof the trace file, go to non-recursive statements at the bottom and we see following
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.04       0.04 4294967293 4294963226 4294967122           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.04       0.04 4294967293 4294963226 4294967122           1
    some behaviour notes.
    1. If I call the proc directly, I dont see the huge IO, its only dbms_job.run that does it.
    2. If I call the dbms_job.run a second time I dont see it, its only when I flush the shared pool which simulates the first time I could be calling the proc which is how I found it initially
    3. If I call the dbms_job.run outside of a proc I do see it.
    4. Watch your IO and CPU if you generate it. Huge spike to coincide with the figures in the trace.
    5. 4294967293 is very close 2^32, is also the size of my shared pool so looks like entire pool is being dumped.
    6. Have reproduced on 3 instances on 3 separate servers. all same version 11.2.0.2.0 and patch level which is 2012 Q2.
    7. change the proc to have the variable commented out and we dont see the dump.
    8. I have a call open with support a while now but havent been able to reproduce on their side. Interested to see if someone has OEL 5, 11.2.0.2 instance, can generate it and also an 11.2.0.3 instance and can show its not in that.
    thanks.

    961469 wrote:
    rjamya wrote:
    I am suspecting this is a tkprof issue, analyzing the same trace file via orasrp doesnt show this behavior. Also the high physical reads shown are missing in the raw trace file.Im not so sure, I can see it in the raw trace file.
    do you see it in raw trace file? if so can you post the STAT line showing high disk read (pr=nnnnnnnn) values ? I dont see it in the trace file that i generated.
    Raj

  • Will someone PLEASE sort out this confusion.

    A while ago I sent an email to BT regarding clearing up a confusion on my paperless bill. I received the following directly quoted reply which is by no means clear.
    "I have checked your account and confirm that the bill dated 11/08/11 for £30.20. The recent bill dated 12/09/11 is your other monthly bill for £42.41.
    Presently, you are on Broadband option 3 + Unlimited Anytime plan at £28.00 (inclusive VAT) per month and Line rental is on top of this, which is £13.90 (inclusive VAT) per month. So, these are your monthly charges."
    So am I paying 2 monthly payments on 2 seperate bills. Or am I paying £28 for the broadband plus the line rental fee of what appears to be approx £13 or so as ONE monthly bill combined, a total of £42.xxx a month.
    This is starting to get confusing to say the least. Because if I take what has been said by the person who replied to me I am now paying a total of what appears to be £70 odd per month for a service that stated £28+line rental for both bb and anytime calls when I clicked to start it.
    Thanks
    Garry.

    Hi You can  give the Live Chat team a go, you can chat to them by clicking on the banner at the top of the "Bills & Call Packages" board.
    They're open Monday to Friday 09:00 to 18:00.
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

  • Help! could someone please look at this

    I am trying to use JSpinner to display range 0.005 -- 0.995. My initial value is 0.625. But when spinner is displayed it always display 1.000. If I extend my Max value to 1.000, then my arrows work correctly, if I use my Max (0.995), arrows have no effect on value it remains at 1.000.
    Here is my code.
    SpinnerNumberModel numMod = new SpinnerNumberModel(0.625, 0.005, 0.995, 0.005);
    JSpinner spinner = new JSpinner(numMod);
    JSpinner.NumberEditor numEdtr = new JSpinner.NumberEditor(spinner,"0.000");
    spinner.setEditor(numEdtr);
    When I try to debug values they are correct, but initial display is always 1.000 no matter whatever is my initial value ranging between 0.005 -- 0.995
    System.out.println("spinner.getValue: "+spinner.getValue());
    System.out.println("spinner.getNextValue: "+spinner.getNextValue());
    System.out.println"spinner.getPreviousValue: "+ spinner.getPreviousValue () );
    I've tried using both JDK 1.4.1 & 1.4.2 with JBuilder 8 with same results. What also confusing me if set my MAX to 1.000 spinner, arrows behaves properly but if my MAX < 0 then arrows don't work at all. Also initial display is always 1.000.
    Please if someone can guide me what is wrong here.
    Thx
    FJF

    At first glance, your code looks okay to me. I added your snippet to an application and JSpinner behaved as predicted under 1.4.0. Can you give some more details? (and try to use more meaningful subject lines =)
    Cheerio,
    Felix
    public class Spin extends JFrame {
         public Spin() throws HeadlessException {
              super( "Spin" );
              SpinnerNumberModel numMod = new SpinnerNumberModel(0.625, 0.005, 0.995, 0.005);
              JSpinner spinner = new JSpinner(numMod);
              JSpinner.NumberEditor numEdtr = new JSpinner.NumberEditor(spinner,"0.000");
              spinner.setEditor(numEdtr);
              JPanel mainpane = new JPanel();
              mainpane.add( spinner );
              setContentPane( mainpane );
              pack();
              setVisible( true );
         public static void main(String[] args) {
              Spin app = new Spin();
    }

  • SOMEONE PLEASE HELP!. shuffle mode bug

    everything is working great for the msot part except for the exception of shuffle mode i was trying it last ngiht and some songs would skip, make weird noises, or for any song i had a music video for the audio version in shuffle mode would seem unusually soft on full blast..if any one knows what to do please tell me. oh, and yes i already tried updating it but apparently im all up to date

    If you follow the Dave's Cave directions again, does it find more malware? You may have horrid infestation.

  • I saved my file as a regular Indesign file, and when I went to open it on a different computer it had a lock on it and will not let me open it. Can someone please explain why this is happening and how to unlock it? It's for a very important and urgent pro

    Please help if you can!

    Assuming the file is stored on a network server, and the "other computer" is on that network as well; with InDesign not running on either, navigate to the folder where the InDesign file is stored and find the lock file (it will have the extension .idlk). Delete it.

  • HT201401 Only some of my music that I have downloaded from itunes plays on my iphone. The songs that wont play have a round circle with a darker square in the middle. Can someone please tell what this means and how I can get the rest of my music on my iph

    I can only get some of my downloaded music from itunes on my iphone. The music that wont play has a round circle with a black square in the middle. Can someone help me to get all my music on my iphone. Thanks

    Once you successfully add you iTunes library to iTunes Match, you go to Settings>iTunes & App Store on your iOS device and turn on iTunes Match.  Your iTunes Match library will then appear on your iOS device.

  • Someone please help! This is so hard and confusing!!

    Ok, so call me crazy or obsessed, but my iPod mini was very special to me, and it was stolen from my bag about a day ago. I cannot pinpoint who would have stolen it, because my school is absolutely huge. However, isnt there some sort of way to know if they try to register it again on iTunes? I have the serial number, and that has to help in some way! Please help me, I want that iPod back so bad. I am dirt poor too, so I dont have the money to buy another one. I mean, the serial number has to be entered to register it to a new computer, so shouldn't it be able to be found some way if the serial number is registered again? I am desperate to know if that can help in some way! Please help me! There has to be some way to find out of it is registered somewhere else!

    Sorry your iPod got stolen, but their is no way for Apple to track the use of that iPod by the serial number.
    "I mean, the serial number has to be entered to register it to a new computer"
    No, it does not. An iPod can be used with unlimited computers without the need to register it.
    If you did register the product when you first got it, then if you've reported the theft to the Police along with the serial number, if it's recovered Apple will assist them to return it to you.
    That's all you can do.

  • Aline my slides to beats & fit selected slides to music track is always grey I've tried every thing can someone please help figure this out

    aline my slides to beats & fit selected slides to music track is always Gray i cant seem to figure it out its something simple i'm sure I've been trying to work it out for hours can some one help me activate these features

    Hello Michael,
    that seems to depend on the theme of your Slideshow.
    I found that all music adjustments are disabled, unless my Slideshow has the "Classic" theme, so if you really want to fit the slide duration to the music try to switch your presentation theme to "classic".
    Cheers
    Léonie
    P.S. that seems to be a bug - the manual does not mention any restrictions in the newer themes.

Maybe you are looking for

  • Image gets cut off when printing tiles

    My InDesign file includes an 8" x 28" page containing a full-bleed image that prints as 4 tiles of 8.5" x 11".  Whenever I print, the image does not print on the first tile. The foreground text and vector graphics print fine. The image is a PSD, but

  • IPhone Confirm Menu?

    While playing around with the iPhone SDK and some sample programs. I ran into something I would like to try to implement in a program of mine. Basically I want to ask a user if they " ARE SURE " about a particular action they invoke. The way I want t

  • Some code, ok in 9i jdbc, hang on 10g jdbc.

    because the getUpdateCount() method of PreparedStatement always return 1 on 10g.                pstmt =                Database.prepareStatement(cmd,java.sql.ResultSet.TYPE_FORWARD_ONLY,java.sql.ResultSet.CONCUR_READ_ONLY);                resultretur

  • How to fix incoming server for gmail

    how do i configure gmail on iphone 4s. it states INCOMING SERVER error and does not allow my gmail access as in past.

  • 08/2012 CMap resource updates

    CMap Resource Release (08/13/2012) by Ken Lunde ([email protected]) This release contains the following eight CMap resource changes: Adobe-Japan1-6: UniJIS-UTF8-H (CMapVersion=13.017) UniJIS-UTF16-H (CMapVersion=1.017) UniJIS-UTF32-H (CMapVersion=1.0