Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8203614

Java API SSLEngine example code needs correction

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b08
    • Verification:
      Not verified

      Description

      A DESCRIPTION OF THE PROBLEM :
      Example code :
      BUFFER_UNDERFLOW:
             int netSize = engine.getSession().getPacketBufferSize();
             // Resize buffer if needed.
             if (netSize > dst.capacity()) { //**********************maybe should be :if (netSize > src.capacity()) {
                 ByteBuffer b = ByteBuffer.allocate(netSize);
                 src.flip();
                 b.put(src);
                 src = b;
             }
             // Obtain more inbound network data for src,
             // then retry the operation.
             break;
         // other cases: CLOSED, OK.

      FREQUENCY : always


        Attachments

          Activity

            People

            Assignee:
            jnimeh Jamil Nimeh
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: