Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
37977969
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
37977969
编写于
6月 03, 2014
作者:
A
asaha
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
f9cd70e2
3b4107a5
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
322 addition
and
78 deletion
+322
-78
make/mapfiles/libnet/mapfile-vers
make/mapfiles/libnet/mapfile-vers
+2
-0
src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java
...are/classes/java/net/AbstractPlainDatagramSocketImpl.java
+4
-0
src/share/classes/java/net/DatagramSocket.java
src/share/classes/java/net/DatagramSocket.java
+39
-3
src/share/classes/java/net/DatagramSocketImpl.java
src/share/classes/java/net/DatagramSocketImpl.java
+6
-0
src/share/classes/sun/nio/ch/DatagramChannelImpl.java
src/share/classes/sun/nio/ch/DatagramChannelImpl.java
+20
-0
src/share/classes/sun/security/ssl/CipherSuite.java
src/share/classes/sun/security/ssl/CipherSuite.java
+48
-49
src/solaris/native/java/net/AbstractPlainDatagramSocketImpl.c
...solaris/native/java/net/AbstractPlainDatagramSocketImpl.c
+89
-0
src/windows/native/java/net/AbstractPlainDatagramSocketImpl.c
...windows/native/java/net/AbstractPlainDatagramSocketImpl.c
+82
-0
src/windows/native/sun/awt/splashscreen/splashscreen_sys.c
src/windows/native/sun/awt/splashscreen/splashscreen_sys.c
+9
-4
test/sun/security/ssl/sanity/ciphersuites/CipherSuitesInOrder.java
...security/ssl/sanity/ciphersuites/CipherSuitesInOrder.java
+23
-22
未找到文件。
make/mapfiles/libnet/mapfile-vers
浏览文件 @
37977969
...
...
@@ -28,6 +28,8 @@
SUNWprivate_1.1 {
global:
JNI_OnLoad;
Java_java_net_AbstractPlainDatagramSocketImpl_init;
Java_java_net_AbstractPlainDatagramSocketImpl_dataAvailable;
Java_java_net_PlainSocketImpl_socketListen;
Java_java_net_PlainDatagramSocketImpl_getTTL;
Java_java_net_PlainDatagramSocketImpl_init;
...
...
src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java
浏览文件 @
37977969
...
...
@@ -68,6 +68,7 @@ abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl
return
null
;
}
});
init
();
}
/**
...
...
@@ -362,4 +363,7 @@ abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl
protected
boolean
nativeConnectDisabled
()
{
return
connectDisabled
;
}
native
int
dataAvailable
();
private
static
native
void
init
();
}
src/share/classes/java/net/DatagramSocket.java
浏览文件 @
37977969
...
...
@@ -83,6 +83,17 @@ class DatagramSocket implements java.io.Closeable {
*/
boolean
oldImpl
=
false
;
/**
* Set when a socket is ST_CONNECTED until we are certain
* that any packets which might have been received prior
* to calling connect() but not read by the application
* have been read. During this time we check the source
* address of all packets received to be sure they are from
* the connected destination. Other packets are read but
* silently dropped.
*/
private
boolean
explicitFilter
=
false
;
private
int
bytesLeftToFilter
;
/*
* Connection state:
* ST_NOT_CONNECTED = socket not connected
...
...
@@ -142,6 +153,15 @@ class DatagramSocket implements java.io.Closeable {
// socket is now connected by the impl
connectState
=
ST_CONNECTED
;
// Do we need to filter some packets?
int
avail
=
getImpl
().
dataAvailable
();
if
(
avail
==
-
1
)
{
throw
new
SocketException
();
}
explicitFilter
=
avail
>
0
;
if
(
explicitFilter
)
{
bytesLeftToFilter
=
getReceiveBufferSize
();
}
}
catch
(
SocketException
se
)
{
// connection will be emulated by DatagramSocket
...
...
@@ -490,6 +510,7 @@ class DatagramSocket implements java.io.Closeable {
connectedAddress
=
null
;
connectedPort
=
-
1
;
connectState
=
ST_NOT_CONNECTED
;
explicitFilter
=
false
;
}
}
...
...
@@ -748,10 +769,12 @@ class DatagramSocket implements java.io.Closeable {
}
// end of while
}
}
if
(
connectState
==
ST_CONNECTED_NO_IMPL
)
{
if
(
(
connectState
==
ST_CONNECTED_NO_IMPL
)
||
explicitFilter
)
{
// We have to do the filtering the old fashioned way since
// the native impl doesn't support connect or the connect
// via the impl failed.
// via the impl failed, or .. "explicitFilter" may be set when
// a socket is connected via the impl, for a period of time
// when packets from other sources might be queued on socket.
boolean
stop
=
false
;
while
(!
stop
)
{
InetAddress
peekAddress
=
null
;
...
...
@@ -770,8 +793,12 @@ class DatagramSocket implements java.io.Closeable {
if
((!
connectedAddress
.
equals
(
peekAddress
))
||
(
connectedPort
!=
peekPort
))
{
// throw the packet away and silently continue
DatagramPacket
tmp
=
new
DatagramPacket
(
new
byte
[
1
],
1
);
DatagramPacket
tmp
=
new
DatagramPacket
(
new
byte
[
1024
],
1024
);
getImpl
().
receive
(
tmp
);
if
(
explicitFilter
)
{
bytesLeftToFilter
-=
tmp
.
getLength
();
}
}
else
{
stop
=
true
;
}
...
...
@@ -780,6 +807,15 @@ class DatagramSocket implements java.io.Closeable {
// If the security check succeeds, or the datagram is
// connected then receive the packet
getImpl
().
receive
(
p
);
if
(
explicitFilter
)
{
bytesLeftToFilter
-=
p
.
getLength
();
if
(
bytesLeftToFilter
<=
0
)
{
explicitFilter
=
false
;
}
else
{
// break out of filter, if there is no more data queued
explicitFilter
=
getImpl
().
dataAvailable
()
>
0
;
}
}
}
}
...
...
src/share/classes/java/net/DatagramSocketImpl.java
浏览文件 @
37977969
...
...
@@ -47,6 +47,12 @@ public abstract class DatagramSocketImpl implements SocketOptions {
*/
protected
FileDescriptor
fd
;
int
dataAvailable
()
{
// default impl returns zero, which disables the calling
// functionality
return
0
;
}
/**
* The DatagramSocket or MulticastSocket
* that owns this impl
...
...
src/share/classes/sun/nio/ch/DatagramChannelImpl.java
浏览文件 @
37977969
...
...
@@ -755,6 +755,26 @@ class DatagramChannelImpl
// set or refresh local address
localAddress
=
Net
.
localAddress
(
fd
);
// flush any packets already received.
boolean
blocking
=
false
;
synchronized
(
blockingLock
())
{
try
{
blocking
=
isBlocking
();
// remainder of each packet thrown away
ByteBuffer
tmpBuf
=
ByteBuffer
.
allocate
(
1
);
if
(
blocking
)
{
configureBlocking
(
false
);
}
do
{
tmpBuf
.
clear
();
}
while
(
read
(
tmpBuf
)
>
0
);
}
finally
{
if
(
blocking
)
{
configureBlocking
(
true
);
}
}
}
}
}
}
...
...
src/share/classes/sun/security/ssl/CipherSuite.java
浏览文件 @
37977969
/*
* Copyright (c) 2002, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -968,7 +968,7 @@ final class CipherSuite implements Comparable<CipherSuite> {
* 1. Prefer Suite B compliant cipher suites, see RFC6460 (To be
* changed later, see below).
* 2. Prefer the stronger bulk cipher, in the order of AES_256(GCM),
* AES_128(GCM), AES_256, AES_128,
RC-4, 3DES-EDE
.
* AES_128(GCM), AES_256, AES_128,
3DES-EDE, RC-4
.
* 3. Prefer the stronger MAC algorithm, in the order of SHA384,
* SHA256, SHA, MD5.
* 4. Prefer the better performance of key exchange and digital
...
...
@@ -1055,18 +1055,6 @@ final class CipherSuite implements Comparable<CipherSuite> {
add
(
"TLS_DHE_DSS_WITH_AES_128_CBC_SHA"
,
0x0032
,
--
p
,
K_DHE_DSS
,
B_AES_128
,
T
);
// RC-4
add
(
"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA"
,
0xC007
,
--
p
,
K_ECDHE_ECDSA
,
B_RC4_128
,
N
);
add
(
"TLS_ECDHE_RSA_WITH_RC4_128_SHA"
,
0xC011
,
--
p
,
K_ECDHE_RSA
,
B_RC4_128
,
N
);
add
(
"SSL_RSA_WITH_RC4_128_SHA"
,
0x0005
,
--
p
,
K_RSA
,
B_RC4_128
,
N
);
add
(
"TLS_ECDH_ECDSA_WITH_RC4_128_SHA"
,
0xC002
,
--
p
,
K_ECDH_ECDSA
,
B_RC4_128
,
N
);
add
(
"TLS_ECDH_RSA_WITH_RC4_128_SHA"
,
0xC00C
,
--
p
,
K_ECDH_RSA
,
B_RC4_128
,
N
);
// Cipher suites in GCM mode, see RFC 5288/5289.
//
// We may increase the priority of cipher suites in GCM mode when
...
...
@@ -1127,6 +1115,17 @@ final class CipherSuite implements Comparable<CipherSuite> {
add
(
"SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA"
,
0x0013
,
--
p
,
K_DHE_DSS
,
B_3DES
,
N
);
// RC-4
add
(
"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA"
,
0xC007
,
--
p
,
K_ECDHE_ECDSA
,
B_RC4_128
,
N
);
add
(
"TLS_ECDHE_RSA_WITH_RC4_128_SHA"
,
0xC011
,
--
p
,
K_ECDHE_RSA
,
B_RC4_128
,
N
);
add
(
"SSL_RSA_WITH_RC4_128_SHA"
,
0x0005
,
--
p
,
K_RSA
,
B_RC4_128
,
N
);
add
(
"TLS_ECDH_ECDSA_WITH_RC4_128_SHA"
,
0xC002
,
--
p
,
K_ECDH_ECDSA
,
B_RC4_128
,
N
);
add
(
"TLS_ECDH_RSA_WITH_RC4_128_SHA"
,
0xC00C
,
--
p
,
K_ECDH_RSA
,
B_RC4_128
,
N
);
add
(
"SSL_RSA_WITH_RC4_128_MD5"
,
0x0004
,
--
p
,
K_RSA
,
B_RC4_128
,
N
);
...
...
@@ -1146,7 +1145,7 @@ final class CipherSuite implements Comparable<CipherSuite> {
* 2. If a cipher suite has been obsoleted, we put it at the end of
* the list.
* 3. Prefer the stronger bulk cipher, in the order of AES_256,
* AES_128,
RC-4, 3DES-EDE, DES, RC4_40, DES
40, NULL.
* AES_128,
3DES-EDE, RC-4, DES, DES40, RC4_
40, NULL.
* 4. Prefer the stronger MAC algorithm, in the order of SHA384,
* SHA256, SHA, MD5.
* 5. Prefer the better performance of key exchange and digital
...
...
@@ -1174,32 +1173,15 @@ final class CipherSuite implements Comparable<CipherSuite> {
add
(
"TLS_DH_anon_WITH_AES_128_CBC_SHA"
,
0x0034
,
--
p
,
K_DH_ANON
,
B_AES_128
,
N
);
add
(
"TLS_ECDH_anon_WITH_RC4_128_SHA"
,
0xC016
,
--
p
,
K_ECDH_ANON
,
B_RC4_128
,
N
);
add
(
"SSL_DH_anon_WITH_RC4_128_MD5"
,
0x0018
,
--
p
,
K_DH_ANON
,
B_RC4_128
,
N
);
add
(
"TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA"
,
0xC017
,
--
p
,
K_ECDH_ANON
,
B_3DES
,
N
);
add
(
"SSL_DH_anon_WITH_3DES_EDE_CBC_SHA"
,
0x001b
,
--
p
,
K_DH_ANON
,
B_3DES
,
N
);
add
(
"TLS_RSA_WITH_NULL_SHA256"
,
0x003b
,
--
p
,
K_RSA
,
B_NULL
,
N
,
max
,
tls12
,
P_SHA256
);
add
(
"TLS_ECDHE_ECDSA_WITH_NULL_SHA"
,
0xC006
,
--
p
,
K_ECDHE_ECDSA
,
B_NULL
,
N
);
add
(
"TLS_ECDHE_RSA_WITH_NULL_SHA"
,
0xC010
,
--
p
,
K_ECDHE_RSA
,
B_NULL
,
N
);
add
(
"SSL_RSA_WITH_NULL_SHA"
,
0x0002
,
--
p
,
K_RSA
,
B_NULL
,
N
);
add
(
"TLS_ECDH_ECDSA_WITH_NULL_SHA"
,
0xC001
,
--
p
,
K_ECDH_ECDSA
,
B_NULL
,
N
);
add
(
"TLS_ECDH_RSA_WITH_NULL_SHA"
,
0xC00B
,
--
p
,
K_ECDH_RSA
,
B_NULL
,
N
);
add
(
"TLS_ECDH_anon_WITH_NULL_SHA"
,
0xC015
,
--
p
,
K_ECDH_ANON
,
B_NULL
,
N
);
add
(
"SSL_RSA_WITH_NULL_MD5"
,
0x0001
,
--
p
,
K_RSA
,
B_NULL
,
N
);
add
(
"TLS_ECDH_anon_WITH_RC4_128_SHA"
,
0xC016
,
--
p
,
K_ECDH_ANON
,
B_RC4_128
,
N
);
add
(
"SSL_DH_anon_WITH_RC4_128_MD5"
,
0x0018
,
--
p
,
K_DH_ANON
,
B_RC4_128
,
N
);
// weak cipher suites obsoleted in TLS 1.2
add
(
"SSL_RSA_WITH_DES_CBC_SHA"
,
...
...
@@ -1212,11 +1194,6 @@ final class CipherSuite implements Comparable<CipherSuite> {
0x001a
,
--
p
,
K_DH_ANON
,
B_DES
,
N
,
tls12
);
// weak cipher suites obsoleted in TLS 1.1
add
(
"SSL_RSA_EXPORT_WITH_RC4_40_MD5"
,
0x0003
,
--
p
,
K_RSA_EXPORT
,
B_RC4_40
,
N
,
tls11
);
add
(
"SSL_DH_anon_EXPORT_WITH_RC4_40_MD5"
,
0x0017
,
--
p
,
K_DH_ANON
,
B_RC4_40
,
N
,
tls11
);
add
(
"SSL_RSA_EXPORT_WITH_DES40_CBC_SHA"
,
0x0008
,
--
p
,
K_RSA_EXPORT
,
B_DES_40
,
N
,
tls11
);
add
(
"SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA"
,
...
...
@@ -1226,27 +1203,49 @@ final class CipherSuite implements Comparable<CipherSuite> {
add
(
"SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA"
,
0x0019
,
--
p
,
K_DH_ANON
,
B_DES_40
,
N
,
tls11
);
add
(
"SSL_RSA_EXPORT_WITH_RC4_40_MD5"
,
0x0003
,
--
p
,
K_RSA_EXPORT
,
B_RC4_40
,
N
,
tls11
);
add
(
"SSL_DH_anon_EXPORT_WITH_RC4_40_MD5"
,
0x0017
,
--
p
,
K_DH_ANON
,
B_RC4_40
,
N
,
tls11
);
add
(
"TLS_RSA_WITH_NULL_SHA256"
,
0x003b
,
--
p
,
K_RSA
,
B_NULL
,
N
,
max
,
tls12
,
P_SHA256
);
add
(
"TLS_ECDHE_ECDSA_WITH_NULL_SHA"
,
0xC006
,
--
p
,
K_ECDHE_ECDSA
,
B_NULL
,
N
);
add
(
"TLS_ECDHE_RSA_WITH_NULL_SHA"
,
0xC010
,
--
p
,
K_ECDHE_RSA
,
B_NULL
,
N
);
add
(
"SSL_RSA_WITH_NULL_SHA"
,
0x0002
,
--
p
,
K_RSA
,
B_NULL
,
N
);
add
(
"TLS_ECDH_ECDSA_WITH_NULL_SHA"
,
0xC001
,
--
p
,
K_ECDH_ECDSA
,
B_NULL
,
N
);
add
(
"TLS_ECDH_RSA_WITH_NULL_SHA"
,
0xC00B
,
--
p
,
K_ECDH_RSA
,
B_NULL
,
N
);
add
(
"TLS_ECDH_anon_WITH_NULL_SHA"
,
0xC015
,
--
p
,
K_ECDH_ANON
,
B_NULL
,
N
);
add
(
"SSL_RSA_WITH_NULL_MD5"
,
0x0001
,
--
p
,
K_RSA
,
B_NULL
,
N
);
// Supported Kerberos ciphersuites from RFC2712
add
(
"TLS_KRB5_WITH_RC4_128_SHA"
,
0x0020
,
--
p
,
K_KRB5
,
B_RC4_128
,
N
);
add
(
"TLS_KRB5_WITH_RC4_128_MD5"
,
0x0024
,
--
p
,
K_KRB5
,
B_RC4_128
,
N
);
add
(
"TLS_KRB5_WITH_3DES_EDE_CBC_SHA"
,
0x001f
,
--
p
,
K_KRB5
,
B_3DES
,
N
);
add
(
"TLS_KRB5_WITH_3DES_EDE_CBC_MD5"
,
0x0023
,
--
p
,
K_KRB5
,
B_3DES
,
N
);
add
(
"TLS_KRB5_WITH_RC4_128_SHA"
,
0x0020
,
--
p
,
K_KRB5
,
B_RC4_128
,
N
);
add
(
"TLS_KRB5_WITH_RC4_128_MD5"
,
0x0024
,
--
p
,
K_KRB5
,
B_RC4_128
,
N
);
add
(
"TLS_KRB5_WITH_DES_CBC_SHA"
,
0x001e
,
--
p
,
K_KRB5
,
B_DES
,
N
,
tls12
);
add
(
"TLS_KRB5_WITH_DES_CBC_MD5"
,
0x0022
,
--
p
,
K_KRB5
,
B_DES
,
N
,
tls12
);
add
(
"TLS_KRB5_EXPORT_WITH_RC4_40_SHA"
,
0x0028
,
--
p
,
K_KRB5_EXPORT
,
B_RC4_40
,
N
,
tls11
);
add
(
"TLS_KRB5_EXPORT_WITH_RC4_40_MD5"
,
0x002b
,
--
p
,
K_KRB5_EXPORT
,
B_RC4_40
,
N
,
tls11
);
add
(
"TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA"
,
0x0026
,
--
p
,
K_KRB5_EXPORT
,
B_DES_40
,
N
,
tls11
);
add
(
"TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5"
,
0x0029
,
--
p
,
K_KRB5_EXPORT
,
B_DES_40
,
N
,
tls11
);
add
(
"TLS_KRB5_EXPORT_WITH_RC4_40_SHA"
,
0x0028
,
--
p
,
K_KRB5_EXPORT
,
B_RC4_40
,
N
,
tls11
);
add
(
"TLS_KRB5_EXPORT_WITH_RC4_40_MD5"
,
0x002b
,
--
p
,
K_KRB5_EXPORT
,
B_RC4_40
,
N
,
tls11
);
/*
* Other values from the TLS Cipher Suite Registry, as of August 2010.
...
...
src/solaris/native/java/net/AbstractPlainDatagramSocketImpl.c
0 → 100644
浏览文件 @
37977969
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include <sys/types.h>
#include <sys/socket.h>
#ifdef __solaris__
#include <unistd.h>
#include <stropts.h>
#ifndef BSD_COMP
#define BSD_COMP
#endif
#endif
#include <sys/ioctl.h>
#include "jvm.h"
#include "jni_util.h"
#include "net_util.h"
#include "java_net_AbstractPlainDatagramSocketImpl.h"
static
jfieldID
IO_fd_fdID
;
static
jfieldID
apdsi_fdID
;
/*
* Class: java_net_AbstractPlainDatagramSocketImpl
* Method: init
* Signature: ()V
*/
JNIEXPORT
void
JNICALL
Java_java_net_AbstractPlainDatagramSocketImpl_init
(
JNIEnv
*
env
,
jclass
cls
)
{
apdsi_fdID
=
(
*
env
)
->
GetFieldID
(
env
,
cls
,
"fd"
,
"Ljava/io/FileDescriptor;"
);
CHECK_NULL
(
apdsi_fdID
);
IO_fd_fdID
=
NET_GetFileDescriptorID
(
env
);
}
/*
* Class: java_net_AbstractPlainDatagramSocketImpl
* Method: dataAvailable
* Signature: ()I
*/
JNIEXPORT
jint
JNICALL
Java_java_net_AbstractPlainDatagramSocketImpl_dataAvailable
(
JNIEnv
*
env
,
jobject
this
)
{
int
fd
,
retval
;
jobject
fdObj
=
(
*
env
)
->
GetObjectField
(
env
,
this
,
apdsi_fdID
);
if
(
IS_NULL
(
fdObj
))
{
JNU_ThrowByName
(
env
,
JNU_JAVANETPKG
"SocketException"
,
"Socket closed"
);
return
-
1
;
}
fd
=
(
*
env
)
->
GetIntField
(
env
,
fdObj
,
IO_fd_fdID
);
if
(
ioctl
(
fd
,
FIONREAD
,
&
retval
)
<
0
)
{
return
-
1
;
}
return
retval
;
}
src/windows/native/java/net/AbstractPlainDatagramSocketImpl.c
0 → 100644
浏览文件 @
37977969
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include <windows.h>
#include <winsock2.h>
#include "jvm.h"
#include "jni_util.h"
#include "net_util.h"
#include "java_net_AbstractPlainDatagramSocketImpl.h"
static
jfieldID
IO_fd_fdID
;
static
jfieldID
apdsi_fdID
;
/*
* Class: java_net_AbstractPlainDatagramSocketImpl
* Method: init
* Signature: ()V
*/
JNIEXPORT
void
JNICALL
Java_java_net_AbstractPlainDatagramSocketImpl_init
(
JNIEnv
*
env
,
jclass
cls
)
{
apdsi_fdID
=
(
*
env
)
->
GetFieldID
(
env
,
cls
,
"fd"
,
"Ljava/io/FileDescriptor;"
);
CHECK_NULL
(
apdsi_fdID
);
IO_fd_fdID
=
NET_GetFileDescriptorID
(
env
);
CHECK_NULL
(
IO_fd_fdID
);
JNU_CHECK_EXCEPTION
(
env
);
}
/*
* Class: java_net_AbstractPlainDatagramSocketImpl
* Method: dataAvailable
* Signature: ()I
*/
JNIEXPORT
jint
JNICALL
Java_java_net_AbstractPlainDatagramSocketImpl_dataAvailable
(
JNIEnv
*
env
,
jobject
this
)
{
SOCKET
fd
;
int
retval
;
jobject
fdObj
=
(
*
env
)
->
GetObjectField
(
env
,
this
,
apdsi_fdID
);
if
(
IS_NULL
(
fdObj
))
{
JNU_ThrowByName
(
env
,
JNU_JAVANETPKG
"SocketException"
,
"Socket closed"
);
return
-
1
;
}
fd
=
(
SOCKET
)(
*
env
)
->
GetIntField
(
env
,
fdObj
,
IO_fd_fdID
);
if
(
ioctlsocket
(
fd
,
FIONREAD
,
&
retval
)
<
0
)
{
return
-
1
;
}
return
retval
;
}
src/windows/native/sun/awt/splashscreen/splashscreen_sys.c
浏览文件 @
37977969
/*
* Copyright (c) 2005, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -213,6 +213,14 @@ SplashPaint(Splash * splash, HDC hdc)
void
SplashRedrawWindow
(
Splash
*
splash
)
{
if
(
!
SplashIsStillLooping
(
splash
))
{
KillTimer
(
splash
->
hWnd
,
0
);
}
if
(
splash
->
currentFrame
<
0
)
{
return
;
}
SplashUpdateScreenData
(
splash
);
if
(
splash
->
isLayered
)
{
BLENDFUNCTION
bf
;
...
...
@@ -303,9 +311,6 @@ SplashRedrawWindow(Splash * splash)
time
=
0
;
SetTimer
(
splash
->
hWnd
,
0
,
time
,
NULL
);
}
else
{
KillTimer
(
splash
->
hWnd
,
0
);
}
}
void
SplashReconfigureNow
(
Splash
*
splash
)
{
...
...
test/sun/security/ssl/sanity/ciphersuites/CipherSuitesInOrder.java
浏览文件 @
37977969
...
...
@@ -69,11 +69,6 @@ public class CipherSuitesInOrder {
"TLS_ECDH_RSA_WITH_AES_128_CBC_SHA"
,
"TLS_DHE_RSA_WITH_AES_128_CBC_SHA"
,
"TLS_DHE_DSS_WITH_AES_128_CBC_SHA"
,
"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA"
,
"TLS_ECDHE_RSA_WITH_RC4_128_SHA"
,
"SSL_RSA_WITH_RC4_128_SHA"
,
"TLS_ECDH_ECDSA_WITH_RC4_128_SHA"
,
"TLS_ECDH_RSA_WITH_RC4_128_SHA"
,
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
,
"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"
,
...
...
@@ -97,6 +92,12 @@ public class CipherSuitesInOrder {
"TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA"
,
"SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA"
,
"SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA"
,
"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA"
,
"TLS_ECDHE_RSA_WITH_RC4_128_SHA"
,
"SSL_RSA_WITH_RC4_128_SHA"
,
"TLS_ECDH_ECDSA_WITH_RC4_128_SHA"
,
"TLS_ECDH_RSA_WITH_RC4_128_SHA"
,
"SSL_RSA_WITH_RC4_128_MD5"
,
"TLS_EMPTY_RENEGOTIATION_INFO_SCSV"
,
...
...
@@ -110,38 +111,38 @@ public class CipherSuitesInOrder {
"TLS_DH_anon_WITH_AES_128_CBC_SHA256"
,
"TLS_ECDH_anon_WITH_AES_128_CBC_SHA"
,
"TLS_DH_anon_WITH_AES_128_CBC_SHA"
,
"TLS_ECDH_anon_WITH_RC4_128_SHA"
,
"SSL_DH_anon_WITH_RC4_128_MD5"
,
"TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA"
,
"SSL_DH_anon_WITH_3DES_EDE_CBC_SHA"
,
"TLS_RSA_WITH_NULL_SHA256"
,
"TLS_ECDHE_ECDSA_WITH_NULL_SHA"
,
"TLS_ECDHE_RSA_WITH_NULL_SHA"
,
"SSL_RSA_WITH_NULL_SHA"
,
"TLS_ECDH_ECDSA_WITH_NULL_SHA"
,
"TLS_ECDH_RSA_WITH_NULL_SHA"
,
"TLS_ECDH_anon_WITH_NULL_SHA"
,
"SSL_RSA_WITH_NULL_MD5"
,
"TLS_ECDH_anon_WITH_RC4_128_SHA"
,
"SSL_DH_anon_WITH_RC4_128_MD5"
,
"SSL_RSA_WITH_DES_CBC_SHA"
,
"SSL_DHE_RSA_WITH_DES_CBC_SHA"
,
"SSL_DHE_DSS_WITH_DES_CBC_SHA"
,
"SSL_DH_anon_WITH_DES_CBC_SHA"
,
"SSL_RSA_EXPORT_WITH_RC4_40_MD5"
,
"SSL_DH_anon_EXPORT_WITH_RC4_40_MD5"
,
"SSL_RSA_EXPORT_WITH_DES40_CBC_SHA"
,
"SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA"
,
"SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA"
,
"SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA"
,
"TLS_KRB5_WITH_RC4_128_SHA"
,
"TLS_KRB5_WITH_RC4_128_MD5"
,
"SSL_RSA_EXPORT_WITH_RC4_40_MD5"
,
"SSL_DH_anon_EXPORT_WITH_RC4_40_MD5"
,
"TLS_RSA_WITH_NULL_SHA256"
,
"TLS_ECDHE_ECDSA_WITH_NULL_SHA"
,
"TLS_ECDHE_RSA_WITH_NULL_SHA"
,
"SSL_RSA_WITH_NULL_SHA"
,
"TLS_ECDH_ECDSA_WITH_NULL_SHA"
,
"TLS_ECDH_RSA_WITH_NULL_SHA"
,
"TLS_ECDH_anon_WITH_NULL_SHA"
,
"SSL_RSA_WITH_NULL_MD5"
,
"TLS_KRB5_WITH_3DES_EDE_CBC_SHA"
,
"TLS_KRB5_WITH_3DES_EDE_CBC_MD5"
,
"TLS_KRB5_WITH_RC4_128_SHA"
,
"TLS_KRB5_WITH_RC4_128_MD5"
,
"TLS_KRB5_WITH_DES_CBC_SHA"
,
"TLS_KRB5_WITH_DES_CBC_MD5"
,
"TLS_KRB5_EXPORT_WITH_RC4_40_SHA"
,
"TLS_KRB5_EXPORT_WITH_RC4_40_MD5"
,
"TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA"
,
"TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5"
"TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5"
,
"TLS_KRB5_EXPORT_WITH_RC4_40_SHA"
,
"TLS_KRB5_EXPORT_WITH_RC4_40_MD5"
);
private
final
static
String
[]
protocols
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录