提交 97f8d985 编写于 作者: A asaha

Merge

......@@ -866,6 +866,7 @@ e03fff22900242d92a97839a9c095bb106bdc68f jdk8u162-b36
b6195815c4bbbf275f1aefd337d805eb66f2b5b8 jdk8u171-b00
f1792a59f1fa20e47fe5d4561754012440564bec jdk8u171-b01
cac020298633fc736f5e21afddf00145665ef0a7 jdk8u171-b02
e7e27f446209924f66a4bf86738f3e5f2fbbef5f jdk8u181-b00
c260afc0c5a13407aad4f066f81fba814bb0cbae jdk8u171-b03
ac700f67341a20ddae093c319da1c65e41edcacd jdk8u171-b04
863ef3413aa42c15fbdc14fef6732f2741f97046 jdk8u171-b05
......@@ -889,3 +890,6 @@ a8746b41e23a1deda3d0f41ed2eca3d3a4cc74de jdk8u191-b00
f52ece1d8708024735f06e7e3bdc771efbc073d0 jdk8u172-b09
9e9009034e5ce97a97f72c00cd37cf2a638fa1a4 jdk8u172-b10
2a041b1f858dc6a372ac07b8cf5bf6fab879dcc8 jdk8u172-b11
d902fae6241006af3c4cfc4ce82ebcb3efb9d725 jdk8u181-b01
baac18e216fb47b4cfa04169b3c3de58d667de7c jdk8u181-b02
d237c59d14e1c1fb1f750e9cdabcea6e711f4d34 jdk8u181-b03
/*
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018, 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
......@@ -674,20 +674,18 @@ class VirtualMachineImpl extends MirrorImpl
versionInfo().jdwpMinor >= 6;
}
public boolean canGetInstanceInfo() {
if (versionInfo().jdwpMajor < 1 ||
versionInfo().jdwpMinor < 6) {
if (versionInfo().jdwpMajor > 1 ||
versionInfo().jdwpMinor >= 6) {
validateVM();
return hasNewCapabilities() &&
capabilitiesNew().canGetInstanceInfo;
} else {
return false;
}
validateVM();
return hasNewCapabilities() &&
capabilitiesNew().canGetInstanceInfo;
}
public boolean canUseSourceNameFilters() {
if (versionInfo().jdwpMajor < 1 ||
versionInfo().jdwpMinor < 6) {
return false;
}
return true;
return versionInfo().jdwpMajor > 1 ||
versionInfo().jdwpMinor >= 6;
}
public boolean canForceEarlyReturn() {
validateVM();
......@@ -703,12 +701,8 @@ class VirtualMachineImpl extends MirrorImpl
capabilitiesNew().canGetSourceDebugExtension;
}
public boolean canGetClassFileVersion() {
if ( versionInfo().jdwpMajor < 1 &&
versionInfo().jdwpMinor < 6) {
return false;
} else {
return true;
}
return versionInfo().jdwpMajor > 1 ||
versionInfo().jdwpMinor >= 6;
}
public boolean canGetConstantPool() {
validateVM();
......
......@@ -1123,6 +1123,7 @@ public final class WToolkit extends SunToolkit implements Runnable {
}
if ((e instanceof MouseEvent) && comp.isEnabled() &&
comp.isFocusable() &&
(((comp instanceof TextComponent) &&
((TextComponent)comp).isEditable()) ||
((comp instanceof JTextComponent) &&
......
......@@ -490,8 +490,7 @@ void AwtToolkit::InitTouchKeyboardExeFilePath() {
HWND AwtToolkit::GetTouchKeyboardWindow() {
const TCHAR wndClassName[] = _T("IPTip_Main_Window");
HWND hwnd = ::FindWindow(wndClassName, NULL);
if ((hwnd != NULL) && ::IsWindow(hwnd) && ::IsWindowEnabled(hwnd) &&
::IsWindowVisible(hwnd)) {
if ((hwnd != NULL) && ::IsWindow(hwnd) && ::IsWindowEnabled(hwnd)) {
return hwnd;
}
return NULL;
......
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2017, 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
......@@ -142,8 +142,17 @@ public class Chain {
PrivateKey[] privKeys = new PrivateKey[N];
PublicKey[] pubKeys = new PublicKey[N];
PublicKey[] anotherPubKeys = new PublicKey[N];
KeyPairGenerator kpg = KeyPairGenerator.getInstance(
test.keyAlg.name);
Signature signature;
KeyPairGenerator kpg;
if (test.provider != Provider.Default) {
signature = Signature.getInstance(test.sigAlg.name,
test.provider.name);
kpg = KeyPairGenerator.getInstance(
test.keyAlg.name, test.provider.name);
} else {
signature = Signature.getInstance(test.sigAlg.name);
kpg = KeyPairGenerator.getInstance(test.keyAlg.name);
}
for (int j=0; j < N; j++) {
if (test.keySize != -1) {
kpg.initialize(test.keySize);
......@@ -162,14 +171,6 @@ public class Chain {
}
}
Signature signature;
if (test.provider != Provider.Default) {
signature = Signature.getInstance(test.sigAlg.name,
test.provider.name);
} else {
signature = Signature.getInstance(test.sigAlg.name);
}
// Create a chain of signed objects
SignedObject[] objects = new SignedObject[N];
objects[0] = new SignedObject(str, privKeys[0], signature);
......
......@@ -23,7 +23,7 @@
/**
* @test
* @bug 4206909 4813885 8189789
* @bug 4206909 4813885 8189789 8196854
* @summary Test basic functionality of DeflaterOutputStream/InflaterInputStream and GZIPOutputStream/GZIPInputStream, including flush
*/
......@@ -153,7 +153,6 @@ public class InflateIn_DeflateOut {
OutputStream output = new FlushableGZIPOutputStream(byteOutStream);
byte[] data = new byte[random.nextInt(1024 * 1024)];
byte[] buf = new byte[data.length];
random.nextBytes(data);
output.write(data);
......@@ -175,7 +174,7 @@ public class InflateIn_DeflateOut {
int numRead;
byte[] b = new byte[4 * 1024];
try {
while ((numRead = gzis.read(buf)) >= 0) {
while ((numRead = gzis.read(b)) >= 0) {
baos.write(b, 0, numRead);
}
} finally {
......
/*
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 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
......@@ -23,7 +23,7 @@
/**
* @test
* @bug 6405536 6414980
* @bug 6405536 6414980 8051972
* @summary Make sure that we can parse certificates using various named curves
* and verify their signatures
* @author Andreas Sterbenz
......@@ -153,8 +153,14 @@ public class ReadCertificates extends PKCS11Test {
signer = getRandomCert(certList);
} while (cert.getIssuerX500Principal().equals(signer.getSubjectX500Principal()));
try {
cert.verify(signer.getPublicKey());
throw new Exception("Verified invalid signature");
PublicKey signerPublicKey = signer.getPublicKey();
cert.verify(signerPublicKey);
// Ignore false positives
if (cert.getPublicKey().equals(signerPublicKey)) {
System.out.println("OK: self-signed certificate detected");
} else {
throw new Exception("Verified invalid signature");
}
} catch (SignatureException e) {
System.out.println("OK: " + e);
} catch (InvalidKeyException e) {
......
......@@ -29,7 +29,7 @@
* @run main/timeout=300 SupportedDSAParamGen 1024 160
* @run main/timeout=300 SupportedDSAParamGen 2048 224
* @run main/timeout=300 SupportedDSAParamGen 2048 256
* @run main/timeout=450 SupportedDSAParamGen 3072 256
* @run main/timeout=700 SupportedDSAParamGen 3072 256
*/
import java.security.*;
import java.security.spec.*;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册