提交 dac269da 编写于 作者: X xuelei

7180038: regression test failure, SSLEngineBadBufferArrayAccess.java

Reviewed-by: weijun
上级 c9228fce
/* /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -287,18 +287,27 @@ public class SSLEngineBadBufferArrayAccess { ...@@ -287,18 +287,27 @@ public class SSLEngineBadBufferArrayAccess {
if (serverClose) { if (serverClose) {
serverEngine.closeOutbound(); serverEngine.closeOutbound();
} }
}
if (closed && isEngineClosed(serverEngine)) {
serverIn.flip(); serverIn.flip();
/* /*
* A sanity check to ensure we got what was sent. * A sanity check to ensure we got what was sent.
*/ */
if (serverIn.remaining() != clientMsg.length) { if (serverIn.remaining() != clientMsg.length) {
throw new Exception("Client: Data length error"); throw new Exception("Client: Data length error -" +
" IF THIS FAILS, PLEASE REPORT THIS TO THE" +
" SECURITY TEAM. WE HAVE BEEN UNABLE TO" +
" RELIABLY DUPLICATE.");
} }
for (int i = 0; i < clientMsg.length; i++) { for (int i = 0; i < clientMsg.length; i++) {
if (clientMsg[i] != serverIn.get()) { if (clientMsg[i] != serverIn.get()) {
throw new Exception("Client: Data content error"); throw new Exception("Client: Data content error -" +
" IF THIS FAILS, PLEASE REPORT THIS TO THE" +
" SECURITY TEAM. WE HAVE BEEN UNABLE TO" +
" RELIABLY DUPLICATE.");
} }
} }
serverIn.compact(); serverIn.compact();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册