src/java.base/share/classes/sun/security/ssl/OutputRecord.java
branchJDK-8145252-TLS13-branch
changeset 56686 07dc566630ee
parent 56542 56aaa6cb3693
child 56784 6210466cf1ac
equal deleted inserted replaced
56685:c7e7234828c0 56686:07dc566630ee
   286             SSLWriteCipher encCipher, byte contentType, ByteBuffer destination,
   286             SSLWriteCipher encCipher, byte contentType, ByteBuffer destination,
   287             int headerOffset, int dstLim, int headerSize,
   287             int headerOffset, int dstLim, int headerSize,
   288             ProtocolVersion protocolVersion) {
   288             ProtocolVersion protocolVersion) {
   289         if (!encCipher.isNullCipher()) {
   289         if (!encCipher.isNullCipher()) {
   290             // inner plaintext, using zero length padding.
   290             // inner plaintext, using zero length padding.
   291             int pos = destination.position();
   291             int endOfPt = destination.limit();
   292             destination.position(destination.limit());
   292             destination.limit(endOfPt + 1);
   293             destination.limit(destination.limit() + 1);
   293             destination.put(endOfPt, contentType);
   294             destination.put(contentType);
       
   295             destination.position(pos);
       
   296         }
   294         }
   297 
   295 
   298         // use the right TLSCiphertext.opaque_type and legacy_record_version
   296         // use the right TLSCiphertext.opaque_type and legacy_record_version
   299         ProtocolVersion pv = protocolVersion;
   297         ProtocolVersion pv = protocolVersion;
   300         if (!encCipher.isNullCipher()) {
   298         if (!encCipher.isNullCipher()) {