From a3c0889315e194a7100ec989c5ecc1d9621a03b6 Mon Sep 17 00:00:00 2001 From: Serguei Spitsyn Date: Wed, 25 Feb 2015 01:02:04 -0800 Subject: [PATCH 01/58] 8046246: the constantPoolCacheOopDesc::adjust_method_entries() used in RedefineClasses does not scale Add new test java/lang/instrument/ManyMethodsBenchmarkAgent.java Reviewed-by: coleenp, dcubed --- .../instrument/ManyMethodsBenchmarkAgent.java | 75 ++++++++++ .../instrument/ManyMethodsBenchmarkApp.java | 141 ++++++++++++++++++ 2 files changed, 216 insertions(+) create mode 100644 jdk/test/java/lang/instrument/ManyMethodsBenchmarkAgent.java create mode 100644 jdk/test/java/lang/instrument/ManyMethodsBenchmarkApp.java diff --git a/jdk/test/java/lang/instrument/ManyMethodsBenchmarkAgent.java b/jdk/test/java/lang/instrument/ManyMethodsBenchmarkAgent.java new file mode 100644 index 00000000000..05f9f1942ff --- /dev/null +++ b/jdk/test/java/lang/instrument/ManyMethodsBenchmarkAgent.java @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2015, 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. + * + * 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. + */ + +/** + * @test + * @bug 8046246 + * @summary Tests and benchmarks the JVMTI RedefineClasses when a + * single class (and its parent) contains many methods. + * + * @run build ManyMethodsBenchmarkApp ManyMethodsBenchmarkAgent + * @run shell MakeJAR3.sh ManyMethodsBenchmarkAgent 'Can-Retransform-Classes: true' + * @run main/othervm -javaagent:ManyMethodsBenchmarkAgent.jar ManyMethodsBenchmarkApp + */ +import java.lang.instrument.*; + +public class ManyMethodsBenchmarkAgent +{ + public static boolean fail = false; + public static boolean completed = false; + private static Instrumentation instrumentation; + + public static void + premain( String agentArgs, + Instrumentation instrumentation) { + System.out.println("ManyMethodsBenchmarkAgent started"); + ManyMethodsBenchmarkAgent.instrumentation = instrumentation; + System.out.println("ManyMethodsBenchmarkAgent finished"); + } + + static void instr() { + System.out.println("ManyMethodsBenchmarkAgent.instr started"); + + Class[] allClasses = instrumentation.getAllLoadedClasses(); + + for (int i = 0; i < allClasses.length; i++) { + Class klass = allClasses[i]; + String name = klass.getName(); + if (!name.equals("Base")) { + continue; + } + System.err.println("Instrumenting the class: " + klass); + + try { + instrumentation.retransformClasses(klass); + } catch (Throwable e) { + System.err.println("Error: bad return from retransform: " + klass); + System.err.println(" ERROR: " + e); + fail = true; + } + } + completed = true; + System.out.println("ManyMethodsBenchmarkAgent.instr finished"); + } + +} diff --git a/jdk/test/java/lang/instrument/ManyMethodsBenchmarkApp.java b/jdk/test/java/lang/instrument/ManyMethodsBenchmarkApp.java new file mode 100644 index 00000000000..c85bf42b820 --- /dev/null +++ b/jdk/test/java/lang/instrument/ManyMethodsBenchmarkApp.java @@ -0,0 +1,141 @@ +/* + * Copyright 2015 Google Inc. 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. + * + * 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. + */ + +import java.io.File; +import java.io.FileWriter; +import java.io.PrintStream; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.Arrays; +import java.util.List; +import javax.tools.JavaCompiler; +import javax.tools.StandardJavaFileManager; +import javax.tools.ToolProvider; + +/** + * A manual benchmark of the JVMTI RedefineClasses when a + * single class (and its parent) contains many methods. + */ +public class ManyMethodsBenchmarkApp { + // Limit is 64k but we can not put such many as the CP limit is 32k. + // In practice, it means a real limit is much lower (less than 22000). + static final int METHOD_COUNT = 20000; + + static Class loadClassInNewClassLoader(String className) throws Exception { + URL[] urls = { new File(".").toURI().toURL() }; + URLClassLoader ucl = new URLClassLoader(urls, null); + Class klazz = Class.forName(className, true, ucl); + return klazz; + } + + static void benchmarkClassOperations(String className) throws Exception { + Class klazz = loadClassInNewClassLoader(className); + + Method[] methods = klazz.getDeclaredMethods(); + if (methods.length != METHOD_COUNT) { + throw new AssertionError("unexpected method count: " + methods.length + + " expected: " + METHOD_COUNT); + } + + methods = klazz.getMethods(); + // returned methods includes those inherited from Object + int objectMethodSlop = 100; + if (methods.length <= METHOD_COUNT || + methods.length >= METHOD_COUNT + objectMethodSlop) { + throw new AssertionError("unexpected method count: " + methods.length); + } + + // Invoke methods to make them appear in the constant pool cache + Object obj = klazz.newInstance(); + Object[] args = new Object[0]; + for (Method m: methods) { + try { + Class[] types = m.getParameterTypes(); + String name = m.getName(); + // System.out.println("method: " + name + "; argno: " + types.length); + if (types.length == 0 && name.length() == 2 && name.startsWith("f")) { + m.invoke(obj, args); + } + } catch (InvocationTargetException ex) { + ex.printStackTrace(); + } + } + } + + public static void main(String[] args) throws Exception { + System.out.println("test started: ManyMethodsBenchmarkApp"); + + // Create source files with many methods + File base = new File("Base.java"); + try (FileWriter fw = new FileWriter(base)) { + fw.write("public class Base {\n"); + final int L = 10; + // Each of the first L methods makes calls to its own chunk of METHOD_COUNT/L methods + for (int k = 0; k < L; k++) { + fw.write(" public void f" + k + "() {\n"); + int shift = (k == 0) ? L : 0; + for (int i = (k * (METHOD_COUNT/L)) + shift; i < (k + 1) * METHOD_COUNT/L; i++) { + fw.write(" f" + i + "();\n"); + } + fw.write(" }\n"); + } + + // The rest of (METHOD_COUNT - L) methods have empty body + for (int i = L; i < METHOD_COUNT; i++) { + fw.write(" public static void f" + i + "() {}\n"); + } + fw.write("}\n"); + } + + // Compile the generated source files. + JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); + List files = Arrays.asList(new File[] { base }); + try (StandardJavaFileManager fileManager = + compiler.getStandardFileManager(null, null, null)) { + compiler.getTask(null, fileManager, null, null, null, + fileManager.getJavaFileObjectsFromFiles(files)) + .call(); + } + + benchmarkClassOperations("Base"); + + ManyMethodsBenchmarkAgent.instr(); + + // Cleanup + base.delete(); + new File("Base.class").delete(); + if (!ManyMethodsBenchmarkAgent.completed) { + throw new Exception("ERROR: ManyMethodsBenchmarkAgent did not complete."); + } + + if (ManyMethodsBenchmarkAgent.fail) { + throw new Exception("ERROR: ManyMethodsBenchmarkAgent failed."); + } else { + System.out.println("ManyMethodsBenchmarkAgent succeeded."); + } + System.out.println("test finished: ManyMethodsBenchmarkApp"); + } +} From a8da73929a3d1cbcc69c5592f18b8226ab4800a5 Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Wed, 25 Feb 2015 14:01:27 +0300 Subject: [PATCH 02/58] 8043393: NullPointerException and no event received when clipboard data flavor changes Reviewed-by: ant, azvegint --- .../sun/awt/datatransfer/SunClipboard.java | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/jdk/src/java.desktop/share/classes/sun/awt/datatransfer/SunClipboard.java b/jdk/src/java.desktop/share/classes/sun/awt/datatransfer/SunClipboard.java index 258a298adbe..7e73f3fb284 100644 --- a/jdk/src/java.desktop/share/classes/sun/awt/datatransfer/SunClipboard.java +++ b/jdk/src/java.desktop/share/classes/sun/awt/datatransfer/SunClipboard.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2015, 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 @@ -40,7 +40,7 @@ import java.awt.datatransfer.UnsupportedFlavorException; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; -import java.util.Objects; +import java.util.Arrays; import java.util.Set; import java.util.HashSet; @@ -74,12 +74,11 @@ public abstract class SunClipboard extends Clipboard private volatile int numberOfFlavorListeners = 0; /** - * A set of DataFlavors that is available on - * this clipboard. It is used for tracking changes - * of DataFlavors available on this clipboard. + * A set of {@code DataFlavor}s that is available on this clipboard. It is + * used for tracking changes of {@code DataFlavor}s available on this + * clipboard. Can be {@code null}. */ - private volatile Set currentDataFlavors; - + private volatile long[] currentFormats; public SunClipboard(String name) { super(name); @@ -362,11 +361,11 @@ public abstract class SunClipboard extends Clipboard try { openClipboard(null); currentFormats = getClipboardFormats(); - } catch (IllegalStateException exc) { + } catch (final IllegalStateException ignored) { } finally { closeClipboard(); } - currentDataFlavors = formatArrayAsDataFlavorSet(currentFormats); + this.currentFormats = currentFormats; registerClipboardViewerChecked(); } @@ -383,7 +382,7 @@ public abstract class SunClipboard extends Clipboard } if (flavorListeners.remove(listener) && --numberOfFlavorListeners == 0) { unregisterClipboardViewerChecked(); - currentDataFlavors = null; + currentFormats = null; } } @@ -416,18 +415,16 @@ public abstract class SunClipboard extends Clipboard * @param formats data formats that have just been retrieved from * this clipboard */ - public void checkChange(long[] formats) { - Set prevDataFlavors = currentDataFlavors; - currentDataFlavors = formatArrayAsDataFlavorSet(formats); - - if (Objects.equals(prevDataFlavors, currentDataFlavors)) { + public final void checkChange(final long[] formats) { + if (Arrays.equals(formats, currentFormats)) { // we've been able to successfully get available on the clipboard // DataFlavors this and previous time and they are coincident; // don't notify return; } + currentFormats = formats; - for (AppContext appContext : AppContext.getAppContexts()) { + for (final AppContext appContext : AppContext.getAppContexts()) { if (appContext == null || appContext.isDisposed()) { continue; } From f2de6b3408244b0e94b042decbfbd855e911f853 Mon Sep 17 00:00:00 2001 From: Phil Race Date: Wed, 25 Feb 2015 13:45:09 -0800 Subject: [PATCH 03/58] 8073699: Memory leak in jdk/src/java/desktop/share/native/libjavajpeg/imageioJPEG.c Reviewed-by: bae, serb --- .../java.desktop/share/native/libjavajpeg/imageioJPEG.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/jdk/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c b/jdk/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c index 2fb507c0f66..f0d5c019a8d 100644 --- a/jdk/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c +++ b/jdk/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c @@ -2778,6 +2778,14 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage pb = &data->pixelBuf; if (setPixelBuffer(env, pb, buffer) == NOT_OK) { + if (scale != NULL) { + for (i = 0; i < numBands; i++) { + if (scale[i] != NULL) { + free(scale[i]); + } + } + free(scale); + } return data->abortFlag; // We already threw an out of memory exception } From b15e27a0b282ae2b7021850064d75613daa32cbb Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Thu, 26 Feb 2015 16:41:39 +0300 Subject: [PATCH 04/58] 8073795: JMenuBar looks bad under retina Reviewed-by: alexsch, azvegint --- .../com/apple/laf/AquaMenuBarBorder.java | 45 +++--- .../javax/swing/plaf/basic/BasicBorders.java | 10 +- .../javax/swing/plaf/metal/MetalBorders.java | 26 ++-- .../MisplacedBorder/MisplacedBorder.java | 135 ++++++++++++++++++ 4 files changed, 169 insertions(+), 47 deletions(-) create mode 100644 jdk/test/javax/swing/JMenuBar/MisplacedBorder/MisplacedBorder.java diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuBarBorder.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuBarBorder.java index 389eb4cfeec..bd5ab2b6a8a 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuBarBorder.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuBarBorder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2015, 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 @@ -25,46 +25,33 @@ package com.apple.laf; -import java.awt.*; +import java.awt.Color; +import java.awt.Component; +import java.awt.Graphics; +import java.awt.Insets; import javax.swing.border.Border; +import sun.swing.SwingUtilities2; + +/** + * The class represents the border of a {@code JMenuBar}. + */ public class AquaMenuBarBorder implements Border { - public AquaMenuBarBorder() { - super(); - } - /** - * Paints the border for the specified component with the specified - * position and size. - * @param c the component for which this border is being painted - * @param g the paint graphics - * @param x the x position of the painted border - * @param y the y position of the painted border - * @param width the width of the painted border - * @param height the height of the painted border - */ - public void paintBorder(final Component c, final Graphics g, final int x, final int y, final int width, final int height) { - // for now we don't paint a border. We let the button paint it since there - // needs to be a strict ordering for aqua components. - //paintButton(c, g, x, y, width, height); + @Override + public void paintBorder(final Component c, final Graphics g, final int x, + final int y, final int width, final int height) { g.setColor(Color.gray); - g.drawLine(x, y + height - 1, x + width, y + height - 1); + SwingUtilities2.drawHLine(g, x, x + width - 1, y + height - 1); } - /** - * Returns the insets of the border. - * @param c the component for which this border insets value applies - */ + @Override public Insets getBorderInsets(final Component c) { return new Insets(0, 0, 1, 0); } - /** - * Returns whether or not the border is opaque. If the border - * is opaque, it is responsible for filling in it's own - * background when painting. - */ + @Override public boolean isBorderOpaque() { return false; } diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicBorders.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicBorders.java index 633b2f91ee4..949c3e35f4a 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicBorders.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicBorders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -37,6 +37,8 @@ import java.awt.Rectangle; import java.awt.Color; import java.awt.Graphics; +import sun.swing.SwingUtilities2; + /** * Factory object that can vend Borders appropriate for the basic L & F. * @author Georges Saab @@ -453,10 +455,10 @@ public class BasicBorders { Color oldColor = g.getColor(); g.translate(x, y); g.setColor(shadow); - g.drawLine(0, height-2, width, height-2); + SwingUtilities2.drawHLine(g, 0, width - 1, height - 2); g.setColor(highlight); - g.drawLine(0, height-1, width, height-1); - g.translate(-x,-y); + SwingUtilities2.drawHLine(g, 0, width - 1, height - 1); + g.translate(-x, -y); g.setColor(oldColor); } diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBorders.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBorders.java index a49a4a8bb48..edbd02bbbad 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBorders.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBorders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, 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 @@ -40,6 +40,7 @@ import java.awt.Graphics; import java.awt.Window; import sun.swing.StringUIClientPropertyKey; +import sun.swing.SwingUtilities2; /** @@ -559,25 +560,22 @@ public class MetalBorders { protected static Insets borderInsets = new Insets( 1, 0, 1, 0 ); public void paintBorder( Component c, Graphics g, int x, int y, int w, int h ) { - g.translate( x, y ); + g.translate(x, y); if (MetalLookAndFeel.usingOcean()) { - // Only paint a border if we're not next to a horizontal - // toolbar - if ((c instanceof JMenuBar) && !MetalToolBarUI.doesMenuBarBorderToolBar((JMenuBar)c)) { + // Only paint a border if we're not next to a horizontal toolbar + if (c instanceof JMenuBar + && !MetalToolBarUI.doesMenuBarBorderToolBar((JMenuBar)c)) { g.setColor(MetalLookAndFeel.getControl()); - g.drawLine(0, h - 2, w, h - 2); + SwingUtilities2.drawHLine(g, 0, w - 1, h - 2); g.setColor(UIManager.getColor("MenuBar.borderColor")); - g.drawLine(0, h - 1, w, h - 1); + SwingUtilities2.drawHLine(g, 0, w - 1, h - 1); } + } else { + g.setColor(MetalLookAndFeel.getControlShadow()); + SwingUtilities2.drawHLine(g, 0, w - 1, h - 1); } - else { - g.setColor( MetalLookAndFeel.getControlShadow() ); - g.drawLine( 0, h-1, w, h-1 ); - } - - g.translate( -x, -y ); - + g.translate(-x, -y); } public Insets getBorderInsets(Component c, Insets newInsets) { diff --git a/jdk/test/javax/swing/JMenuBar/MisplacedBorder/MisplacedBorder.java b/jdk/test/javax/swing/JMenuBar/MisplacedBorder/MisplacedBorder.java new file mode 100644 index 00000000000..43a7dc31533 --- /dev/null +++ b/jdk/test/javax/swing/JMenuBar/MisplacedBorder/MisplacedBorder.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2015, 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. + * + * 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. + */ + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; + +import javax.imageio.ImageIO; +import javax.swing.JFrame; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; + +import static java.awt.image.BufferedImage.TYPE_INT_ARGB_PRE; +import static javax.swing.UIManager.getInstalledLookAndFeels; + +/** + * @test + * @bug 8073795 + * @summary JMenuBar has incorrect border when the window is on retina display. + * @author Sergey Bylokhov + * @run main/othervm MisplacedBorder + * @run main/othervm -Dswing.metalTheme=steel MisplacedBorder + */ +public final class MisplacedBorder implements Runnable { + + public static final int W = 400; + public static final int H = 400; + + public static void main(final String[] args) throws Exception { + for (final UIManager.LookAndFeelInfo laf : getInstalledLookAndFeels()) { + SwingUtilities.invokeAndWait(() -> setLookAndFeel(laf)); + SwingUtilities.invokeAndWait(new MisplacedBorder()); + } + System.out.println("Test passed"); + } + + @Override + public void run() { + final JMenuBar menubar = new JMenuBar(); + menubar.add(new JMenu("")); + menubar.add(new JMenu("")); + final JFrame frame = new JFrame(); + frame.setUndecorated(true); + frame.setJMenuBar(menubar); + frame.setSize(W / 3, H / 3); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + + // draw menu bar using standard order. + final BufferedImage bi1 = step1(menubar); + + // draw menu border on top of the menu bar, nothing should be changed. + final BufferedImage bi2 = step2(menubar); + frame.dispose(); + + for (int x = 0; x < W; ++x) { + for (int y = 0; y < H; ++y) { + if (bi1.getRGB(x, y) != bi2.getRGB(x, y)) { + try { + ImageIO.write(bi1, "png", new File("image1.png")); + ImageIO.write(bi2, "png", new File("image2.png")); + } catch (IOException e) { + e.printStackTrace(); + } + throw new RuntimeException("Failed: wrong color"); + } + } + } + } + + /** + * Draws standard JMenuBar. + */ + private BufferedImage step1(final JMenuBar menubar) { + final BufferedImage bi1 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE); + final Graphics2D g2d = bi1.createGraphics(); + g2d.scale(2, 2); + g2d.setColor(Color.RED); + g2d.fillRect(0, 0, W, H); + menubar.paintAll(g2d); + g2d.dispose(); + return bi1; + } + + /** + * Draws standard JMenuBar and border on top of it. + */ + private BufferedImage step2(final JMenuBar menubar) { + final BufferedImage bi2 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE); + final Graphics2D g2d2 = bi2.createGraphics(); + g2d2.scale(2, 2); + g2d2.setColor(Color.RED); + g2d2.fillRect(0, 0, W, H); + menubar.paintAll(g2d2); + menubar.getBorder().paintBorder(menubar, g2d2, menubar.getX(), menubar + .getX(), menubar.getWidth(), menubar.getHeight()); + g2d2.dispose(); + return bi2; + } + + private static void setLookAndFeel(final UIManager.LookAndFeelInfo laf) { + try { + UIManager.setLookAndFeel(laf.getClassName()); + System.out.println("LookAndFeel: " + laf.getClassName()); + } catch (ClassNotFoundException | InstantiationException | + UnsupportedLookAndFeelException | IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file From 104db62ecafd761dea22b3b625ca044a51911058 Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Fri, 27 Feb 2015 01:06:39 +0300 Subject: [PATCH 05/58] 4958064: JPGWriter does not throw UnsupportedException when canWriteSequence retuns false Reviewed-by: prr, bae --- .../imageio/plugins/jpeg/JPEGImageWriter.java | 5 ++ .../plugins/shared/CanWriteSequence.java | 78 +++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 jdk/test/javax/imageio/plugins/shared/CanWriteSequence.java diff --git a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java index 0daa7d38b79..bc24343f9ba 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java +++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java @@ -1104,6 +1104,11 @@ public class JPEGImageWriter extends ImageWriter { currentImage++; // After a successful write } + @Override + public boolean canWriteSequence() { + return true; + } + public void prepareWriteSequence(IIOMetadata streamMetadata) throws IOException { setThreadLock(); diff --git a/jdk/test/javax/imageio/plugins/shared/CanWriteSequence.java b/jdk/test/javax/imageio/plugins/shared/CanWriteSequence.java new file mode 100644 index 00000000000..54da1b77cb7 --- /dev/null +++ b/jdk/test/javax/imageio/plugins/shared/CanWriteSequence.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2015, 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. + * + * 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. + */ + +import java.io.File; +import java.io.FileOutputStream; +import java.util.Iterator; + +import javax.imageio.ImageIO; +import javax.imageio.ImageWriter; +import javax.imageio.metadata.IIOMetadata; +import javax.imageio.spi.IIORegistry; +import javax.imageio.spi.ImageWriterSpi; +import javax.imageio.stream.ImageOutputStream; + +/** + * @test + * @bug 4958064 + * @author Sergey Bylokhov + */ +public final class CanWriteSequence { + + public static void main(final String[] args) throws Exception { + final IIORegistry registry = IIORegistry.getDefaultInstance(); + final Iterator iter = + registry.getServiceProviders(ImageWriterSpi.class, + provider -> true, true); + // Validates all supported ImageWriters + while (iter.hasNext()) { + final ImageWriter writer = iter.next().createWriterInstance(); + System.out.println("ImageWriter = " + writer); + test(writer); + } + System.out.println("Test passed"); + } + + private static void test(final ImageWriter writer) throws Exception { + final File file = File.createTempFile("temp", ".img"); + file.deleteOnExit(); + final FileOutputStream fos = new FileOutputStream(file); + final ImageOutputStream ios = ImageIO.createImageOutputStream(fos); + writer.setOutput(ios); + final IIOMetadata data = writer.getDefaultStreamMetadata(null); + + if (writer.canWriteSequence()) { + writer.prepareWriteSequence(data); + } else { + try { + writer.prepareWriteSequence(data); + throw new RuntimeException( + "UnsupportedOperationException was not thrown"); + } catch (final UnsupportedOperationException ignored) { + // expected + } + } + writer.dispose(); + ios.close(); + } +} \ No newline at end of file From 307da40f99977566768d582aa2193e7882b17eec Mon Sep 17 00:00:00 2001 From: Prasanta Sadhukhan Date: Mon, 2 Mar 2015 16:34:44 +0300 Subject: [PATCH 06/58] 8048782: OpenJDK: PiscesCache : xmax/ymax rounding up can cause RasterFormatException Reviewed-by: prr, flar --- .../sun/java2d/pisces/PiscesCache.java | 9 + .../java2d/pisces/PiscesTileGenerator.java | 5 +- .../sun/java2d/pisces/OpenJDKFillBug.java | 173 ++++++++++++++++++ 3 files changed, 183 insertions(+), 4 deletions(-) create mode 100644 jdk/test/sun/java2d/pisces/OpenJDKFillBug.java diff --git a/jdk/src/java.desktop/share/classes/sun/java2d/pisces/PiscesCache.java b/jdk/src/java.desktop/share/classes/sun/java2d/pisces/PiscesCache.java index fd8cfa7917f..a26e7aa05f3 100644 --- a/jdk/src/java.desktop/share/classes/sun/java2d/pisces/PiscesCache.java +++ b/jdk/src/java.desktop/share/classes/sun/java2d/pisces/PiscesCache.java @@ -167,6 +167,15 @@ final class PiscesCache { rowAARLE[row][1] = end; } + void getBBox(int bbox[]) { + // Since we add +1 to bboxX1,bboxY1 so when PTG asks for bbox, + // we will give after -1 + bbox[0] = bboxX0; + bbox[1] = bboxY0; + bbox[2] = bboxX1 - 1; + bbox[3] = bboxY1 - 1; + } + @Override public String toString() { String ret = "bbox = ["+ diff --git a/jdk/src/java.desktop/share/classes/sun/java2d/pisces/PiscesTileGenerator.java b/jdk/src/java.desktop/share/classes/sun/java2d/pisces/PiscesTileGenerator.java index 2fc2e9c7e7c..7f1b49eca54 100644 --- a/jdk/src/java.desktop/share/classes/sun/java2d/pisces/PiscesTileGenerator.java +++ b/jdk/src/java.desktop/share/classes/sun/java2d/pisces/PiscesTileGenerator.java @@ -76,10 +76,7 @@ final class PiscesTileGenerator implements AATileGenerator { } public void getBbox(int bbox[]) { - bbox[0] = cache.bboxX0; - bbox[1] = cache.bboxY0; - bbox[2] = cache.bboxX1; - bbox[3] = cache.bboxY1; + cache.getBBox(bbox); //System.out.println("bbox["+bbox[0]+", "+bbox[1]+" => "+bbox[2]+", "+bbox[3]+"]"); } diff --git a/jdk/test/sun/java2d/pisces/OpenJDKFillBug.java b/jdk/test/sun/java2d/pisces/OpenJDKFillBug.java new file mode 100644 index 00000000000..1c39583d922 --- /dev/null +++ b/jdk/test/sun/java2d/pisces/OpenJDKFillBug.java @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2015, 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. + * + * 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. + */ +import java.awt.Color; +import java.awt.Composite; +import java.awt.CompositeContext; +import java.awt.Graphics2D; +import java.awt.RenderingHints; +import java.awt.geom.AffineTransform; +import java.awt.geom.GeneralPath; +import java.awt.image.BufferedImage; +import java.awt.image.ColorModel; +import java.awt.image.Raster; +import java.awt.image.WritableRaster; +import java.awt.image.RasterFormatException; + +/** + * @test + * @bug 8048782 + * @summary Test program that demonstrates PiscesRendering bug in + * OpenJDK 1.7.0.60 (and probably in all other OpenJDK versions, too). + */ + +public class OpenJDKFillBug +{ + /** + * Test program that demonstrates a bug in OpenJDK 1.7.0.60 (and + * probably in all other OpenJDK versions, too). To see the bug, simply run + * the 'main' program with OpenJDK. The bug makes the 'g2d.fill' + * method fail with the following exception: + * + * This bug is found in OpenJDK but also is present in OracleJDK + * if run with + * -Dsun.java2d.renderer=sun.java2d.pisces.PiscesRenderingEngine + * + * The bug is related to sun.java2d.pisces.PiscesCache constructor + * that accepts '(int minx,int miny,int maxx,int maxy)' arguments: + * the internal 'bboxX1' and 'bboxY1' are set to values one greater + * than given maximum X and Y values. Those maximum values are then + * later used in AAShapePipe' class 'renderTiles' method, where a + * Y/X loop eventually calls 'GeneralCompositePipe' class + * 'renderPathTile' method. In that method, the operation will + * eventually call 'IntegerInterleavedRaster' class + * 'createWritableChild' method with arguments: + * + *
    + *
  • x=800 + *
  • y=0 + *
  • width=2 (this value is too high: should be 1) + *
  • height=32 + *
  • x0=0 + *
  • y0=0 + *
  • bandList[]=null + *
+ * + * This calls for a sub-raster with bounds that fall outside the + * original raster, and therefore the 'createWritableChild' method + * correctly throws 'RasterFormatException'. + * + * The bug is closely related to the use of a custom Composite + * implementation, which are quite rare. The application where this + * bug was first detected implements a high-quality PDF rendering + * engine that needs custom Composite operations to properly + * implement PDF advanced color blending and masking operators. + */ + + public static void main(String args[]) + { + BufferedImage bi = new BufferedImage(801,1202, + BufferedImage.TYPE_INT_ARGB); + Graphics2D g2d = bi.createGraphics(); + GeneralPath gp = new GeneralPath(); + AffineTransform m = new AffineTransform(2.483489907915543, + 0.0, + 0.0, + -2.4844977263331955, + 0.0, + 1202.0); + Composite c = new CustomComposite(); + + gp.moveTo(-4.511, -14.349); + gp.lineTo(327.489, -14.349); + gp.lineTo(327.489, 494.15); + gp.lineTo(-4.511, 494.15); + gp.closePath(); + + g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, + RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY); + g2d.setRenderingHint(RenderingHints.KEY_RENDERING, + RenderingHints.VALUE_RENDER_QUALITY); + g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, + RenderingHints.VALUE_COLOR_RENDER_QUALITY); + g2d.setRenderingHint(RenderingHints.KEY_TEXT_LCD_CONTRAST, + Integer.valueOf(140)); + g2d.setRenderingHint(RenderingHints.KEY_DITHERING, + RenderingHints.VALUE_DITHER_ENABLE); + g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT); + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON); + g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, + RenderingHints.VALUE_STROKE_NORMALIZE); + g2d.setPaint(Color.red); + g2d.setComposite(c); + g2d.setTransform(m); + try { + g2d.fill(gp); + } catch (RasterFormatException rfe) { + System.out.println("Test failed"); + throw new RuntimeException("xmax/ymax rounding cause RasterFormatException: " + rfe); + } + g2d.dispose(); + System.out.println("Test passed"); + } + + // === CustomComposite === + + /** + * Dummy custom Composite implementation. + */ + + public static class CustomComposite implements Composite + { + @Override + public CompositeContext createContext(ColorModel srcColorModel, + ColorModel dstColorModel, + RenderingHints hints) + { + return new CustomCompositeContext(); + } + + // === CustomCompositeContext === + + /** + * Dummy custom CompositeContext implementation. + */ + + public static class CustomCompositeContext implements CompositeContext + { + + @Override + public void dispose() + { + // NOP + } + + @Override + public void compose(Raster src,Raster dstIn,WritableRaster dstOut) + { + // NOP + } + } + } +} From 3ca192f3b3652902833530120d454ed76f0e9cf0 Mon Sep 17 00:00:00 2001 From: Prasanta Sadhukhan Date: Tue, 3 Mar 2015 17:50:01 +0300 Subject: [PATCH 07/58] 8039345: Strange behaviour of per-pixel translucency on linux Reviewed-by: prr, azvegint --- .../classes/sun/java2d/xr/XRSurfaceData.java | 14 ++- .../XRSurfaceData/ComponentResizeTest.java | 100 ++++++++++++++++++ 2 files changed, 112 insertions(+), 2 deletions(-) create mode 100644 jdk/test/sun/java2d/XRSurfaceData/ComponentResizeTest.java diff --git a/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRSurfaceData.java b/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRSurfaceData.java index 296bf4b62f2..dcfd6325b35 100644 --- a/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRSurfaceData.java +++ b/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRSurfaceData.java @@ -548,8 +548,18 @@ public abstract class XRSurfaceData extends XSurfaceData { peer.getColorModel().getPixelSize(), Transparency.OPAQUE); if (isXRDrawableValid()) { - initXRender(XRUtils. - getPictureFormatForTransparency(Transparency.OPAQUE)); + // If we have a 32 bit color model for the window it needs + // alpha to support translucency of the window so we need + // to get the ARGB32 XRender picture format else for + // 24 bit colormodel we need RGB24 or OPAQUE pictureformat. + if (peer.getColorModel().getPixelSize() == 32) { + initXRender(XRUtils. + getPictureFormatForTransparency(Transparency.TRANSLUCENT)); + } + else { + initXRender(XRUtils. + getPictureFormatForTransparency(Transparency.OPAQUE)); + } makePipes(); } } diff --git a/jdk/test/sun/java2d/XRSurfaceData/ComponentResizeTest.java b/jdk/test/sun/java2d/XRSurfaceData/ComponentResizeTest.java new file mode 100644 index 00000000000..db9e1e57147 --- /dev/null +++ b/jdk/test/sun/java2d/XRSurfaceData/ComponentResizeTest.java @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2015, 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. + * + * 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. + */ + +import java.awt.Color; +import java.awt.FlowLayout; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JFrame; +import javax.swing.SwingUtilities; +import java.awt.Component; +import javax.swing.JOptionPane; + +/** + * @test + * @bug 8039345 + * @author Prasanta Sadhukhan + * @run main/manual ComponentResizeTest + * @summary Resizes JFrame so that component drawn inside it gets repainted + * without leaving any trails + */ +public class ComponentResizeTest { + + private static JFrame demoFrame; + + public static void testresize() throws Exception { + Thread.sleep(5000); + for (int i = 0; i < 20; i++) { + SwingUtilities.invokeLater(() -> { + demoFrame.setSize(demoFrame.getWidth() + 5, demoFrame.getHeight() + 5); + }); + Thread.sleep(1000); + } + } + + public static void main(String[] args) throws Exception { + SwingUtilities.invokeAndWait(() -> { + JOptionPane.showMessageDialog( + (Component) null, + "The test creates a transparent JFrame and resizes the JFrame. Please verify JFrame is transparent and components (like JButton, checkbox) move without leaving any trails", + "information", JOptionPane.INFORMATION_MESSAGE); + createAndShowGUI(); + }); + + try { + testresize(); + } finally { + SwingUtilities.invokeLater(() -> { + demoFrame.dispose(); + }); + } + + SwingUtilities.invokeAndWait(() -> { + int confirm = JOptionPane.showConfirmDialog( + (Component) null, + "Did the component resize work without leaving any trails?", + "alert", JOptionPane.YES_NO_OPTION); + if (confirm == JOptionPane.YES_OPTION) { + System.out.println("Test passed"); + } else { + System.out.println("Test failed"); + throw new RuntimeException("Component resize leaves trail"); + } + }); + } + + private static void createAndShowGUI() { + demoFrame = new JFrame(); + demoFrame.setSize(300, 300); + demoFrame.setLayout(new FlowLayout()); + demoFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + demoFrame.setUndecorated(true); + demoFrame.setBackground(new Color(0f, 0, 0, 0.1f)); + JCheckBox b = new JCheckBox("Whatever"); + demoFrame.paintAll(null); + b.setOpaque(true); + demoFrame.add(b); + demoFrame.add(new JButton()); + demoFrame.setVisible(true); + } +} From 8def2a3e453b99e6e51609a40f927f41d0b44587 Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Tue, 3 Mar 2015 20:23:34 +0300 Subject: [PATCH 08/58] 8073420: JFrame.EXIT_ON_CLOSE can be removed in favour of WindowConstants.EXIT_ON_CLOSE Reviewed-by: art, azvegint, alexsch --- .../J2DBench/src/j2dbench/J2DBench.java | 5 +++-- .../demo/share/jfc/SampleTree/SampleTree.java | 4 ++-- jdk/src/demo/share/management/JTop/JTop.java | 4 ++-- .../share/classes/javax/swing/JFrame.java | 20 ++++++------------- .../share/classes/javax/swing/JLayer.java | 4 ++-- 5 files changed, 15 insertions(+), 22 deletions(-) diff --git a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/J2DBench.java b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/J2DBench.java index 2294e7f01be..053908ca8d8 100644 --- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/J2DBench.java +++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/J2DBench.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -61,6 +61,7 @@ import javax.swing.BoxLayout; import javax.swing.JFileChooser; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; +import javax.swing.WindowConstants; import java.text.SimpleDateFormat; import java.util.Date; @@ -698,7 +699,7 @@ public class J2DBench { } }; guiFrame = f; - f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); f.getContentPane().setLayout(new BorderLayout()); f.getContentPane().add(Group.root.getJComponent(), BorderLayout.CENTER); JPanel p = new JPanel(); diff --git a/jdk/src/demo/share/jfc/SampleTree/SampleTree.java b/jdk/src/demo/share/jfc/SampleTree/SampleTree.java index efde28fd6f0..c7093a157ae 100644 --- a/jdk/src/demo/share/jfc/SampleTree/SampleTree.java +++ b/jdk/src/demo/share/jfc/SampleTree/SampleTree.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -135,7 +135,7 @@ public final class SampleTree { panel.add("Center", sp); panel.add("South", constructOptionsPanel()); - frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); frame.pack(); frame.setVisible(true); } diff --git a/jdk/src/demo/share/management/JTop/JTop.java b/jdk/src/demo/share/management/JTop/JTop.java index ab0cd94e33d..c1d48cc3716 100644 --- a/jdk/src/demo/share/management/JTop/JTop.java +++ b/jdk/src/demo/share/management/JTop/JTop.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -410,7 +410,7 @@ public class JTop extends JPanel { private static void createAndShowGUI(JPanel jtop) { // Create and set up the window. JFrame frame = new JFrame("JTop"); - frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); // Create and set up the content pane. JComponent contentPane = (JComponent) frame.getContentPane(); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JFrame.java b/jdk/src/java.desktop/share/classes/javax/swing/JFrame.java index 68d81f602a4..be6b5ba96ba 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JFrame.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JFrame.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -127,16 +127,6 @@ public class JFrame extends Frame implements WindowConstants, RootPaneContainer, TransferHandler.HasGetTransferHandler { - /** - * The exit application default window close operation. If a window - * has this set as the close operation and is closed in an applet, - * a SecurityException may be thrown. - * It is recommended you only use this in an application. - * - * @since 1.3 - */ - public static final int EXIT_ON_CLOSE = 3; - /** * Key into the AppContext, used to check if should provide decorations * by default. @@ -352,7 +342,7 @@ public class JFrame extends Frame implements WindowConstants, * objects. * *
  • EXIT_ON_CLOSE - * (defined in JFrame): + * (defined in WindowConstants): * Exit the application using the System * exit method. Use this only in applications. * @@ -393,7 +383,9 @@ public class JFrame extends Frame implements WindowConstants, operation != HIDE_ON_CLOSE && operation != DISPOSE_ON_CLOSE && operation != EXIT_ON_CLOSE) { - throw new IllegalArgumentException("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or EXIT_ON_CLOSE"); + throw new IllegalArgumentException("defaultCloseOperation must be" + + " one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE," + + " DISPOSE_ON_CLOSE, or EXIT_ON_CLOSE"); } if (operation == EXIT_ON_CLOSE) { @@ -861,7 +853,7 @@ public class JFrame extends Frame implements WindowConstants, defaultCloseOperationString = "DISPOSE_ON_CLOSE"; } else if (defaultCloseOperation == DO_NOTHING_ON_CLOSE) { defaultCloseOperationString = "DO_NOTHING_ON_CLOSE"; - } else if (defaultCloseOperation == 3) { + } else if (defaultCloseOperation == EXIT_ON_CLOSE) { defaultCloseOperationString = "EXIT_ON_CLOSE"; } else defaultCloseOperationString = ""; String rootPaneString = (rootPane != null ? diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JLayer.java b/jdk/src/java.desktop/share/classes/javax/swing/JLayer.java index 9c22489f5b6..833b09e6e73 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JLayer.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JLayer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2015, 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 @@ -103,7 +103,7 @@ import java.security.PrivilegedAction; * * private static void createAndShowGUI() { * final JFrame frame = new JFrame(); - * frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + * frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); * * // work with the layer as with any other Swing component * frame.add(createLayer()); From 08af89e08e2e00a0407b6d57cebb7ee20afc3c8d Mon Sep 17 00:00:00 2001 From: Roman Kennke Date: Wed, 4 Mar 2015 15:42:02 +0100 Subject: [PATCH 09/58] 8072436: Refactor X11FontManager Factor fontconfig related code out of X11FontManager into its own superclass FcFontManager. Reviewed-by: prr, serb --- jdk/make/mapfiles/libawt/mapfile-mawt-vers | 2 +- jdk/make/mapfiles/libawt/mapfile-vers-linux | 2 +- .../mapfiles/libawt_headless/mapfile-vers | 2 +- jdk/make/mapfiles/libawt_xawt/mapfile-vers | 2 +- .../unix/classes/sun/awt/FcFontManager.java | 108 ++++++++++++++++++ .../unix/classes/sun/awt/X11FontManager.java | 48 +------- .../classes/sun/font/FcFontConfiguration.java | 12 +- .../unix/native/common/awt/fontpath.c | 10 +- 8 files changed, 126 insertions(+), 60 deletions(-) create mode 100644 jdk/src/java.desktop/unix/classes/sun/awt/FcFontManager.java diff --git a/jdk/make/mapfiles/libawt/mapfile-mawt-vers b/jdk/make/mapfiles/libawt/mapfile-mawt-vers index 06d3ff802e1..195ba1cbc50 100644 --- a/jdk/make/mapfiles/libawt/mapfile-mawt-vers +++ b/jdk/make/mapfiles/libawt/mapfile-mawt-vers @@ -243,7 +243,7 @@ SUNWprivate_1.1 { getDefaultConfig; Java_sun_font_FontConfigManager_getFontConfig; Java_sun_font_FontConfigManager_getFontConfigAASettings; - Java_sun_awt_X11FontManager_getFontPathNative; + Java_sun_awt_FcFontManager_getFontPathNative; Java_sun_font_SunFontManager_populateFontFileNameMap; # CDE private entry point diff --git a/jdk/make/mapfiles/libawt/mapfile-vers-linux b/jdk/make/mapfiles/libawt/mapfile-vers-linux index 922b015c68c..5624693fcca 100644 --- a/jdk/make/mapfiles/libawt/mapfile-vers-linux +++ b/jdk/make/mapfiles/libawt/mapfile-vers-linux @@ -270,7 +270,7 @@ SUNWprivate_1.1 { getDefaultConfig; Java_sun_font_FontConfigManager_getFontConfig; Java_sun_font_FontConfigManager_getFontConfigAASettings; - Java_sun_awt_X11FontManager_getFontPathNative; + Java_sun_awt_FcFontManager_getFontPathNative; Java_sun_font_SunFontManager_populateFontFileNameMap; # CDE private entry point diff --git a/jdk/make/mapfiles/libawt_headless/mapfile-vers b/jdk/make/mapfiles/libawt_headless/mapfile-vers index df24e4505db..5ea1745e296 100644 --- a/jdk/make/mapfiles/libawt_headless/mapfile-vers +++ b/jdk/make/mapfiles/libawt_headless/mapfile-vers @@ -65,7 +65,7 @@ SUNWprivate_1.1 { Java_sun_font_FontConfigManager_getFontConfig; Java_sun_font_FontConfigManager_getFontConfigAASettings; Java_sun_font_FontConfigManager_getFontConfigVersion; - Java_sun_awt_X11FontManager_getFontPathNative; + Java_sun_awt_FcFontManager_getFontPathNative; Java_sun_awt_FontDescriptor_initIDs; Java_sun_awt_PlatformFont_initIDs; diff --git a/jdk/make/mapfiles/libawt_xawt/mapfile-vers b/jdk/make/mapfiles/libawt_xawt/mapfile-vers index 4a891077b76..a2f75efcd0b 100644 --- a/jdk/make/mapfiles/libawt_xawt/mapfile-vers +++ b/jdk/make/mapfiles/libawt_xawt/mapfile-vers @@ -188,7 +188,7 @@ SUNWprivate_1.1 { Java_sun_font_FontConfigManager_getFontConfig; Java_sun_font_FontConfigManager_getFontConfigAASettings; Java_sun_font_FontConfigManager_getFontConfigVersion; - Java_sun_awt_X11FontManager_getFontPathNative; + Java_sun_awt_FcFontManager_getFontPathNative; Java_sun_awt_X11GraphicsEnvironment_initDisplay; Java_sun_awt_X11GraphicsEnvironment_initGLX; Java_sun_awt_X11GraphicsEnvironment_initXRender; diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/FcFontManager.java b/jdk/src/java.desktop/unix/classes/sun/awt/FcFontManager.java new file mode 100644 index 00000000000..5ffa3490db6 --- /dev/null +++ b/jdk/src/java.desktop/unix/classes/sun/awt/FcFontManager.java @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2015 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. + */ + +package sun.awt; + +import sun.font.FcFontConfiguration; +import sun.font.FontConfigManager; +import sun.font.SunFontManager; + +/** + * A {@link sun.font.FontManager} that uses fontconfig to find system fonts. + */ +public class FcFontManager extends SunFontManager { + + private FontConfigManager fcManager = null; + + public synchronized FontConfigManager getFontConfigManager() { + + if (fcManager == null) { + fcManager = new FontConfigManager(); + } + + return fcManager; + } + + @Override + protected FontConfiguration createFontConfiguration() { + FcFontConfiguration fcFontConfig = new FcFontConfiguration(this); + if (fcFontConfig.init()) { + return fcFontConfig; + } else { + throw new InternalError("failed to initialize fontconfig"); + } + } + + @Override + public FontConfiguration createFontConfiguration(boolean preferLocaleFonts, + boolean preferPropFonts) { + FcFontConfiguration fcFontConfig = + new FcFontConfiguration(this, preferLocaleFonts, preferPropFonts); + if (fcFontConfig.init()) { + return fcFontConfig; + } else { + throw new InternalError("failed to initialize fontconfig"); + } + } + + @Override + protected String[] getDefaultPlatformFont() { + final String[] info = new String[2]; + getFontConfigManager().initFontConfigFonts(false); + FontConfigManager.FcCompFont[] fontConfigFonts = + getFontConfigManager().getFontConfigFonts(); + for (int i=0; i 0 && + fontConfigFonts[0].firstFont.fontFile != null) { + info[0] = fontConfigFonts[0].firstFont.familyName; + info[1] = fontConfigFonts[0].firstFont.fontFile; + } else { + info[0] = "Dialog"; + info[1] = "/dialog.ttf"; + } + } + return info; + } + + protected native String getFontPathNative(boolean noType1Fonts, + boolean isX11GE); + + protected synchronized String getFontPath(boolean noType1Fonts) { + return getFontPathNative(noType1Fonts, false); + } + +} diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11FontManager.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11FontManager.java index 179adeb97eb..5a2771cd90b 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11FontManager.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11FontManager.java @@ -54,7 +54,7 @@ import sun.util.logging.PlatformLogger; /** * The X11 implementation of {@link FontManager}. */ -public final class X11FontManager extends SunFontManager { +public final class X11FontManager extends FcFontManager { // constants identifying XLFD and font ID fields private static final int FOUNDRY_FIELD = 1; @@ -154,8 +154,6 @@ public final class X11FontManager extends SunFontManager { */ private static String[] fontdirs = null; - private FontConfigManager fcManager = null; - public static X11FontManager getInstance() { return (X11FontManager) SunFontManager.getInstance(); } @@ -784,51 +782,9 @@ public final class X11FontManager extends SunFontManager { preferLocaleFonts, preferPropFonts); } - public synchronized native String getFontPathNative(boolean noType1Fonts); - protected synchronized String getFontPath(boolean noType1Fonts) { isHeadless(); // make sure GE is inited, as its the X11 lock. - return getFontPathNative(noType1Fonts); - } - - @Override - protected String[] getDefaultPlatformFont() { - final String[] info = new String[2]; - getFontConfigManager().initFontConfigFonts(false); - FontConfigManager.FcCompFont[] fontConfigFonts = - getFontConfigManager().getFontConfigFonts(); - for (int i=0; i 0 && - fontConfigFonts[0].firstFont.fontFile != null) { - info[0] = fontConfigFonts[0].firstFont.familyName; - info[1] = fontConfigFonts[0].firstFont.fontFile; - } else { - info[0] = "Dialog"; - info[1] = "/dialog.ttf"; - } - } - return info; - } - - public synchronized FontConfigManager getFontConfigManager() { - - if (fcManager == null) { - fcManager = new FontConfigManager(); - } - - return fcManager; + return getFontPathNative(noType1Fonts, true); } @Override diff --git a/jdk/src/java.desktop/unix/classes/sun/font/FcFontConfiguration.java b/jdk/src/java.desktop/unix/classes/sun/font/FcFontConfiguration.java index f5fd8cc996b..567e8bea83f 100644 --- a/jdk/src/java.desktop/unix/classes/sun/font/FcFontConfiguration.java +++ b/jdk/src/java.desktop/unix/classes/sun/font/FcFontConfiguration.java @@ -39,10 +39,10 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Properties; import java.util.Scanner; +import sun.awt.FcFontManager; import sun.awt.FontConfiguration; import sun.awt.FontDescriptor; import sun.awt.SunToolkit; -import sun.awt.X11FontManager; import sun.font.CompositeFontDescriptor; import sun.font.FontManager; import sun.font.FontConfigManager.FontConfigInfo; @@ -92,7 +92,7 @@ public class FcFontConfiguration extends FontConfiguration { setFontConfiguration(); readFcInfo(); - X11FontManager fm = (X11FontManager) fontManager; + FcFontManager fm = (FcFontManager) fontManager; FontConfigManager fcm = fm.getFontConfigManager(); if (fcCompFonts == null) { fcCompFonts = fcm.loadFontConfig(); @@ -194,7 +194,7 @@ public class FcFontConfiguration extends FontConfiguration { @Override public String[] getPlatformFontNames() { HashSet nameSet = new HashSet(); - X11FontManager fm = (X11FontManager) fontManager; + FcFontManager fm = (FcFontManager) fontManager; FontConfigManager fcm = fm.getFontConfigManager(); FcCompFont[] fcCompFonts = fcm.loadFontConfig(); for (int i=0; iNewStringUTF(env, ptr); return ret; From 6e61892373ebff644d85c636479d8d4c5c30e188 Mon Sep 17 00:00:00 2001 From: Mark Sheppard Date: Mon, 9 Mar 2015 18:48:40 +0000 Subject: [PATCH 10/58] 8065078: NetworkInterface.getNetworkInterfaces() triggers intermittent test failures Reviewed-by: chegar --- .../native/libnet/NetworkInterface_winXP.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/jdk/src/java.base/windows/native/libnet/NetworkInterface_winXP.c b/jdk/src/java.base/windows/native/libnet/NetworkInterface_winXP.c index 2308a59b44b..c245045696e 100644 --- a/jdk/src/java.base/windows/native/libnet/NetworkInterface_winXP.c +++ b/jdk/src/java.base/windows/native/libnet/NetworkInterface_winXP.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2015, 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 @@ -28,6 +28,7 @@ #include /* needed for htonl */ #include #include +#include #include "java_net_NetworkInterface.h" #include "jni_util.h" @@ -70,7 +71,7 @@ void printnifs (netif *netifPP, char *str) { #endif -static int bufsize = 1024; +static int bufsize = 4096; /* * return an array of IP_ADAPTER_ADDRESSES containing one element @@ -102,7 +103,11 @@ static int getAdapters (JNIEnv *env, IP_ADAPTER_ADDRESSES **adapters) { ret = GetAdaptersAddresses(AF_UNSPEC, flags, NULL, adapterInfo, &len); if (ret == ERROR_BUFFER_OVERFLOW) { - IP_ADAPTER_ADDRESSES * newAdapterInfo = + IP_ADAPTER_ADDRESSES * newAdapterInfo = NULL; + if (len < (ULONG_MAX - bufsize)) { + len = len + bufsize; + } + newAdapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); if (newAdapterInfo == NULL) { free(adapterInfo); @@ -113,7 +118,6 @@ static int getAdapters (JNIEnv *env, IP_ADAPTER_ADDRESSES **adapters) { adapterInfo = newAdapterInfo; - bufsize = len; ret = GetAdaptersAddresses(AF_UNSPEC, flags, NULL, adapterInfo, &len); } @@ -176,7 +180,11 @@ IP_ADAPTER_ADDRESSES *getAdapter (JNIEnv *env, jint index) { flags |= GAA_FLAG_INCLUDE_PREFIX; val = GetAdaptersAddresses(AF_UNSPEC, flags, NULL, adapterInfo, &len); if (val == ERROR_BUFFER_OVERFLOW) { - IP_ADAPTER_ADDRESSES * newAdapterInfo = + IP_ADAPTER_ADDRESSES * newAdapterInfo = NULL; + if (len < (ULONG_MAX - bufsize)) { + len = len + bufsize; + } + newAdapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); if (newAdapterInfo == NULL) { free(adapterInfo); @@ -187,7 +195,6 @@ IP_ADAPTER_ADDRESSES *getAdapter (JNIEnv *env, jint index) { adapterInfo = newAdapterInfo; - bufsize = len; val = GetAdaptersAddresses(AF_UNSPEC, flags, NULL, adapterInfo, &len); } From 47e85e2963edaa88cfc5a541d59f11db5d1b183b Mon Sep 17 00:00:00 2001 From: Jason Uh Date: Mon, 9 Mar 2015 17:21:07 -0700 Subject: [PATCH 11/58] 8073430: Deprecate security APIs that have been superseded Reviewed-by: mullan, weijun --- .../security/cert/internal/x509/X509V1CertImpl.java | 7 ++++++- .../share/classes/java/security/acl/Acl.java | 4 ++++ .../share/classes/java/security/acl/AclEntry.java | 6 +++++- .../java/security/acl/AclNotFoundException.java | 6 +++++- .../share/classes/java/security/acl/Group.java | 6 +++++- .../java/security/acl/LastOwnerException.java | 6 +++++- .../java/security/acl/NotOwnerException.java | 6 +++++- .../share/classes/java/security/acl/Owner.java | 5 ++++- .../share/classes/java/security/acl/Permission.java | 6 +++++- .../classes/java/security/acl/package-info.java | 10 ++++++---- .../javax/net/ssl/HandshakeCompletedEvent.java | 6 +++++- .../share/classes/javax/net/ssl/SSLSession.java | 6 +++++- .../classes/javax/security/cert/Certificate.java | 4 +++- .../security/cert/CertificateEncodingException.java | 4 +++- .../javax/security/cert/CertificateException.java | 4 +++- .../security/cert/CertificateExpiredException.java | 4 +++- .../cert/CertificateNotYetValidException.java | 4 +++- .../security/cert/CertificateParsingException.java | 4 +++- .../javax/security/cert/X509Certificate.java | 4 +++- .../classes/javax/security/cert/package-info.java | 11 ++++++----- .../https/AbstractDelegateHttpsURLConnection.java | 13 ++++++++++--- .../sun/net/www/protocol/https/HttpsClient.java | 7 ++++++- .../www/protocol/https/HttpsURLConnectionImpl.java | 7 ++++++- .../classes/sun/security/ssl/SSLSessionImpl.java | 7 ++++++- 24 files changed, 115 insertions(+), 32 deletions(-) diff --git a/jdk/src/java.base/share/classes/com/sun/security/cert/internal/x509/X509V1CertImpl.java b/jdk/src/java.base/share/classes/com/sun/security/cert/internal/x509/X509V1CertImpl.java index 07a31a0ef34..b9ffb200a81 100644 --- a/jdk/src/java.base/share/classes/com/sun/security/cert/internal/x509/X509V1CertImpl.java +++ b/jdk/src/java.base/share/classes/com/sun/security/cert/internal/x509/X509V1CertImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -45,8 +45,13 @@ import java.util.Vector; * The X509V1CertImpl class is used as a conversion wrapper around * sun.security.x509.X509Cert certificates when running under JDK1.1.x. * + * @deprecated This is the implementation class for the deprecated + * {@code javax.security.cert.X509Certificate} class. The classes in the + * {@code java.security.cert} package should be used instead. + * * @author Jeff Nisewanger */ +@Deprecated public class X509V1CertImpl extends X509Certificate implements Serializable { static final long serialVersionUID = -2048442350420423405L; private java.security.cert.X509Certificate wrappedCert; diff --git a/jdk/src/java.base/share/classes/java/security/acl/Acl.java b/jdk/src/java.base/share/classes/java/security/acl/Acl.java index cffb48e46a7..9131966a08e 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/Acl.java +++ b/jdk/src/java.base/share/classes/java/security/acl/Acl.java @@ -82,8 +82,12 @@ import java.security.Principal; * @see java.security.acl.Acl#getPermissions * * @author Satish Dharmaraj + * + * @deprecated This package has been replaced by {@code java.security.Policy} + * and related classes since 1.2. */ +@Deprecated public interface Acl extends Owner { /** diff --git a/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java b/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java index cd9675f34a1..dd4e548ab47 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java +++ b/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2015, 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 @@ -50,7 +50,11 @@ import java.security.Principal; * @see java.security.acl.Acl * * @author Satish Dharmaraj + * + * @deprecated This package has been replaced by {@code java.security.Policy} + * and related classes since 1.2. */ +@Deprecated public interface AclEntry extends Cloneable { /** diff --git a/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java b/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java index 6f08e178e71..0a153e25665 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java +++ b/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2015, 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 @@ -30,7 +30,11 @@ package java.security.acl; * non-existent ACL (Access Control List). * * @author Satish Dharmaraj + * + * @deprecated This package has been replaced by {@code java.security.Policy} + * and related classes since 1.2. */ +@Deprecated public class AclNotFoundException extends Exception { private static final long serialVersionUID = 5684295034092681791L; diff --git a/jdk/src/java.base/share/classes/java/security/acl/Group.java b/jdk/src/java.base/share/classes/java/security/acl/Group.java index ebd9c445282..9ff69f563cb 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/Group.java +++ b/jdk/src/java.base/share/classes/java/security/acl/Group.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2015, 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 @@ -39,7 +39,11 @@ import java.security.Principal; * Principal or Group. * * @author Satish Dharmaraj + * + * @deprecated This package has been replaced by {@code java.security.Policy} + * and related classes since 1.2. */ +@Deprecated public interface Group extends Principal { /** diff --git a/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java b/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java index 196c8f1bd86..b25bf84d46c 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java +++ b/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2015, 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 @@ -32,7 +32,11 @@ package java.security.acl; * @see java.security.acl.Owner#deleteOwner * * @author Satish Dharmaraj + * + * @deprecated This package has been replaced by {@code java.security.Policy} + * and related classes since 1.2. */ +@Deprecated public class LastOwnerException extends Exception { private static final long serialVersionUID = -5141997548211140359L; diff --git a/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java b/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java index 0a4b04b22d5..68d214d7185 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java +++ b/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2015, 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 @@ -31,7 +31,11 @@ package java.security.acl; * the object, but the Principal attempting the modification is not an owner. * * @author Satish Dharmaraj + * + * @deprecated This package has been replaced by {@code java.security.Policy} + * and related classes since 1.2. */ +@Deprecated public class NotOwnerException extends Exception { private static final long serialVersionUID = -5555597911163362399L; diff --git a/jdk/src/java.base/share/classes/java/security/acl/Owner.java b/jdk/src/java.base/share/classes/java/security/acl/Owner.java index 2f649d40b33..2a4999b277d 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/Owner.java +++ b/jdk/src/java.base/share/classes/java/security/acl/Owner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2015, 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 @@ -36,7 +36,10 @@ import java.security.Principal; * * @see java.security.acl.Acl * + * @deprecated This package has been replaced by {@code java.security.Policy} + * and related classes since 1.2. */ +@Deprecated public interface Owner { /** diff --git a/jdk/src/java.base/share/classes/java/security/acl/Permission.java b/jdk/src/java.base/share/classes/java/security/acl/Permission.java index 380a0102cd0..236f10795f0 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/Permission.java +++ b/jdk/src/java.base/share/classes/java/security/acl/Permission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2015, 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 @@ -31,7 +31,11 @@ package java.security.acl; * a particular type of access to a resource. * * @author Satish Dharmaraj + * + * @deprecated This package has been replaced by {@code java.security.Policy} + * and related classes since 1.2. */ +@Deprecated public interface Permission { /** diff --git a/jdk/src/java.base/share/classes/java/security/acl/package-info.java b/jdk/src/java.base/share/classes/java/security/acl/package-info.java index fbe5a8de6b9..f0362fdf0b6 100644 --- a/jdk/src/java.base/share/classes/java/security/acl/package-info.java +++ b/jdk/src/java.base/share/classes/java/security/acl/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, 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 @@ -24,10 +24,12 @@ */ /** - * The classes and interfaces in this package have been - * superseded by classes in the java.security package. - * See that package and, for example, java.security.Permission for details. + * The classes and interfaces in this package have been deprecated. + * The {@code java.security} package contains suitable replacements. + * See that package and, for example, {@code java.security.Permission} + * for details. * * @since 1.1 */ +@Deprecated package java.security.acl; diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/HandshakeCompletedEvent.java b/jdk/src/java.base/share/classes/javax/net/ssl/HandshakeCompletedEvent.java index f6abafaea85..fb5b8ed704d 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/HandshakeCompletedEvent.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/HandshakeCompletedEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -152,7 +152,11 @@ public class HandshakeCompletedEvent extends EventObject * {@link javax.security.cert.X509Certificate} format). * @exception SSLPeerUnverifiedException if the peer is not verified. * @see #getPeerPrincipal() + * @deprecated The {@link #getPeerCertificates()} method that returns an + * array of {@code java.security.cert.Certificate} should + * be used instead. */ + @Deprecated public javax.security.cert.X509Certificate [] getPeerCertificateChain() throws SSLPeerUnverifiedException { diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLSession.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLSession.java index d98edf0b365..5f6317dd295 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLSession.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLSession.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -272,7 +272,11 @@ public interface SSLSession { * @exception SSLPeerUnverifiedException if the peer's identity * has not been verified * @see #getPeerPrincipal() + * @deprecated The {@link #getPeerCertificates()} method that returns an + * array of {@code java.security.cert.Certificate} should + * be used instead. */ + @Deprecated public javax.security.cert.X509Certificate [] getPeerCertificateChain() throws SSLPeerUnverifiedException; diff --git a/jdk/src/java.base/share/classes/javax/security/cert/Certificate.java b/jdk/src/java.base/share/classes/javax/security/cert/Certificate.java index 10fd767c157..84fdefde609 100644 --- a/jdk/src/java.base/share/classes/javax/security/cert/Certificate.java +++ b/jdk/src/java.base/share/classes/javax/security/cert/Certificate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -57,9 +57,11 @@ import java.security.SignatureException; * * @since 1.4 * @see X509Certificate + * @deprecated Use the classes in {@code java.security.cert} instead. * * @author Hemma Prafullchandra */ +@Deprecated public abstract class Certificate { /** diff --git a/jdk/src/java.base/share/classes/javax/security/cert/CertificateEncodingException.java b/jdk/src/java.base/share/classes/javax/security/cert/CertificateEncodingException.java index 1496c754181..95fbcfbeb1e 100644 --- a/jdk/src/java.base/share/classes/javax/security/cert/CertificateEncodingException.java +++ b/jdk/src/java.base/share/classes/javax/security/cert/CertificateEncodingException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -38,7 +38,9 @@ package javax.security.cert; * * @since 1.4 * @author Hemma Prafullchandra + * @deprecated Use the classes in {@code java.security.cert} instead. */ +@Deprecated public class CertificateEncodingException extends CertificateException { private static final long serialVersionUID = -8187642723048403470L; diff --git a/jdk/src/java.base/share/classes/javax/security/cert/CertificateException.java b/jdk/src/java.base/share/classes/javax/security/cert/CertificateException.java index 68ee6798b8c..144bb97fe6a 100644 --- a/jdk/src/java.base/share/classes/javax/security/cert/CertificateException.java +++ b/jdk/src/java.base/share/classes/javax/security/cert/CertificateException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2015, 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 @@ -38,7 +38,9 @@ package javax.security.cert; * @author Hemma Prafullchandra * @since 1.4 * @see Certificate + * @deprecated Use the classes in {@code java.security.cert} instead. */ +@Deprecated public class CertificateException extends Exception { private static final long serialVersionUID = -5757213374030785290L; diff --git a/jdk/src/java.base/share/classes/javax/security/cert/CertificateExpiredException.java b/jdk/src/java.base/share/classes/javax/security/cert/CertificateExpiredException.java index 7e4579f2ebe..9f4eb7d4aed 100644 --- a/jdk/src/java.base/share/classes/javax/security/cert/CertificateExpiredException.java +++ b/jdk/src/java.base/share/classes/javax/security/cert/CertificateExpiredException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -40,7 +40,9 @@ package javax.security.cert; * * @since 1.4 * @author Hemma Prafullchandra + * @deprecated Use the classes in {@code java.security.cert} instead. */ +@Deprecated public class CertificateExpiredException extends CertificateException { private static final long serialVersionUID = 5091601212177261883L; diff --git a/jdk/src/java.base/share/classes/javax/security/cert/CertificateNotYetValidException.java b/jdk/src/java.base/share/classes/javax/security/cert/CertificateNotYetValidException.java index 9a53daa661d..c5c67c7f61e 100644 --- a/jdk/src/java.base/share/classes/javax/security/cert/CertificateNotYetValidException.java +++ b/jdk/src/java.base/share/classes/javax/security/cert/CertificateNotYetValidException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -40,7 +40,9 @@ package javax.security.cert; * * @since 1.4 * @author Hemma Prafullchandra + * @deprecated Use the classes in {@code java.security.cert} instead. */ +@Deprecated public class CertificateNotYetValidException extends CertificateException { private static final long serialVersionUID = -8976172474266822818L; diff --git a/jdk/src/java.base/share/classes/javax/security/cert/CertificateParsingException.java b/jdk/src/java.base/share/classes/javax/security/cert/CertificateParsingException.java index 4378587bb70..cd1f6ac507c 100644 --- a/jdk/src/java.base/share/classes/javax/security/cert/CertificateParsingException.java +++ b/jdk/src/java.base/share/classes/javax/security/cert/CertificateParsingException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -39,7 +39,9 @@ package javax.security.cert; * * @since 1.4 * @author Hemma Prafullchandra + * @deprecated Use the classes in {@code java.security.cert} instead. */ +@Deprecated public class CertificateParsingException extends CertificateException { private static final long serialVersionUID = -8449352422951136229L; diff --git a/jdk/src/java.base/share/classes/javax/security/cert/X509Certificate.java b/jdk/src/java.base/share/classes/javax/security/cert/X509Certificate.java index 1ef7ddcb56a..666524a084c 100644 --- a/jdk/src/java.base/share/classes/javax/security/cert/X509Certificate.java +++ b/jdk/src/java.base/share/classes/javax/security/cert/X509Certificate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -124,7 +124,9 @@ import java.util.Date; * @see Certificate * @see java.security.cert.X509Extension * @see java.security.Security security properties + * @deprecated Use the classes in {@code java.security.cert} instead. */ +@Deprecated public abstract class X509Certificate extends Certificate { /* diff --git a/jdk/src/java.base/share/classes/javax/security/cert/package-info.java b/jdk/src/java.base/share/classes/javax/security/cert/package-info.java index c09a0eafabc..a1d7a34fae1 100644 --- a/jdk/src/java.base/share/classes/javax/security/cert/package-info.java +++ b/jdk/src/java.base/share/classes/javax/security/cert/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2015, 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 @@ -26,15 +26,16 @@ /** * Provides classes for public key certificates. * - * These classes include a simplified version of the - * java.security.cert package. These classes were developed - * as part of the Java Secure Socket + * This package has been deprecated. These classes include a simplified + * version of the {@code java.security.cert} package. These classes were + * developed as part of the Java Secure Socket * Extension (JSSE). When JSSE was added to the J2SE version 1.4, this * package was added for backward-compatibility reasons only. * * New applications should not use this package, but rather - * java.security.cert. + * {@code java.security.cert}. * * @since 1.4 */ +@Deprecated package javax.security.cert; diff --git a/jdk/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java b/jdk/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java index 3b8ff0c09af..9d70053d35f 100644 --- a/jdk/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java +++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2015, 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 @@ -244,7 +244,9 @@ public abstract class AbstractDelegateHttpsURLConnection extends public java.security.cert.Certificate[] getServerCertificates() throws SSLPeerUnverifiedException { if (cachedResponse != null) { - List l = ((SecureCacheResponse)cachedResponse).getServerCertificateChain(); + List l = + ((SecureCacheResponse)cachedResponse) + .getServerCertificateChain(); if (l == null) { return null; } else { @@ -262,7 +264,12 @@ public abstract class AbstractDelegateHttpsURLConnection extends /** * Returns the server's X.509 certificate chain, or null if * the server did not authenticate. + * + * @deprecated This method returns the deprecated + * {@code javax.security.cert.X509Certificate} type. + * Use {@code getServerCertificates()} instead. */ + @Deprecated public javax.security.cert.X509Certificate[] getServerCertificateChain() throws SSLPeerUnverifiedException { if (cachedResponse != null) { @@ -271,7 +278,7 @@ public abstract class AbstractDelegateHttpsURLConnection extends if (http == null) { throw new IllegalStateException("connection not yet open"); } else { - return ((HttpsClient)http).getServerCertificateChain (); + return ((HttpsClient)http).getServerCertificateChain(); } } diff --git a/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java b/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java index 30e9fb0840a..5bc55ed9e50 100644 --- a/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java +++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2015, 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 @@ -699,7 +699,12 @@ final class HttpsClient extends HttpClient /** * Returns the X.509 certificate chain with which the server * authenticated itself, or null if the server did not authenticate. + * + * @deprecated This method returns the deprecated + * {@code javax.security.cert.X509Certificate} type. + * Use {@code getServerCertificates()} instead. */ + @Deprecated javax.security.cert.X509Certificate [] getServerCertificateChain() throws SSLPeerUnverifiedException { diff --git a/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java b/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java index c3067c044e0..5477b2cab80 100644 --- a/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java +++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2015, 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 @@ -204,7 +204,12 @@ public class HttpsURLConnectionImpl * NOTE: This method is not necessary for the version of this class * implementing javax.net.ssl.HttpsURLConnection, but provided for * compatibility with the com.sun.net.ssl.HttpsURLConnection version. + * + * @deprecated This method returns the deprecated + * {@code javax.security.cert.X509Certificate} type. + * Use {@code getServerCertificates()} instead. */ + @Deprecated public javax.security.cert.X509Certificate[] getServerCertificateChain() { try { return delegate.getServerCertificateChain(); diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java b/jdk/src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java index b5f304b6b97..881c4bf82fb 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2015, 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 @@ -464,8 +464,13 @@ final class SSLSessionImpl extends ExtendedSSLSession { * * @return array of peer X.509 certs, with the peer's own cert * first in the chain, and with the "root" CA last. + * + * @deprecated This method returns the deprecated + * {@code javax.security.cert.X509Certificate} type. + * Use {@code getPeerCertificates()} instead. */ @Override + @Deprecated public javax.security.cert.X509Certificate[] getPeerCertificateChain() throws SSLPeerUnverifiedException { // From 24bf7ba966548dfde80a87c1b718031a1d200454 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Mon, 9 Mar 2015 17:37:34 -0700 Subject: [PATCH 12/58] 8074714: Add javax/xml/jaxp/testng/validation to othervm.dirs in TEST.ROOT Reviewed-by: lancea --- jdk/test/TEST.ROOT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/test/TEST.ROOT b/jdk/test/TEST.ROOT index 6df529bccbd..7b89da112cf 100644 --- a/jdk/test/TEST.ROOT +++ b/jdk/test/TEST.ROOT @@ -8,7 +8,7 @@ keys=2d dnd i18n othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces # Tests that cannot run concurrently -exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi java/util/stream +exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi java/util/stream javax/xml/jaxp/testng/validation # Group definitions groups=TEST.groups [closed/TEST.groups] From f54b0ebdc29407bdcb83be5e43787dd957e6fe30 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Mon, 9 Mar 2015 18:16:52 -0700 Subject: [PATCH 13/58] 8074788: Javadoc typo in PKCS8EncodedKeySpec Reviewed-by: xuelei --- .../share/classes/java/security/spec/PKCS8EncodedKeySpec.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java b/jdk/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java index 90a94ed3436..89bf11d94ae 100644 --- a/jdk/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java +++ b/jdk/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -89,7 +89,7 @@ public class PKCS8EncodedKeySpec extends EncodedKeySpec { * Java Cryptography Architecture Standard Algorithm Name Documentation * for information about standard algorithm names. * @throws NullPointerException if {@code encodedKey} - * or {@algorithm} is null. + * or {@code algorithm} is null. * @throws IllegalArgumentException if {@code algorithm} is * the empty string {@code ""} * @since 1.9 From 71d53d5bb7d4f2c91ab3017e8b88e7cce50d1ad6 Mon Sep 17 00:00:00 2001 From: Amy Lu Date: Tue, 10 Mar 2015 13:30:21 +0100 Subject: [PATCH 14/58] 8074674: Doclint regression in java/util/regex/Matcher.java Reviewed-by: psandoz --- jdk/src/java.base/share/classes/java/util/regex/Matcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/util/regex/Matcher.java b/jdk/src/java.base/share/classes/java/util/regex/Matcher.java index 0fcd3eac11f..96cf39a6338 100644 --- a/jdk/src/java.base/share/classes/java/util/regex/Matcher.java +++ b/jdk/src/java.base/share/classes/java/util/regex/Matcher.java @@ -1183,7 +1183,7 @@ public final class Matcher implements MatchResult { * *

    Given the regular expression dog, the input * "zzzdogzzzdogzzz", and the function - * mr -> mr.group().toUpperCase(), an invocation of this method on + * {@code mr -> mr.group().toUpperCase()}, an invocation of this method on * a matcher for that expression would yield the string * "zzzDOGzzzDOGzzz". * @@ -1405,7 +1405,7 @@ public final class Matcher implements MatchResult { * *

    Given the regular expression dog, the input * "zzzdogzzzdogzzz", and the function - * mr -> mr.group().toUpperCase(), an invocation of this method on + * {@code mr -> mr.group().toUpperCase()}, an invocation of this method on * a matcher for that expression would yield the string * "zzzDOGzzzdogzzz". * From 367a429ff43ebb2b684914d607e11b608c0e2de0 Mon Sep 17 00:00:00 2001 From: Roger Riggs Date: Tue, 10 Mar 2015 16:44:45 -0400 Subject: [PATCH 15/58] 8058464: (process spec) ProcessBuilder.redirectXXX throws unspecified NPE Add a class level spec for null arguments throwing NPE in ProcessBuilder Reviewed-by: martin, alanb --- .../share/classes/java/lang/ProcessBuilder.java | 11 +++++------ jdk/test/java/lang/ProcessBuilder/Basic.java | 10 +++++++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/lang/ProcessBuilder.java b/jdk/src/java.base/share/classes/java/lang/ProcessBuilder.java index 72b260309d6..940084cfbc6 100644 --- a/jdk/src/java.base/share/classes/java/lang/ProcessBuilder.java +++ b/jdk/src/java.base/share/classes/java/lang/ProcessBuilder.java @@ -171,6 +171,11 @@ import java.util.Map; * variables, first call {@link java.util.Map#clear() Map.clear()} * before adding environment variables. * + *

    + * Unless otherwise noted, passing a {@code null} argument to a constructor + * or method in this class will cause a {@link NullPointerException} to be + * thrown. + * * @author Martin Buchholz * @since 1.5 */ @@ -193,7 +198,6 @@ public final class ProcessBuilder * command. * * @param command the list containing the program and its arguments - * @throws NullPointerException if the argument is null */ public ProcessBuilder(List command) { if (command == null) @@ -228,8 +232,6 @@ public final class ProcessBuilder * * @param command the list containing the program and its arguments * @return this process builder - * - * @throws NullPointerException if the argument is null */ public ProcessBuilder command(List command) { if (command == null) @@ -554,7 +556,6 @@ public final class ProcessBuilder * } * * @param file The {@code File} for the {@code Redirect}. - * @throws NullPointerException if the specified file is null * @return a redirect to read from the specified file */ public static Redirect from(final File file) { @@ -581,7 +582,6 @@ public final class ProcessBuilder * } * * @param file The {@code File} for the {@code Redirect}. - * @throws NullPointerException if the specified file is null * @return a redirect to write to the specified file */ public static Redirect to(final File file) { @@ -612,7 +612,6 @@ public final class ProcessBuilder * } * * @param file The {@code File} for the {@code Redirect}. - * @throws NullPointerException if the specified file is null * @return a redirect to append to the specified file */ public static Redirect appendTo(final File file) { diff --git a/jdk/test/java/lang/ProcessBuilder/Basic.java b/jdk/test/java/lang/ProcessBuilder/Basic.java index 03d165f7111..cfc4d443ff8 100644 --- a/jdk/test/java/lang/ProcessBuilder/Basic.java +++ b/jdk/test/java/lang/ProcessBuilder/Basic.java @@ -26,7 +26,7 @@ * @bug 4199068 4738465 4937983 4930681 4926230 4931433 4932663 4986689 * 5026830 5023243 5070673 4052517 4811767 6192449 6397034 6413313 * 6464154 6523983 6206031 4960438 6631352 6631966 6850957 6850958 - * 4947220 7018606 7034570 4244896 5049299 8003488 8054494 + * 4947220 7018606 7034570 4244896 5049299 8003488 8054494 8058464 * @summary Basic tests for Process and Environment Variable code * @run main/othervm/timeout=300 Basic * @run main/othervm/timeout=300 -Djdk.lang.Process.launchMechanism=fork Basic @@ -941,6 +941,14 @@ public class Basic { () -> pb.redirectOutput(Redirect.from(ifile)), () -> pb.redirectError(Redirect.from(ifile))); + THROWS(NullPointerException.class, + () -> pb.redirectInput((File)null), + () -> pb.redirectOutput((File)null), + () -> pb.redirectError((File)null), + () -> pb.redirectInput((Redirect)null), + () -> pb.redirectOutput((Redirect)null), + () -> pb.redirectError((Redirect)null)); + THROWS(IOException.class, // Input file does not exist () -> pb.start()); From 8db87d223f2363ef654d66a2937de02a9c0b73ea Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Tue, 10 Mar 2015 13:55:47 -0700 Subject: [PATCH 16/58] 8074870: Really add javax/xml/jaxp/testng/validation to othervm.dirs in TEST.ROOT Reviewed-by: rriggs --- jdk/test/TEST.ROOT | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/test/TEST.ROOT b/jdk/test/TEST.ROOT index 7b89da112cf..20863c62a87 100644 --- a/jdk/test/TEST.ROOT +++ b/jdk/test/TEST.ROOT @@ -5,10 +5,10 @@ keys=2d dnd i18n # Tests that must run in othervm mode -othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces +othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces javax/xml/jaxp/testng/validation # Tests that cannot run concurrently -exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi java/util/stream javax/xml/jaxp/testng/validation +exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi java/util/stream # Group definitions groups=TEST.groups [closed/TEST.groups] From f825d1ff35e6f7a899dfc8e39ee3999b0c9916e4 Mon Sep 17 00:00:00 2001 From: Martin Buchholz Date: Wed, 4 Mar 2015 17:35:40 -0800 Subject: [PATCH 17/58] 8074577: Modernize Unsafe internal javadoc Use modern javadoc style Reviewed-by: jrose --- .../share/classes/sun/misc/Unsafe.java | 137 +++++++++--------- 1 file changed, 67 insertions(+), 70 deletions(-) diff --git a/jdk/src/java.base/share/classes/sun/misc/Unsafe.java b/jdk/src/java.base/share/classes/sun/misc/Unsafe.java index 15402d168cd..ef25c517f03 100644 --- a/jdk/src/java.base/share/classes/sun/misc/Unsafe.java +++ b/jdk/src/java.base/share/classes/sun/misc/Unsafe.java @@ -57,31 +57,29 @@ public final class Unsafe { * Provides the caller with the capability of performing unsafe * operations. * - *

    The returned Unsafe object should be carefully guarded + *

    The returned {@code Unsafe} object should be carefully guarded * by the caller, since it can be used to read and write data at arbitrary * memory addresses. It must never be passed to untrusted code. * - *

    Most methods in this class are very low-level, and correspond to a + *

    Most methods in this class are very low-level, and correspond to a * small number of hardware instructions (on typical machines). Compilers * are encouraged to optimize these methods accordingly. * - *

    Here is a suggested idiom for using unsafe operations: + *

    Here is a suggested idiom for using unsafe operations: * - *

    +     * 
     {@code
          * class MyTrustedClass {
          *   private static final Unsafe unsafe = Unsafe.getUnsafe();
          *   ...
          *   private long myCountAddress = ...;
          *   public int getCount() { return unsafe.getByte(myCountAddress); }
    -     * }
    -     * 
    + * }} * - * (It may assist compilers to make the local variable be - * final.) + * (It may assist compilers to make the local variable {@code final}.) * - * @exception SecurityException if a security manager exists and its - * checkPropertiesAccess method doesn't allow - * access to the system properties. + * @throws SecurityException if a security manager exists and its + * {@code checkPropertiesAccess} method doesn't allow + * access to the system properties. */ @CallerSensitive public static Unsafe getUnsafe() { @@ -100,28 +98,27 @@ public final class Unsafe { /** * Fetches a value from a given Java variable. * More specifically, fetches a field or array element within the given - * object o at the given offset, or (if o is - * null) from the memory address whose numerical value is the given - * offset. + * object {@code o} at the given offset, or (if {@code o} is null) + * from the memory address whose numerical value is the given offset. *

    * The results are undefined unless one of the following cases is true: *

      *
    • The offset was obtained from {@link #objectFieldOffset} on * the {@link java.lang.reflect.Field} of some Java field and the object - * referred to by o is of a class compatible with that + * referred to by {@code o} is of a class compatible with that * field's class. * - *
    • The offset and object reference o (either null or + *
    • The offset and object reference {@code o} (either null or * non-null) were both obtained via {@link #staticFieldOffset} * and {@link #staticFieldBase} (respectively) from the * reflective {@link Field} representation of some Java field. * - *
    • The object referred to by o is an array, and the offset - * is an integer of the form B+N*S, where N is - * a valid index into the array, and B and S are + *
    • The object referred to by {@code o} is an array, and the offset + * is an integer of the form {@code B+N*S}, where {@code N} is + * a valid index into the array, and {@code B} and {@code S} are * the values obtained by {@link #arrayBaseOffset} and {@link * #arrayIndexScale} (respectively) from the array's class. The value - * referred to is the Nth element of the array. + * referred to is the {@code N}th element of the array. * *
    *

    @@ -162,7 +159,7 @@ public final class Unsafe { * is stored into that variable. *

    * The variable must be of the same type as the method - * parameter x. + * parameter {@code x}. * * @param o Java heap object in which the variable resides, if any, else * null @@ -184,9 +181,9 @@ public final class Unsafe { /** * Stores a reference value into a given Java variable. *

    - * Unless the reference x being stored is either null + * Unless the reference {@code x} being stored is either null * or matches the field type, the results are undefined. - * If the reference o is non-null, car marks or + * If the reference {@code o} is non-null, car marks or * other store barriers for that object (if the VM requires them) * are updated. * @see #putInt(Object, long, int) @@ -272,11 +269,11 @@ public final class Unsafe { * zero, or does not point into a block obtained from {@link * #allocateMemory}, the results are undefined. * - *

    If the native pointer is less than 64 bits wide, it is extended as + *

    If the native pointer is less than 64 bits wide, it is extended as * an unsigned number to a Java long. The pointer may be indexed by any * given byte offset, simply by adding that offset (as a simple integer) to * the long representing the pointer. The number of bytes actually read - * from the target address maybe determined by consulting {@link + * from the target address may be determined by consulting {@link * #addressSize}. * * @see #allocateMemory @@ -288,7 +285,7 @@ public final class Unsafe { * zero, or does not point into a block obtained from {@link * #allocateMemory}, the results are undefined. * - *

    The number of bytes actually written at the target address maybe + *

    The number of bytes actually written at the target address may be * determined by consulting {@link #addressSize}. * * @see #getAddress(long) @@ -357,7 +354,7 @@ public final class Unsafe { * (usually zero). This provides a single-register addressing mode, * as discussed in {@link #getInt(Object,long)}. * - *

    Equivalent to setMemory(null, address, bytes, value). + *

    Equivalent to {@code setMemory(null, address, bytes, value)}. */ public void setMemory(long address, long bytes, byte value) { setMemory(null, address, bytes, value); @@ -388,7 +385,7 @@ public final class Unsafe { * block. This provides a single-register addressing mode, * as discussed in {@link #getInt(Object,long)}. * - * Equivalent to copyMemory(null, srcAddress, null, destAddress, bytes). + * Equivalent to {@code copyMemory(null, srcAddress, null, destAddress, bytes)}. */ public void copyMemory(long srcAddress, long destAddress, long bytes) { copyMemory(null, srcAddress, null, destAddress, bytes); @@ -413,7 +410,7 @@ public final class Unsafe { public static final int INVALID_FIELD_OFFSET = -1; /** - * Report the location of a given field in the storage allocation of its + * Reports the location of a given field in the storage allocation of its * class. Do not expect to perform any sort of arithmetic on this offset; * it is just a cookie which is passed to the unsafe heap memory accessors. * @@ -433,7 +430,7 @@ public final class Unsafe { public native long objectFieldOffset(Field f); /** - * Report the location of a given static field, in conjunction with {@link + * Reports the location of a given static field, in conjunction with {@link * #staticFieldBase}. *

    Do not expect to perform any sort of arithmetic on this offset; * it is just a cookie which is passed to the unsafe heap memory accessors. @@ -452,7 +449,7 @@ public final class Unsafe { public native long staticFieldOffset(Field f); /** - * Report the location of a given static field, in conjunction with {@link + * Reports the location of a given static field, in conjunction with {@link * #staticFieldOffset}. *

    Fetch the base "Object", if any, with which static fields of the * given class can be accessed via methods like {@link #getInt(Object, @@ -464,7 +461,7 @@ public final class Unsafe { public native Object staticFieldBase(Field f); /** - * Detect if the given class may need to be initialized. This is often + * Detects if the given class may need to be initialized. This is often * needed in conjunction with obtaining the static field base of a * class. * @return false only if a call to {@code ensureClassInitialized} would have no effect @@ -472,14 +469,14 @@ public final class Unsafe { public native boolean shouldBeInitialized(Class c); /** - * Ensure the given class has been initialized. This is often + * Ensures the given class has been initialized. This is often * needed in conjunction with obtaining the static field base of a * class. */ public native void ensureClassInitialized(Class c); /** - * Report the offset of the first element in the storage allocation of a + * Reports the offset of the first element in the storage allocation of a * given array class. If {@link #arrayIndexScale} returns a non-zero value * for the same class, you may use that scale factor, together with this * base offset, to form new offsets to access elements of arrays of the @@ -527,7 +524,7 @@ public final class Unsafe { = theUnsafe.arrayBaseOffset(Object[].class); /** - * Report the scale factor for addressing elements in the storage + * Reports the scale factor for addressing elements in the storage * allocation of a given array class. However, arrays of "narrow" types * will generally not work properly with accessors like {@link * #getByte(Object, long)}, so the scale factor for such classes is reported @@ -576,7 +573,7 @@ public final class Unsafe { = theUnsafe.arrayIndexScale(Object[].class); /** - * Report the size in bytes of a native pointer, as stored via {@link + * Reports the size in bytes of a native pointer, as stored via {@link * #putAddress}. This value will be either 4 or 8. Note that the sizes of * other primitive types (as stored in native memory blocks) is determined * fully by their information content. @@ -587,7 +584,7 @@ public final class Unsafe { public static final int ADDRESS_SIZE = theUnsafe.addressSize(); /** - * Report the size in bytes of a native memory page (whatever that is). + * Reports the size in bytes of a native memory page (whatever that is). * This value will always be a power of two. */ public native int pageSize(); @@ -596,7 +593,7 @@ public final class Unsafe { /// random trusted operations from JNI: /** - * Tell the VM to define a class, without security checks. By default, the + * Tells the VM to define a class, without security checks. By default, the * class loader and protection domain come from the caller's class. */ public native Class defineClass(String name, byte[] b, int off, int len, @@ -604,7 +601,7 @@ public final class Unsafe { ProtectionDomain protectionDomain); /** - * Define a class but do not make it known to the class loader or system dictionary. + * Defines a class but does not make it known to the class loader or system dictionary. *

    * For each CP entry, the corresponding CP patch must either be null or have * the a format that matches its tag: @@ -621,38 +618,38 @@ public final class Unsafe { */ public native Class defineAnonymousClass(Class hostClass, byte[] data, Object[] cpPatches); - - /** Allocate an instance but do not run any constructor. - Initializes the class if it has not yet been. */ + /** + * Allocates an instance but does not run any constructor. + * Initializes the class if it has not yet been. + */ public native Object allocateInstance(Class cls) throws InstantiationException; - /** Throw the exception without telling the verifier. */ + /** Throws the exception without telling the verifier. */ public native void throwException(Throwable ee); - /** - * Atomically update Java variable to x if it is currently - * holding expected. - * @return true if successful + * Atomically updates Java variable to {@code x} if it is currently + * holding {@code expected}. + * @return {@code true} if successful */ public final native boolean compareAndSwapObject(Object o, long offset, Object expected, Object x); /** - * Atomically update Java variable to x if it is currently - * holding expected. - * @return true if successful + * Atomically updates Java variable to {@code x} if it is currently + * holding {@code expected}. + * @return {@code true} if successful */ public final native boolean compareAndSwapInt(Object o, long offset, int expected, int x); /** - * Atomically update Java variable to x if it is currently - * holding expected. - * @return true if successful + * Atomically updates Java variable to {@code x} if it is currently + * holding {@code expected}. + * @return {@code true} if successful */ public final native boolean compareAndSwapLong(Object o, long offset, long expected, @@ -736,28 +733,28 @@ public final class Unsafe { public native void putOrderedLong(Object o, long offset, long x); /** - * Unblock the given thread blocked on park, or, if it is - * not blocked, cause the subsequent call to park not to + * Unblocks the given thread blocked on {@code park}, or, if it is + * not blocked, causes the subsequent call to {@code park} not to * block. Note: this operation is "unsafe" solely because the * caller must somehow ensure that the thread has not been * destroyed. Nothing special is usually required to ensure this * when called from Java (in which there will ordinarily be a live * reference to the thread) but this is not nearly-automatically * so when calling from native code. - * @param thread the thread to unpark. * + * @param thread the thread to unpark. */ public native void unpark(Object thread); /** - * Block current thread, returning when a balancing - * unpark occurs, or a balancing unpark has + * Blocks current thread, returning when a balancing + * {@code unpark} occurs, or a balancing {@code unpark} has * already occurred, or the thread is interrupted, or, if not * absolute and time is not zero, the given time nanoseconds have * elapsed, or if absolute, the given deadline in milliseconds * since Epoch has passed, or spuriously (i.e., returning for no * "reason"). Note: This operation is in the Unsafe class only - * because unpark is, so it would be strange to place it + * because {@code unpark} is, so it would be strange to place it * elsewhere. */ public native void park(boolean isAbsolute, long time); @@ -765,8 +762,8 @@ public final class Unsafe { /** * Gets the load average in the system run queue assigned * to the available processors averaged over various periods of time. - * This method retrieves the given nelem samples and - * assigns to the elements of the given loadavg array. + * This method retrieves the given {@code nelem} samples and + * assigns to the elements of the given {@code loadavg} array. * The system imposes a maximum of 3 samples, representing * averages over the last 1, 5, and 15 minutes, respectively. * @@ -784,8 +781,8 @@ public final class Unsafe { /** * Atomically adds the given value to the current value of a field - * or array element within the given object o - * at the given offset. + * or array element within the given object {@code o} + * at the given {@code offset}. * * @param o object/array to update the field/element in * @param offset field/element offset @@ -803,8 +800,8 @@ public final class Unsafe { /** * Atomically adds the given value to the current value of a field - * or array element within the given object o - * at the given offset. + * or array element within the given object {@code o} + * at the given {@code offset}. * * @param o object/array to update the field/element in * @param offset field/element offset @@ -822,8 +819,8 @@ public final class Unsafe { /** * Atomically exchanges the given value with the current value of - * a field or array element within the given object o - * at the given offset. + * a field or array element within the given object {@code o} + * at the given {@code offset}. * * @param o object/array to update the field/element in * @param offset field/element offset @@ -841,8 +838,8 @@ public final class Unsafe { /** * Atomically exchanges the given value with the current value of - * a field or array element within the given object o - * at the given offset. + * a field or array element within the given object {@code o} + * at the given {@code offset}. * * @param o object/array to update the field/element in * @param offset field/element offset @@ -861,7 +858,7 @@ public final class Unsafe { /** * Atomically exchanges the given reference value with the current * reference value of a field or array element within the given - * object o at the given offset. + * object {@code o} at the given {@code offset}. * * @param o object/array to update the field/element in * @param offset field/element offset From 0803af98c7f332e4a8e10239fe00b7dcf58a90e2 Mon Sep 17 00:00:00 2001 From: Yuri Nesterenko Date: Thu, 5 Mar 2015 11:07:48 +0300 Subject: [PATCH 18/58] 8074092: Newly introduced unnecessary dependencies on internal API in client regtests Reviewed-by: serb, azvegint --- .../Choice/ItemStateChangeTest/ItemStateChangeTest.java | 4 +++- jdk/test/java/awt/Desktop/8064934/bug8064934.java | 5 +++-- .../java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java | 4 +++- .../FullscreenAfterSplash/FullScreenAfterSplash.java | 5 +++-- .../event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java | 5 ++++- jdk/test/javax/swing/JButton/4796987/bug4796987.java | 8 ++++---- jdk/test/javax/swing/JFileChooser/8062561/bug8062561.java | 6 ++++-- jdk/test/javax/swing/JPopupMenu/6827786/bug6827786.java | 5 ++++- 8 files changed, 28 insertions(+), 14 deletions(-) diff --git a/jdk/test/java/awt/Choice/ItemStateChangeTest/ItemStateChangeTest.java b/jdk/test/java/awt/Choice/ItemStateChangeTest/ItemStateChangeTest.java index 45ccef0262b..9dd36dda9e3 100644 --- a/jdk/test/java/awt/Choice/ItemStateChangeTest/ItemStateChangeTest.java +++ b/jdk/test/java/awt/Choice/ItemStateChangeTest/ItemStateChangeTest.java @@ -27,15 +27,17 @@ @summary awt Choice doesn't fire ItemStateChange when selecting item after select() call @author Oleg Pekhovskiy: area=awt-choice @library ../../regtesthelpers + @library ../../../../lib/testlibrary @build Util + @build jdk.testlibrary.OSInfo @run main ItemStateChangeTest */ import test.java.awt.regtesthelpers.Util; +import jdk.testlibrary.OSInfo; import java.awt.*; import java.awt.event.*; -import sun.awt.OSInfo; public class ItemStateChangeTest extends Frame { diff --git a/jdk/test/java/awt/Desktop/8064934/bug8064934.java b/jdk/test/java/awt/Desktop/8064934/bug8064934.java index 8824f883cf5..ca1c451ccc1 100644 --- a/jdk/test/java/awt/Desktop/8064934/bug8064934.java +++ b/jdk/test/java/awt/Desktop/8064934/bug8064934.java @@ -25,10 +25,11 @@ * @bug 8064934 * @summary Incorrect Exception message from java.awt.Desktop.open() * @author Dmitry Markov + * @library ../../../../lib/testlibrary + * @build jdk.testlibrary.OSInfo * @run main bug8064934 */ -import sun.awt.OSInfo; - +import jdk.testlibrary.OSInfo; import java.awt.*; import java.io.File; import java.io.IOException; diff --git a/jdk/test/java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java b/jdk/test/java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java index c8b47366542..dcfb8ca16a9 100644 --- a/jdk/test/java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java +++ b/jdk/test/java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java @@ -27,6 +27,8 @@ @summary REG: Menu does not disappear when clicked, keeping Choice's drop-down open, XToolkit @author andrei.dmitriev: area=awt.menu @library ../../regtesthelpers + @library ../../../../lib/testlibrary + @build jdk.testlibrary.OSInfo @build Util @run main OpensWithNoGrab */ @@ -34,7 +36,7 @@ import java.awt.*; import java.awt.event.*; -import sun.awt.OSInfo; +import jdk.testlibrary.OSInfo; import test.java.awt.regtesthelpers.Util; public class OpensWithNoGrab diff --git a/jdk/test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java b/jdk/test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java index b5e019ec772..6cecf964a72 100644 --- a/jdk/test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java +++ b/jdk/test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java @@ -21,8 +21,7 @@ * questions. */ -import sun.awt.OSInfo; - +import jdk.testlibrary.OSInfo; import java.awt.*; import java.awt.Robot; import java.awt.event.InputEvent; @@ -38,6 +37,8 @@ import javax.swing.*; * @bug 8024185 * @summary Native Mac OS X full screen does not work after showing the splash * @library ../ + * @library ../../../../lib/testlibrary + * @build jdk.testlibrary.OSInfo * @build GenerateTestImage * @run main GenerateTestImage * @author Petr Pchelko area=awt.event diff --git a/jdk/test/java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java b/jdk/test/java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java index 310e78f9ff8..6878c3f42a8 100644 --- a/jdk/test/java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java +++ b/jdk/test/java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java @@ -27,10 +27,13 @@ @summary Tests that key events with modifiers are not swallowed. @author anton.tarasov: area=awt.focus @library ../../../regtesthelpers + @library ../../../../../lib/testlibrary + @build jdk.testlibrary.OSInfo @build Util @run main SwallowKeyEvents */ +import jdk.testlibrary.OSInfo; import java.awt.AWTException; import java.awt.Frame; import java.awt.Robot; @@ -49,7 +52,7 @@ public class SwallowKeyEvents { static Robot r; public static void main(String[] args) { - if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.WINDOWS) { + if (OSInfo.getOSType() == OSInfo.OSType.WINDOWS) { System.out.println("Skipped. Test not for MS Windows."); return; } diff --git a/jdk/test/javax/swing/JButton/4796987/bug4796987.java b/jdk/test/javax/swing/JButton/4796987/bug4796987.java index ac41799da61..a206ff7b931 100644 --- a/jdk/test/javax/swing/JButton/4796987/bug4796987.java +++ b/jdk/test/javax/swing/JButton/4796987/bug4796987.java @@ -27,14 +27,15 @@ * @summary XP Only: JButton.setBorderPainted() does not work with XP L&F * @author Alexander Scherbatiy * @library ../../regtesthelpers + * @library ../../../../lib/testlibrary + * @build jdk.testlibrary.OSInfo * @build Util * @run main bug4796987 */ +import jdk.testlibrary.OSInfo; import java.awt.*; import javax.swing.*; -import sun.awt.OSInfo; -import sun.awt.SunToolkit; import com.sun.java.swing.plaf.windows.WindowsLookAndFeel; public class bug4796987 { @@ -51,7 +52,6 @@ public class bug4796987 { } private static void testButtonBorder() throws Exception { - SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); Robot robot = new Robot(); robot.setAutoDelay(50); @@ -62,7 +62,7 @@ public class bug4796987 { } }); - toolkit.realSync(); + robot.waitForIdle(); Thread.sleep(500); Point p1 = Util.getCenterPoint(button1); diff --git a/jdk/test/javax/swing/JFileChooser/8062561/bug8062561.java b/jdk/test/javax/swing/JFileChooser/8062561/bug8062561.java index 3802de38b22..cf00665d61f 100644 --- a/jdk/test/javax/swing/JFileChooser/8062561/bug8062561.java +++ b/jdk/test/javax/swing/JFileChooser/8062561/bug8062561.java @@ -21,6 +21,7 @@ * questions. */ +import jdk.testlibrary.OSInfo; import java.awt.Robot; import java.awt.event.KeyEvent; import java.io.File; @@ -31,12 +32,13 @@ import java.util.concurrent.TimeUnit; import javax.swing.JFileChooser; import javax.swing.SwingUtilities; import javax.swing.filechooser.FileSystemView; -import sun.awt.OSInfo; /** * @test * @bug 8062561 * @summary File system view returns null default directory + * @library ../../../../lib/testlibrary + * @build jdk.testlibrary.OSInfo * @run main/othervm bug8062561 GENERATE_POLICY * @run main/othervm/policy=security.policy bug8062561 CHECK_DEFAULT_DIR run */ @@ -72,7 +74,7 @@ public class bug8062561 { File defaultDirectory = FileSystemView.getFileSystemView(). getDefaultDirectory(); if (defaultDirectory != null) { - throw new RuntimeException("File system default directory is null!"); + throw new RuntimeException("File system default directory must be null! (FilePermission has not been granted in our policy file)."); } } private static volatile JFileChooser fileChooser; diff --git a/jdk/test/javax/swing/JPopupMenu/6827786/bug6827786.java b/jdk/test/javax/swing/JPopupMenu/6827786/bug6827786.java index 77c05fe206e..1cacce868bf 100644 --- a/jdk/test/javax/swing/JPopupMenu/6827786/bug6827786.java +++ b/jdk/test/javax/swing/JPopupMenu/6827786/bug6827786.java @@ -27,9 +27,12 @@ * @summary Tests duplicate mnemonics * @author Peter Zhelezniakov * @library ../../regtesthelpers + * @library ../../../../lib/testlibrary + * @build jdk.testlibrary.OSInfo * @build Util * @run main bug6827786 */ +import jdk.testlibrary.OSInfo; import java.awt.*; import java.awt.event.KeyEvent; import javax.swing.*; @@ -63,7 +66,7 @@ public class bug6827786 { checkfocus(); // select menu - if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.MACOSX) { + if (OSInfo.getOSType() == OSInfo.OSType.MACOSX) { Util.hitKeys(robot, KeyEvent.VK_CONTROL, KeyEvent.VK_ALT, KeyEvent.VK_F); } else { Util.hitKeys(robot, KeyEvent.VK_ALT, KeyEvent.VK_F); From 02614afbd146d397421307c4d8de0673f3be4d7a Mon Sep 17 00:00:00 2001 From: Zaiyao Liu Date: Fri, 6 Mar 2015 00:49:38 +0000 Subject: [PATCH 19/58] 8044193: Need to add known answer tests for AES cipher Added more tests for AES cipher using known test vectors. Reviewed-by: valeriep --- .../Cipher/AES/TestAESCiphers/Dynamic.java | 186 ++++++++++++++++++ .../TestAESWithDefaultProvider.java | 35 ++++ .../TestAESWithProviderChange.java | 39 ++++ .../TestAESWithRemoveAddProvider.java | 42 ++++ .../Cipher/AES/TestAESCiphers/testAES.policy | 6 + 5 files changed, 308 insertions(+) create mode 100644 jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/Dynamic.java create mode 100644 jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/TestAESWithDefaultProvider.java create mode 100644 jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/TestAESWithProviderChange.java create mode 100644 jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/TestAESWithRemoveAddProvider.java create mode 100644 jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/testAES.policy diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/Dynamic.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/Dynamic.java new file mode 100644 index 00000000000..3aa6d29e8fe --- /dev/null +++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/Dynamic.java @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2012, 2015, 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. + * + * 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. + */ + +import java.io.PrintStream; +import java.security.NoSuchAlgorithmException; +import java.security.spec.AlgorithmParameterSpec; +import java.util.Arrays; +import java.util.Random; + +import javax.crypto.Cipher; +import javax.crypto.KeyGenerator; +import javax.crypto.SecretKey; +import javax.crypto.spec.IvParameterSpec; + +public class Dynamic { + + static final String ALGORITHM = "AES"; + static final String[] MODE = { + "ECb", "CbC", "CTR", "PCBC", "OFB", "OFB150", "cFB", "CFB7", + "cFB8", "cFB16", "cFB24", "cFB32", "Cfb40", "cfB48", "cfB56", + "cfB64", "cfB72", "cfB80", "cfB88", "cfB96", "cfb104", "cfB112", + "cfB120", "cfB128", "OFB8", "OFB16", "OFB24", "OFB32", "OFB40", + "OFB48", "OFB56", "OFB64", "OFB72", "OFB80", "OFB88", "OFB96", + "OFB104", "OFB112", "OFB120", "OFB128", "GCM" + }; + static final String[] PADDING = { + "NoPadding", "PKCS5Padding", "ISO10126Padding" + }; + static final String SUNJCE = "SunJCE"; + + Cipher ci = null; + byte[] iv = null; + AlgorithmParameterSpec aps = null; + SecretKey key = null; + int keyStrength; + static int DefaultSize = 128; + + public void run(String[] argv) throws Exception { + if (!runAllTest(argv, System.out)) { + throw new Exception("Test Failed"); + } + } + + protected boolean runAllTest(String argv[], PrintStream out) { + boolean result = true; + StringBuilder failedList = new StringBuilder(); + int failedCnt = 0; + int testCount = 0; + int padKinds; // how many kinds of padding mode such as PKCS5padding and + // NoPadding. + + try { + for (int i = 0; i < 3; i++) { + keyStrength = DefaultSize + i * 64; // obtain the key size 128, + // 192, 256 + + for (int j = 0; j < MODE.length; j++) { + if (MODE[j].equalsIgnoreCase("ECB") + || MODE[j].equalsIgnoreCase("PCBC") + || MODE[j].equalsIgnoreCase("CBC")) { + padKinds = PADDING.length; + } else { + padKinds = 1; + } + + for (int k = 0; k < padKinds; k++) { + testCount++; + try { + if (!runTest(ALGORITHM, MODE[j], PADDING[k])) { + result = false; + failedCnt++; + failedList.append(ALGORITHM + "/" + MODE[j] + + "/" + PADDING[k] + " "); + } + } catch (Exception e) { + e.printStackTrace(); + result = false; + failedCnt++; + failedList.append(ALGORITHM + "/" + MODE[j] + "/" + + PADDING[k] + " "); + } + + } + } + } + + if (result) { + out.println("STATUS:Passed. Test " + testCount + + " cases, All Passed"); + return true; + } + out.println("STATUS:Failed. " + failedCnt + " Failed: " + + failedList); + return false; + + } catch (Exception ex) { + ex.printStackTrace(); + out.println("STATUS:Failed. Unexpected Exception: " + ex); + return false; + } + } + + protected boolean runTest(String algo, String mo, String pad) + throws Exception { + boolean result = true; + try { + byte[] plainText = new byte[160000]; + new Random().nextBytes(plainText); + + String transformation = algo + "/" + mo + "/" + pad; + ci = Cipher.getInstance(transformation, SUNJCE); + KeyGenerator kg = KeyGenerator.getInstance(algo, SUNJCE); + if (keyStrength > Cipher.getMaxAllowedKeyLength(transformation)) { + // skip if this key length is larger than what's + // configured in the jce jurisdiction policy files + System.out.println(keyStrength + + " is larger than what's configured " + + "in the jce jurisdiction policy files"); + return result; + } + kg.init(keyStrength); + key = kg.generateKey(); + + if (!mo.equalsIgnoreCase("GCM")) { + ci.init(Cipher.ENCRYPT_MODE, key, aps); + } else { + ci.init(Cipher.ENCRYPT_MODE, key); + } + byte[] cipherText = new byte[ci.getOutputSize(plainText.length)]; + int offset = ci.update(plainText, 0, plainText.length, cipherText, + 0); + ci.doFinal(cipherText, offset); + + if (!mo.equalsIgnoreCase("ECB")) { + iv = ci.getIV(); + aps = new IvParameterSpec(iv); + } else { + aps = null; + } + + if (!mo.equalsIgnoreCase("GCM")) { + ci.init(Cipher.DECRYPT_MODE, key, aps); + } else { + ci.init(Cipher.DECRYPT_MODE, key, ci.getParameters()); + } + byte[] recoveredText = new byte[ci.getOutputSize(cipherText.length)]; + int len = ci.doFinal(cipherText, 0, cipherText.length, + recoveredText); + + byte[] tmp = new byte[len]; + for (int i = 0; i < len; i++) { + tmp[i] = recoveredText[i]; + } + + result = Arrays.equals(plainText, tmp); + } catch (NoSuchAlgorithmException nsaEx) { + nsaEx.printStackTrace(); + // CFB7 and OFB150 are negative test,SunJCE not support this + // algorithm + result = mo.equalsIgnoreCase("CFB7") + || mo.equalsIgnoreCase("OFB150"); + + } + return result; + } +} diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/TestAESWithDefaultProvider.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/TestAESWithDefaultProvider.java new file mode 100644 index 00000000000..132e79d9a35 --- /dev/null +++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/TestAESWithDefaultProvider.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2012, 2015, 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. + * + * 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. + */ + +/* + * @test + * @bug 8044193 + * @summary Test AES ciphers with different modes and padding schemes with + * default provider + */ + +public class TestAESWithDefaultProvider extends Dynamic { + public static void main(String argv[]) throws Exception { + new TestAESWithDefaultProvider().run(argv); + } +} diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/TestAESWithProviderChange.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/TestAESWithProviderChange.java new file mode 100644 index 00000000000..8dec9f136a4 --- /dev/null +++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/TestAESWithProviderChange.java @@ -0,0 +1,39 @@ +/* Copyright (c) 2012, 2015, 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. + * + * 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. + */ + +import java.security.Security; + +/* + * @test + * @bug 8044193 + * @summary Test AES ciphers with different modes and padding schemes after + * remove then add provider. + * @run main/othervm/policy=testAES.policy TestAESWithProviderChange + */ + +public class TestAESWithProviderChange extends Dynamic { + public static void main(String argv[]) throws Exception { + Security.removeProvider(SUNJCE); + Security.addProvider(new com.sun.crypto.provider.SunJCE()); + new TestAESWithProviderChange().run(argv); + } +} diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/TestAESWithRemoveAddProvider.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/TestAESWithRemoveAddProvider.java new file mode 100644 index 00000000000..81761a7ea4b --- /dev/null +++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/TestAESWithRemoveAddProvider.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2012, 2015, 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. + * + * 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. + */ + +import java.security.*; +import java.security.Provider; + +/* + * @test + * @bug 8044193 + * @summary Test AES ciphers with different modes and padding schemes after + * remove default provider then add it back. + * @run main/othervm/policy=testAES.policy TestAESWithRemoveAddProvider + */ + +public class TestAESWithRemoveAddProvider extends Dynamic { + public static void main(String argv[]) throws Exception { + Provider pJCE = Security.getProvider(SUNJCE); + Security.removeProvider(SUNJCE); + Security.addProvider(pJCE); + new TestAESWithRemoveAddProvider().run(argv); + } +} diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/testAES.policy b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/testAES.policy new file mode 100644 index 00000000000..a138a577ff7 --- /dev/null +++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/testAES.policy @@ -0,0 +1,6 @@ +grant +{ + permission java.security.SecurityPermission "removeProvider.SunJCE"; + permission java.security.SecurityPermission "insertProvider.SunJCE"; + permission java.security.SecurityPermission "putProviderProperty.SunJCE"; +}; From b035ca734821fa7874c9f6167183bb3e48f50109 Mon Sep 17 00:00:00 2001 From: Ivan Gerasimov Date: Fri, 6 Mar 2015 13:30:49 +0300 Subject: [PATCH 20/58] 8073692: (cs) Inconsistent docs for CharsetDecoder.replaceWith and CharsetEncoder.replaceWith Reviewed-by: martin --- .../java/nio/charset/Charset-X-Coder.java.template | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template b/jdk/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template index f5e50a51c85..faa51bb45d4 100644 --- a/jdk/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template +++ b/jdk/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template @@ -266,16 +266,15 @@ public abstract class Charset$Coder$ { * method, passing the new replacement, after checking that the new * replacement is acceptable.

    * - * @param newReplacement The replacement value - * + * @param newReplacement The new replacement; must not be + * null, must have non-zero length, #if[decoder] - * The new replacement; must not be null - * and must have non-zero length + * and must not be longer than the value returned by the + * {@link #max$ItypesPerOtype$() max$ItypesPerOtype$} method #end[decoder] #if[encoder] - * The new replacement; must not be null, must have - * non-zero length, must not be longer than the value returned by - * the {@link #max$ItypesPerOtype$() max$ItypesPerOtype$} method, and + * must not be longer than the value returned by the + * {@link #max$ItypesPerOtype$() max$ItypesPerOtype$} method, and * must be {@link #isLegalReplacement legal} #end[encoder] * From 2bb83340149c470140985f2cf35f5f1a6234be20 Mon Sep 17 00:00:00 2001 From: Anton Nashatyrev Date: Fri, 6 Mar 2015 16:38:54 +0300 Subject: [PATCH 21/58] 8072900: Mouse events are captured by the wrong menu in OS X Reviewed-by: serb, alexp --- .../classes/com/apple/laf/AquaMenuUI.java | 14 +- .../8072900/WrongSelectionOnMouseOver.java | 198 ++++++++++++++++++ 2 files changed, 207 insertions(+), 5 deletions(-) create mode 100644 jdk/test/javax/swing/JMenu/8072900/WrongSelectionOnMouseOver.java diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuUI.java index 450bf547644..f56a3c6f7f1 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuUI.java +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuUI.java @@ -148,11 +148,15 @@ public class AquaMenuUI extends BasicMenuUI implements AquaMenuPainter.Client { // In Aqua, we always have a menu delay, regardless of where the menu is. if (!(selectedPath.length > 0 && selectedPath[selectedPath.length - 1] == menu.getPopupMenu())) { - if (menu.getDelay() == 0) { - appendPath(getPath(), menu.getPopupMenu()); - } else { - manager.setSelectedPath(getPath()); - setupPostTimer(menu); + // the condition below prevents from activating menu in other frame + if (!menu.isTopLevelMenu() || (selectedPath.length > 0 && + selectedPath[0] == menu.getParent())) { + if (menu.getDelay() == 0) { + appendPath(getPath(), menu.getPopupMenu()); + } else { + manager.setSelectedPath(getPath()); + setupPostTimer(menu); + } } } } diff --git a/jdk/test/javax/swing/JMenu/8072900/WrongSelectionOnMouseOver.java b/jdk/test/javax/swing/JMenu/8072900/WrongSelectionOnMouseOver.java new file mode 100644 index 00000000000..cf02f6f2126 --- /dev/null +++ b/jdk/test/javax/swing/JMenu/8072900/WrongSelectionOnMouseOver.java @@ -0,0 +1,198 @@ +/* + * Copyright (c) 2015, 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. + * + * 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. + */ + +/* +@test +@bug 8072900 +@summary Mouse events are captured by the wrong menu in OS X +@author Anton Nashatyrev +@run main WrongSelectionOnMouseOver +*/ + +import javax.swing.*; +import javax.swing.event.MenuEvent; +import javax.swing.event.MenuListener; +import java.awt.*; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +import static javax.swing.UIManager.getInstalledLookAndFeels; + +public class WrongSelectionOnMouseOver implements Runnable { + + CountDownLatch firstMenuSelected = new CountDownLatch(1); + CountDownLatch secondMenuMouseEntered = new CountDownLatch(1); + CountDownLatch secondMenuSelected = new CountDownLatch(1); + + JMenu m1, m2; + + private UIManager.LookAndFeelInfo laf; + JFrame frame1; + JFrame frame2; + + public WrongSelectionOnMouseOver(UIManager.LookAndFeelInfo laf) throws Exception { + this.laf = laf; + } + + private void createUI() throws Exception { + System.out.println("Testing UI: " + laf); + UIManager.setLookAndFeel(laf.getClassName()); + + { + frame1 = new JFrame("Frame1"); + JMenuBar mb = new JMenuBar(); + m1 = new JMenu("File"); + JMenuItem i1 = new JMenuItem("Save"); + JMenuItem i2 = new JMenuItem("Load"); + + m1.addMenuListener(new MenuListener() { + @Override + public void menuSelected(MenuEvent e) { + firstMenuSelected.countDown(); + System.out.println("Menu1: menuSelected"); + } + + @Override + public void menuDeselected(MenuEvent e) { + System.out.println("Menu1: menuDeselected"); + } + + @Override + public void menuCanceled(MenuEvent e) { + System.out.println("Menu1: menuCanceled"); + } + }); + + frame1.setJMenuBar(mb); + mb.add(m1); + m1.add(i1); + m1.add(i2); + + frame1.setLayout(new FlowLayout()); + frame1.setBounds(200, 200, 200, 200); + + frame1.setVisible(true); + } + + { + frame2 = new JFrame("Frame2"); + JMenuBar mb = new JMenuBar(); + m2 = new JMenu("File"); + JMenuItem i1 = new JMenuItem("Save"); + JMenuItem i2 = new JMenuItem("Load"); + + m2.addMouseListener(new MouseAdapter() { + @Override + public void mouseEntered(MouseEvent e) { + secondMenuMouseEntered.countDown(); + System.out.println("WrongSelectionOnMouseOver.mouseEntered"); + } + }); + + m2.addMenuListener(new MenuListener() { + @Override + public void menuSelected(MenuEvent e) { + secondMenuSelected.countDown(); + System.out.println("Menu2: menuSelected"); + } + + @Override + public void menuDeselected(MenuEvent e) { + System.out.println("Menu2: menuDeselected"); + } + + @Override + public void menuCanceled(MenuEvent e) { + System.out.println("Menu2: menuCanceled"); + } + }); + + frame2.setJMenuBar(mb); + mb.add(m2); + m2.add(i1); + m2.add(i2); + + frame2.setLayout(new FlowLayout()); + frame2.setBounds(400, 200, 200, 200); + + frame2.setVisible(true); + } + } + + public void disposeUI() { + frame1.dispose(); + frame2.dispose(); + } + + @Override + public void run() { + try { + if (frame1 == null) { + createUI(); + } else { + disposeUI(); + } + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + public void test() throws Exception { + Robot robot = new Robot(); + robot.setAutoDelay(100); + + robot.waitForIdle(); + + robot.mouseMove((int) m1.getLocationOnScreen().getX() + 5, + (int) m1.getLocationOnScreen().getY() + 5); + robot.mousePress(MouseEvent.BUTTON1_MASK); + robot.mouseRelease(MouseEvent.BUTTON1_MASK); + + if (!firstMenuSelected.await(5, TimeUnit.SECONDS)) { + throw new RuntimeException("Menu has not been selected."); + }; + + robot.mouseMove((int) m2.getLocationOnScreen().getX() + 5, + (int) m2.getLocationOnScreen().getY() + 5); + + if (!secondMenuMouseEntered.await(5, TimeUnit.SECONDS)) { + throw new RuntimeException("MouseEntered event missed for the second menu"); + }; + + if (secondMenuSelected.await(1, TimeUnit.SECONDS)) { + throw new RuntimeException("The second menu has been selected"); + }; + } + + public static void main(final String[] args) throws Exception { + for (final UIManager.LookAndFeelInfo laf : getInstalledLookAndFeels()) { + WrongSelectionOnMouseOver test = new WrongSelectionOnMouseOver(laf); + SwingUtilities.invokeAndWait(test); + test.test(); + SwingUtilities.invokeAndWait(test); + } + System.out.println("Test passed"); + } +} \ No newline at end of file From 2ae75ccaa18a95b6bc852f67303883cb5de53e55 Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Fri, 6 Mar 2015 09:02:26 -0800 Subject: [PATCH 22/58] 8074428: Move pack200, unpack200, libpack200 to jdk.pack200 Reviewed-by: alanb, weijun, erikj, ihse --- ...{Launcher-jdk.runtime.gmk => Launcher-jdk.pack200.gmk} | 8 ++++---- jdk/make/lib/{Lib-jdk.runtime.gmk => Lib-jdk.pack200.gmk} | 6 +++--- .../share/native/common-unpack/bands.cpp | 0 .../share/native/common-unpack/bands.h | 0 .../share/native/common-unpack/bytes.cpp | 0 .../share/native/common-unpack/bytes.h | 0 .../share/native/common-unpack/coding.cpp | 0 .../share/native/common-unpack/coding.h | 0 .../share/native/common-unpack/constants.h | 0 .../share/native/common-unpack/defines.h | 0 .../share/native/common-unpack/unpack.cpp | 0 .../share/native/common-unpack/unpack.h | 0 .../share/native/common-unpack/utils.cpp | 0 .../share/native/common-unpack/utils.h | 0 .../share/native/common-unpack/zip.cpp | 0 .../share/native/common-unpack/zip.h | 0 .../share/native/libunpack/jni.cpp | 0 .../share/native/unpack200/main.cpp | 0 .../windows/native/unpack200/unpack200_proto.exe.manifest | 0 19 files changed, 7 insertions(+), 7 deletions(-) rename jdk/make/launcher/{Launcher-jdk.runtime.gmk => Launcher-jdk.pack200.gmk} (94%) rename jdk/make/lib/{Lib-jdk.runtime.gmk => Lib-jdk.pack200.gmk} (92%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/common-unpack/bands.cpp (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/common-unpack/bands.h (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/common-unpack/bytes.cpp (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/common-unpack/bytes.h (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/common-unpack/coding.cpp (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/common-unpack/coding.h (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/common-unpack/constants.h (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/common-unpack/defines.h (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/common-unpack/unpack.cpp (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/common-unpack/unpack.h (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/common-unpack/utils.cpp (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/common-unpack/utils.h (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/common-unpack/zip.cpp (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/common-unpack/zip.h (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/libunpack/jni.cpp (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/share/native/unpack200/main.cpp (100%) rename jdk/src/{jdk.runtime => jdk.pack200}/windows/native/unpack200/unpack200_proto.exe.manifest (100%) diff --git a/jdk/make/launcher/Launcher-jdk.runtime.gmk b/jdk/make/launcher/Launcher-jdk.pack200.gmk similarity index 94% rename from jdk/make/launcher/Launcher-jdk.runtime.gmk rename to jdk/make/launcher/Launcher-jdk.pack200.gmk index 366dc5cc9a2..1e6c21820cb 100644 --- a/jdk/make/launcher/Launcher-jdk.runtime.gmk +++ b/jdk/make/launcher/Launcher-jdk.pack200.gmk @@ -32,9 +32,9 @@ $(eval $(call SetupLauncher,pack200, \ # The order of the object files on the link command line affects the size of the resulting # binary (at least on linux) which causes the size to differ between old and new build. -UNPACKEXE_SRC := $(JDK_TOPDIR)/src/jdk.runtime/share/native/common-unpack \ - $(JDK_TOPDIR)/src/jdk.runtime/share/native/unpack200 -UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/jdk.runtime/share/native/common-unpack \ +UNPACKEXE_SRC := $(JDK_TOPDIR)/src/jdk.pack200/share/native/common-unpack \ + $(JDK_TOPDIR)/src/jdk.pack200/share/native/unpack200 +UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/jdk.pack200/share/native/common-unpack \ -I$(JDK_TOPDIR)/src/java.base/share/native/libjava \ -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava @@ -96,7 +96,7 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \ -D "JDK_INTERNAL_NAME=unpack200" \ -D "JDK_FTYPE=0x1L", \ DEBUG_SYMBOLS := true, \ - MANIFEST := $(JDK_TOPDIR)/src/jdk.runtime/windows/native/unpack200/unpack200_proto.exe.manifest)) + MANIFEST := $(JDK_TOPDIR)/src/jdk.pack200/windows/native/unpack200/unpack200_proto.exe.manifest)) ifneq ($(USE_EXTERNAL_LIBZ), true) diff --git a/jdk/make/lib/Lib-jdk.runtime.gmk b/jdk/make/lib/Lib-jdk.pack200.gmk similarity index 92% rename from jdk/make/lib/Lib-jdk.runtime.gmk rename to jdk/make/lib/Lib-jdk.pack200.gmk index 4bf9b026cc1..eb8caa61485 100644 --- a/jdk/make/lib/Lib-jdk.runtime.gmk +++ b/jdk/make/lib/Lib-jdk.pack200.gmk @@ -30,14 +30,14 @@ include LibCommon.gmk $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \ LIBRARY := unpack, \ OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ - SRC := $(JDK_TOPDIR)/src/jdk.runtime/share/native/libunpack \ - $(JDK_TOPDIR)/src/jdk.runtime/share/native/common-unpack, \ + SRC := $(JDK_TOPDIR)/src/jdk.pack200/share/native/libunpack \ + $(JDK_TOPDIR)/src/jdk.pack200/share/native/common-unpack, \ LANG := C++, \ OPTIMIZATION := LOW, \ CFLAGS := $(CXXFLAGS_JDKLIB) \ -DNO_ZLIB -DUNPACK_JNI -DFULL \ -I$(SUPPORT_OUTPUTDIR)/headers/java.base \ - -I$(JDK_TOPDIR)/src/jdk.runtime/share/native/common-unpack \ + -I$(JDK_TOPDIR)/src/jdk.pack200/share/native/common-unpack \ $(LIBJAVA_HEADER_FLAGS), \ CFLAGS_release := -DPRODUCT, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \ diff --git a/jdk/src/jdk.runtime/share/native/common-unpack/bands.cpp b/jdk/src/jdk.pack200/share/native/common-unpack/bands.cpp similarity index 100% rename from jdk/src/jdk.runtime/share/native/common-unpack/bands.cpp rename to jdk/src/jdk.pack200/share/native/common-unpack/bands.cpp diff --git a/jdk/src/jdk.runtime/share/native/common-unpack/bands.h b/jdk/src/jdk.pack200/share/native/common-unpack/bands.h similarity index 100% rename from jdk/src/jdk.runtime/share/native/common-unpack/bands.h rename to jdk/src/jdk.pack200/share/native/common-unpack/bands.h diff --git a/jdk/src/jdk.runtime/share/native/common-unpack/bytes.cpp b/jdk/src/jdk.pack200/share/native/common-unpack/bytes.cpp similarity index 100% rename from jdk/src/jdk.runtime/share/native/common-unpack/bytes.cpp rename to jdk/src/jdk.pack200/share/native/common-unpack/bytes.cpp diff --git a/jdk/src/jdk.runtime/share/native/common-unpack/bytes.h b/jdk/src/jdk.pack200/share/native/common-unpack/bytes.h similarity index 100% rename from jdk/src/jdk.runtime/share/native/common-unpack/bytes.h rename to jdk/src/jdk.pack200/share/native/common-unpack/bytes.h diff --git a/jdk/src/jdk.runtime/share/native/common-unpack/coding.cpp b/jdk/src/jdk.pack200/share/native/common-unpack/coding.cpp similarity index 100% rename from jdk/src/jdk.runtime/share/native/common-unpack/coding.cpp rename to jdk/src/jdk.pack200/share/native/common-unpack/coding.cpp diff --git a/jdk/src/jdk.runtime/share/native/common-unpack/coding.h b/jdk/src/jdk.pack200/share/native/common-unpack/coding.h similarity index 100% rename from jdk/src/jdk.runtime/share/native/common-unpack/coding.h rename to jdk/src/jdk.pack200/share/native/common-unpack/coding.h diff --git a/jdk/src/jdk.runtime/share/native/common-unpack/constants.h b/jdk/src/jdk.pack200/share/native/common-unpack/constants.h similarity index 100% rename from jdk/src/jdk.runtime/share/native/common-unpack/constants.h rename to jdk/src/jdk.pack200/share/native/common-unpack/constants.h diff --git a/jdk/src/jdk.runtime/share/native/common-unpack/defines.h b/jdk/src/jdk.pack200/share/native/common-unpack/defines.h similarity index 100% rename from jdk/src/jdk.runtime/share/native/common-unpack/defines.h rename to jdk/src/jdk.pack200/share/native/common-unpack/defines.h diff --git a/jdk/src/jdk.runtime/share/native/common-unpack/unpack.cpp b/jdk/src/jdk.pack200/share/native/common-unpack/unpack.cpp similarity index 100% rename from jdk/src/jdk.runtime/share/native/common-unpack/unpack.cpp rename to jdk/src/jdk.pack200/share/native/common-unpack/unpack.cpp diff --git a/jdk/src/jdk.runtime/share/native/common-unpack/unpack.h b/jdk/src/jdk.pack200/share/native/common-unpack/unpack.h similarity index 100% rename from jdk/src/jdk.runtime/share/native/common-unpack/unpack.h rename to jdk/src/jdk.pack200/share/native/common-unpack/unpack.h diff --git a/jdk/src/jdk.runtime/share/native/common-unpack/utils.cpp b/jdk/src/jdk.pack200/share/native/common-unpack/utils.cpp similarity index 100% rename from jdk/src/jdk.runtime/share/native/common-unpack/utils.cpp rename to jdk/src/jdk.pack200/share/native/common-unpack/utils.cpp diff --git a/jdk/src/jdk.runtime/share/native/common-unpack/utils.h b/jdk/src/jdk.pack200/share/native/common-unpack/utils.h similarity index 100% rename from jdk/src/jdk.runtime/share/native/common-unpack/utils.h rename to jdk/src/jdk.pack200/share/native/common-unpack/utils.h diff --git a/jdk/src/jdk.runtime/share/native/common-unpack/zip.cpp b/jdk/src/jdk.pack200/share/native/common-unpack/zip.cpp similarity index 100% rename from jdk/src/jdk.runtime/share/native/common-unpack/zip.cpp rename to jdk/src/jdk.pack200/share/native/common-unpack/zip.cpp diff --git a/jdk/src/jdk.runtime/share/native/common-unpack/zip.h b/jdk/src/jdk.pack200/share/native/common-unpack/zip.h similarity index 100% rename from jdk/src/jdk.runtime/share/native/common-unpack/zip.h rename to jdk/src/jdk.pack200/share/native/common-unpack/zip.h diff --git a/jdk/src/jdk.runtime/share/native/libunpack/jni.cpp b/jdk/src/jdk.pack200/share/native/libunpack/jni.cpp similarity index 100% rename from jdk/src/jdk.runtime/share/native/libunpack/jni.cpp rename to jdk/src/jdk.pack200/share/native/libunpack/jni.cpp diff --git a/jdk/src/jdk.runtime/share/native/unpack200/main.cpp b/jdk/src/jdk.pack200/share/native/unpack200/main.cpp similarity index 100% rename from jdk/src/jdk.runtime/share/native/unpack200/main.cpp rename to jdk/src/jdk.pack200/share/native/unpack200/main.cpp diff --git a/jdk/src/jdk.runtime/windows/native/unpack200/unpack200_proto.exe.manifest b/jdk/src/jdk.pack200/windows/native/unpack200/unpack200_proto.exe.manifest similarity index 100% rename from jdk/src/jdk.runtime/windows/native/unpack200/unpack200_proto.exe.manifest rename to jdk/src/jdk.pack200/windows/native/unpack200/unpack200_proto.exe.manifest From 014ea775ad18948b40233f978b1d565971ec9199 Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Fri, 6 Mar 2015 09:07:32 -0800 Subject: [PATCH 23/58] 8074429: Move jar, jarsigner tool to jdk.jartool module Reviewed-by: alanb, weijun, erikj, ihse --- jdk/make/gensrc/Gensrc-jdk.jartool.gmk | 44 +++++++++++++++++++ jdk/make/launcher/Launcher-jdk.dev.gmk | 6 --- jdk/make/launcher/Launcher-jdk.jartool.gmk | 32 ++++++++++++++ .../com/sun/jarsigner/ContentSigner.java | 0 .../jarsigner/ContentSignerParameters.java | 0 .../com/sun/jarsigner/package-info.java | 0 .../sun/security/tools/jarsigner/Main.java | 0 .../security/tools/jarsigner/Resources.java | 0 .../tools/jarsigner/Resources_ja.java | 0 .../tools/jarsigner/Resources_zh_CN.java | 0 .../tools/jarsigner/TimestampedSigner.java | 0 .../classes/sun/tools/jar/CommandLine.java | 0 .../classes/sun/tools/jar/JarException.java | 0 .../share/classes/sun/tools/jar/Main.java | 0 .../share/classes/sun/tools/jar/Manifest.java | 0 .../classes/sun/tools/jar/SignatureFile.java | 0 .../sun/tools/jar/resources/jar.properties | 0 .../sun/tools/jar/resources/jar_de.properties | 0 .../sun/tools/jar/resources/jar_es.properties | 0 .../sun/tools/jar/resources/jar_fr.properties | 0 .../sun/tools/jar/resources/jar_it.properties | 0 .../sun/tools/jar/resources/jar_ja.properties | 0 .../sun/tools/jar/resources/jar_ko.properties | 0 .../tools/jar/resources/jar_pt_BR.properties | 0 .../sun/tools/jar/resources/jar_sv.properties | 0 .../tools/jar/resources/jar_zh_CN.properties | 0 .../tools/jar/resources/jar_zh_TW.properties | 0 27 files changed, 76 insertions(+), 6 deletions(-) create mode 100644 jdk/make/gensrc/Gensrc-jdk.jartool.gmk create mode 100644 jdk/make/launcher/Launcher-jdk.jartool.gmk rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/com/sun/jarsigner/ContentSigner.java (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/com/sun/jarsigner/ContentSignerParameters.java (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/com/sun/jarsigner/package-info.java (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/security/tools/jarsigner/Main.java (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/security/tools/jarsigner/Resources.java (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/security/tools/jarsigner/Resources_ja.java (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/CommandLine.java (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/JarException.java (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/Main.java (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/Manifest.java (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/SignatureFile.java (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/resources/jar.properties (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/resources/jar_de.properties (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/resources/jar_es.properties (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/resources/jar_fr.properties (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/resources/jar_it.properties (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/resources/jar_ja.properties (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/resources/jar_ko.properties (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/resources/jar_pt_BR.properties (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/resources/jar_sv.properties (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/resources/jar_zh_CN.properties (100%) rename jdk/src/{jdk.dev => jdk.jartool}/share/classes/sun/tools/jar/resources/jar_zh_TW.properties (100%) diff --git a/jdk/make/gensrc/Gensrc-jdk.jartool.gmk b/jdk/make/gensrc/Gensrc-jdk.jartool.gmk new file mode 100644 index 00000000000..0fb8eabc621 --- /dev/null +++ b/jdk/make/gensrc/Gensrc-jdk.jartool.gmk @@ -0,0 +1,44 @@ +# +# Copyright (c) 2015, 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 GensrcCommon.gmk + +################################################################################ + +include GensrcProperties.gmk + +$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, \ + $(filter %.properties, \ + $(call CacheFind, \ + $(JDK_TOPDIR)/src/jdk.jartool/share/classes/sun/tools/jar/resources)), \ + ListResourceBundle)) + +TARGETS += $(COMPILE_PROPERTIES) + +################################################################################ + +all: $(TARGETS) + +.PHONY: all diff --git a/jdk/make/launcher/Launcher-jdk.dev.gmk b/jdk/make/launcher/Launcher-jdk.dev.gmk index 92b6d1bacb9..9dbe8a53b04 100644 --- a/jdk/make/launcher/Launcher-jdk.dev.gmk +++ b/jdk/make/launcher/Launcher-jdk.dev.gmk @@ -25,12 +25,6 @@ include LauncherCommon.gmk -$(eval $(call SetupLauncher,jar, \ - -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jar.Main"$(COMMA) }')) - -$(eval $(call SetupLauncher,jarsigner, \ - -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.jarsigner.Main"$(COMMA) }')) - ifndef BUILD_HEADLESS_ONLY $(eval $(call SetupLauncher,policytool, \ -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.policytool.PolicyTool"$(COMMA) }',, \ diff --git a/jdk/make/launcher/Launcher-jdk.jartool.gmk b/jdk/make/launcher/Launcher-jdk.jartool.gmk new file mode 100644 index 00000000000..b6d44e315ff --- /dev/null +++ b/jdk/make/launcher/Launcher-jdk.jartool.gmk @@ -0,0 +1,32 @@ +# +# Copyright (c) 2015, 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 LauncherCommon.gmk + +$(eval $(call SetupLauncher,jar, \ + -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jar.Main"$(COMMA) }')) + +$(eval $(call SetupLauncher,jarsigner, \ + -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.jarsigner.Main"$(COMMA) }')) diff --git a/jdk/src/jdk.dev/share/classes/com/sun/jarsigner/ContentSigner.java b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/com/sun/jarsigner/ContentSigner.java rename to jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java diff --git a/jdk/src/jdk.dev/share/classes/com/sun/jarsigner/ContentSignerParameters.java b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/com/sun/jarsigner/ContentSignerParameters.java rename to jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java diff --git a/jdk/src/jdk.dev/share/classes/com/sun/jarsigner/package-info.java b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/package-info.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/com/sun/jarsigner/package-info.java rename to jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/package-info.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner/Main.java b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner/Main.java rename to jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner/Resources.java b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner/Resources.java rename to jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner/Resources_ja.java b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner/Resources_ja.java rename to jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java rename to jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java rename to jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/CommandLine.java b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/CommandLine.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/CommandLine.java rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/CommandLine.java diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/JarException.java b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/JarException.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/JarException.java rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/JarException.java diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/Main.java b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Main.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/Main.java rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/Main.java diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/Manifest.java b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Manifest.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/Manifest.java rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/Manifest.java diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/SignatureFile.java b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/SignatureFile.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/SignatureFile.java rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/SignatureFile.java diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar.properties rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_de.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_de.properties rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_es.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_es.properties rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_fr.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_fr.properties similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_fr.properties rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_fr.properties diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_it.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_it.properties similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_it.properties rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_it.properties diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_ja.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_ja.properties rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_ko.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ko.properties similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_ko.properties rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ko.properties diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_pt_BR.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.properties similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_pt_BR.properties rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.properties diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_sv.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_sv.properties similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_sv.properties rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_sv.properties diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_zh_CN.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_zh_CN.properties rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties diff --git a/jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_zh_TW.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_TW.properties similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/tools/jar/resources/jar_zh_TW.properties rename to jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_TW.properties From a1ffcbec36f4fe98e10671cf54a4062050d9349c Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Fri, 6 Mar 2015 09:11:42 -0800 Subject: [PATCH 24/58] 8074430: Move policytool to jdk.policytool module Reviewed-by: alanb, weijun, erikj, ihse --- jdk/make/launcher/Launcher-jdk.dev.gmk | 6 ------ .../classes/sun/security/tools/policytool/PolicyTool.java | 0 .../classes/sun/security/tools/policytool/Resources.java | 0 .../classes/sun/security/tools/policytool/Resources_de.java | 0 .../classes/sun/security/tools/policytool/Resources_es.java | 0 .../classes/sun/security/tools/policytool/Resources_fr.java | 0 .../classes/sun/security/tools/policytool/Resources_it.java | 0 .../classes/sun/security/tools/policytool/Resources_ja.java | 0 .../classes/sun/security/tools/policytool/Resources_ko.java | 0 .../sun/security/tools/policytool/Resources_pt_BR.java | 0 .../classes/sun/security/tools/policytool/Resources_sv.java | 0 .../sun/security/tools/policytool/Resources_zh_CN.java | 0 .../sun/security/tools/policytool/Resources_zh_HK.java | 0 .../sun/security/tools/policytool/Resources_zh_TW.java | 0 14 files changed, 6 deletions(-) rename jdk/src/{jdk.dev => jdk.policytool}/share/classes/sun/security/tools/policytool/PolicyTool.java (100%) rename jdk/src/{jdk.dev => jdk.policytool}/share/classes/sun/security/tools/policytool/Resources.java (100%) rename jdk/src/{jdk.dev => jdk.policytool}/share/classes/sun/security/tools/policytool/Resources_de.java (100%) rename jdk/src/{jdk.dev => jdk.policytool}/share/classes/sun/security/tools/policytool/Resources_es.java (100%) rename jdk/src/{jdk.dev => jdk.policytool}/share/classes/sun/security/tools/policytool/Resources_fr.java (100%) rename jdk/src/{jdk.dev => jdk.policytool}/share/classes/sun/security/tools/policytool/Resources_it.java (100%) rename jdk/src/{jdk.dev => jdk.policytool}/share/classes/sun/security/tools/policytool/Resources_ja.java (100%) rename jdk/src/{jdk.dev => jdk.policytool}/share/classes/sun/security/tools/policytool/Resources_ko.java (100%) rename jdk/src/{jdk.dev => jdk.policytool}/share/classes/sun/security/tools/policytool/Resources_pt_BR.java (100%) rename jdk/src/{jdk.dev => jdk.policytool}/share/classes/sun/security/tools/policytool/Resources_sv.java (100%) rename jdk/src/{jdk.dev => jdk.policytool}/share/classes/sun/security/tools/policytool/Resources_zh_CN.java (100%) rename jdk/src/{jdk.dev => jdk.policytool}/share/classes/sun/security/tools/policytool/Resources_zh_HK.java (100%) rename jdk/src/{jdk.dev => jdk.policytool}/share/classes/sun/security/tools/policytool/Resources_zh_TW.java (100%) diff --git a/jdk/make/launcher/Launcher-jdk.dev.gmk b/jdk/make/launcher/Launcher-jdk.dev.gmk index 9dbe8a53b04..b58545e5418 100644 --- a/jdk/make/launcher/Launcher-jdk.dev.gmk +++ b/jdk/make/launcher/Launcher-jdk.dev.gmk @@ -25,12 +25,6 @@ include LauncherCommon.gmk -ifndef BUILD_HEADLESS_ONLY - $(eval $(call SetupLauncher,policytool, \ - -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.policytool.PolicyTool"$(COMMA) }',, \ - $(XLIBS))) -endif - $(eval $(call SetupLauncher,jdeps, \ -DEXPAND_CLASSPATH_WILDCARDS \ -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \ diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/PolicyTool.java b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/PolicyTool.java rename to jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources.java b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources.java rename to jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_de.java b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_de.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_de.java rename to jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_de.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_es.java b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_es.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_es.java rename to jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_es.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_fr.java b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_fr.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_fr.java rename to jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_fr.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_it.java b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_it.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_it.java rename to jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_it.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_ja.java b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_ja.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_ja.java rename to jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_ja.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_ko.java b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_ko.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_ko.java rename to jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_ko.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_pt_BR.java b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_pt_BR.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_pt_BR.java rename to jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_pt_BR.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_sv.java b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_sv.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_sv.java rename to jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_sv.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_zh_CN.java b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_zh_CN.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_zh_CN.java rename to jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_zh_CN.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_zh_HK.java b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_zh_HK.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_zh_HK.java rename to jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_zh_HK.java diff --git a/jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_zh_TW.java b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_zh_TW.java similarity index 100% rename from jdk/src/jdk.dev/share/classes/sun/security/tools/policytool/Resources_zh_TW.java rename to jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_zh_TW.java From f9a9e68c05a9b72e907e70e81059fd9f89089c72 Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Fri, 6 Mar 2015 16:00:58 -0800 Subject: [PATCH 25/58] 8074460: Always print seeds used in [Splittable]Random instances in java.math tests Create a utility class which creates a pseudorandom number generator (PRNG) and retains the seed. Use this class in java.math tests which use a PRNG. Always print the seed value before the PRNG is used. Reviewed-by: darcy --- .../math/BigDecimal/StringConstructor.java | 22 ++--- .../java/math/BigInteger/BigIntegerTest.java | 96 ++++++++++--------- .../java/math/BigInteger/ModPow65537.java | 12 ++- jdk/test/java/math/BigInteger/PrimeTest.java | 12 ++- .../math/BigInteger/SymmetricRangeTests.java | 13 +-- jdk/test/java/math/RandomSeed.java | 81 ++++++++++++++++ 6 files changed, 162 insertions(+), 74 deletions(-) create mode 100644 jdk/test/java/math/RandomSeed.java diff --git a/jdk/test/java/math/BigDecimal/StringConstructor.java b/jdk/test/java/math/BigDecimal/StringConstructor.java index 992eb9dc1b8..c8051eb98a5 100644 --- a/jdk/test/java/math/BigDecimal/StringConstructor.java +++ b/jdk/test/java/math/BigDecimal/StringConstructor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2015, 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,19 +23,20 @@ /* * @test - * @bug 4103117 4331084 4488017 4490929 6255285 6268365 - * @summary Tests the BigDecimal string constructor. + * @library .. + * @bug 4103117 4331084 4488017 4490929 6255285 6268365 8074460 + * @summary Tests the BigDecimal string constructor (use -Dseed=X to set PRNG seed). */ import java.math.*; -import java.util.Random; public class StringConstructor { - private static int seed = new Random().nextInt(); - private static Random rnd = new Random(seed); + private static RandomSeed rndSeed = new RandomSeed(false); public static void main(String[] args) throws Exception { + System.out.println("Random number generator seed = " + rndSeed.getSeed()); + constructWithError(""); constructWithError("+"); constructWithError("-"); @@ -71,19 +72,18 @@ public class StringConstructor { // Roundtrip tests for (int i=0; i<100; i++) { - int size = rnd.nextInt(100) + 1; - BigInteger bi = new BigInteger(size, rnd); - if (rnd.nextBoolean()) + int size = rndSeed.getRandom().nextInt(100) + 1; + BigInteger bi = new BigInteger(size, rndSeed.getRandom()); + if (rndSeed.getRandom().nextBoolean()) bi = bi.negate(); int decimalLength = bi.toString().length(); - int scale = rnd.nextInt(decimalLength); + int scale = rndSeed.getRandom().nextInt(decimalLength); BigDecimal bd = new BigDecimal(bi, scale); String bdString = bd.toString(); // System.err.println("bi" + bi.toString() + "\tscale " + scale); // System.err.println("bd string: " + bdString); BigDecimal bdDoppel = new BigDecimal(bdString); if (!bd.equals(bdDoppel)) { - System.err.println("Random number seed = " + seed); System.err.println("bd string: scale: " + bd.scale() + "\t" + bdString); System.err.println("bd doppel: scale: " + bdDoppel.scale() + diff --git a/jdk/test/java/math/BigInteger/BigIntegerTest.java b/jdk/test/java/math/BigInteger/BigIntegerTest.java index 4de80fad4fd..e1b36c0812b 100644 --- a/jdk/test/java/math/BigInteger/BigIntegerTest.java +++ b/jdk/test/java/math/BigInteger/BigIntegerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, 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,8 +23,9 @@ /* * @test - * @bug 4181191 4161971 4227146 4194389 4823171 4624738 4812225 4837946 4026465 - * @summary tests methods in BigInteger + * @library .. + * @bug 4181191 4161971 4227146 4194389 4823171 4624738 4812225 4837946 4026465 8074460 + * @summary tests methods in BigInteger (use -Dseed=X to set PRNG seed) * @run main/timeout=400 BigIntegerTest * @author madbot */ @@ -35,7 +36,6 @@ import java.io.FileOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.math.BigInteger; -import java.util.Random; /** * This is a simple test class created to ensure that the results @@ -86,7 +86,8 @@ public class BigIntegerTest { static final int SIZE = 1000; // numbers per batch - static Random rnd = new Random(); + private static RandomSeed rndSeed = new RandomSeed(false); + static boolean failure = false; public static void constructor() { @@ -97,7 +98,7 @@ public class BigIntegerTest { int arrayLength = 23; int halfLength = arrayLength/2; byte[] array = new byte[arrayLength]; - rnd.nextBytes(array); + rndSeed.getRandom().nextBytes(array); int[][] offLen = new int[][] { // offset, length, num exceptions {-1, arrayLength, 1}, // negative offset @@ -161,7 +162,7 @@ public class BigIntegerTest { } byte[] magNonZeroLength = new byte[42]; - rnd.nextBytes(magNonZeroLength); + rndSeed.getRandom().nextBytes(magNonZeroLength); for (int signum = -1; signum <= 1; signum++) { BigInteger bi = new BigInteger(signum, magNonZeroLength, 0, 0); if (bi.compareTo(BigInteger.ZERO) != 0) { @@ -174,13 +175,13 @@ public class BigIntegerTest { for (int i = 0; i < SIZE; i++) { // create reference value via a different code path from those tested - BigInteger reference = new BigInteger(2 + rnd.nextInt(336), 4, rnd); + BigInteger reference = new BigInteger(2 + rndSeed.getRandom().nextInt(336), 4, rndSeed.getRandom()); byte[] refArray = reference.toByteArray(); int refLen = refArray.length; - int factor = rnd.nextInt(5); - int objLen = refArray.length + factor*rnd.nextInt(refArray.length) + 1; - int offset = rnd.nextInt(objLen - refLen); + int factor = rndSeed.getRandom().nextInt(5); + int objLen = refArray.length + factor*rndSeed.getRandom().nextInt(refArray.length) + 1; + int offset = rndSeed.getRandom().nextInt(objLen - refLen); byte[] objArray = new byte[objLen]; System.arraycopy(refArray, 0, objArray, offset, refLen); @@ -191,7 +192,7 @@ public class BigIntegerTest { failCount++; } - boolean isNegative = rnd.nextBoolean(); + boolean isNegative = rndSeed.getRandom().nextBoolean(); BigInteger signMag = new BigInteger(isNegative ? -1 : 1, objArray, offset, refLen); if (signMag.compareTo(isNegative ? reference.negate() : reference) != 0) { System.err.println("Sign-magnitude BigInteger not equal for offset " + @@ -208,7 +209,7 @@ public class BigIntegerTest { for (int i=0; i= lower; bits--) { for (int i = 0; i < 50; i++) { - BigInteger x = BigInteger.ONE.shiftLeft(bits - 1).or(new BigInteger(bits - 2, rnd)); + BigInteger x = BigInteger.ONE.shiftLeft(bits - 1).or(new BigInteger(bits - 2, rndSeed.getRandom())); for (int radix = Character.MIN_RADIX; radix < Character.MAX_RADIX; radix++) { String result = x.toString(radix); @@ -764,9 +765,9 @@ public class BigIntegerTest { int failCount = 0; for (int i=0; i<10; i++) { - BigInteger m = new BigInteger(100, 5, rnd); + BigInteger m = new BigInteger(100, 5, rndSeed.getRandom()); while(m.compareTo(BigInteger.ONE) != 1) - m = new BigInteger(100, 5, rnd); + m = new BigInteger(100, 5, rndSeed.getRandom()); BigInteger exp = m.subtract(BigInteger.ONE); BigInteger base = fetchNumber(order).abs(); while(base.compareTo(m) != -1) @@ -826,7 +827,7 @@ public class BigIntegerTest { // Test consistency for(int i=0; i<10; i++) { - p1 = BigInteger.probablePrime(100, rnd); + p1 = BigInteger.probablePrime(100, rndSeed.getRandom()); if (!p1.isProbablePrime(100)) { System.err.println("Consistency "+p1.toString(16)); failCount++; @@ -867,7 +868,7 @@ public class BigIntegerTest { // Numbers of the form (6k+1)(12k+1)(18k+1) are Carmichael numbers if // each of the factors is prime int found = 0; - BigInteger f1 = new BigInteger(40, 100, rnd); + BigInteger f1 = new BigInteger(40, 100, rndSeed.getRandom()); while (found < NUM_CARMICHAELS_TO_TEST) { BigInteger k = null; BigInteger f2, f3; @@ -894,8 +895,8 @@ public class BigIntegerTest { // Test some composites that are products of 2 primes for (int i=0; i<50; i++) { - p1 = BigInteger.probablePrime(100, rnd); - p2 = BigInteger.probablePrime(100, rnd); + p1 = BigInteger.probablePrime(100, rndSeed.getRandom()); + p2 = BigInteger.probablePrime(100, rndSeed.getRandom()); c1 = p1.multiply(p2); if (c1.isProbablePrime(100)) { System.err.println("Composite failed "+c1.toString(16)); @@ -904,8 +905,8 @@ public class BigIntegerTest { } for (int i=0; i<4; i++) { - p1 = BigInteger.probablePrime(600, rnd); - p2 = BigInteger.probablePrime(600, rnd); + p1 = BigInteger.probablePrime(600, rndSeed.getRandom()); + p2 = BigInteger.probablePrime(600, rndSeed.getRandom()); c1 = p1.multiply(p2); if (c1.isProbablePrime(100)) { System.err.println("Composite failed "+c1.toString(16)); @@ -960,7 +961,7 @@ public class BigIntegerTest { // Next, pick some large primes, use nextProbablePrime to find the // next one, and make sure there are no primes in between for (int i=0; i<100; i+=10) { - p1 = BigInteger.probablePrime(50 + i, rnd); + p1 = BigInteger.probablePrime(50 + i, rndSeed.getRandom()); p2 = p1.add(ONE); p3 = p1.nextProbablePrime(); while(p2.compareTo(p3) < 0) { @@ -1025,7 +1026,7 @@ public class BigIntegerTest { } for(int i=0; i<10; i++) { - BigInteger b1 = fetchNumber(rnd.nextInt(100)); + BigInteger b1 = fetchNumber(rndSeed.getRandom().nextInt(100)); BigInteger b2 = null; File f = new File("serialtest"); try (FileOutputStream fos = new FileOutputStream(f)) { @@ -1059,6 +1060,7 @@ public class BigIntegerTest { * */ public static void main(String[] args) throws Exception { + System.out.println("Random number generator seed = " + rndSeed.getSeed()); // Some variables for sizing test numbers in bits int order1 = ORDER_MEDIUM; @@ -1131,8 +1133,8 @@ public class BigIntegerTest { * If order is less than 2, order is changed to 2. */ private static BigInteger fetchNumber(int order) { - boolean negative = rnd.nextBoolean(); - int numType = rnd.nextInt(7); + boolean negative = rndSeed.getRandom().nextBoolean(); + int numType = rndSeed.getRandom().nextInt(7); BigInteger result = null; if (order < 2) order = 2; @@ -1156,14 +1158,14 @@ public class BigIntegerTest { break; case 3: // One bit in number - result = BigInteger.ONE.shiftLeft(rnd.nextInt(order)); + result = BigInteger.ONE.shiftLeft(rndSeed.getRandom().nextInt(order)); break; case 4: // Random bit density byte[] val = new byte[(order+7)/8]; - int iterations = rnd.nextInt(order); + int iterations = rndSeed.getRandom().nextInt(order); for (int i=0; i 0) { - int runLength = Math.min(remaining, rnd.nextInt(order)); + int runLength = Math.min(remaining, rndSeed.getRandom().nextInt(order)); result = result.shiftLeft(runLength); if (bit > 0) result = result.add(ONE.shiftLeft(runLength).subtract(ONE)); @@ -1183,7 +1185,7 @@ public class BigIntegerTest { break; default: // random bits - result = new BigInteger(order, rnd); + result = new BigInteger(order, rndSeed.getRandom()); } if (negative) diff --git a/jdk/test/java/math/BigInteger/ModPow65537.java b/jdk/test/java/math/BigInteger/ModPow65537.java index ec962e2a5ff..f8e4a5422d1 100644 --- a/jdk/test/java/math/BigInteger/ModPow65537.java +++ b/jdk/test/java/math/BigInteger/ModPow65537.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2015, 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,13 +23,13 @@ /* * @test - * @bug 4891312 - * @summary verify that modPow() not broken by the special case for 65537 + * @library .. + * @bug 4891312 8074460 + * @summary verify that modPow() not broken by the special case for 65537 (use -Dseed=X to set PRNG seed) * @author Andreas Sterbenz */ import java.math.BigInteger; -import java.util.*; import java.security.*; import java.security.spec.*; @@ -78,7 +78,9 @@ public class ModPow65537 { private static void testSigning(KeyPair kp) throws Exception { System.out.println(kp.getPublic()); byte[] data = new byte[1024]; - new Random().nextBytes(data); + RandomSeed rndSeed = new RandomSeed(false); + System.out.println("Random number generator seed = " + rndSeed.getSeed()); + rndSeed.getRandom().nextBytes(data); Signature sig = Signature.getInstance("SHA1withRSA", "SunRsaSign"); sig.initSign(kp.getPrivate()); diff --git a/jdk/test/java/math/BigInteger/PrimeTest.java b/jdk/test/java/math/BigInteger/PrimeTest.java index 5f5affeb240..fae4fd7979b 100644 --- a/jdk/test/java/math/BigInteger/PrimeTest.java +++ b/jdk/test/java/math/BigInteger/PrimeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2015, 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 @@ -25,13 +25,13 @@ /* * @test - * @bug 8026236 - * @summary test primality verification methods in BigInteger + * @library .. + * @bug 8026236 8074460 + * @summary test primality verification methods in BigInteger (use -Dseed=X to set PRNG seed) * @author bpb */ import java.math.BigInteger; import java.util.BitSet; -import java.util.HashSet; import java.util.List; import java.util.NavigableSet; import java.util.Set; @@ -178,7 +178,9 @@ public class PrimeTest { } // Create a list of non-prime BigIntegers. - List nonPrimeBigInts = (new SplittableRandom()) + RandomSeed rndSeed = new RandomSeed(true); + System.out.println("Random number generator seed = " + rndSeed.getSeed()); + List nonPrimeBigInts = (rndSeed.getSplittableRandom()) .ints(NUM_NON_PRIMES, 2, maxPrime).mapToObj(BigInteger::valueOf) .filter(b -> !b.isProbablePrime(certainty)).collect(toList()); diff --git a/jdk/test/java/math/BigInteger/SymmetricRangeTests.java b/jdk/test/java/math/BigInteger/SymmetricRangeTests.java index b944a95d32f..d3cb73cbef2 100644 --- a/jdk/test/java/math/BigInteger/SymmetricRangeTests.java +++ b/jdk/test/java/math/BigInteger/SymmetricRangeTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 1025, 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 @@ -24,9 +24,10 @@ /* * @test * @ignore This test has huge memory requirements + * @library .. * @run main/timeout=180/othervm -Xmx8g SymmetricRangeTests - * @bug 6910473 8021204 8021203 9005933 - * @summary Test range of BigInteger values + * @bug 6910473 8021204 8021203 9005933 8074460 + * @summary Test range of BigInteger values (use -Dseed=X to set PRNG seed) * @author Dmitry Nadezhin */ import java.io.ByteArrayInputStream; @@ -35,7 +36,6 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.Arrays; -import java.util.Random; import java.math.BigInteger; public class SymmetricRangeTests { @@ -114,8 +114,9 @@ public class SymmetricRangeTests { System.out.println("Testing overflow in BitSieve.sieveSingle"); int bitLength = (5 << 27) - 1; try { - Random rnd = new Random(); - BigInteger actual = new BigInteger(bitLength, 0, rnd); + RandomSeed rndSeed = new RandomSeed(false); + System.out.println("Random number generator seed = " + rndSeed.getSeed()); + BigInteger actual = new BigInteger(bitLength, 0, rndSeed.getRandom()); throw new RuntimeException("new BigInteger(bitLength, 0, null).bitLength()=" + actual.bitLength()); } catch (ArithmeticException e) { // expected diff --git a/jdk/test/java/math/RandomSeed.java b/jdk/test/java/math/RandomSeed.java new file mode 100644 index 00000000000..494705c5fd6 --- /dev/null +++ b/jdk/test/java/math/RandomSeed.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2015, 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. + * + * 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. + */ + +import java.util.Random; +import java.util.SplittableRandom; + +public class RandomSeed { + private long seed = 0L; + private Random rnd = null; + private SplittableRandom srnd = null; + + public RandomSeed(boolean isSplittableRandom) { + init(isSplittableRandom); + } + + private void init(boolean isSplittableRandom) { + // obtain seed from environment if supplied + boolean isSeedProvided = false; + try { + // note that Long.valueOf(null) also throws a NumberFormatException + // so if the property is undefined this will still work correctly + seed = Long.valueOf(System.getProperty("seed")); + isSeedProvided = true; + } catch (NumberFormatException e) { + // do nothing: isSeedProvided is already false + } + + // if no seed from environment, create a fresh one + Random tmpRnd = null; + if (!isSeedProvided) { + tmpRnd = new Random(); + seed = tmpRnd.nextLong(); + } + + // create the PRNG + if (isSplittableRandom) { + srnd = new SplittableRandom(seed); + } else { + rnd = tmpRnd != null ? tmpRnd : new Random(); + rnd.setSeed(seed); + } + } + + public Random getRandom() { + if (rnd == null) { + throw new IllegalStateException("Variable of type Random not initialized"); + } + return rnd; + } + + public SplittableRandom getSplittableRandom() { + if (srnd == null) { + throw new IllegalStateException("Variable of type SplittableRandom not initialized"); + } + return srnd; + } + + public long getSeed() { + return seed; + } +} From 011b337a5120fceef4ea68883efc302f7f39846c Mon Sep 17 00:00:00 2001 From: Xueming Shen Date: Sat, 7 Mar 2015 10:11:03 -0800 Subject: [PATCH 26/58] 8074406: DateTimeFormatter.appendZoneOrOffsetId() fails to resolve a ZoneOffset for OffsetDateTime To support resolve OffsetDateTime from DTF.appendZoneOrOffset() Reviewed-by: rriggs --- .../classes/java/time/format/Parsed.java | 11 +- .../time/format/TCKZoneIdPrinterParser.java | 231 ++++++++++-------- 2 files changed, 144 insertions(+), 98 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/time/format/Parsed.java b/jdk/src/java.base/share/classes/java/time/format/Parsed.java index 1eb88454414..58cbfaffbef 100644 --- a/jdk/src/java.base/share/classes/java/time/format/Parsed.java +++ b/jdk/src/java.base/share/classes/java/time/format/Parsed.java @@ -216,7 +216,16 @@ final class Parsed implements TemporalAccessor { return (R) (date != null ? LocalDate.from(date) : null); } else if (query == TemporalQueries.localTime()) { return (R) time; - } else if (query == TemporalQueries.zone() || query == TemporalQueries.offset()) { + } else if (query == TemporalQueries.offset()) { + Long offsetSecs = fieldValues.get(OFFSET_SECONDS); + if (offsetSecs != null) { + return (R) ZoneOffset.ofTotalSeconds(offsetSecs.intValue()); + } + if (zone instanceof ZoneOffset) { + return (R)zone; + } + return query.queryFrom(this); + } else if (query == TemporalQueries.zone()) { return query.queryFrom(this); } else if (query == TemporalQueries.precision()) { return null; // not a complete date/time diff --git a/jdk/test/java/time/tck/java/time/format/TCKZoneIdPrinterParser.java b/jdk/test/java/time/tck/java/time/format/TCKZoneIdPrinterParser.java index 122da8608c2..11e2dcd9620 100644 --- a/jdk/test/java/time/tck/java/time/format/TCKZoneIdPrinterParser.java +++ b/jdk/test/java/time/tck/java/time/format/TCKZoneIdPrinterParser.java @@ -152,144 +152,181 @@ public class TCKZoneIdPrinterParser { @DataProvider(name="parseSuccess") Object[][] data_parseSuccess() { return new Object[][] { - {"Z", 1, -1, ZoneId.of("Z")}, - {"UTC", 3, -1, ZoneId.of("UTC")}, - {"UT", 2, -1, ZoneId.of("UT")}, - {"GMT", 3, -1, ZoneId.of("GMT")}, + {"Z", 1, -1, ZoneId.of("Z"), true}, + {"UTC", 3, -1, ZoneId.of("UTC"), false}, + {"UT", 2, -1, ZoneId.of("UT"), false}, + {"GMT", 3, -1, ZoneId.of("GMT"), false}, - {"+00:00", 6, -1, ZoneOffset.UTC}, - {"UTC+00:00", 9, -1, ZoneId.of("UTC")}, - {"UT+00:00", 8, -1, ZoneId.of("UT")}, - {"GMT+00:00", 9, -1, ZoneId.of("GMT")}, - {"-00:00", 6, -1, ZoneOffset.UTC}, - {"UTC-00:00", 9, -1, ZoneId.of("UTC")}, - {"UT-00:00", 8, -1, ZoneId.of("UT")}, - {"GMT-00:00", 9, -1, ZoneId.of("GMT")}, + {"+00:00", 6, -1, ZoneOffset.UTC, true}, + {"UTC+00:00", 9, -1, ZoneId.of("UTC"), false}, + {"UT+00:00", 8, -1, ZoneId.of("UT"), false}, + {"GMT+00:00", 9, -1, ZoneId.of("GMT"), false}, + {"-00:00", 6, -1, ZoneOffset.UTC, true}, + {"UTC-00:00", 9, -1, ZoneId.of("UTC"), false}, + {"UT-00:00", 8, -1, ZoneId.of("UT"), false}, + {"GMT-00:00", 9, -1, ZoneId.of("GMT"), false}, - {"+01:30", 6, -1, ZoneOffset.ofHoursMinutes(1, 30)}, - {"UTC+01:30", 9, -1, ZoneId.of("UTC+01:30")}, - {"UT+02:30", 8, -1, ZoneId.of("UT+02:30")}, - {"GMT+03:30", 9, -1, ZoneId.of("GMT+03:30")}, - {"-01:30", 6, -1, ZoneOffset.ofHoursMinutes(-1, -30)}, - {"UTC-01:30", 9, -1, ZoneId.of("UTC-01:30")}, - {"UT-02:30", 8, -1, ZoneId.of("UT-02:30")}, - {"GMT-03:30", 9, -1, ZoneId.of("GMT-03:30")}, + {"+01:30", 6, -1, ZoneOffset.ofHoursMinutes(1, 30), true}, + {"UTC+01:30", 9, -1, ZoneId.of("UTC+01:30"), false}, + {"UT+02:30", 8, -1, ZoneId.of("UT+02:30"), false}, + {"GMT+03:30", 9, -1, ZoneId.of("GMT+03:30"), false}, + {"-01:30", 6, -1, ZoneOffset.ofHoursMinutes(-1, -30), true}, + {"UTC-01:30", 9, -1, ZoneId.of("UTC-01:30"), false}, + {"UT-02:30", 8, -1, ZoneId.of("UT-02:30"), false}, + {"GMT-03:30", 9, -1, ZoneId.of("GMT-03:30"), false}, // fallback to UTC - {"UTC-01:WW", 3, -1, ZoneId.of("UTC")}, - {"UT-02:WW", 2, -1, ZoneId.of("UT")}, - {"GMT-03:WW", 3, -1, ZoneId.of("GMT")}, - {"Z0", 1, -1, ZoneOffset.UTC}, - {"UTC1", 3, -1, ZoneId.of("UTC")}, + {"UTC-01:WW", 3, -1, ZoneId.of("UTC"), false}, + {"UT-02:WW", 2, -1, ZoneId.of("UT"), false}, + {"GMT-03:WW", 3, -1, ZoneId.of("GMT"), false}, + {"Z0", 1, -1, ZoneOffset.UTC, true}, + {"UTC1", 3, -1, ZoneId.of("UTC"), false}, // Z not parsed as zero - {"UTCZ", 3, -1, ZoneId.of("UTC")}, - {"UTZ", 2, -1, ZoneId.of("UT")}, - {"GMTZ", 3, -1, ZoneId.of("GMT")}, + {"UTCZ", 3, -1, ZoneId.of("UTC"), false}, + {"UTZ", 2, -1, ZoneId.of("UT"), false}, + {"GMTZ", 3, -1, ZoneId.of("GMT"), false}, // 0 not parsed - {"UTC0", 3, -1, ZoneId.of("UTC")}, - {"UT0", 2, -1, ZoneId.of("UT")}, + {"UTC0", 3, -1, ZoneId.of("UTC"), false}, + {"UT0", 2, -1, ZoneId.of("UT"), false}, // fail to parse - {"", 0, 0, null}, - {"A", 0, 0, null}, - {"UZ", 0, 0, null}, - {"GMA", 0, 0, null}, - {"0", 0, 0, null}, - {"+", 0, 0, null}, - {"-", 0, 0, null}, + {"", 0, 0, null, false}, + {"A", 0, 0, null, false}, + {"UZ", 0, 0, null, false}, + {"GMA", 0, 0, null, false}, + {"0", 0, 0, null, false}, + {"+", 0, 0, null, false}, + {"-", 0, 0, null, false}, // zone IDs - {"Europe/London", 13, -1, ZoneId.of("Europe/London")}, - {"America/New_York", 16, -1, ZoneId.of("America/New_York")}, - {"America/Bogusville", 0, 0, null}, + {"Europe/London", 13, -1, ZoneId.of("Europe/London"), false}, + {"America/New_York", 16, -1, ZoneId.of("America/New_York"), false}, + {"America/Bogusville", 0, 0, null, false}, }; } @Test(dataProvider="parseSuccess") - public void test_parseSuccess_plain(String text, int expectedIndex, int expectedErrorIndex, ZoneId expected) { + public void test_ZoneId_parseSuccess_plain( + String text, int expectedIndex, int expectedErrorIndex, ZoneId expected, boolean isZoneOffset) + { builder.appendZoneId(); - TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text, pos); - assertEquals(pos.getErrorIndex(), expectedErrorIndex, "Incorrect error index parsing: " + text); - assertEquals(pos.getIndex(), expectedIndex, "Incorrect index parsing: " + text); - if (expected != null) { - assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + text); - assertEquals(parsed.query(TemporalQueries.offset()), null, "Incorrect offset parsing: " + text); - assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + text); - } else { - assertEquals(parsed, null); - } + test(text, expectedIndex, expectedErrorIndex, expected, isZoneOffset); } @Test(dataProvider="parseSuccess") - public void test_parseSuccess_prefix(String text, int expectedIndex, int expectedErrorIndex, ZoneId expected) { + public void test_ZoneId_parseSuccess_prefix( + String text, int expectedIndex, int expectedErrorIndex, ZoneId expected, boolean isZoneOffset) + { builder.appendZoneId(); pos.setIndex(3); - String prefixText = "XXX" + text; - TemporalAccessor parsed = builder.toFormatter().parseUnresolved(prefixText, pos); - assertEquals(pos.getErrorIndex(), expectedErrorIndex >= 0 ? expectedErrorIndex + 3 : expectedErrorIndex, "Incorrect error index parsing: " + prefixText); - assertEquals(pos.getIndex(), expectedIndex + 3, "Incorrect index parsing: " + prefixText); - if (expected != null) { - assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + prefixText); - assertEquals(parsed.query(TemporalQueries.offset()), null, "Incorrect offset parsing: " + prefixText); - assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + prefixText); - } else { - assertEquals(parsed, null); - } + test("XXX" + text, + expectedIndex + 3, + expectedErrorIndex >= 0 ? expectedErrorIndex + 3 : expectedErrorIndex, + expected, isZoneOffset); } @Test(dataProvider="parseSuccess") - public void test_parseSuccess_suffix(String text, int expectedIndex, int expectedErrorIndex, ZoneId expected) { + public void test_ZoneId_parseSuccess_suffix( + String text, int expectedIndex, int expectedErrorIndex, ZoneId expected, boolean isZoneOffset) + { builder.appendZoneId(); - String suffixText = text + "XXX"; - TemporalAccessor parsed = builder.toFormatter().parseUnresolved(suffixText, pos); - assertEquals(pos.getErrorIndex(), expectedErrorIndex, "Incorrect error index parsing: " + suffixText); - assertEquals(pos.getIndex(), expectedIndex, "Incorrect index parsing: " + suffixText); - if (expected != null) { - assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + suffixText); - assertEquals(parsed.query(TemporalQueries.offset()), null, "Incorrect offset parsing: " + suffixText); - assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + suffixText); - } else { - assertEquals(parsed, null); - } + test(text + "XXX", expectedIndex, expectedErrorIndex, expected, isZoneOffset); } @Test(dataProvider="parseSuccess") - public void test_parseSuccess_caseSensitive(String text, int expectedIndex, int expectedErrorIndex, ZoneId expected) { + public void test_ZoneId_parseSuccess_caseSensitive( + String text, int expectedIndex, int expectedErrorIndex, ZoneId expected, boolean isZoneOffset) + { builder.parseCaseSensitive().appendZoneId(); - String lcText = text.toLowerCase(Locale.ENGLISH); - TemporalAccessor parsed = builder.toFormatter().parseUnresolved(lcText, pos); + if (text.matches("[^A-Z]*[A-Z].*")) { // if input has letters + String lcText = text.toLowerCase(Locale.ENGLISH); + TemporalAccessor parsed = builder.toFormatter().parseUnresolved(lcText, pos); assertEquals(pos.getErrorIndex() >= 0, true); assertEquals(pos.getIndex(), 0); assertEquals(parsed, null); } else { - // case sensitive made no difference - assertEquals(pos.getIndex(), expectedIndex, "Incorrect index parsing: " + lcText); - assertEquals(pos.getErrorIndex(), expectedErrorIndex, "Incorrect error index parsing: " + lcText); - if (expected != null) { - assertEquals(parsed.query(TemporalQueries.zoneId()), expected); - assertEquals(parsed.query(TemporalQueries.offset()), null); - assertEquals(parsed.query(TemporalQueries.zone()), expected); - } else { - assertEquals(parsed, null); - } + test(text.toLowerCase(Locale.ENGLISH), expectedIndex, expectedErrorIndex, expected, isZoneOffset); } } @Test(dataProvider="parseSuccess") - public void test_parseSuccess_caseInsensitive(String text, int expectedIndex, int expectedErrorIndex, ZoneId expected) { + public void test_ZoneId_parseSuccess_caseInsensitive( + String text, int expectedIndex, int expectedErrorIndex, ZoneId expected, boolean isZoneOffset) + { builder.parseCaseInsensitive().appendZoneId(); - String lcText = text.toLowerCase(Locale.ENGLISH); - TemporalAccessor parsed = builder.toFormatter().parseUnresolved(lcText, pos); - assertEquals(pos.getErrorIndex(), expectedErrorIndex, "Incorrect error index parsing: " + lcText); - assertEquals(pos.getIndex(), expectedIndex, "Incorrect index parsing: " + lcText); + test(text.toLowerCase(Locale.ENGLISH), expectedIndex, expectedErrorIndex, expected, isZoneOffset); + } + + @Test(dataProvider="parseSuccess") + public void test_ZoneOrOffsetId_parseSuccess_plain( + String text, int expectedIndex, int expectedErrorIndex, ZoneId expected, boolean isZoneOffset) + { + builder.appendZoneOrOffsetId(); + test(text, expectedIndex, expectedErrorIndex, expected, isZoneOffset); + } + + @Test(dataProvider="parseSuccess") + public void test_ZoneOrOffsetId_parseSuccess_prefix( + String text, int expectedIndex, int expectedErrorIndex, ZoneId expected, boolean isZoneOffset) + { + builder.appendZoneOrOffsetId(); + pos.setIndex(3); + test("XXX" + text, + expectedIndex + 3, + expectedErrorIndex >= 0 ? expectedErrorIndex + 3 : expectedErrorIndex, + expected, isZoneOffset); + } + + @Test(dataProvider="parseSuccess") + public void test_ZoneOrOffsetId_parseSuccess_suffix( + String text, int expectedIndex, int expectedErrorIndex, ZoneId expected, boolean isZoneOffset) + { + builder.appendZoneOrOffsetId(); + test(text + "XXX", expectedIndex, expectedErrorIndex, expected, isZoneOffset); + } + + @Test(dataProvider="parseSuccess") + public void test_ZoneOrOffsetId_parseSuccess_caseSensitive( + String text, int expectedIndex, int expectedErrorIndex, ZoneId expected, boolean isZoneOffset) + { + builder.parseCaseSensitive().appendZoneOrOffsetId(); + if (text.matches("[^A-Z]*[A-Z].*")) { // if input has letters + String lcText = text.toLowerCase(Locale.ENGLISH); + TemporalAccessor parsed = builder.toFormatter().parseUnresolved(lcText, pos); + assertEquals(pos.getErrorIndex() >= 0, true); + assertEquals(pos.getIndex(), 0); + assertEquals(parsed, null); + } else { + test(text.toLowerCase(Locale.ENGLISH), expectedIndex, expectedErrorIndex, expected, isZoneOffset); + } + } + + @Test(dataProvider="parseSuccess") + public void test_ZoneOrOffsetIdparseSuccess_caseInsensitive( + String text, int expectedIndex, int expectedErrorIndex, ZoneId expected, boolean isZoneOffset) + { + builder.parseCaseInsensitive().appendZoneOrOffsetId(); + test(text.toLowerCase(Locale.ENGLISH), expectedIndex, expectedErrorIndex, expected, isZoneOffset); + } + + private void test(String text, int expectedIndex, int expectedErrorIndex, ZoneId expected, + boolean isZoneOffset) { + TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text, pos); + assertEquals(pos.getErrorIndex(), expectedErrorIndex, "Incorrect error index parsing: " + text); + assertEquals(pos.getIndex(), expectedIndex, "Incorrect index parsing: " + text); if (expected != null) { - ZoneId zid = parsed.query(TemporalQueries.zoneId()); - assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + lcText); - assertEquals(parsed.query(TemporalQueries.offset()), null, "Incorrect offset parsing: " + lcText); - assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + lcText); + assertEquals(parsed.query(TemporalQueries.zoneId()), + expected, + "Incorrect zoneId parsing: " + text); + assertEquals(parsed.query(TemporalQueries.offset()), + isZoneOffset ? expected : null, + "Incorrect offset parsing: " + text); + assertEquals(parsed.query(TemporalQueries.zone()), + expected, + "Incorrect zone parsing: " + text); } else { assertEquals(parsed, null); } From 64c0d9763008081556d73bd20b8f45f3994b7abe Mon Sep 17 00:00:00 2001 From: Kumar Srinivasan Date: Sat, 7 Mar 2015 15:21:36 -0800 Subject: [PATCH 27/58] 8074373: NMT is not enabled if NMT option is specified after class path specifiers Reviewed-by: dholmes --- jdk/src/java.base/share/native/libjli/java.c | 27 +++++++++++++------- jdk/test/tools/launcher/TestSpecialArgs.java | 20 ++++++++++++++- 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/jdk/src/java.base/share/native/libjli/java.c b/jdk/src/java.base/share/native/libjli/java.c index 27e828fd60a..846e6835855 100644 --- a/jdk/src/java.base/share/native/libjli/java.c +++ b/jdk/src/java.base/share/native/libjli/java.c @@ -661,15 +661,24 @@ SetJvmEnvironment(int argc, char **argv) { * arguments are for the application (i.e. the main class name, or * the -jar argument). */ - if ((i > 0 && *arg != '-') - || JLI_StrCmp(arg, "-version") == 0 - || JLI_StrCmp(arg, "-fullversion") == 0 - || JLI_StrCmp(arg, "-help") == 0 - || JLI_StrCmp(arg, "-?") == 0 - || JLI_StrCmp(arg, "-jar") == 0 - || JLI_StrCmp(arg, "-X") == 0 - ) { - return; + if (i > 0) { + char *prev = argv[i - 1]; + // skip non-dash arg preceded by class path specifiers + if (*arg != '-' && + ((JLI_StrCmp(prev, "-cp") == 0 + || JLI_StrCmp(prev, "-classpath") == 0))) { + continue; + } + + if (*arg != '-' + || JLI_StrCmp(arg, "-version") == 0 + || JLI_StrCmp(arg, "-fullversion") == 0 + || JLI_StrCmp(arg, "-help") == 0 + || JLI_StrCmp(arg, "-?") == 0 + || JLI_StrCmp(arg, "-jar") == 0 + || JLI_StrCmp(arg, "-X") == 0) { + return; + } } /* * The following case checks for "-XX:NativeMemoryTracking=value". diff --git a/jdk/test/tools/launcher/TestSpecialArgs.java b/jdk/test/tools/launcher/TestSpecialArgs.java index 0e35f028521..307a4e06fb4 100644 --- a/jdk/test/tools/launcher/TestSpecialArgs.java +++ b/jdk/test/tools/launcher/TestSpecialArgs.java @@ -23,7 +23,7 @@ /* * @test - * @bug 7124089 7131021 8042469 8066185 + * @bug 7124089 7131021 8042469 8066185 8074373 * @summary Checks for Launcher special flags, such as MacOSX specific flags, * and JVM NativeMemoryTracking flags. * @compile -XDignore.symbol.file TestSpecialArgs.java EnvironmentVariables.java @@ -270,6 +270,16 @@ public class TestSpecialArgs extends TestHelper { tr = doExec(envMap, javaCmd, "Foo", "-XX:NativeMemoryTracking=summary"); checkTestResult(tr); + // should accept with no warnings + tr = doExec(javaCmd, "-cp", jarFile.getName(), + "-XX:NativeMemoryTracking=summary", "Foo"); + ensureNoWarnings(tr); + + // should accept with no warnings + tr = doExec(javaCmd, "-classpath", jarFile.getName(), + "-XX:NativeMemoryTracking=summary", "Foo"); + ensureNoWarnings(tr); + // make sure a missing class is handled correctly, because the class // resolution is performed by the JVM. tr = doExec(javaCmd, "AbsentClass", "-XX:NativeMemoryTracking=summary"); @@ -278,6 +288,14 @@ public class TestSpecialArgs extends TestHelper { } } + void ensureNoWarnings(TestResult tr) { + checkTestResult(tr); + if (tr.contains("warning: Native Memory Tracking")) { + System.err.println(tr.toString()); + throw new RuntimeException("Test Fails"); + } + } + void checkTestResult(TestResult tr) { if (!tr.isOK()) { System.err.println(tr.toString()); From 84afe48e4ffc2b9b2dd119d556c1112e5c7a188d Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Mon, 9 Mar 2015 10:39:50 +0100 Subject: [PATCH 28/58] 8074096: Disable (most) native warnings in JDK on a per-library basis Reviewed-by: erikj, tbell --- jdk/make/CompileDemos.gmk | 12 +++++-- jdk/make/launcher/Launcher-jdk.pack200.gmk | 5 ++- jdk/make/lib/Awt2dLibraries.gmk | 40 +++++++++++++++++++--- jdk/make/lib/CoreLibraries.gmk | 24 +++++++++++-- jdk/make/lib/Lib-java.security.jgss.gmk | 4 ++- jdk/make/lib/Lib-jdk.crypto.ec.gmk | 4 ++- jdk/make/lib/Lib-jdk.crypto.pkcs11.gmk | 4 ++- jdk/make/lib/Lib-jdk.deploy.osx.gmk | 4 ++- jdk/make/lib/Lib-jdk.pack200.gmk | 7 +++- jdk/make/lib/NetworkingLibraries.gmk | 5 ++- jdk/make/lib/NioLibraries.gmk | 6 ++-- jdk/make/lib/PlatformLibraries.gmk | 4 +-- jdk/make/lib/SoundLibraries.gmk | 3 ++ 13 files changed, 101 insertions(+), 21 deletions(-) diff --git a/jdk/make/CompileDemos.gmk b/jdk/make/CompileDemos.gmk index ed7ba13082c..a56b020e09d 100644 --- a/jdk/make/CompileDemos.gmk +++ b/jdk/make/CompileDemos.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, 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 @@ -219,6 +219,9 @@ define SetupJVMTIDemo # Param 7 = libs for solaris # Param 8 = libs for linux # Param 9 = extra directories with required sources + # Param 10 = DISABLED_WARNINGS_gcc + # Param 11 = DISABLED_WARNINGS_microsoft + # Param 12 = DISABLED_WARNINGS_clang BUILD_DEMO_JVMTI_$1_EXTRA_SRC := \ $$(wildcard $(DEMO_OS_TYPE_SRC)/jvmti/$1) \ $$(wildcard $$(addprefix $(DEMO_SHARE_SRC)/jvmti/, $2)) \ @@ -254,6 +257,9 @@ define SetupJVMTIDemo LANG := $$(BUILD_DEMO_JVMTI_$1_LANG), \ OPTIMIZATION := LOW, \ CXXFLAGS := $$($1_CXXFLAGS), \ + DISABLED_WARNINGS_gcc := $(10), \ + DISABLED_WARNINGS_clang := $(12), \ + DISABLED_WARNINGS_microsoft := $(11), \ LDFLAGS := $(filter-out -incremental:no -opt:ref, $(LDFLAGS_JDKLIB)), \ LDFLAGS_macosx := $(call SET_EXECUTABLE_ORIGIN), \ LDFLAGS_SUFFIX := $$($1_EXTRA_CXX), \ @@ -310,13 +316,13 @@ define SetupJVMTIDemo endif endef -$(eval $(call SetupJVMTIDemo,compiledMethodLoad, agent_util)) +$(eval $(call SetupJVMTIDemo,compiledMethodLoad, agent_util, , , , , , , , pointer-to-int-cast format, , format)) $(eval $(call SetupJVMTIDemo,gctest, agent_util)) $(eval $(call SetupJVMTIDemo,heapTracker, agent_util java_crw_demo)) $(eval $(call SetupJVMTIDemo,heapViewer, agent_util)) $(eval $(call SetupJVMTIDemo,minst, agent_util java_crw_demo)) $(eval $(call SetupJVMTIDemo,mtrace, agent_util java_crw_demo)) -$(eval $(call SetupJVMTIDemo,waiters, agent_util, , C++)) +$(eval $(call SetupJVMTIDemo,waiters, agent_util, , C++, , , , , , , 4101)) $(eval $(call SetupJVMTIDemo,versionCheck, agent_util)) ################################################################################################## diff --git a/jdk/make/launcher/Launcher-jdk.pack200.gmk b/jdk/make/launcher/Launcher-jdk.pack200.gmk index 1e6c21820cb..6ee00f7ccd0 100644 --- a/jdk/make/launcher/Launcher-jdk.pack200.gmk +++ b/jdk/make/launcher/Launcher-jdk.pack200.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, 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 @@ -79,6 +79,9 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \ CFLAGS_linux := -fPIC, \ CFLAGS_solaris := -KPIC, \ CFLAGS_macosx := -fPIC, \ + DISABLED_WARNINGS_gcc := sign-compare unused-result format-nonliteral \ + format-security parentheses, \ + DISABLED_WARNINGS_microsoft := 4267 4018, \ MAPFILE := $(UNPACK_MAPFILE),\ LDFLAGS := $(UNPACKEXE_ZIPOBJS) \ $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \ diff --git a/jdk/make/lib/Awt2dLibraries.gmk b/jdk/make/lib/Awt2dLibraries.gmk index d7e50779625..549068675fd 100644 --- a/jdk/make/lib/Awt2dLibraries.gmk +++ b/jdk/make/lib/Awt2dLibraries.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, 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 @@ -55,6 +55,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \ OPTIMIZATION := HIGHEST, \ CFLAGS := $(CFLAGS_JDKLIB) \ $(BUILD_LIBMLIB_CFLAGS), \ + DISABLED_WARNINGS_gcc := parentheses, \ + DISABLED_WARNINGS_clang := parentheses, \ + DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \ MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ @@ -127,6 +130,7 @@ ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc) CFLAGS := -xarch=sparcvis \ $(LIBMLIB_IMAGE_V_CFLAGS) \ $(CFLAGS_JDKLIB), \ + DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \ MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(BUILD_LIBMLIB_LDLIBS) -ljava -ljvm \ @@ -175,9 +179,6 @@ LIBAWT_CFLAGS += -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \ LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES $(X_CFLAGS) -ifeq ($(OPENJDK_TARGET_OS), macosx) -endif - ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc) LIBAWT_CFLAGS += -DMLIB_ADD_SUFF LIBAWT_CFLAGS += -xarch=sparcvis @@ -253,6 +254,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \ LANG := $(LIBAWT_LANG), \ OPTIMIZATION := LOW, \ CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \ + DISABLED_WARNINGS_gcc := sign-compare unused-result maybe-uninitialized \ + format-nonliteral parentheses, \ + DISABLED_WARNINGS_clang := logical-op-parentheses, \ + DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \ + DISABLED_WARNINGS_microsoft := 4297 4244 4267, \ ASFLAGS := $(LIBAWT_ASFLAGS), \ MAPFILE := $(LIBAWT_MAPFILE), \ LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \ @@ -361,6 +367,11 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),) OPTIMIZATION := LOW, \ CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \ $(X_CFLAGS), \ + DISABLED_WARNINGS_gcc := type-limits pointer-to-int-cast \ + deprecated-declarations unused-result maybe-uninitialized format \ + format-security int-to-pointer-cast parentheses, \ + DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \ + E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(X_LIBS) $(LIBAWT_XAWT_LDFLAGS) \ @@ -417,6 +428,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \ $(LCMS_CFLAGS), \ CFLAGS_solaris := -xc99=no_lib, \ CFLAGS_windows := -DCMS_IS_WINDOWS_, \ + DISABLED_WARNINGS_gcc := format-nonliteral, \ + DISABLED_WARNINGS_clang := tautological-compare, \ + DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ @@ -495,6 +509,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \ CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJAVAJPEG_SRC)) \ $(LIBJAVA_HEADER_FLAGS) \ -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \ + DISABLED_WARNINGS_gcc := clobbered parentheses, \ + DISABLED_WARNINGS_clang := logical-op-parentheses, \ + DISABLED_WARNINGS_microsoft := 4267, \ MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \ LDFLAGS := $(LDFLAGS_JDKLIB) $(LIBJPEG_LIBS) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ @@ -563,6 +580,9 @@ ifeq ($(BUILD_HEADLESS), true) $(CUPS_CFLAGS) \ $(X_CFLAGS) \ $(LIBAWT_HEADLESS_CFLAGS), \ + DISABLED_WARNINGS_gcc := maybe-uninitialized int-to-pointer-cast, \ + DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \ + E_EMPTY_TRANSLATION_UNIT, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ @@ -644,6 +664,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \ CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \ OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \ CFLAGS_windows = -DCC_NOEX, \ + DISABLED_WARNINGS_gcc := sign-compare int-to-pointer-cast reorder \ + delete-non-virtual-dtor, \ + DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types, \ + DISABLED_WARNINGS_solstudio := truncwarn, \ + DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090, \ MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \ LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ @@ -876,6 +901,10 @@ ifndef BUILD_HEADLESS_ONLY OPTIMIZATION := LOW, \ CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \ $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS), \ + DISABLED_WARNINGS_gcc := type-limits unused-result maybe-uninitialized, \ + DISABLED_WARNINGS_clang := incompatible-pointer-types, \ + DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST, \ + DISABLED_WARNINGS_microsoft := 4244 4267, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ @@ -946,6 +975,9 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) $(X_CFLAGS) \ $(X_LIBS) \ $(LIBAWT_LWAWT_CFLAGS), \ + DISABLED_WARNINGS_clang := incomplete-implementation \ + deprecated-declarations objc-method-access bitwise-op-parentheses \ + incompatible-pointer-types parentheses-equality extra-tokens, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN) \ -L$(INSTALL_LIBRARIES_HERE), \ diff --git a/jdk/make/lib/CoreLibraries.gmk b/jdk/make/lib/CoreLibraries.gmk index 7046e35b785..678af20a830 100644 --- a/jdk/make/lib/CoreLibraries.gmk +++ b/jdk/make/lib/CoreLibraries.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, 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 @@ -26,7 +26,7 @@ WIN_VERIFY_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify/verify.lib ########################################################################################## -# libfdlibm is statically linked with libjava below and not delivered into the +# libfdlibm is statically linked with libjava below and not delivered into the # product on its own. BUILD_LIBFDLIBM_OPTIMIZATION := HIGH @@ -48,6 +48,8 @@ ifneq ($(OPENJDK_TARGET_OS), macosx) CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \ CFLAGS_windows_debug := -DLOGGING, \ CFLAGS_aix := -qfloat=nomaf, \ + DISABLED_WARNINGS_gcc := sign-compare, \ + DISABLED_WARNINGS_microsoft := 4146 4244 4018, \ ARFLAGS := $(ARFLAGS), \ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) @@ -94,6 +96,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \ LANG := C, \ OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \ CFLAGS := $(CFLAGS_JDKLIB), \ + DISABLED_WARNINGS_microsoft := 4244 4267, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libverify/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ @@ -147,6 +150,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \ OPTIMIZATION := HIGH, \ CFLAGS := $(CFLAGS_JDKLIB) \ $(LIBJAVA_CFLAGS), \ + DISABLED_WARNINGS_gcc := type-limits format-nonliteral, \ + DISABLED_WARNINGS_clang := int-conversion, \ + DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \ + DISABLED_WARNINGS_microsoft := 4022 4267, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ @@ -209,6 +216,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \ -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \ -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \ CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \ + DISABLED_WARNINGS_gcc := parentheses, \ + DISABLED_WARNINGS_clang := dangling-else, \ + DISABLED_WARNINGS_microsoft := 4267, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libzip/mapfile-vers, \ REORDER := $(BUILD_LIBZIP_REORDER), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ @@ -307,6 +317,12 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \ LANG := C, \ OPTIMIZATION := HIGH, \ CFLAGS := $(LIBJLI_CFLAGS), \ + DISABLED_WARNINGS_gcc := pointer-to-int-cast sign-compare format-nonliteral \ + parentheses, \ + DISABLED_WARNINGS_clang := implicit-function-declaration parentheses \ + int-conversion, \ + DISABLED_WARNINGS_solstudio := E_ASM_DISABLES_OPTIMIZATION E_NEWLINE_NOT_LAST, \ + DISABLED_WARNINGS_microsoft := 4244 4047 4267, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjli/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ @@ -355,6 +371,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows) LANG := C, \ OPTIMIZATION := HIGH, \ CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \ + DISABLED_WARNINGS_microsoft := 4244 4047 4267, \ ARFLAGS := $(ARFLAGS), \ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) @@ -375,6 +392,8 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx) LANG := C, \ OPTIMIZATION := HIGH, \ CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \ + DISABLED_WARNINGS_clang := implicit-function-declaration parentheses \ + int-conversion, \ LDFLAGS := -nostdlib -r, \ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) @@ -401,4 +420,3 @@ else ifeq ($(OPENJDK_TARGET_OS), aix) TARGETS += $(BUILD_LIBJLI_STATIC) endif - diff --git a/jdk/make/lib/Lib-java.security.jgss.gmk b/jdk/make/lib/Lib-java.security.jgss.gmk index ba78eb4cc39..a92212f4b0e 100644 --- a/jdk/make/lib/Lib-java.security.jgss.gmk +++ b/jdk/make/lib/Lib-java.security.jgss.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, 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 @@ -41,6 +41,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows) CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2GSS_SRC)) \ $(LIBJAVA_HEADER_FLAGS) \ -I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \ + DISABLED_WARNINGS_gcc := pointer-to-int-cast, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2gss/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ @@ -82,6 +83,7 @@ ifneq ($(BUILD_CRYPTO), no) CFLAGS := $(CFLAGS_JDKLIB) \ $(addprefix -I, $(BUILD_LIBKRB5_SRC)) \ -I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \ + DISABLED_WARNINGS_clang := implicit-function-declaration, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS), \ diff --git a/jdk/make/lib/Lib-jdk.crypto.ec.gmk b/jdk/make/lib/Lib-jdk.crypto.ec.gmk index db75429ab6a..564eb402ae0 100644 --- a/jdk/make/lib/Lib-jdk.crypto.ec.gmk +++ b/jdk/make/lib/Lib-jdk.crypto.ec.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, 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 @@ -54,6 +54,8 @@ ifeq ($(ENABLE_INTREE_EC), yes) -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \ CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \ $(BUILD_LIBSUNEC_FLAGS), \ + DISABLED_WARNINGS_gcc := sign-compare, \ + DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \ LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \ diff --git a/jdk/make/lib/Lib-jdk.crypto.pkcs11.gmk b/jdk/make/lib/Lib-jdk.crypto.pkcs11.gmk index bbd6bc37c88..0672aa3a359 100644 --- a/jdk/make/lib/Lib-jdk.crypto.pkcs11.gmk +++ b/jdk/make/lib/Lib-jdk.crypto.pkcs11.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, 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 @@ -39,6 +39,8 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \ CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2PKCS11_SRC)) \ $(LIBJAVA_HEADER_FLAGS) \ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.crypto.pkcs11, \ + DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \ + DISABLED_WARNINGS_microsoft := 4013 4267, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2pkcs11/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ diff --git a/jdk/make/lib/Lib-jdk.deploy.osx.gmk b/jdk/make/lib/Lib-jdk.deploy.osx.gmk index 628c17fbced..f68b9c065e3 100644 --- a/jdk/make/lib/Lib-jdk.deploy.osx.gmk +++ b/jdk/make/lib/Lib-jdk.deploy.osx.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, 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 @@ -40,6 +40,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) CFLAGS := $(CFLAGS_JDKLIB) \ -I$(LIBAPPLESCRIPTENGINE_SRC) \ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.deploy.osx, \ + DISABLED_WARNINGS_clang := implicit-function-declaration format, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_SUFFIX := -framework Cocoa \ @@ -71,6 +72,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) OPTIMIZATION := LOW, \ CFLAGS := $(CFLAGS_JDKLIB) \ $(LIBOSX_CFLAGS), \ + DISABLED_WARNINGS_clang := deprecated-declarations, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.desktop \ $(call SET_SHARED_LIBRARY_ORIGIN), \ diff --git a/jdk/make/lib/Lib-jdk.pack200.gmk b/jdk/make/lib/Lib-jdk.pack200.gmk index eb8caa61485..37e32d0a725 100644 --- a/jdk/make/lib/Lib-jdk.pack200.gmk +++ b/jdk/make/lib/Lib-jdk.pack200.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, 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 @@ -40,6 +40,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \ -I$(JDK_TOPDIR)/src/jdk.pack200/share/native/common-unpack \ $(LIBJAVA_HEADER_FLAGS), \ CFLAGS_release := -DPRODUCT, \ + DISABLED_WARNINGS_gcc := conversion-null sign-compare format-security \ + format-nonliteral parentheses, \ + DISABLED_WARNINGS_clang := bool-conversion format-security, \ + DISABLED_WARNINGS_solstudio := truncwarn, \ + DISABLED_WARNINGS_microsoft := 4267 4018, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ diff --git a/jdk/make/lib/NetworkingLibraries.gmk b/jdk/make/lib/NetworkingLibraries.gmk index 57d86eabfb5..4231121123e 100644 --- a/jdk/make/lib/NetworkingLibraries.gmk +++ b/jdk/make/lib/NetworkingLibraries.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, 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 @@ -33,6 +33,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNET, \ OPTIMIZATION := LOW, \ CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/java.base \ $(LIBJAVA_HEADER_FLAGS) $(addprefix -I, $(LIBNET_SRC_DIRS)), \ + DISABLED_WARNINGS_gcc := format-nonliteral, \ + DISABLED_WARNINGS_clang := parentheses-equality constant-logical-operand, \ + DISABLED_WARNINGS_microsoft := 4244 4047 4133, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnet/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ diff --git a/jdk/make/lib/NioLibraries.gmk b/jdk/make/lib/NioLibraries.gmk index 9a6e3e07ced..fd973ccc535 100644 --- a/jdk/make/lib/NioLibraries.gmk +++ b/jdk/make/lib/NioLibraries.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, 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 @@ -69,6 +69,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \ OPTIMIZATION := HIGH, \ CFLAGS := $(CFLAGS_JDKLIB) \ $(BUILD_LIBNIO_CFLAGS), \ + DISABLED_WARNINGS_gcc := type-limits, \ + DISABLED_WARNINGS_clang := tautological-compare, \ + DISABLED_WARNINGS_microsoft := 4244, \ MAPFILE := $(BUILD_LIBNIO_MAPFILE), \ LDFLAGS := $(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ @@ -92,4 +95,3 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \ TARGETS += $(BUILD_LIBNIO) $(BUILD_LIBNIO): $(BUILD_LIBNET) - diff --git a/jdk/make/lib/PlatformLibraries.gmk b/jdk/make/lib/PlatformLibraries.gmk index 14592213e40..0035b1dfbbb 100644 --- a/jdk/make/lib/PlatformLibraries.gmk +++ b/jdk/make/lib/PlatformLibraries.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, 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 @@ -38,6 +38,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) CFLAGS := $(CFLAGS_JDKLIB) \ $(addprefix -I, $(LIBOSXAPP_SRC)) \ -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \ + DISABLED_WARNINGS_clang := objc-method-access objc-root-class, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_SUFFIX_macosx := \ @@ -59,4 +60,3 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) TARGETS += $(BUILD_LIBOSXAPP) endif - diff --git a/jdk/make/lib/SoundLibraries.gmk b/jdk/make/lib/SoundLibraries.gmk index ec3b99d8447..f123d179d7a 100644 --- a/jdk/make/lib/SoundLibraries.gmk +++ b/jdk/make/lib/SoundLibraries.gmk @@ -129,6 +129,8 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND, \ CFLAGS := $(CFLAGS_JDKLIB) \ $(LIBJSOUND_CFLAGS), \ CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \ + DISABLED_WARNINGS_clang := implicit-function-declaration \ + deprecated-writable-strings, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsound/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ @@ -175,6 +177,7 @@ ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), ) -DUSE_PORTS=TRUE \ -DUSE_PLATFORM_MIDI_OUT=TRUE \ -DUSE_PLATFORM_MIDI_IN=TRUE, \ + DISABLED_WARNINGS_gcc := parentheses, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsoundalsa/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ From d0ff6ad56574d8c7e6371d9b2f75ab8adbe5da8e Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Mon, 9 Mar 2015 16:18:33 +0100 Subject: [PATCH 29/58] 8074690: Fix for JDK-8074429 was not complete Reviewed-by: alanb, erikj --- jdk/make/gensrc/Gensrc-jdk.dev.gmk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jdk/make/gensrc/Gensrc-jdk.dev.gmk b/jdk/make/gensrc/Gensrc-jdk.dev.gmk index 0c956abbc12..b8f57aa529e 100644 --- a/jdk/make/gensrc/Gensrc-jdk.dev.gmk +++ b/jdk/make/gensrc/Gensrc-jdk.dev.gmk @@ -32,8 +32,7 @@ include GensrcProperties.gmk $(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, \ $(filter %.properties, \ $(call CacheFind, \ - $(JDK_TOPDIR)/src/jdk.dev/share/classes/jdk/tools/jimage/resources \ - $(JDK_TOPDIR)/src/jdk.dev/share/classes/sun/tools/jar/resources)), \ + $(JDK_TOPDIR)/src/jdk.dev/share/classes/jdk/tools/jimage/resources)), \ ListResourceBundle)) TARGETS += $(COMPILE_PROPERTIES) From 71bacd69b022e98933ddb85aa0266979939e99e6 Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Mon, 9 Mar 2015 08:53:34 -0700 Subject: [PATCH 30/58] 4849595: Erroneous javadoc for TableColumn.addPropertyChangeListener Reviewed-by: azvegint, alexsch --- .../javax/swing/table/TableColumn.java | 45 ++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/jdk/src/java.desktop/share/classes/javax/swing/table/TableColumn.java b/jdk/src/java.desktop/share/classes/javax/swing/table/TableColumn.java index a2d8f1eac20..8facbc82057 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/table/TableColumn.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/table/TableColumn.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -25,15 +25,14 @@ package javax.swing.table; -import javax.swing.*; -import javax.swing.border.*; -import javax.swing.event.SwingPropertyChangeSupport; -import java.lang.Integer; -import java.awt.Color; import java.awt.Component; -import java.io.Serializable; -import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; +import java.io.Serializable; + +import javax.swing.JLabel; +import javax.swing.JTable; +import javax.swing.UIManager; +import javax.swing.event.SwingPropertyChangeSupport; /** * A TableColumn represents all the attributes of a column in a @@ -744,19 +743,25 @@ public class TableColumn extends Object implements Serializable { // /** - * Adds a PropertyChangeListener to the listener list. - * The listener is registered for all properties. - *

    - * A PropertyChangeEvent will get fired in response to an - * explicit call to setFont, setBackground, - * or setForeground on the - * current component. Note that if the current component is - * inheriting its foreground, background, or font from its - * container, then no event will be fired in response to a - * change in the inherited property. - * - * @param listener the listener to be added + * Adds a {@code PropertyChangeListener} to the listener list. The listener + * is registered for all bound properties of this class, including the + * following: + *

      + *
    • this TableColumn's modelIndex ("modelIndex")
    • + *
    • this TableColumn's identifier ("identifier")
    • + *
    • this TableColumn's header value ("headerValue")
    • + *
    • this TableColumn's header renderer ("headerRenderer")
    • + *
    • this TableColumn's cell renderer ("cellRenderer")
    • + *
    • this TableColumn's cell editor ("cellEditor")
    • + *
    • this TableColumn's width ("width")
    • + *
    • this TableColumn's preferred width ("preferredWidth")
    • + *
    • this TableColumn's minimum width ("minWidth")
    • + *
    • this TableColumn's maximum width ("maxWidth")
    • + *
    • this TableColumn's resizable state ("isResizable")
    • + *
    * + * @param listener the listener to be added + * @see #removePropertyChangeListener(PropertyChangeListener) */ public synchronized void addPropertyChangeListener( PropertyChangeListener listener) { From 1c5857f8dddb09330f28f42762e407b43296e100 Mon Sep 17 00:00:00 2001 From: Jaroslav Bachorik Date: Tue, 10 Mar 2015 09:37:56 +0100 Subject: [PATCH 31/58] 6712222: Race condition in java/lang/management/ThreadMXBean/AllThreadIds.java Reviewed-by: dholmes, dfuchs --- .../management/ThreadMXBean/AllThreadIds.java | 99 +++++++++---------- 1 file changed, 49 insertions(+), 50 deletions(-) diff --git a/jdk/test/java/lang/management/ThreadMXBean/AllThreadIds.java b/jdk/test/java/lang/management/ThreadMXBean/AllThreadIds.java index 05547b78001..aa80c746cf2 100644 --- a/jdk/test/java/lang/management/ThreadMXBean/AllThreadIds.java +++ b/jdk/test/java/lang/management/ThreadMXBean/AllThreadIds.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2015, 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 @@ -27,21 +27,19 @@ * @summary Basic unit test of ThreadMXBean.getAllThreadIds() * @author Alexei Guibadoulline and Mandy Chung * - * @run build Barrier * @run main/othervm AllThreadIds */ import java.lang.management.*; -import java.util.*; +import java.util.concurrent.Phaser; public class AllThreadIds { final static int DAEMON_THREADS = 20; final static int USER_THREADS = 5; final static int ALL_THREADS = DAEMON_THREADS + USER_THREADS; - private static volatile boolean live[] = new boolean[ALL_THREADS]; - private static Thread allThreads[] = new Thread[ALL_THREADS]; - private static ThreadMXBean mbean - = ManagementFactory.getThreadMXBean(); + private static final boolean live[] = new boolean[ALL_THREADS]; + private static final Thread allThreads[] = new Thread[ALL_THREADS]; + private static final ThreadMXBean mbean = ManagementFactory.getThreadMXBean(); private static boolean testFailed = false; private static boolean trace = false; @@ -52,8 +50,7 @@ public class AllThreadIds { private static int curLiveThreadCount = 0; private static int curPeakThreadCount = 0; - // barrier for threads communication - private static Barrier barrier = new Barrier(ALL_THREADS); + private static final Phaser startupCheck = new Phaser(ALL_THREADS + 1); private static void printThreadList() { if (!trace) return; @@ -124,18 +121,15 @@ public class AllThreadIds { curPeakThreadCount = mbean.getPeakThreadCount(); checkThreadCount(0, 0); - // Start all threads and wait to be sure they all are alive - barrier.set(ALL_THREADS); for (int i = 0; i < ALL_THREADS; i++) { - live[i] = true; + setLive(i, true); allThreads[i] = new MyThread(i); - allThreads[i].setDaemon( (i < DAEMON_THREADS) ? true : false); + allThreads[i].setDaemon(i < DAEMON_THREADS); allThreads[i].start(); } // wait until all threads are started. - barrier.await(); - + startupCheck.arriveAndAwaitAdvance(); checkThreadCount(ALL_THREADS, 0); printThreadList(); @@ -173,15 +167,14 @@ public class AllThreadIds { // Stop daemon threads, wait to be sure they all are dead, and check // that they disappeared from getAllThreadIds() list - barrier.set(DAEMON_THREADS); for (int i = 0; i < DAEMON_THREADS; i++) { - live[i] = false; + setLive(i, false); } - // wait until daemon threads are terminated. - barrier.await(); - // give chance to threads to terminate - pause(); + // make sure the daemon threads are completely dead + joinDaemonThreads(); + + // and check the reported thread count checkThreadCount(0, DAEMON_THREADS); // Check mbean now @@ -190,11 +183,11 @@ public class AllThreadIds { for (int i = 0; i < ALL_THREADS; i++) { long expectedId = allThreads[i].getId(); boolean found = false; - boolean live = (i >= DAEMON_THREADS); + boolean alive = (i >= DAEMON_THREADS); if (trace) { System.out.print("Looking for thread with id " + expectedId + - (live ? " expected alive." : " expected terminated.")); + (alive ? " expected alive." : " expected terminated.")); } for (int j = 0; j < list.length; j++) { if (expectedId == list[j]) { @@ -203,11 +196,11 @@ public class AllThreadIds { } } - if (live != found) { + if (alive != found) { testFailed = true; } if (trace) { - if (live != found) { + if (alive != found) { System.out.println(" TEST FAILED."); } else { System.out.println(); @@ -216,15 +209,14 @@ public class AllThreadIds { } // Stop all threads and wait to be sure they all are dead - barrier.set(ALL_THREADS - DAEMON_THREADS); for (int i = DAEMON_THREADS; i < ALL_THREADS; i++) { - live[i] = false; + setLive(i, false); } - // wait until daemon threads are terminated . - barrier.await(); - // give chance to threads to terminate - pause(); + // make sure the non-daemon threads are completely dead + joinNonDaemonThreads(); + + // and check the thread count checkThreadCount(0, ALL_THREADS - DAEMON_THREADS); if (testFailed) @@ -233,6 +225,30 @@ public class AllThreadIds { System.out.println("Test passed."); } + private static void joinDaemonThreads() throws InterruptedException { + for (int i = 0; i < DAEMON_THREADS; i++) { + allThreads[i].join(); + } + } + + private static void joinNonDaemonThreads() throws InterruptedException { + for (int i = DAEMON_THREADS; i < ALL_THREADS; i++) { + allThreads[i].join(); + } + } + + private static void setLive(int i, boolean val) { + synchronized(live) { + live[i] = val; + } + } + + private static boolean isLive(int i) { + synchronized(live) { + return live[i]; + } + } + // The MyThread thread lives as long as correspondent live[i] value is true private static class MyThread extends Thread { int id; @@ -243,8 +259,8 @@ public class AllThreadIds { public void run() { // signal started - barrier.signal(); - while (live[id]) { + startupCheck.arrive(); + while (isLive(id)) { try { sleep(100); } catch (InterruptedException e) { @@ -253,23 +269,6 @@ public class AllThreadIds { testFailed = true; } } - // signal about to exit - barrier.signal(); } } - - private static Object pauseObj = new Object(); - private static void pause() { - // Enter lock a without blocking - synchronized (pauseObj) { - try { - // may need to tune this timeout for different platforms - pauseObj.wait(50); - } catch (Exception e) { - System.err.println("Unexpected exception."); - e.printStackTrace(System.err); - } - } - } - } From 8bc60ff868295a48a7e1d38c63f051eefe17e32f Mon Sep 17 00:00:00 2001 From: Alexander Zvegintsev Date: Tue, 10 Mar 2015 15:39:26 +0300 Subject: [PATCH 32/58] 8056151: Switching to GTK L&F on-the-fly leads to X Window System error RenderBadPicture Reviewed-by: alexsch, serb --- .../unix/classes/sun/awt/UNIXToolkit.java | 28 +++++---- .../plaf/gtk/crash/RenderBadPictureCrash.java | 59 +++++++++++++++++++ 2 files changed, 76 insertions(+), 11 deletions(-) create mode 100644 jdk/test/javax/swing/plaf/gtk/crash/RenderBadPictureCrash.java diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java b/jdk/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java index 2fad1b6b4a7..bf6f87d4a6e 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2015, 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 @@ -29,11 +29,10 @@ import static java.awt.RenderingHints.*; import java.awt.color.ColorSpace; import java.awt.image.*; import java.security.AccessController; -import java.security.PrivilegedAction; import sun.security.action.GetIntegerAction; import com.sun.java.swing.plaf.gtk.GTKConstants.TextDirection; +import sun.awt.X11.XToolkit; import sun.java2d.opengl.OGLRenderQueue; -import java.lang.reflect.InvocationTargetException; public abstract class UNIXToolkit extends SunToolkit { @@ -73,16 +72,16 @@ public abstract class UNIXToolkit extends SunToolkit if (nativeGTKLoaded != null) { // We've already attempted to load GTK, so just return the // status of that attempt. - return nativeGTKLoaded.booleanValue(); + return nativeGTKLoaded; } else if (nativeGTKAvailable != null) { // We've already checked the availability of the native GTK // libraries, so just return the status of that attempt. - return nativeGTKAvailable.booleanValue(); + return nativeGTKAvailable; } else { boolean success = check_gtk(); - nativeGTKAvailable = Boolean.valueOf(success); + nativeGTKAvailable = success; return success; } } @@ -99,11 +98,15 @@ public abstract class UNIXToolkit extends SunToolkit public boolean loadGTK() { synchronized (GTK_LOCK) { if (nativeGTKLoaded == null) { - boolean success = load_gtk(); - nativeGTKLoaded = Boolean.valueOf(success); + XToolkit.awtLock(); + try { + nativeGTKLoaded = load_gtk(); + } finally { + XToolkit.awtUnlock(); + } } } - return nativeGTKLoaded.booleanValue(); + return nativeGTKLoaded; } /** @@ -252,6 +255,7 @@ public abstract class UNIXToolkit extends SunToolkit private native void nativeSync(); + @Override public void sync() { // flush the X11 buffer nativeSync(); @@ -266,6 +270,8 @@ public abstract class UNIXToolkit extends SunToolkit * This requires that the Gnome properties have already been gathered. */ public static final String FONTCONFIGAAHINT = "fontconfig/Antialias"; + + @Override protected RenderingHints getDesktopAAHints() { Object aaValue = getDesktopProperty("gnome.Xft/Antialias"); @@ -288,8 +294,8 @@ public abstract class UNIXToolkit extends SunToolkit * us to default to "OFF". I don't think that's the best guess. * So if its !=0 then lets assume AA. */ - boolean aa = Boolean.valueOf(((aaValue instanceof Number) && - ((Number)aaValue).intValue() != 0)); + boolean aa = ((aaValue instanceof Number) + && ((Number) aaValue).intValue() != 0); Object aaHint; if (aa) { String subpixOrder = diff --git a/jdk/test/javax/swing/plaf/gtk/crash/RenderBadPictureCrash.java b/jdk/test/javax/swing/plaf/gtk/crash/RenderBadPictureCrash.java new file mode 100644 index 00000000000..0ef16996cf5 --- /dev/null +++ b/jdk/test/javax/swing/plaf/gtk/crash/RenderBadPictureCrash.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2015, 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. + * + * 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. + */ + +/* + @test + @bug 8056151 + @summary Switching to GTK L&F on-the-fly leads to X Window System error RenderBadPicture + @run main/othervm -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel -Dsun.java2d.xrender=T RenderBadPictureCrash + */ + +import java.awt.Color; +import java.lang.reflect.InvocationTargetException; +import javax.swing.JFrame; +import javax.swing.SwingUtilities; + +import javax.swing.UIManager; + +public class RenderBadPictureCrash { + + public static void main(String[] args) throws InterruptedException, InvocationTargetException { + SwingUtilities.invokeAndWait(() -> { + JFrame f = new JFrame(); + f.setUndecorated(true); + f.setBackground(new Color(0, 0, 0, 0)); + f.setSize(200, 300); + f.setVisible(true); + + try { + UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); + } catch (Exception e) { + System.err.println(e); + System.err.println("Could not set GTKLookAndFeel, skipping this test"); + } finally { + f.dispose(); + } + }); + } + +} From 741e72173c32cb9c32f234c4d640f7940fc6fcd9 Mon Sep 17 00:00:00 2001 From: Nakul Natu Date: Tue, 10 Mar 2015 21:48:37 +0300 Subject: [PATCH 33/58] 8066436: Minimize can cause window to disappear on osx Reviewed-by: serb, azvegint --- .../sun/lwawt/macosx/CPlatformWindow.java | 3 + .../classes/sun/lwawt/macosx/LWCToolkit.java | 2 +- .../MaximizedNormalBoundsUndecoratedTest.java | 76 +++++++++++++++++++ 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 jdk/test/java/awt/Frame/MaximizedNormalBoundsUndecoratedTest/MaximizedNormalBoundsUndecoratedTest.java diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java index dd59cf11365..888e89cd11c 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java @@ -488,6 +488,9 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo } else { deliverZoom(true); + // We need an up to date size of the peer, so we flush the native events + // to be sure that there are no setBounds requests in the queue. + LWCToolkit.flushNativeSelectors(); this.normalBounds = peer.getBounds(); GraphicsConfiguration config = getPeer().getGraphicsConfiguration(); diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java index 9d01af03eaf..da01ed005e0 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java @@ -843,7 +843,7 @@ public final class LWCToolkit extends LWToolkit { /** * Just spin a single empty block synchronously. */ - private static native void flushNativeSelectors(); + static native void flushNativeSelectors(); @Override public Clipboard createPlatformClipboard() { diff --git a/jdk/test/java/awt/Frame/MaximizedNormalBoundsUndecoratedTest/MaximizedNormalBoundsUndecoratedTest.java b/jdk/test/java/awt/Frame/MaximizedNormalBoundsUndecoratedTest/MaximizedNormalBoundsUndecoratedTest.java new file mode 100644 index 00000000000..119224ac299 --- /dev/null +++ b/jdk/test/java/awt/Frame/MaximizedNormalBoundsUndecoratedTest/MaximizedNormalBoundsUndecoratedTest.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2007, 2015, 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. + * + * 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. + */ + +import java.awt.Frame; +import java.awt.Toolkit; +import java.awt.Dimension; +/* + * @test + * @bug 8066436 + * @summary Set the size of frame. Set extendedState Frame.MAXIMIZED_BOTH and Frame.NORMAL + * sequentially for undecorated Frame and . + * Check if resulted size is equal to original frame size. + * @run main MaximizedNormalBoundsUndecoratedTest + */ + + +public class MaximizedNormalBoundsUndecoratedTest { + private Frame frame; + public static void main(String args[]) { + if (!Toolkit.getDefaultToolkit().isFrameStateSupported(Frame.MAXIMIZED_BOTH) + && !Toolkit.getDefaultToolkit().isFrameStateSupported(Frame.NORMAL)) { + return; + } + MaximizedNormalBoundsUndecoratedTest test = new MaximizedNormalBoundsUndecoratedTest(); + boolean doPass = true; + if( !test.doTest() ) { + System.out.println("Maximizing frame not saving correct normal bounds"); + doPass = false; + } + + if(!doPass) { + throw new RuntimeException("Maximizing frame not saving correct normal bounds"); + } + } + + boolean doTest() { + Dimension beforeMaximizeCalled = new Dimension(300,300); + + frame = new Frame("Test Frame"); + frame.setUndecorated(true); + frame.setFocusable(true); + frame.setSize(beforeMaximizeCalled); + frame.setVisible(true); + frame.setExtendedState(Frame.MAXIMIZED_BOTH); + frame.setExtendedState(Frame.NORMAL); + + Dimension afterMaximizedCalled= frame.getBounds().getSize(); + + frame.dispose(); + + if (beforeMaximizeCalled.equals(afterMaximizedCalled)) { + return true; + } + return false; + } +} From 996a61cf68a28190d1ec90bd1fa50b7d8199bfa4 Mon Sep 17 00:00:00 2001 From: Jaroslav Bachorik Date: Tue, 10 Mar 2015 20:25:48 +0100 Subject: [PATCH 34/58] 8049696: com/sun/jdi/RunToExit fails with "ConnectException: Connection refused" Reviewed-by: sla --- jdk/test/com/sun/jdi/RunToExit.java | 117 +++++++----------- .../jdk/testlibrary/ProcessTools.java | 62 +++++++--- 2 files changed, 91 insertions(+), 88 deletions(-) diff --git a/jdk/test/com/sun/jdi/RunToExit.java b/jdk/test/com/sun/jdi/RunToExit.java index 01a15c85697..f76f4b0b9fa 100644 --- a/jdk/test/com/sun/jdi/RunToExit.java +++ b/jdk/test/com/sun/jdi/RunToExit.java @@ -24,74 +24,29 @@ /* @test * @bug 4997445 * @summary Test that with server=y, when VM runs to System.exit() no error happens - * - * @build VMConnection RunToExit Exit0 + * @library /lib/testlibrary + * @build jdk.testlibrary.* VMConnection RunToExit Exit0 * @run driver RunToExit */ -import java.io.InputStream; -import java.io.IOException; -import java.io.File; -import java.io.BufferedInputStream; import java.net.ServerSocket; import com.sun.jdi.Bootstrap; import com.sun.jdi.VirtualMachine; import com.sun.jdi.event.*; import com.sun.jdi.connect.Connector; import com.sun.jdi.connect.AttachingConnector; +import java.net.ConnectException; import java.util.Map; import java.util.List; import java.util.Iterator; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import jdk.testlibrary.ProcessTools; public class RunToExit { /* Increment this when ERROR: seen */ - static int error_seen = 0; + static volatile int error_seen = 0; static volatile boolean ready = false; - /* - * Helper class to direct process output to a StringBuffer - */ - static class IOHandler implements Runnable { - private String name; - private BufferedInputStream in; - private StringBuffer buffer; - - IOHandler(String name, InputStream in) { - this.name = name; - this.in = new BufferedInputStream(in); - this.buffer = new StringBuffer(); - } - - static void handle(String name, InputStream in) { - IOHandler handler = new IOHandler(name, in); - Thread thr = new Thread(handler); - thr.setDaemon(true); - thr.start(); - } - - public void run() { - try { - byte b[] = new byte[100]; - for (;;) { - int n = in.read(b, 0, 100); - // The first thing that will get read is - // Listening for transport dt_socket at address: xxxxx - // which shows the debuggee is ready to accept connections. - ready = true; - if (n < 0) { - break; - } - buffer.append(new String(b, 0, n)); - } - } catch (IOException ioe) { } - - String str = buffer.toString(); - if ( str.contains("ERROR:") ) { - error_seen++; - } - System.out.println(name + ": " + str); - } - - } /* * Find a connector by name @@ -111,24 +66,40 @@ public class RunToExit { /* * Launch a server debuggee with the given address */ - private static Process launch(String address, String class_name) throws IOException { - String exe = System.getProperty("java.home") - + File.separator + "bin" + File.separator + "java"; - String cmd = exe + " " + VMConnection.getDebuggeeVMOptions() + - " -agentlib:jdwp=transport=dt_socket" + - ",server=y" + ",suspend=y" + ",address=" + address + - " " + class_name; + private static Process launch(String address, String class_name) throws Exception { + String args[] = new String[]{ + "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=" + + address, + class_name + }; + args = VMConnection.insertDebuggeeVMOptions(args); - System.out.println("Starting: " + cmd); + ProcessBuilder launcher = ProcessTools.createJavaProcessBuilder(args); - Process p = Runtime.getRuntime().exec(cmd); + System.out.println(launcher.command().stream().collect(Collectors.joining(" ", "Starting: ", ""))); - IOHandler.handle("Input Stream", p.getInputStream()); - IOHandler.handle("Error Stream", p.getErrorStream()); + Process p = ProcessTools.startProcess( + class_name, + launcher, + RunToExit::checkForError, + RunToExit::isTransportListening, + 0, + TimeUnit.NANOSECONDS + ); return p; } + private static boolean isTransportListening(String line) { + return line.startsWith("Listening for transport dt_socket"); + } + + private static void checkForError(String line) { + if (line.contains("ERROR:")) { + error_seen++; + } + } + /* * - pick a TCP port * - Launch a server debuggee: server=y,suspend=y,address=${port} @@ -146,15 +117,6 @@ public class RunToExit { // launch the server debuggee Process process = launch(address, "Exit0"); - // wait for the debugge to be ready - while (!ready) { - try { - Thread.sleep(1000); - } catch(Exception ee) { - throw ee; - } - } - // attach to server debuggee and resume it so it can exit AttachingConnector conn = (AttachingConnector)findConnector("com.sun.jdi.SocketAttach"); Map conn_args = conn.defaultArguments(); @@ -164,7 +126,16 @@ public class RunToExit { System.out.println("Connection arguments: " + conn_args); - VirtualMachine vm = conn.attach(conn_args); + VirtualMachine vm = null; + while (vm == null) { + try { + vm = conn.attach(conn_args); + } catch (ConnectException e) { + e.printStackTrace(System.out); + System.out.println("--- Debugee not ready. Retrying in 500ms. ---"); + Thread.sleep(500); + } + } // The first event is always a VMStartEvent, and it is always in // an EventSet by itself. Wait for it. diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java index fedcd91f796..3e88f8887df 100644 --- a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java +++ b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java @@ -88,24 +88,12 @@ public final class ProcessTools { ProcessBuilder processBuilder, Consumer consumer) throws IOException { - Process p = null; try { - p = startProcess( - name, - processBuilder, - line -> { - if (consumer != null) { - consumer.accept(line); - } - return false; - }, - -1, - TimeUnit.NANOSECONDS - ); + return startProcess(name, processBuilder, consumer, null, -1, TimeUnit.NANOSECONDS); } catch (InterruptedException | TimeoutException e) { - // can't ever happen + // will never happen + throw new RuntimeException(e); } - return p; } /** @@ -133,6 +121,38 @@ public final class ProcessTools { final Predicate linePredicate, long timeout, TimeUnit unit) + throws IOException, InterruptedException, TimeoutException { + return startProcess(name, processBuilder, null, linePredicate, timeout, unit); + } + + /** + *

    Starts a process from its builder.

    + * The default redirects of STDOUT and STDERR are started + *

    + * It is possible to wait for the process to get to a warmed-up state + * via {@linkplain Predicate} condition on the STDOUT and monitor the + * in-streams via the provided {@linkplain Consumer} + *

    + * @param name The process name + * @param processBuilder The process builder + * @param lineConsumer The {@linkplain Consumer} the lines will be forwarded to + * @param linePredicate The {@linkplain Predicate} to use on the STDOUT + * Used to determine the moment the target app is + * properly warmed-up. + * It can be null - in that case the warmup is skipped. + * @param timeout The timeout for the warmup waiting; -1 = no wait; 0 = wait forever + * @param unit The timeout {@linkplain TimeUnit} + * @return Returns the initialized {@linkplain Process} + * @throws IOException + * @throws InterruptedException + * @throws TimeoutException + */ + public static Process startProcess(String name, + ProcessBuilder processBuilder, + final Consumer lineConsumer, + final Predicate linePredicate, + long timeout, + TimeUnit unit) throws IOException, InterruptedException, TimeoutException { System.out.println("["+name+"]:" + processBuilder.command().stream().collect(Collectors.joining(" "))); Process p = processBuilder.start(); @@ -141,6 +161,18 @@ public final class ProcessTools { stdout.addPump(new LineForwarder(name, System.out)); stderr.addPump(new LineForwarder(name, System.err)); + if (lineConsumer != null) { + StreamPumper.LinePump pump = new StreamPumper.LinePump() { + @Override + protected void processLine(String line) { + lineConsumer.accept(line); + } + }; + stdout.addPump(pump); + stderr.addPump(pump); + } + + CountDownLatch latch = new CountDownLatch(1); if (linePredicate != null) { StreamPumper.LinePump pump = new StreamPumper.LinePump() { From 0d022c42c9d3cfa4a0be4eff49309fd132496cbc Mon Sep 17 00:00:00 2001 From: Martin Buchholz Date: Tue, 10 Mar 2015 14:23:03 -0700 Subject: [PATCH 35/58] 8074579: Use more efficient and readable way of checking PKZIP signatures Reviewed-by: sherman --- .../share/native/libjli/manifest_info.h | 15 +++++++++------ .../share/native/libjli/parse_manifest.c | 17 +++++++---------- .../java.base/share/native/libzip/zip_util.c | 13 +++++-------- .../java.base/share/native/libzip/zip_util.h | 15 ++++++++------- jdk/src/java.base/unix/native/launcher/jexec.c | 2 +- 5 files changed, 30 insertions(+), 32 deletions(-) diff --git a/jdk/src/java.base/share/native/libjli/manifest_info.h b/jdk/src/java.base/share/native/libjli/manifest_info.h index cd951d5cb9f..5f9773e0bca 100644 --- a/jdk/src/java.base/share/native/libjli/manifest_info.h +++ b/jdk/src/java.base/share/native/libjli/manifest_info.h @@ -32,13 +32,16 @@ * Zip file header signatures */ #define SIGSIZ 4 /* size of all header signatures */ -#define LOCSIG 0x04034b50L /* "PK\003\004" */ -#define EXTSIG 0x08074b50L /* "PK\007\008" */ -#define CENSIG 0x02014b50L /* "PK\001\002" */ -#define ENDSIG 0x06054b50L /* "PK\005\006" */ -#define ZIP64_ENDSIG 0x06064b50L /* "PK\006\006" */ -#define ZIP64_LOCSIG 0x07064b50L /* "PK\006\007" */ +#define PKZIP_SIGNATURE_AT(p, b2, b3) \ + (((p)[0] == 'P') & ((p)[1] == 'K') & ((p)[2] == b2) & ((p)[3] == b3)) +#define CENSIG_AT(p) PKZIP_SIGNATURE_AT(p, 1, 2) +#define LOCSIG_AT(p) PKZIP_SIGNATURE_AT(p, 3, 4) +#define ENDSIG_AT(p) PKZIP_SIGNATURE_AT(p, 5, 6) +#define EXTSIG_AT(p) PKZIP_SIGNATURE_AT(p, 7, 8) +#define ZIP64_ENDSIG_AT(p) PKZIP_SIGNATURE_AT(p, 6, 6) +#define ZIP64_LOCSIG_AT(p) PKZIP_SIGNATURE_AT(p, 6, 7) + /* * Header sizes including signatures */ diff --git a/jdk/src/java.base/share/native/libjli/parse_manifest.c b/jdk/src/java.base/share/native/libjli/parse_manifest.c index a8e17b89b25..9ce82c1a1d6 100644 --- a/jdk/src/java.base/share/native/libjli/parse_manifest.c +++ b/jdk/src/java.base/share/native/libjli/parse_manifest.c @@ -138,7 +138,7 @@ find_end64(int fd, Byte *ep, jlong pos) return -1; if ((bytes = read(fd, ep, ZIP64_LOCHDR)) < 0) return -1; - if (GETSIG(ep) == ZIP64_LOCSIG) + if (ZIP64_LOCSIG_AT(ep)) return end64pos; return -1; } @@ -176,7 +176,7 @@ find_end(int fd, Byte *eb) return (-1); if ((bytes = read(fd, eb, ENDHDR)) < 0) return (-1); - if (GETSIG(eb) == ENDSIG) { + if (ENDSIG_AT(eb)) { return haveZIP64(eb) ? find_end64(fd, eb, pos) : pos; } @@ -200,14 +200,11 @@ find_end(int fd, Byte *eb) /* * Search backwards from the end of file stopping when the END header - * signature is found. (The first condition of the "if" is just a - * fast fail, because the GETSIG macro isn't always cheap. The - * final condition protects against false positives.) + * signature is found. */ endpos = &buffer[bytes]; for (cp = &buffer[bytes - ENDHDR]; cp >= &buffer[0]; cp--) - if ((*cp == (ENDSIG & 0xFF)) && (GETSIG(cp) == ENDSIG) && - (cp + ENDHDR + ENDCOM(cp) == endpos)) { + if (ENDSIG_AT(cp) && (cp + ENDHDR + ENDCOM(cp) == endpos)) { (void) memcpy(eb, cp, ENDHDR); free(buffer); pos = flen - (endpos - cp); @@ -267,7 +264,7 @@ compute_cen(int fd, Byte *bp) if ((bytes = read(fd, buffer, MINREAD)) < 0) { return (-1); } - if (GETSIG(buffer) != ZIP64_ENDSIG) { + if (!ZIP64_ENDSIG_AT(buffer)) { return -1; } if ((offset = ZIP64_ENDOFF(buffer)) < (jlong)0) { @@ -356,7 +353,7 @@ find_file(int fd, zentry *entry, const char *file_name) * Loop through the Central Directory Headers. Note that a valid zip/jar * must have an ENDHDR (with ENDSIG) after the Central Directory. */ - while (GETSIG(p) == CENSIG) { + while (CENSIG_AT(p)) { /* * If a complete header isn't in the buffer, shift the contents @@ -403,7 +400,7 @@ find_file(int fd, zentry *entry, const char *file_name) free(buffer); return (-1); } - if (GETSIG(locbuf) != LOCSIG) { + if (!LOCSIG_AT(locbuf)) { free(buffer); return (-1); } diff --git a/jdk/src/java.base/share/native/libzip/zip_util.c b/jdk/src/java.base/share/native/libzip/zip_util.c index 51ee1d5276f..d99a5cd66a7 100644 --- a/jdk/src/java.base/share/native/libzip/zip_util.c +++ b/jdk/src/java.base/share/native/libzip/zip_util.c @@ -281,9 +281,9 @@ static jboolean verifyEND(jzfile *zip, jlong endpos, char *endbuf) { return (cenpos >= 0 && locpos >= 0 && readFullyAt(zip->zfd, buf, sizeof(buf), cenpos) != -1 && - GETSIG(buf) == CENSIG && + CENSIG_AT(buf) && readFullyAt(zip->zfd, buf, sizeof(buf), locpos) != -1 && - GETSIG(buf) == LOCSIG); + LOCSIG_AT(buf)); } /* @@ -674,7 +674,7 @@ readCEN(jzfile *zip, jint knownTotal) method = CENHOW(cp); nlen = CENNAM(cp); - if (GETSIG(cp) != CENSIG) + if (!CENSIG_AT(cp)) ZIP_FORMAT_ERROR("invalid CEN header (bad signature)"); if (CENFLG(cp) & 1) ZIP_FORMAT_ERROR("invalid CEN header (encrypted entry)"); @@ -827,10 +827,7 @@ ZIP_Put_In_Cache0(const char *name, ZFILE zfd, char **pmsg, jlong lastModified, // Assumption, zfd refers to start of file. Trivially, reuse errbuf. if (readFully(zfd, errbuf, 4) != -1) { // errors will be handled later - if (GETSIG(errbuf) == LOCSIG) - zip->locsig = JNI_TRUE; - else - zip->locsig = JNI_FALSE; + zip->locsig = LOCSIG_AT(errbuf) ? JNI_TRUE : JNI_FALSE; } len = zip->len = IO_Lseek(zfd, 0, SEEK_END); @@ -1284,7 +1281,7 @@ ZIP_GetEntryDataOffset(jzfile *zip, jzentry *entry) zip->msg = "error reading zip file"; return -1; } - if (GETSIG(loc) != LOCSIG) { + if (!LOCSIG_AT(loc)) { zip->msg = "invalid LOC header (bad signature)"; return -1; } diff --git a/jdk/src/java.base/share/native/libzip/zip_util.h b/jdk/src/java.base/share/native/libzip/zip_util.h index 1287d3aa29e..1f5f3bd6cab 100644 --- a/jdk/src/java.base/share/native/libzip/zip_util.h +++ b/jdk/src/java.base/share/native/libzip/zip_util.h @@ -33,13 +33,14 @@ /* * Header signatures */ -#define LOCSIG 0x04034b50L /* "PK\003\004" */ -#define EXTSIG 0x08074b50L /* "PK\007\008" */ -#define CENSIG 0x02014b50L /* "PK\001\002" */ -#define ENDSIG 0x06054b50L /* "PK\005\006" */ - -#define ZIP64_ENDSIG 0x06064b50L /* "PK\006\006" */ -#define ZIP64_LOCSIG 0x07064b50L /* "PK\006\007" */ +#define PKZIP_SIGNATURE_AT(p, b2, b3) \ + (((p)[0] == 'P') & ((p)[1] == 'K') & ((p)[2] == b2) & ((p)[3] == b3)) +#define CENSIG_AT(p) PKZIP_SIGNATURE_AT(p, 1, 2) +#define LOCSIG_AT(p) PKZIP_SIGNATURE_AT(p, 3, 4) +#define ENDSIG_AT(p) PKZIP_SIGNATURE_AT(p, 5, 6) +#define EXTSIG_AT(p) PKZIP_SIGNATURE_AT(p, 7, 8) +#define ZIP64_ENDSIG_AT(p) PKZIP_SIGNATURE_AT(p, 6, 6) +#define ZIP64_LOCSIG_AT(p) PKZIP_SIGNATURE_AT(p, 6, 7) /* * Header sizes including signatures diff --git a/jdk/src/java.base/unix/native/launcher/jexec.c b/jdk/src/java.base/unix/native/launcher/jexec.c index a30617de7b9..179ae4f893c 100644 --- a/jdk/src/java.base/unix/native/launcher/jexec.c +++ b/jdk/src/java.base/unix/native/launcher/jexec.c @@ -323,7 +323,7 @@ const char * isJar(const char * path) { result = BAD_MAGIC_MSG; // be sure the file is at least a ZIP file - if (GETSIG(buf) == LOCSIG) { + if (LOCSIG_AT(buf)) { off_t flen = LOCNAM(buf); off_t xlen = LOCEXT(buf); From d24e1db13aa4871eded32742dc5a3536e6c49994 Mon Sep 17 00:00:00 2001 From: Alexander Kulyakhtin Date: Wed, 11 Mar 2015 00:45:02 +0300 Subject: [PATCH 36/58] 8072754: com/sun/jdi/NativeInstanceFilter.java requires adjustments to work with module boundaries The tests uses sun.misc.Version to check if the JVM version is greater than a certain version. For the JDK 9 the condition is always true and the usage of sun.misc.Version thus can be eliminated. Reviewed-by: alanb, sla --- .../com/sun/jdi/NativeInstanceFilterTarg.java | 24 +++---------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/jdk/test/com/sun/jdi/NativeInstanceFilterTarg.java b/jdk/test/com/sun/jdi/NativeInstanceFilterTarg.java index a3179da7078..5b81fc8e0b1 100644 --- a/jdk/test/com/sun/jdi/NativeInstanceFilterTarg.java +++ b/jdk/test/com/sun/jdi/NativeInstanceFilterTarg.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2015, 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 @@ -21,36 +21,18 @@ * questions. */ -import sun.misc.Version; - public class NativeInstanceFilterTarg { public static void main(String args[]) { - boolean runTest = jvmSupportsJVMTI_12x(); String s1 = "abc"; String s2 = "def"; latch(s1); s1.intern(); - if (runTest) { - s2.intern(); // this is the call that generates events that ought - // to be filtered out. - } else { - System.out.println("Neutering test since JVMTI 1.2 not supported"); - } + s2.intern(); // this is the call that generates events that ought + // to be filtered out. } // Used by debugger to get an instance to filter with public static String latch(String s) { return s; } - public static boolean jvmSupportsJVMTI_12x() { - // This fix requires the JVM to support JVMTI 1.2, which doesn't - // happen until HSX 20.0, build 05. - int major = Version.jvmMajorVersion(); - int minor = Version.jvmMinorVersion(); - int micro = Version.jvmMicroVersion(); - int build = Version.jvmBuildNumber(); - - return (major > 20 || major == 20 && - (minor > 0 || micro > 0 || build >= 5)); - } } From 665dc6f6279ac6d253a18190e71a1bc5545b5509 Mon Sep 17 00:00:00 2001 From: Xue-Lei Andrew Fan Date: Wed, 11 Mar 2015 04:52:39 +0000 Subject: [PATCH 37/58] 8072385: Only the first DNSName entry is checked for endpoint identification Reviewed-by: weijun, jnimeh --- .../share/classes/sun/security/ssl/ClientHandshaker.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java b/jdk/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java index 7f1577beb83..cb4f54eb125 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java @@ -1569,6 +1569,9 @@ final class ClientHandshaker extends Handshaker { /* * Returns the subject alternative name of the specified type in the * subjectAltNames extension of a certificate. + * + * Note that only those subjectAltName types that use String data + * should be passed into this function. */ private static Collection getSubjectAltNames( Collection> subjectAltNames, int type) { From 6a297b5c2bafe626e5e28b81fb59775b5932e975 Mon Sep 17 00:00:00 2001 From: Masayoshi Okutsu Date: Wed, 11 Mar 2015 14:33:14 +0900 Subject: [PATCH 38/58] 8074791: Long-form date format incorrect month string for Finnish locale Reviewed-by: naoto --- .../sun/text/resources/fi/FormatData_fi.java | 6 +- .../sun/text/resources/Format/Bug8074791.java | 69 +++++++++++++++++++ jdk/test/sun/text/resources/LocaleData | 6 ++ .../sun/text/resources/LocaleDataTest.java | 4 +- 4 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 jdk/test/sun/text/resources/Format/Bug8074791.java diff --git a/jdk/src/jdk.localedata/share/classes/sun/text/resources/fi/FormatData_fi.java b/jdk/src/jdk.localedata/share/classes/sun/text/resources/fi/FormatData_fi.java index f80df887abf..c9a520a8388 100644 --- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/fi/FormatData_fi.java +++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/fi/FormatData_fi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2015, 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 @@ -295,8 +295,8 @@ public class FormatData_fi extends ParallelListResourceBundle { }, { "DatePatterns", new String[] { - "d. MMMM'ta 'yyyy", // full date pattern - "d. MMMM'ta 'yyyy", // long date pattern + "d. MMMM yyyy", // full date pattern + "d. MMMM yyyy", // long date pattern "d.M.yyyy", // medium date pattern "d.M.yyyy", // short date pattern } diff --git a/jdk/test/sun/text/resources/Format/Bug8074791.java b/jdk/test/sun/text/resources/Format/Bug8074791.java new file mode 100644 index 00000000000..138158ca090 --- /dev/null +++ b/jdk/test/sun/text/resources/Format/Bug8074791.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2015, 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. + * + * 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. + */ + +/* + * @test + * @bug 8074791 + * @summary Make sure that Finnish month names are correct in formatted text. + */ + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.Locale; +import static java.text.DateFormat.*; +import static java.util.Calendar.JANUARY; + +public class Bug8074791 { + private static Locale FINNISH = new Locale("fi"); + private static String JAN_FORMAT = "tammikuuta"; + private static String JAN_STANDALONE = "tammikuu"; + + public static void main(String[] arg) { + int errors = 0; + + DateFormat df = DateFormat.getDateInstance(LONG, FINNISH); + Date jan20 = new GregorianCalendar(2015, JANUARY, 20).getTime(); + String str = df.format(jan20).toString(); + // Extract the month name (locale data dependent) + String month = str.replaceAll(".+\\s([a-z]+)\\s\\d+$", "$1"); + if (!month.equals(JAN_FORMAT)) { + errors++; + System.err.println("wrong format month name: got '" + month + + "', expected '" + JAN_FORMAT + "'"); + } + + SimpleDateFormat sdf = new SimpleDateFormat("LLLL", FINNISH); // stand-alone month name + month = sdf.format(jan20); + if (!month.equals(JAN_STANDALONE)) { + errors++; + System.err.println("wrong stand-alone month name: got '" + month + + "', expected '" + JAN_STANDALONE + "'"); + } + + if (errors > 0) { + throw new RuntimeException(); + } + } +} diff --git a/jdk/test/sun/text/resources/LocaleData b/jdk/test/sun/text/resources/LocaleData index 205932144d3..719cc3df066 100644 --- a/jdk/test/sun/text/resources/LocaleData +++ b/jdk/test/sun/text/resources/LocaleData @@ -8273,3 +8273,9 @@ FormatData/zh/MonthNarrows/9=10 FormatData/zh/MonthNarrows/10=11 FormatData/zh/MonthNarrows/11=12 FormatData/zh/MonthNarrows/12= + +# bug #8074791 +FormatData/fi/DatePatterns/0=d. MMMM yyyy +FormatData/fi/DatePatterns/1=d. MMMM yyyy +FormatData/fi/DatePatterns/2=d.M.yyyy +FormatData/fi/DatePatterns/3=d.M.yyyy diff --git a/jdk/test/sun/text/resources/LocaleDataTest.java b/jdk/test/sun/text/resources/LocaleDataTest.java index abfdd97943d..96d6d1d9a75 100644 --- a/jdk/test/sun/text/resources/LocaleDataTest.java +++ b/jdk/test/sun/text/resources/LocaleDataTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2015, 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 @@ -36,7 +36,7 @@ * 6919624 6998391 7019267 7020960 7025837 7020583 7036905 7066203 7101495 * 7003124 7085757 7028073 7171028 7189611 8000983 7195759 8004489 8006509 * 7114053 7074882 7040556 8013836 8021121 6192407 6931564 8027695 8017142 - * 8037343 8055222 8042126 + * 8037343 8055222 8042126 8074791 * @summary Verify locale data * */ From e8b15600ac394449663c4a1f4c6a955746640c5f Mon Sep 17 00:00:00 2001 From: Staffan Larsen Date: Wed, 11 Mar 2015 08:09:35 +0100 Subject: [PATCH 39/58] 8074841: Resolve disabled warnings for the JVMTI demo compiledMethodLoad 8074842: Resolve disabled warnings for the JVMTI demo waiters Reviewed-by: alanb, ihse, dsamersoff --- jdk/make/CompileDemos.gmk | 4 ++-- .../demo/share/jvmti/compiledMethodLoad/compiledMethodLoad.c | 2 +- jdk/src/demo/share/jvmti/waiters/Agent.cpp | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/jdk/make/CompileDemos.gmk b/jdk/make/CompileDemos.gmk index a56b020e09d..2d10867948f 100644 --- a/jdk/make/CompileDemos.gmk +++ b/jdk/make/CompileDemos.gmk @@ -316,13 +316,13 @@ define SetupJVMTIDemo endif endef -$(eval $(call SetupJVMTIDemo,compiledMethodLoad, agent_util, , , , , , , , pointer-to-int-cast format, , format)) +$(eval $(call SetupJVMTIDemo,compiledMethodLoad, agent_util)) $(eval $(call SetupJVMTIDemo,gctest, agent_util)) $(eval $(call SetupJVMTIDemo,heapTracker, agent_util java_crw_demo)) $(eval $(call SetupJVMTIDemo,heapViewer, agent_util)) $(eval $(call SetupJVMTIDemo,minst, agent_util java_crw_demo)) $(eval $(call SetupJVMTIDemo,mtrace, agent_util java_crw_demo)) -$(eval $(call SetupJVMTIDemo,waiters, agent_util, , C++, , , , , , , 4101)) +$(eval $(call SetupJVMTIDemo,waiters, agent_util, , C++)) $(eval $(call SetupJVMTIDemo,versionCheck, agent_util)) ################################################################################################## diff --git a/jdk/src/demo/share/jvmti/compiledMethodLoad/compiledMethodLoad.c b/jdk/src/demo/share/jvmti/compiledMethodLoad/compiledMethodLoad.c index 0f78bc953f7..72c9717a5cb 100644 --- a/jdk/src/demo/share/jvmti/compiledMethodLoad/compiledMethodLoad.c +++ b/jdk/src/demo/share/jvmti/compiledMethodLoad/compiledMethodLoad.c @@ -143,7 +143,7 @@ print_inline_info_record(jvmtiCompiledMethodLoadInlineRecord* record, for (i = 0; i < numpcs; i++) { PCStackInfo pcrecord = (record->pcinfo[i]); - fprintf(fp, "PcDescriptor(pc=0x%lx):\n", (jint)(pcrecord.pc)); + fprintf(fp, "PcDescriptor(pc=%p):\n", pcrecord.pc); print_stack_frames(&pcrecord, jvmti, fp); } } diff --git a/jdk/src/demo/share/jvmti/waiters/Agent.cpp b/jdk/src/demo/share/jvmti/waiters/Agent.cpp index cf2285c6ca6..8f67f5480a5 100644 --- a/jdk/src/demo/share/jvmti/waiters/Agent.cpp +++ b/jdk/src/demo/share/jvmti/waiters/Agent.cpp @@ -111,8 +111,6 @@ Agent::get_monitor(jvmtiEnv *jvmti, JNIEnv *env, jobject object) /* VM initialization and VM death calls to Agent */ Agent::Agent(jvmtiEnv *jvmti, JNIEnv *env, jthread thread) { - jvmtiError err; - stdout_message("Agent created..\n"); stdout_message("VMInit...\n"); /* Start monitor list */ @@ -129,8 +127,6 @@ Agent::~Agent() void Agent::vm_death(jvmtiEnv *jvmti, JNIEnv *env) { - jvmtiError err; - /* Delete all Monitors we allocated */ for ( int i = 0; i < (int)monitor_count; i++ ) { delete monitor_list[i]; From 465abe9cfd9ba53dc318b35269cb09cd6e62c2bc Mon Sep 17 00:00:00 2001 From: Alexander Zvegintsev Date: Wed, 11 Mar 2015 16:48:43 +0300 Subject: [PATCH 40/58] 8074921: OS X build broken by reference to XToolkit Reviewed-by: alexsch, serb --- .../java.desktop/unix/classes/sun/awt/UNIXToolkit.java | 8 +------- .../unix/native/libawt_xawt/awt/gtk2_interface.c | 5 ++++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java b/jdk/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java index bf6f87d4a6e..702bccb3d43 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java @@ -31,7 +31,6 @@ import java.awt.image.*; import java.security.AccessController; import sun.security.action.GetIntegerAction; import com.sun.java.swing.plaf.gtk.GTKConstants.TextDirection; -import sun.awt.X11.XToolkit; import sun.java2d.opengl.OGLRenderQueue; public abstract class UNIXToolkit extends SunToolkit @@ -98,12 +97,7 @@ public abstract class UNIXToolkit extends SunToolkit public boolean loadGTK() { synchronized (GTK_LOCK) { if (nativeGTKLoaded == null) { - XToolkit.awtLock(); - try { - nativeGTKLoaded = load_gtk(); - } finally { - XToolkit.awtUnlock(); - } + nativeGTKLoaded = load_gtk(); } } return nativeGTKLoaded; diff --git a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c index 8204b8d4836..2e35e5ea43a 100644 --- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c +++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2015, 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 @@ -33,6 +33,7 @@ #include "jvm_md.h" #include "sizecalc.h" #include +#include "awt.h" #define GTK2_LIB_VERSIONED VERSIONED_JNI_LIB_NAME("gtk-x11-2.0", "0") #define GTK2_LIB JNI_LIB_NAME("gtk-x11-2.0") @@ -890,6 +891,7 @@ gboolean gtk2_load(JNIEnv *env) * BadMatch errors which we would normally ignore. The IO error handler * is preserved here, too, just for consistency. */ + AWT_LOCK(); handler = XSetErrorHandler(NULL); io_handler = XSetIOErrorHandler(NULL); @@ -926,6 +928,7 @@ gboolean gtk2_load(JNIEnv *env) XSetErrorHandler(handler); XSetIOErrorHandler(io_handler); + AWT_UNLOCK(); /* Initialize widget array. */ for (i = 0; i < _GTK_WIDGET_TYPE_SIZE; i++) From 827d9d39285738e0dc35807dae3330ec657f2032 Mon Sep 17 00:00:00 2001 From: Frank Yuan Date: Fri, 13 Mar 2015 15:50:39 +0300 Subject: [PATCH 41/58] 8061293: Update javax/xml tests to remove references of jre dir Reviewed-by: lancea, mkos --- jdk/test/javax/xml/ws/8033113/WsImportTest.java | 3 --- jdk/test/javax/xml/ws/8046817/GenerateEnumSchema.java | 3 --- jdk/test/javax/xml/ws/clientjar/TestWsImport.java | 3 --- jdk/test/javax/xml/ws/ebcdic/WsImportTest.java | 3 --- 4 files changed, 12 deletions(-) diff --git a/jdk/test/javax/xml/ws/8033113/WsImportTest.java b/jdk/test/javax/xml/ws/8033113/WsImportTest.java index aa1cf860ab4..ac1b13e3949 100644 --- a/jdk/test/javax/xml/ws/8033113/WsImportTest.java +++ b/jdk/test/javax/xml/ws/8033113/WsImportTest.java @@ -140,9 +140,6 @@ public class WsImportTest { private static String getWsImport() { String javaHome = System.getProperty("java.home"); - if (javaHome.endsWith("jre")) { - javaHome = new File(javaHome).getParent(); - } String wsimport = javaHome + File.separator + "bin" + File.separator + "wsimport"; if (System.getProperty("os.name").startsWith("Windows")) { wsimport = wsimport.concat(".exe"); diff --git a/jdk/test/javax/xml/ws/8046817/GenerateEnumSchema.java b/jdk/test/javax/xml/ws/8046817/GenerateEnumSchema.java index cb70d2247ae..1edd3c23907 100644 --- a/jdk/test/javax/xml/ws/8046817/GenerateEnumSchema.java +++ b/jdk/test/javax/xml/ws/8046817/GenerateEnumSchema.java @@ -86,9 +86,6 @@ public class GenerateEnumSchema { private static String getSchemagen() { String javaHome = System.getProperty("java.home"); - if (javaHome.endsWith("jre")) { - javaHome = new File(javaHome).getParent(); - } String schemagen = javaHome + File.separator + "bin" + File.separator + "schemagen"; if (System.getProperty("os.name").startsWith("Windows")) { schemagen = schemagen.concat(".exe"); diff --git a/jdk/test/javax/xml/ws/clientjar/TestWsImport.java b/jdk/test/javax/xml/ws/clientjar/TestWsImport.java index 422f4f5f045..dadceb34295 100644 --- a/jdk/test/javax/xml/ws/clientjar/TestWsImport.java +++ b/jdk/test/javax/xml/ws/clientjar/TestWsImport.java @@ -55,9 +55,6 @@ public class TestWsImport { public static void main(String[] args) throws IOException { String javaHome = System.getProperty("java.home"); - if (javaHome.endsWith("jre")) { - javaHome = new File(javaHome).getParent(); - } String wsimport = javaHome + File.separator + "bin" + File.separator + "wsimport"; if (System.getProperty("os.name").startsWith("Windows")) { wsimport = wsimport.concat(".exe"); diff --git a/jdk/test/javax/xml/ws/ebcdic/WsImportTest.java b/jdk/test/javax/xml/ws/ebcdic/WsImportTest.java index 7977cf98730..21a9fd874cc 100644 --- a/jdk/test/javax/xml/ws/ebcdic/WsImportTest.java +++ b/jdk/test/javax/xml/ws/ebcdic/WsImportTest.java @@ -133,9 +133,6 @@ public class WsImportTest { private static String getWsImport() { String javaHome = System.getProperty("java.home"); - if (javaHome.endsWith("jre")) { - javaHome = new File(javaHome).getParent(); - } String wsimport = javaHome + File.separator + "bin" + File.separator + "wsimport"; if (System.getProperty("os.name").startsWith("Windows")) { wsimport = wsimport.concat(".exe"); From a55dd41fc7ad4987f699778f206e48686b0f437b Mon Sep 17 00:00:00 2001 From: Jamil Nimeh Date: Fri, 13 Mar 2015 09:32:54 -0700 Subject: [PATCH 42/58] 8074064: OCSPResponse.SingleResponse objects do not parse singleExtensions Reviewed-by: mullan, vinnie --- .../provider/certpath/OCSPResponse.java | 134 +++++--- .../certpath/OCSP/OCSPSingleExtensions.java | 185 ++++++++++ .../provider/certpath/OCSP/TEST.properties | 1 + .../security/provider/certpath/OCSP/int.crt | 121 +++++++ .../certpath/OCSP/ocsp-good-nonext.resp | 316 +++++++++++++++++ .../certpath/OCSP/ocsp-good-witharchcut.resp | 320 +++++++++++++++++ .../certpath/OCSP/ocsp-good-withnext.resp | 317 +++++++++++++++++ .../certpath/OCSP/ocsp-rev-bad-sr-tag.resp | 60 ++++ .../certpath/OCSP/ocsp-rev-nocerts.resp | 53 +++ .../certpath/OCSP/ocsp-rev-nonext-noinv.resp | 317 +++++++++++++++++ .../OCSP/ocsp-rev-nonext-withinv.resp | 323 ++++++++++++++++++ .../OCSP/ocsp-rev-sr-cont-reverse.resp | 61 ++++ .../certpath/OCSP/ocsp-rev-twonext.resp | 58 ++++ .../OCSP/ocsp-rev-withnext-noinv.resp | 319 +++++++++++++++++ .../OCSP/ocsp-rev-withnext-withinv.resp | 323 ++++++++++++++++++ 15 files changed, 2861 insertions(+), 47 deletions(-) create mode 100644 jdk/test/sun/security/provider/certpath/OCSP/OCSPSingleExtensions.java create mode 100644 jdk/test/sun/security/provider/certpath/OCSP/TEST.properties create mode 100644 jdk/test/sun/security/provider/certpath/OCSP/int.crt create mode 100644 jdk/test/sun/security/provider/certpath/OCSP/ocsp-good-nonext.resp create mode 100644 jdk/test/sun/security/provider/certpath/OCSP/ocsp-good-witharchcut.resp create mode 100644 jdk/test/sun/security/provider/certpath/OCSP/ocsp-good-withnext.resp create mode 100644 jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-bad-sr-tag.resp create mode 100644 jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-nocerts.resp create mode 100644 jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-nonext-noinv.resp create mode 100644 jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-nonext-withinv.resp create mode 100644 jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-sr-cont-reverse.resp create mode 100644 jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-twonext.resp create mode 100644 jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-withnext-noinv.resp create mode 100644 jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-withnext-withinv.resp diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java index 8075d73fd81..f8e72abebc0 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2015, 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 @@ -670,6 +670,38 @@ public final class OCSPResponse { return signerCert; // set in verify() } + /** + * Build a String-Extension map from DER encoded data. + * @param derVal A {@code DerValue} object built from a SEQUENCE of + * extensions + * + * @return A {@code Map} using the OID in string form as the keys. If no + * extensions are found or an empty SEQUENCE is passed in, then + * an empty {@code Map} will be returned. + * + * @throws IOException if any decoding errors occur. + */ + private static Map + parseExtensions(DerValue derVal) throws IOException { + DerValue[] extDer = derVal.data.getSequence(3); + Map extMap = + new HashMap<>(extDer.length); + + for (DerValue extDerVal : extDer) { + Extension ext = new Extension(extDerVal); + // We don't support any extensions yet. Therefore, if it + // is critical we must throw an exception because we + // don't know how to process it. + if (ext.isCritical()) { + throw new IOException("Unsupported OCSP critical extension: " + + ext.getExtensionId()); + } + extMap.put(ext.getId(), ext); + } + + return extMap; + } + /* * A class representing a single OCSP response. */ @@ -718,7 +750,7 @@ public final class OCSPResponse { } } else { revocationTime = null; - revocationReason = CRLReason.UNSPECIFIED; + revocationReason = null; if (tag == CERT_STATUS_GOOD) { certStatus = CertStatus.GOOD; } else if (tag == CERT_STATUS_UNKNOWN) { @@ -729,55 +761,59 @@ public final class OCSPResponse { } thisUpdate = tmp.getGeneralizedTime(); - - if (tmp.available() == 0) { - // we are done - nextUpdate = null; - } else { - derVal = tmp.getDerValue(); - tag = (byte)(derVal.tag & 0x1f); - if (tag == 0) { - // next update - nextUpdate = derVal.data.getGeneralizedTime(); - - if (tmp.available() == 0) { - // we are done - } else { - derVal = tmp.getDerValue(); - tag = (byte)(derVal.tag & 0x1f); - } - } else { - nextUpdate = null; - } + if (debug != null) { + debug.println("thisUpdate: " + thisUpdate); } - // singleExtensions + + // Parse optional fields like nextUpdate and singleExtensions + Date tmpNextUpdate = null; + Map tmpMap = null; + + // Check for the first optional item, it could be nextUpdate + // [CONTEXT 0] or singleExtensions [CONTEXT 1] if (tmp.available() > 0) { derVal = tmp.getDerValue(); - if (derVal.isContextSpecific((byte)1)) { - DerValue[] singleExtDer = derVal.data.getSequence(3); - singleExtensions = - new HashMap - (singleExtDer.length); - for (int i = 0; i < singleExtDer.length; i++) { - Extension ext = new Extension(singleExtDer[i]); - if (debug != null) { - debug.println("OCSP single extension: " + ext); - } - // We don't support any extensions yet. Therefore, if it - // is critical we must throw an exception because we - // don't know how to process it. - if (ext.isCritical()) { - throw new IOException( - "Unsupported OCSP critical extension: " + - ext.getExtensionId()); - } - singleExtensions.put(ext.getId(), ext); + + // nextUpdate processing + if (derVal.isContextSpecific((byte)0)) { + tmpNextUpdate = derVal.data.getGeneralizedTime(); + if (debug != null) { + debug.println("nextUpdate: " + tmpNextUpdate); } - } else { - singleExtensions = Collections.emptyMap(); + + // If more data exists in the singleResponse, it + // can only be singleExtensions. Get this DER value + // for processing in the next block + derVal = tmp.available() > 0 ? tmp.getDerValue() : null; + } + + // singleExtensions processing + if (derVal != null) { + if (derVal.isContextSpecific((byte)1)) { + tmpMap = parseExtensions(derVal); + + // There should not be any other items in the + // singleResponse at this point. + if (tmp.available() > 0) { + throw new IOException(tmp.available() + + " bytes of additional data in singleResponse"); + } + } else { + // Unknown item in the singleResponse + throw new IOException("Unsupported singleResponse " + + "item, tag = " + String.format("%02X", derVal.tag)); + } + } + } + + nextUpdate = tmpNextUpdate; + singleExtensions = (tmpMap != null) ? tmpMap : + Collections.emptyMap(); + if (debug != null) { + for (java.security.cert.Extension ext : + singleExtensions.values()) { + debug.println("singleExtension: " + ext); } - } else { - singleExtensions = Collections.emptyMap(); } } @@ -793,7 +829,8 @@ public final class OCSPResponse { } @Override public Date getRevocationTime() { - return (Date) revocationTime.clone(); + return (revocationTime != null ? (Date) revocationTime.clone() : + null); } @Override public CRLReason getRevocationReason() { @@ -821,6 +858,9 @@ public final class OCSPResponse { if (nextUpdate != null) { sb.append("nextUpdate is " + nextUpdate + "\n"); } + for (java.security.cert.Extension ext : singleExtensions.values()) { + sb.append("singleExtension: " + ext + "\n"); + } return sb.toString(); } } diff --git a/jdk/test/sun/security/provider/certpath/OCSP/OCSPSingleExtensions.java b/jdk/test/sun/security/provider/certpath/OCSP/OCSPSingleExtensions.java new file mode 100644 index 00000000000..3e518375800 --- /dev/null +++ b/jdk/test/sun/security/provider/certpath/OCSP/OCSPSingleExtensions.java @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2015, 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. + * + * 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. + */ + +/* + * @test + * @bug 8074064 + * @summary OCSPResponse.SingleResponse objects do not parse singleExtensions + * @run main/othervm sun.security.provider.certpath.OCSPSingleExtensions + */ + +package sun.security.provider.certpath; + +import java.io.*; +import java.util.*; +import java.security.cert.*; + +import sun.security.x509.SerialNumber; + +/* + * Tester note: + * For this test, all input files should be co-located with the test source + * code. All test input data should be in PEM format, and may be commented + * with the '#' character at the beginning of any comment line. Most tests were + * generated using the "openssl ocsp" utility in server mode and used the same + * utility as a client to drive the responses. In rare cases + * (ocsp-good-witharchcut.resp, etc.) the test input was manually modified + * because openssl's ocsp could not generate data in that format (e.g. a + * "good" response with singleExtensions in the SingleResponse structure.) + * These tests were created to force the code to walk codepaths reached only + * with invalid OCSP data or legal formats that are not easily generated using + * the tools at hand. These hand-modified test cases will not verify. + */ + +public class OCSPSingleExtensions { + public static CertificateFactory CF; + public static final File testDir = + new File(System.getProperty("test.src", ".")); + public static final Base64.Decoder B64D = Base64.getMimeDecoder(); + + public static void main(String [] args) throws Exception { + // Get a CertificateFactory for various tests + CF = CertificateFactory.getInstance("X509"); + ByteArrayInputStream bais = + new ByteArrayInputStream(readFile("int.crt").getBytes()); + X509Certificate intCA = (X509Certificate)CF.generateCertificate(bais); + System.out.println("Successfully instantiated CA cert \"" + + intCA.getSubjectX500Principal() + "\""); + + CertId cid0x1500 = new CertId(intCA, new SerialNumber(0x1500)); + boolean noFailures = true; + + OCSPResponse.SingleResponse sr = + getSRByFilename("ocsp-good-nonext.resp", cid0x1500); + noFailures &= checkSingleExts(sr, 0); + + if (sr.getRevocationTime() != null) { + throw new RuntimeException("Oops. revocationTime is non-null " + + sr.getRevocationTime()); + } else if (sr.getRevocationReason() != null) { + throw new RuntimeException("Oops. revocationReason is non-null " + + sr.getRevocationReason()); + } + + sr = getSRByFilename("ocsp-good-withnext.resp", cid0x1500); + noFailures &= checkSingleExts(sr, 0); + + sr = getSRByFilename("ocsp-good-witharchcut.resp", cid0x1500); + noFailures &= checkSingleExts(sr, 1); + + sr = getSRByFilename("ocsp-rev-nocerts.resp", cid0x1500); + noFailures &= checkSingleExts(sr, 1); + + sr = getSRByFilename("ocsp-rev-nonext-noinv.resp", cid0x1500); + noFailures &= checkSingleExts(sr, 0); + + sr = getSRByFilename("ocsp-rev-withnext-noinv.resp", cid0x1500); + noFailures &= checkSingleExts(sr, 0); + + sr = getSRByFilename("ocsp-rev-nonext-withinv.resp", cid0x1500); + noFailures &= checkSingleExts(sr, 1); + + sr = getSRByFilename("ocsp-rev-withnext-withinv.resp", cid0x1500); + noFailures &= checkSingleExts(sr, 1); + + try { + sr = getSRByFilename("ocsp-rev-twonext.resp", cid0x1500); + System.out.println("FAIL: Allowed two nextUpdate fields"); + noFailures = false; + } catch (IOException ioe) { + System.out.println("Caught expected exception: " + ioe); + } + + try { + sr = getSRByFilename("ocsp-rev-bad-sr-tag.resp", cid0x1500); + System.out.println("FAIL: Allowed invalid singleResponse item"); + noFailures = false; + } catch (IOException ioe) { + System.out.println("Caught expected exception: " + ioe); + } + + try { + sr = getSRByFilename("ocsp-rev-sr-cont-reverse.resp", cid0x1500); + System.out.println("FAIL: Allowed reversed " + + "nextUpdate/singleExtensions"); + noFailures = false; + } catch (IOException ioe) { + System.out.println("Caught expected exception: " + ioe); + } + + if (!noFailures) { + throw new RuntimeException("One or more tests failed"); + } + } + + private static OCSPResponse.SingleResponse getSRByFilename(String fileName, + CertId cid) throws IOException { + byte[] respDER = B64D.decode(readFile(fileName)); + OCSPResponse or = new OCSPResponse(respDER); + OCSPResponse.SingleResponse sr = or.getSingleResponse(cid); + return sr; + } + + private static String readFile(String fileName) throws IOException { + String filePath = testDir + "/" + fileName; + StringBuilder sb = new StringBuilder(); + + try (FileReader fr = new FileReader(filePath); + BufferedReader br = new BufferedReader(fr)) { + String line; + while ((line = br.readLine()) != null) { + if (!line.trim().startsWith("#")) { + sb.append(line).append("\n"); + } + } + } + + System.out.println("Successfully read " + fileName); + return sb.toString(); + } + + private static boolean checkSingleExts(OCSPResponse.SingleResponse sr, + int singleExtCount) { + Map singleExts; + try { + singleExts = sr.getSingleExtensions(); + } catch (NullPointerException npe) { + System.out.println( + "Warning: Sent null singleResponse into checkSingleExts"); + return false; + } + + for (String key : singleExts.keySet()) { + System.out.println("singleExtension: " + singleExts.get(key)); + } + + if (singleExts.size() != singleExtCount) { + System.out.println("Single Extension count mismatch, " + + "expected " + singleExtCount + ", got " + + singleExts.size()); + return false; + } else { + return true; + } + } +} diff --git a/jdk/test/sun/security/provider/certpath/OCSP/TEST.properties b/jdk/test/sun/security/provider/certpath/OCSP/TEST.properties new file mode 100644 index 00000000000..72f8b4cfd43 --- /dev/null +++ b/jdk/test/sun/security/provider/certpath/OCSP/TEST.properties @@ -0,0 +1 @@ +bootclasspath.dirs=. diff --git a/jdk/test/sun/security/provider/certpath/OCSP/int.crt b/jdk/test/sun/security/provider/certpath/OCSP/int.crt new file mode 100644 index 00000000000..7922392f300 --- /dev/null +++ b/jdk/test/sun/security/provider/certpath/OCSP/int.crt @@ -0,0 +1,121 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 2 (0x2) + Signature Algorithm: sha256WithRSAEncryption + Issuer: O=Test, CN=TestRoot + Validity + Not Before: Feb 24 00:59:51 2015 GMT + Not After : Feb 13 00:59:51 2017 GMT + Subject: O=Test, CN=TestIntCA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (4096 bit) + Modulus: + 00:bf:0a:29:02:54:00:97:c3:81:e6:33:89:74:03: + cc:a7:f4:8d:54:17:36:48:97:6a:32:4e:b8:87:6d: + 62:8e:87:7f:91:64:3b:75:d5:3d:93:19:17:d2:00: + d8:db:c3:91:7c:35:23:59:d4:29:a3:e1:da:28:66: + 28:85:6b:d3:44:09:38:82:42:2f:23:ab:e6:1b:2f: + 8c:c3:12:40:99:8d:2e:a6:95:16:9c:75:b1:07:bd: + 76:f6:17:bc:a4:93:8f:9f:cd:eb:6d:1c:8c:5c:0c: + 2a:8d:b8:71:2c:ed:ad:fe:7b:ed:3e:c3:e7:24:d4: + ae:53:42:34:c5:82:f9:fa:15:71:ba:9e:16:a7:1e: + c5:5c:a7:48:b3:26:f4:a9:34:71:84:b8:7b:77:a7: + f1:a2:8e:f5:e8:cd:25:f9:63:89:b1:98:2a:8e:4d: + da:9e:2d:d2:a5:96:ca:32:1e:e2:22:b1:0b:b9:0f: + 98:0a:ae:08:2f:a8:fe:90:2f:d8:0d:16:79:2d:c8: + 62:22:69:f3:18:2b:a9:c7:d1:85:f7:5d:d5:ab:44: + 6f:91:9a:1a:86:22:0b:7e:57:97:98:6a:bd:bb:55: + 1e:e6:44:62:18:0b:af:a4:3e:ba:a7:5f:f1:a6:28: + 5c:fe:df:19:9a:cd:39:e3:9a:5e:bc:aa:49:0c:22: + 24:b7:1c:d4:21:99:0b:c4:48:95:b8:de:ad:4c:e1: + 39:e8:34:5d:c6:0c:4f:2c:22:c8:e8:cd:19:b7:d3: + 8f:d3:cd:76:76:0f:b1:bb:0a:45:be:9d:5f:2a:5d: + 51:1c:47:79:bc:c9:d1:bc:30:33:ae:2d:db:27:b9: + 1b:ff:2c:cb:b2:af:7d:e5:a6:9b:6f:23:98:7e:76: + 74:45:5f:41:15:73:c1:9c:f5:88:c6:8f:ca:9b:78: + 70:ee:8b:ba:d1:bc:60:4f:29:76:6d:28:2f:3b:09: + e6:47:53:49:04:15:67:1d:af:0d:51:f8:43:92:c8: + ab:ea:f0:09:9e:47:87:2e:62:d8:91:6e:40:de:ac: + 1b:e1:6a:47:41:c3:7d:cf:90:e0:e9:34:80:d0:56: + 9a:92:83:18:0a:c4:61:b7:60:3d:9a:4c:db:61:0a: + d0:d0:71:f1:ee:de:11:ad:fa:ee:4b:8f:fe:15:ed: + 6d:e4:b0:ba:70:9c:30:ea:52:4d:31:a4:95:35:a1: + 1c:d9:15:9f:9c:ab:06:50:eb:ae:d4:bb:17:74:27: + 44:b9:35:fa:15:61:e1:13:f6:1e:46:88:9c:d3:67: + ca:bc:a5:7c:db:b9:7e:23:1c:24:77:fa:84:8f:38: + 7f:2a:42:d5:49:e0:33:09:5d:29:28:2f:93:33:20: + f9:cf:21 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 9B:F9:84:06:6A:FC:D2:EB:08:93:FB:E4:EE:2F:D8:C1:C2:89:7A:A7 + X509v3 Authority Key Identifier: + keyid:12:B9:C3:48:79:ED:7D:30:C9:78:78:61:94:58:37:07:40:76:38:18 + + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: + Certificate Sign, CRL Sign + Signature Algorithm: sha256WithRSAEncryption + 79:28:d5:46:92:1f:6b:25:de:b0:1e:e2:44:d3:7b:a3:4a:6e: + 05:43:dd:85:47:4d:ca:d0:d9:43:65:34:38:a0:c2:6c:fb:49: + 85:6d:f3:dc:10:8c:73:37:49:22:c3:87:dd:28:8a:b0:b2:2c: + a3:9c:f6:15:4d:98:39:95:a1:21:72:36:ff:04:67:e5:ba:3e: + bd:5e:d4:81:ac:f4:1c:f5:ab:8d:dd:73:e9:37:d9:d2:80:39: + 5b:f5:ec:fe:9c:56:ec:10:f7:86:42:17:d1:f1:4b:c5:38:fe: + 0e:85:2c:6e:ac:6f:52:e5:a8:b9:fe:af:f5:dc:35:0a:74:f8: + 72:4f:51:d5:95:f4:fe:8f:fa:3f:d5:d2:1f:44:3b:63:60:4a: + e2:99:37:bf:09:40:32:6c:ea:3c:61:85:77:bc:63:6e:11:f9: + 41:5f:cb:4c:99:39:2a:37:66:79:4d:5a:7e:93:91:53:33:ce: + b1:c0:1c:68:97:2e:5a:e1:66:59:41:52:07:cf:4a:02:24:54: + dd:01:97:2f:f1:85:db:50:9c:3b:16:95:d2:08:ca:f6:93:9a: + 01:33:36:40:7c:39:e3:df:f8:7b:a7:b5:ea:60:06:a5:74:3a: + dc:ea:36:08:6b:c1:59:03:01:77:17:0e:6b:e1:9a:48:68:06: + 31:03:28:0b:cb:dd:61:93:80:0c:f1:16:e4:87:26:86:72:b4: + 12:32:7b:f7:85:59:9a:e3:1c:c4:d8:6e:55:a9:7e:c5:ce:8b: + be:d2:bf:57:34:62:83:f1:d0:3a:73:e1:75:e1:f4:77:5b:a3: + a3:35:7a:fb:b6:85:68:d5:ad:26:95:71:60:62:92:30:d3:5c: + 7b:8e:42:14:e8:7b:27:13:e6:aa:cb:35:42:2c:db:e9:1f:ff: + fd:4c:8f:fc:04:d8:05:16:da:a8:93:db:3b:f2:51:17:ff:dc: + c7:11:97:14:ac:d8:5a:e7:ad:38:fa:17:bf:bd:4b:92:84:0d: + 96:20:7d:17:ee:31:a6:56:57:5e:a4:0d:d2:cb:47:e8:45:14: + e4:6a:4a:a1:40:da:b7:bc:e8:aa:60:59:4c:4a:3b:0c:ef:26: + 39:fc:cb:8c:fe:79:c3:35:34:f5:3a:11:d3:e6:e7:fe:fd:bc: + 89:6a:c5:d0:5b:a2:b9:84:9d:b4:53:d1:1f:c0:f6:fd:80:8a: + 88:f8:aa:04:8f:5d:83:4a:91:ed:90:f0:f6:0a:bb:1a:01:d7: + a4:bb:3c:c4:c1:e1:38:ca:03:8b:61:d8:18:ab:bc:ef:7e:18: + aa:df:61:d1:1f:64:10:04:e9:25:7d:c3:bb:10:e0:11:55:29: + e6:56:87:80:bf:95:20:c5 + +-----BEGIN CERTIFICATE----- +MIIFIDCCAwigAwIBAgIBAjANBgkqhkiG9w0BAQsFADAiMQ0wCwYDVQQKDARUZXN0 +MREwDwYDVQQDDAhUZXN0Um9vdDAeFw0xNTAyMj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+OZWhIXI2/wRn5bo+vV7Ugaz0HPWrjd1z6TfZ0oA5W/Xs/pxW7BD3hkIX0fFLxTj+ +DoUsbqxvUuWouf6v9dw1CnT4ck9R1ZX0/o/6P9XSH0Q7Y2BK4pk3vwlAMmzqPGGF +d7xjbhH5QV/LTJk5KjdmeU1afpORUzPOscAcaJcuWuFmWUFSB89KAiRU3QGXL/GF +21CcOxaV0gjK9pOaATM2QHw549/4e6e16mAGpXQ63Oo2CGvBWQMBdxcOa+GaSGgG +MQMoC8vdYZOADPEW5IcmhnK0EjJ794VZmuMcxNhuVal+xc6LvtK/VzRig/HQOnPh +deH0d1ujozV6+7aFaNWtJpVxYGKSMNNce45CFOh7JxPmqss1Qizb6R///UyP/ATY +BRbaqJPbO/JRF//cxxGXFKzYWuetOPoXv71LkoQNliB9F+4xplZXXqQN0stH6EUU +5GpKoUDat7zoqmBZTEo7DO8mOfzLjP55wzU09ToR0+bn/v28iWrF0FuiuYSdtFPR +H8D2/YCKiPiqBI9dg0qR7ZDw9gq7GgHXpLs8xMHhOMoDi2HYGKu8734Yqt9h0R9k +EATpJX3DuxDgEVUp5laHgL+VIMU= +-----END CERTIFICATE----- diff --git a/jdk/test/sun/security/provider/certpath/OCSP/ocsp-good-nonext.resp b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-good-nonext.resp new file mode 100644 index 00000000000..173164acc18 --- /dev/null +++ b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-good-nonext.resp @@ -0,0 +1,316 @@ +#OCSP Response Data: +# OCSP Response Status: successful (0x0) +# Response Type: Basic OCSP Response +# Version: 1 (0x0) +# Responder Id: O = Test, CN = TestOCSP +# Produced At: Feb 28 00:44:43 2015 GMT +# Responses: +# Certificate ID: +# Hash Algorithm: sha1 +# Issuer Name Hash: 1056578B741813261FD9712ADA60077FF7C61E8F +# Issuer Key Hash: 9BF984066AFCD2EB0893FBE4EE2FD8C1C2897AA7 +# Serial Number: 1500 +# Cert Status: good +# This Update: Feb 28 00:44:43 2015 GMT +# +# Response Extensions: +# OCSP Nonce: +# 0410AC8B4F37A9FC4A780725B40C10737187 +# Signature Algorithm: sha1WithRSAEncryption +# 34:89:04:55:0d:5d:78:0a:ad:19:50:11:eb:34:dc:49:9a:a8: +# 5d:e6:c1:ff:a9:83:54:6f:3e:30:87:6a:78:c9:d1:09:e9:b9: +# af:27:08:a9:9e:57:62:ab:b7:27:f2:81:61:f4:44:df:46:01: +# 32:e7:eb:c6:f2:8d:fc:55:a4:58:84:60:ac:e2:f2:f1:de:05: +# f2:5f:b3:bc:9e:83:7d:e3:d4:58:71:01:b8:c0:ae:cf:e3:07: +# 23:7a:88:03:d2:c8:45:cd:07:ee:d6:81:31:81:7e:bd:e3:f4: +# 7a:fe:c1:49:99:b1:d9:0d:73:d4:47:b7:2d:14:63:d0:87:23: +# ec:a6:46:86:f6:98:4e:97:d7:93:dc:77:9f:a0:b5:0d:1a:14: +# 08:33:4c:70:34:ba:d5:1c:21:31:fb:3b:e0:78:33:32:11:70: +# d2:7a:3c:e4:62:3c:50:cd:d5:11:5f:cc:99:52:2b:6b:75:43: +# aa:e2:42:a5:d6:a7:4d:09:43:61:13:5b:b7:6a:eb:85:e1:9f: +# 3b:bf:49:fe:b0:54:4c:16:3a:3b:cc:3c:6c:82:08:08:2f:bf: +# dc:e6:7e:d3:58:41:1d:2c:cd:a7:f7:64:30:66:0c:b8:06:e6: +# df:99:10:37:fc:3a:ff:9a:05:37:01:ee:75:6a:ff:58:04:c7: +# 85:19:e6:48 +#Certificate: +# Data: +# Version: 3 (0x2) +# Serial Number: 257 (0x101) +# Signature Algorithm: sha256WithRSAEncryption +# Issuer: O=Test, CN=TestIntCA +# Validity +# Not Before: Feb 24 01:22:24 2015 GMT +# Not After : Feb 24 01:22:24 2016 GMT +# Subject: O=Test, CN=TestOCSP +# Subject Public Key Info: +# Public Key Algorithm: rsaEncryption +# Public-Key: (2048 bit) +# Modulus: +# 00:d2:5c:ae:11:f6:c6:ae:97:ba:31:ed:2b:b6:e1: +# c7:58:03:e5:9b:ee:78:53:cb:33:a5:15:fd:c6:49: +# 16:83:0e:c8:21:7d:cf:a8:eb:18:31:32:0a:62:0c: +# 4e:c7:a5:a5:75:9d:db:72:90:e3:5a:ae:53:0a:1b: +# 59:3f:bd:3a:67:b1:bf:98:64:a4:85:f0:97:10:8b: +# 0e:7e:7b:5e:d4:32:ab:b5:ef:c3:de:22:c0:11:90: +# c8:37:e4:48:b0:5e:fc:1a:2c:7a:85:2b:a6:bd:18: +# 64:08:d3:e3:b8:d8:ab:2e:b5:d8:e8:12:2e:58:45: +# 69:ac:56:94:62:e3:c2:c4:3c:08:ea:b3:bb:a4:89: +# 7e:fb:84:5e:95:49:6f:b9:33:66:1a:c2:7f:36:55: +# 18:a7:21:e4:1b:75:c0:e8:c9:02:1b:9c:f1:8b:b1: +# 58:b0:8c:da:5c:24:a5:f4:a5:36:52:1c:76:d3:5a: +# 71:ee:f0:c8:4b:65:58:0b:d6:d6:6c:23:3b:d0:8f: +# f5:3a:66:d4:f4:fd:34:90:c2:35:a1:6d:70:49:39: +# a6:71:3d:0d:7c:85:d3:d1:f5:6e:30:05:42:a1:88: +# ab:94:1f:25:f2:76:85:57:cb:77:b6:9e:a3:03:26: +# ff:b1:47:71:67:20:75:8d:83:10:17:6c:9a:93:4b: +# f6:31 +# Exponent: 65537 (0x10001) +# X509v3 extensions: +# X509v3 Subject Key Identifier: +# 58:78:83:0E:47:61:C2:C9:E0:77:A7:FE:AD:9C:A4:5F:00:E8:A6:6C +# X509v3 Authority Key Identifier: +# keyid:9B:F9:84:06:6A:FC:D2:EB:08:93:FB:E4:EE:2F:D8:C1:C2:89:7A:A7 +# +# X509v3 Key Usage: critical +# Digital Signature +# X509v3 Extended Key Usage: +# OCSP Signing +# OCSP No Check: +# +# Signature Algorithm: sha256WithRSAEncryption +# 55:13:0c:0b:4a:35:14:25:ef:36:48:59:86:07:e8:c0:cd:d0: +# 9c:19:d1:36:63:85:d1:f0:46:ff:af:39:37:80:bd:3e:c4:88: +# fa:66:2d:57:08:97:1b:20:00:37:30:38:14:cf:ff:5d:01:c4: +# e0:06:aa:82:c9:64:3f:ed:89:1e:da:2a:02:c5:1d:4f:8b:d0: +# 15:f3:26:43:b1:a8:09:f7:1e:d4:0f:37:bd:50:6c:cd:b1:8b: +# a7:77:1a:e9:95:ec:fc:45:31:36:e4:23:c6:63:5e:64:61:ac: +# a9:a3:a8:7c:26:f5:91:57:aa:0d:51:d3:df:ad:29:d3:ef:58: +# ab:74:2f:81:dc:9e:97:35:0d:94:88:0f:34:5d:b7:80:ed:49: +# 2a:39:f4:c9:51:b8:8d:8d:db:e6:ec:04:39:ba:69:55:67:24: +# fe:8f:26:f1:1c:62:0c:ad:95:dc:de:5c:7b:6c:0e:e9:d4:fe: +# e3:cf:9e:d1:5d:da:aa:f9:17:8d:92:ab:2d:54:67:05:c2:7a: +# 51:84:72:c9:ab:f0:32:6b:86:f3:1f:c4:93:3b:9b:8d:73:12: +# 4f:58:2d:59:43:32:1d:0a:0c:a5:58:59:da:ce:9d:12:b4:d3: +# 4f:29:98:dc:a5:44:bd:93:23:65:ad:19:30:ab:72:44:15:48: +# a0:7a:9e:ea:d5:f5:9a:9e:fa:70:32:aa:51:b3:04:b6:91:c4: +# b8:d7:61:ae:c0:41:ec:5a:93:b4:62:bc:09:c4:04:d8:d4:33: +# 09:f9:63:20:d5:01:ed:b9:60:47:14:77:d1:f7:c5:41:3b:3b: +# e7:5d:73:d9:ad:ad:95:20:9c:40:1f:e4:47:0a:f6:54:bb:b8: +# 09:63:00:49:db:2e:7c:2a:79:96:86:1b:96:3b:54:97:48:b4: +# 39:46:f2:27:ef:8c:96:46:cd:af:8e:55:70:9d:6c:8f:d1:1a: +# 4c:fa:e8:90:a4:29:10:04:d1:bf:b2:de:04:28:2a:af:ae:dd: +# df:a6:f9:4a:66:19:76:7a:aa:cf:b0:68:c3:ef:83:3b:7b:e9: +# 6f:12:97:1d:db:1e:2a:da:07:03:d0:ba:c1:87:02:cd:59:be: +# b4:21:22:3b:d8:5d:7d:b4:a3:c7:2a:56:3e:09:6c:6b:6f:54: +# 22:03:bb:b2:d7:98:8a:2f:51:ec:fa:7d:3e:dc:c8:6f:db:2a: +# 6f:46:56:2e:08:b9:41:81:d8:58:a4:6e:2a:c8:46:db:63:52: +# 38:c6:45:1a:6a:a3:04:3e:48:0e:84:3d:29:47:8b:80:fc:ee: +# b4:c8:12:f0:03:ef:7b:48:2d:94:80:a2:51:c3:14:92:7e:57: +# 83:cd:56:7e:9b:8d:c5:c2 +#-----BEGIN CERTIFICATE----- +#MIIEOTCCAiGgAwIBAgICAQEwDQYJKoZIhvcNAQELBQAwIzENMAsGA1UECgwEVGVz +#dDESMBAGA1UEAwwJVGVzdEludENBMB4XDTE1MDIyNDAxMjIyNFoXDTE2MDIyNDAx +#MjIyNFowIjENMAsGA1UECgwEVGVzdDERMA8GA1UEAwwIVGVzdE9DU1AwggEiMA0G +#CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDSXK4R9saul7ox7Su24cdYA+Wb7nhT +#yzOlFf3GSRaDDsghfc+o6xgxMgpiDE7HpaV1ndtykONarlMKG1k/vTpnsb+YZKSF +#8JcQiw5+e17UMqu178PeIsARkMg35EiwXvwaLHqFK6a9GGQI0+O42KsutdjoEi5Y +#RWmsVpRi48LEPAjqs7ukiX77hF6VSW+5M2Yawn82VRinIeQbdcDoyQIbnPGLsViw +#jNpcJKX0pTZSHHbTWnHu8MhLZVgL1tZsIzvQj/U6ZtT0/TSQwjWhbXBJOaZxPQ18 +#hdPR9W4wBUKhiKuUHyXydoVXy3e2nqMDJv+xR3FnIHWNgxAXbJqTS/YxAgMBAAGj +#eDB2MB0GA1UdDgQWBBRYeIMOR2HCyeB3p/6tnKRfAOimbDAfBgNVHSMEGDAWgBSb +#+YQGavzS6wiT++TuL9jBwol6pzAOBgNVHQ8BAf8EBAMCB4AwEwYDVR0lBAwwCgYI +#KwYBBQUHAwkwDwYJKwYBBQUHMAEFBAIFADANBgkqhkiG9w0BAQsFAAOCAgEAVRMM +#C0o1FCXvNkhZhgfowM3QnBnRNmOF0fBG/685N4C9PsSI+mYtVwiXGyAANzA4FM// +#XQHE4AaqgslkP+2JHtoqAsUdT4vQFfMmQ7GoCfce1A83vVBszbGLp3ca6ZXs/EUx +#NuQjxmNeZGGsqaOofCb1kVeqDVHT360p0+9Yq3QvgdyelzUNlIgPNF23gO1JKjn0 +#yVG4jY3b5uwEObppVWck/o8m8RxiDK2V3N5ce2wO6dT+48+e0V3aqvkXjZKrLVRn +#BcJ6UYRyyavwMmuG8x/EkzubjXMST1gtWUMyHQoMpVhZ2s6dErTTTymY3KVEvZMj +#Za0ZMKtyRBVIoHqe6tX1mp76cDKqUbMEtpHEuNdhrsBB7FqTtGK8CcQE2NQzCflj +#INUB7blgRxR30ffFQTs7511z2a2tlSCcQB/kRwr2VLu4CWMASdsufCp5loYbljtU +#l0i0OUbyJ++MlkbNr45VcJ1sj9EaTProkKQpEATRv7LeBCgqr67d36b5SmYZdnqq +#z7Bow++DO3vpbxKXHdseKtoHA9C6wYcCzVm+tCEiO9hdfbSjxypWPglsa29UIgO7 +#steYii9R7Pp9PtzIb9sqb0ZWLgi5QYHYWKRuKshG22NSOMZFGmqjBD5IDoQ9KUeL +#gPzutMgS8APve0gtlICiUcMUkn5Xg81WfpuNxcI= +#-----END CERTIFICATE----- +#Certificate: +# Data: +# Version: 3 (0x2) +# Serial Number: 2 (0x2) +# Signature Algorithm: sha256WithRSAEncryption +# Issuer: O=Test, CN=TestRoot +# Validity +# Not Before: Feb 24 00:59:51 2015 GMT +# Not After : Feb 13 00:59:51 2017 GMT +# Subject: O=Test, CN=TestIntCA +# Subject Public Key Info: +# Public Key Algorithm: rsaEncryption +# Public-Key: (4096 bit) +# Modulus: +# 00:bf:0a:29:02:54:00:97:c3:81:e6:33:89:74:03: +# cc:a7:f4:8d:54:17:36:48:97:6a:32:4e:b8:87:6d: +# 62:8e:87:7f:91:64:3b:75:d5:3d:93:19:17:d2:00: +# d8:db:c3:91:7c:35:23:59:d4:29:a3:e1:da:28:66: +# 28:85:6b:d3:44:09:38:82:42:2f:23:ab:e6:1b:2f: +# 8c:c3:12:40:99:8d:2e:a6:95:16:9c:75:b1:07:bd: +# 76:f6:17:bc:a4:93:8f:9f:cd:eb:6d:1c:8c:5c:0c: +# 2a:8d:b8:71:2c:ed:ad:fe:7b:ed:3e:c3:e7:24:d4: +# ae:53:42:34:c5:82:f9:fa:15:71:ba:9e:16:a7:1e: +# c5:5c:a7:48:b3:26:f4:a9:34:71:84:b8:7b:77:a7: +# f1:a2:8e:f5:e8:cd:25:f9:63:89:b1:98:2a:8e:4d: +# da:9e:2d:d2:a5:96:ca:32:1e:e2:22:b1:0b:b9:0f: +# 98:0a:ae:08:2f:a8:fe:90:2f:d8:0d:16:79:2d:c8: +# 62:22:69:f3:18:2b:a9:c7:d1:85:f7:5d:d5:ab:44: +# 6f:91:9a:1a:86:22:0b:7e:57:97:98:6a:bd:bb:55: +# 1e:e6:44:62:18:0b:af:a4:3e:ba:a7:5f:f1:a6:28: +# 5c:fe:df:19:9a:cd:39:e3:9a:5e:bc:aa:49:0c:22: +# 24:b7:1c:d4:21:99:0b:c4:48:95:b8:de:ad:4c:e1: +# 39:e8:34:5d:c6:0c:4f:2c:22:c8:e8:cd:19:b7:d3: +# 8f:d3:cd:76:76:0f:b1:bb:0a:45:be:9d:5f:2a:5d: +# 51:1c:47:79:bc:c9:d1:bc:30:33:ae:2d:db:27:b9: +# 1b:ff:2c:cb:b2:af:7d:e5:a6:9b:6f:23:98:7e:76: +# 74:45:5f:41:15:73:c1:9c:f5:88:c6:8f:ca:9b:78: +# 70:ee:8b:ba:d1:bc:60:4f:29:76:6d:28:2f:3b:09: +# e6:47:53:49:04:15:67:1d:af:0d:51:f8:43:92:c8: +# ab:ea:f0:09:9e:47:87:2e:62:d8:91:6e:40:de:ac: +# 1b:e1:6a:47:41:c3:7d:cf:90:e0:e9:34:80:d0:56: +# 9a:92:83:18:0a:c4:61:b7:60:3d:9a:4c:db:61:0a: +# d0:d0:71:f1:ee:de:11:ad:fa:ee:4b:8f:fe:15:ed: +# 6d:e4:b0:ba:70:9c:30:ea:52:4d:31:a4:95:35:a1: +# 1c:d9:15:9f:9c:ab:06:50:eb:ae:d4:bb:17:74:27: +# 44:b9:35:fa:15:61:e1:13:f6:1e:46:88:9c:d3:67: +# ca:bc:a5:7c:db:b9:7e:23:1c:24:77:fa:84:8f:38: +# 7f:2a:42:d5:49:e0:33:09:5d:29:28:2f:93:33:20: +# f9:cf:21 +# Exponent: 65537 (0x10001) +# X509v3 extensions: +# X509v3 Subject Key Identifier: +# 9B:F9:84:06:6A:FC:D2:EB:08:93:FB:E4:EE:2F:D8:C1:C2:89:7A:A7 +# X509v3 Authority Key Identifier: +# keyid:12:B9:C3:48:79:ED:7D:30:C9:78:78:61:94:58:37:07:40:76:38:18 +# +# X509v3 Basic Constraints: critical +# CA:TRUE +# X509v3 Key Usage: +# Certificate Sign, CRL Sign +# Signature Algorithm: sha256WithRSAEncryption +# 79:28:d5:46:92:1f:6b:25:de:b0:1e:e2:44:d3:7b:a3:4a:6e: +# 05:43:dd:85:47:4d:ca:d0:d9:43:65:34:38:a0:c2:6c:fb:49: +# 85:6d:f3:dc:10:8c:73:37:49:22:c3:87:dd:28:8a:b0:b2:2c: +# a3:9c:f6:15:4d:98:39:95:a1:21:72:36:ff:04:67:e5:ba:3e: +# bd:5e:d4:81:ac:f4:1c:f5:ab:8d:dd:73:e9:37:d9:d2:80:39: +# 5b:f5:ec:fe:9c:56:ec:10:f7:86:42:17:d1:f1:4b:c5:38:fe: +# 0e:85:2c:6e:ac:6f:52:e5:a8:b9:fe:af:f5:dc:35:0a:74:f8: +# 72:4f:51:d5:95:f4:fe:8f:fa:3f:d5:d2:1f:44:3b:63:60:4a: +# e2:99:37:bf:09:40:32:6c:ea:3c:61:85:77:bc:63:6e:11:f9: +# 41:5f:cb:4c:99:39:2a:37:66:79:4d:5a:7e:93:91:53:33:ce: +# b1:c0:1c:68:97:2e:5a:e1:66:59:41:52:07:cf:4a:02:24:54: +# dd:01:97:2f:f1:85:db:50:9c:3b:16:95:d2:08:ca:f6:93:9a: +# 01:33:36:40:7c:39:e3:df:f8:7b:a7:b5:ea:60:06:a5:74:3a: +# dc:ea:36:08:6b:c1:59:03:01:77:17:0e:6b:e1:9a:48:68:06: +# 31:03:28:0b:cb:dd:61:93:80:0c:f1:16:e4:87:26:86:72:b4: +# 12:32:7b:f7:85:59:9a:e3:1c:c4:d8:6e:55:a9:7e:c5:ce:8b: +# be:d2:bf:57:34:62:83:f1:d0:3a:73:e1:75:e1:f4:77:5b:a3: +# a3:35:7a:fb:b6:85:68:d5:ad:26:95:71:60:62:92:30:d3:5c: +# 7b:8e:42:14:e8:7b:27:13:e6:aa:cb:35:42:2c:db:e9:1f:ff: +# fd:4c:8f:fc:04:d8:05:16:da:a8:93:db:3b:f2:51:17:ff:dc: +# c7:11:97:14:ac:d8:5a:e7:ad:38:fa:17:bf:bd:4b:92:84:0d: +# 96:20:7d:17:ee:31:a6:56:57:5e:a4:0d:d2:cb:47:e8:45:14: +# e4:6a:4a:a1:40:da:b7:bc:e8:aa:60:59:4c:4a:3b:0c:ef:26: +# 39:fc:cb:8c:fe:79:c3:35:34:f5:3a:11:d3:e6:e7:fe:fd:bc: +# 89:6a:c5:d0:5b:a2:b9:84:9d:b4:53:d1:1f:c0:f6:fd:80:8a: +# 88:f8:aa:04:8f:5d:83:4a:91:ed:90:f0:f6:0a:bb:1a:01:d7: +# a4:bb:3c:c4:c1:e1:38:ca:03:8b:61:d8:18:ab:bc:ef:7e:18: +# aa:df:61:d1:1f:64:10:04:e9:25:7d:c3:bb:10:e0:11:55:29: +# e6:56:87:80:bf:95:20:c5 +#-----BEGIN CERTIFICATE----- +#MIIFIDCCAwigAwIBAgIBAjANBgkqhkiG9w0BAQsFADAiMQ0wCwYDVQQKDARUZXN0 +#MREwDwYDVQQDDAhUZXN0Um9vdDAeFw0xNTA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WGTgAzxFuSHJoZytBIye/eFWZrjHMTYblWpfsXOi77Sv1c0YoPx0Dpz4XXh +9Hdbo6M1evu2hWjVrSaVcWBikjDTXHuOQhToeycT5qrLNUIs2+kf//1Mj/wE2AUW +2qiT2zvyURf/3McRlxSs2FrnrTj6F7+9S5KEDZYgfRfuMaZWV16kDdLLR+hFFORq +SqFA2re86KpgWUxKOwzvJjn8y4z+ecM1NPU6EdPm5/79vIlqxdBbormEnbRT0R/A +9v2Aioj4qgSPXYNKke2Q8PYKuxoB16S7PMTB4TjKA4th2BirvO9+GKrfYdEfZBAE +6SV9w7sQ4BFVKeZWh4C/lSDF diff --git a/jdk/test/sun/security/provider/certpath/OCSP/ocsp-good-witharchcut.resp b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-good-witharchcut.resp new file mode 100644 index 00000000000..610c63a9bc7 --- /dev/null +++ b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-good-witharchcut.resp @@ -0,0 +1,320 @@ +#OCSP Response Data: +# OCSP Response Status: successful (0x0) +# Response Type: Basic OCSP Response +# Version: 1 (0x0) +# Responder Id: O = Test, CN = TestOCSP +# Produced At: Feb 28 00:44:43 2015 GMT +# Responses: +# Certificate ID: +# Hash Algorithm: sha1 +# Issuer Name Hash: 1056578B741813261FD9712ADA60077FF7C61E8F +# Issuer Key Hash: 9BF984066AFCD2EB0893FBE4EE2FD8C1C2897AA7 +# Serial Number: 1500 +# Cert Status: good +# This Update: Feb 28 00:44:43 2015 GMT +# Response Single Extensions: +# OCSP Archive Cutoff: +# Feb 19 14:00:00 2015 GMT +# +# Response Extensions: +# OCSP Nonce: +# 0410AC8B4F37A9FC4A780725B40C10737187 +# Signature Algorithm: sha1WithRSAEncryption +# 34:89:04:55:0d:5d:78:0a:ad:19:50:11:eb:34:dc:49:9a:a8: +# 5d:e6:c1:ff:a9:83:54:6f:3e:30:87:6a:78:c9:d1:09:e9:b9: +# af:27:08:a9:9e:57:62:ab:b7:27:f2:81:61:f4:44:df:46:01: +# 32:e7:eb:c6:f2:8d:fc:55:a4:58:84:60:ac:e2:f2:f1:de:05: +# f2:5f:b3:bc:9e:83:7d:e3:d4:58:71:01:b8:c0:ae:cf:e3:07: +# 23:7a:88:03:d2:c8:45:cd:07:ee:d6:81:31:81:7e:bd:e3:f4: +# 7a:fe:c1:49:99:b1:d9:0d:73:d4:47:b7:2d:14:63:d0:87:23: +# ec:a6:46:86:f6:98:4e:97:d7:93:dc:77:9f:a0:b5:0d:1a:14: +# 08:33:4c:70:34:ba:d5:1c:21:31:fb:3b:e0:78:33:32:11:70: +# d2:7a:3c:e4:62:3c:50:cd:d5:11:5f:cc:99:52:2b:6b:75:43: +# aa:e2:42:a5:d6:a7:4d:09:43:61:13:5b:b7:6a:eb:85:e1:9f: +# 3b:bf:49:fe:b0:54:4c:16:3a:3b:cc:3c:6c:82:08:08:2f:bf: +# dc:e6:7e:d3:58:41:1d:2c:cd:a7:f7:64:30:66:0c:b8:06:e6: +# df:99:10:37:fc:3a:ff:9a:05:37:01:ee:75:6a:ff:58:04:c7: +# 85:19:e6:48 +#Certificate: +# Data: +# Version: 3 (0x2) +# Serial Number: 257 (0x101) +# Signature Algorithm: sha256WithRSAEncryption +# Issuer: O=Test, CN=TestIntCA +# Validity +# Not Before: Feb 24 01:22:24 2015 GMT +# Not After : Feb 24 01:22:24 2016 GMT +# Subject: O=Test, CN=TestOCSP +# Subject Public Key Info: +# Public Key Algorithm: rsaEncryption +# Public-Key: (2048 bit) +# Modulus: +# 00:d2:5c:ae:11:f6:c6:ae:97:ba:31:ed:2b:b6:e1: +# c7:58:03:e5:9b:ee:78:53:cb:33:a5:15:fd:c6:49: +# 16:83:0e:c8:21:7d:cf:a8:eb:18:31:32:0a:62:0c: +# 4e:c7:a5:a5:75:9d:db:72:90:e3:5a:ae:53:0a:1b: +# 59:3f:bd:3a:67:b1:bf:98:64:a4:85:f0:97:10:8b: +# 0e:7e:7b:5e:d4:32:ab:b5:ef:c3:de:22:c0:11:90: +# c8:37:e4:48:b0:5e:fc:1a:2c:7a:85:2b:a6:bd:18: +# 64:08:d3:e3:b8:d8:ab:2e:b5:d8:e8:12:2e:58:45: +# 69:ac:56:94:62:e3:c2:c4:3c:08:ea:b3:bb:a4:89: +# 7e:fb:84:5e:95:49:6f:b9:33:66:1a:c2:7f:36:55: +# 18:a7:21:e4:1b:75:c0:e8:c9:02:1b:9c:f1:8b:b1: +# 58:b0:8c:da:5c:24:a5:f4:a5:36:52:1c:76:d3:5a: +# 71:ee:f0:c8:4b:65:58:0b:d6:d6:6c:23:3b:d0:8f: +# f5:3a:66:d4:f4:fd:34:90:c2:35:a1:6d:70:49:39: +# a6:71:3d:0d:7c:85:d3:d1:f5:6e:30:05:42:a1:88: +# ab:94:1f:25:f2:76:85:57:cb:77:b6:9e:a3:03:26: +# ff:b1:47:71:67:20:75:8d:83:10:17:6c:9a:93:4b: +# f6:31 +# Exponent: 65537 (0x10001) +# X509v3 extensions: +# X509v3 Subject Key Identifier: +# 58:78:83:0E:47:61:C2:C9:E0:77:A7:FE:AD:9C:A4:5F:00:E8:A6:6C +# X509v3 Authority Key Identifier: +# keyid:9B:F9:84:06:6A:FC:D2:EB:08:93:FB:E4:EE:2F:D8:C1:C2:89:7A:A7 +# +# X509v3 Key Usage: critical +# Digital Signature +# X509v3 Extended Key Usage: +# OCSP Signing +# OCSP No Check: +# +# Signature Algorithm: sha256WithRSAEncryption +# 55:13:0c:0b:4a:35:14:25:ef:36:48:59:86:07:e8:c0:cd:d0: +# 9c:19:d1:36:63:85:d1:f0:46:ff:af:39:37:80:bd:3e:c4:88: +# fa:66:2d:57:08:97:1b:20:00:37:30:38:14:cf:ff:5d:01:c4: +# e0:06:aa:82:c9:64:3f:ed:89:1e:da:2a:02:c5:1d:4f:8b:d0: +# 15:f3:26:43:b1:a8:09:f7:1e:d4:0f:37:bd:50:6c:cd:b1:8b: +# a7:77:1a:e9:95:ec:fc:45:31:36:e4:23:c6:63:5e:64:61:ac: +# a9:a3:a8:7c:26:f5:91:57:aa:0d:51:d3:df:ad:29:d3:ef:58: +# ab:74:2f:81:dc:9e:97:35:0d:94:88:0f:34:5d:b7:80:ed:49: +# 2a:39:f4:c9:51:b8:8d:8d:db:e6:ec:04:39:ba:69:55:67:24: +# fe:8f:26:f1:1c:62:0c:ad:95:dc:de:5c:7b:6c:0e:e9:d4:fe: +# e3:cf:9e:d1:5d:da:aa:f9:17:8d:92:ab:2d:54:67:05:c2:7a: +# 51:84:72:c9:ab:f0:32:6b:86:f3:1f:c4:93:3b:9b:8d:73:12: +# 4f:58:2d:59:43:32:1d:0a:0c:a5:58:59:da:ce:9d:12:b4:d3: +# 4f:29:98:dc:a5:44:bd:93:23:65:ad:19:30:ab:72:44:15:48: +# a0:7a:9e:ea:d5:f5:9a:9e:fa:70:32:aa:51:b3:04:b6:91:c4: +# b8:d7:61:ae:c0:41:ec:5a:93:b4:62:bc:09:c4:04:d8:d4:33: +# 09:f9:63:20:d5:01:ed:b9:60:47:14:77:d1:f7:c5:41:3b:3b: +# e7:5d:73:d9:ad:ad:95:20:9c:40:1f:e4:47:0a:f6:54:bb:b8: +# 09:63:00:49:db:2e:7c:2a:79:96:86:1b:96:3b:54:97:48:b4: +# 39:46:f2:27:ef:8c:96:46:cd:af:8e:55:70:9d:6c:8f:d1:1a: +# 4c:fa:e8:90:a4:29:10:04:d1:bf:b2:de:04:28:2a:af:ae:dd: +# df:a6:f9:4a:66:19:76:7a:aa:cf:b0:68:c3:ef:83:3b:7b:e9: +# 6f:12:97:1d:db:1e:2a:da:07:03:d0:ba:c1:87:02:cd:59:be: +# b4:21:22:3b:d8:5d:7d:b4:a3:c7:2a:56:3e:09:6c:6b:6f:54: +# 22:03:bb:b2:d7:98:8a:2f:51:ec:fa:7d:3e:dc:c8:6f:db:2a: +# 6f:46:56:2e:08:b9:41:81:d8:58:a4:6e:2a:c8:46:db:63:52: +# 38:c6:45:1a:6a:a3:04:3e:48:0e:84:3d:29:47:8b:80:fc:ee: +# b4:c8:12:f0:03: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VG4jY3b5uwEObppVWck/o8m8RxiDK2V3N5ce2wO6dT+48+e0V3aqvkXjZKrLVRn +#BcJ6UYRyyavwMmuG8x/EkzubjXMST1gtWUMyHQoMpVhZ2s6dErTTTymY3KVEvZMj +#Za0ZMKtyRBVIoHqe6tX1mp76cDKqUbMEtpHEuNdhrsBB7FqTtGK8CcQE2NQzCflj +#INUB7blgRxR30ffFQTs7511z2a2tlSCcQB/kRwr2VLu4CWMASdsufCp5loYbljtU +#l0i0OUbyJ++MlkbNr45VcJ1sj9EaTProkKQpEATRv7LeBCgqr67d36b5SmYZdnqq +#z7Bow++DO3vpbxKXHdseKtoHA9C6wYcCzVm+tCEiO9hdfbSjxypWPglsa29UIgO7 +#steYii9R7Pp9PtzIb9sqb0ZWLgi5QYHYWKRuKshG22NSOMZFGmqjBD5IDoQ9KUeL +#gPzutMgS8APve0gtlICiUcMUkn5Xg81WfpuNxcI= +#-----END CERTIFICATE----- +#Certificate: +# Data: +# Version: 3 (0x2) +# Serial Number: 2 (0x2) +# Signature Algorithm: sha256WithRSAEncryption +# Issuer: O=Test, CN=TestRoot +# Validity +# Not Before: Feb 24 00:59:51 2015 GMT +# Not After : Feb 13 00:59:51 2017 GMT +# Subject: O=Test, CN=TestIntCA +# Subject Public Key Info: +# Public Key Algorithm: rsaEncryption +# Public-Key: (4096 bit) +# Modulus: +# 00:bf:0a:29:02:54:00:97:c3:81:e6:33:89:74:03: +# cc:a7:f4:8d:54:17:36:48:97:6a:32:4e:b8:87:6d: +# 62:8e:87:7f:91:64:3b:75:d5:3d:93:19:17:d2:00: +# d8:db:c3:91:7c:35:23:59:d4:29:a3:e1:da:28:66: +# 28:85:6b:d3:44:09:38:82:42:2f:23:ab:e6:1b:2f: +# 8c:c3:12:40:99:8d:2e:a6:95:16:9c:75:b1:07:bd: +# 76:f6:17:bc:a4:93:8f:9f:cd:eb:6d:1c:8c:5c:0c: +# 2a:8d:b8:71:2c:ed:ad:fe:7b:ed:3e:c3:e7:24:d4: +# ae:53:42:34:c5:82:f9:fa:15:71:ba:9e:16:a7:1e: +# c5:5c:a7:48:b3:26:f4:a9:34:71:84:b8:7b:77:a7: +# f1:a2:8e:f5:e8:cd:25:f9:63:89:b1:98:2a:8e:4d: +# da:9e:2d:d2:a5:96:ca:32:1e:e2:22:b1:0b:b9:0f: +# 98:0a:ae:08:2f:a8:fe:90:2f:d8:0d:16:79:2d:c8: +# 62:22:69:f3:18:2b:a9:c7:d1:85:f7:5d:d5:ab:44: +# 6f:91:9a:1a:86:22:0b:7e:57:97:98:6a:bd:bb:55: +# 1e:e6:44:62:18:0b:af:a4:3e:ba:a7:5f:f1:a6:28: +# 5c:fe:df:19:9a:cd:39:e3:9a:5e:bc:aa:49:0c:22: +# 24:b7:1c:d4:21:99:0b:c4:48:95:b8:de:ad:4c:e1: +# 39:e8:34:5d:c6:0c:4f:2c:22:c8:e8:cd:19:b7:d3: +# 8f:d3:cd:76:76:0f:b1:bb:0a:45:be:9d:5f:2a:5d: +# 51:1c:47:79:bc:c9:d1:bc:30:33:ae:2d:db:27:b9: +# 1b:ff:2c:cb:b2:af:7d:e5:a6:9b:6f:23:98:7e:76: +# 74:45:5f:41:15:73:c1:9c:f5:88:c6:8f:ca:9b:78: +# 70:ee:8b:ba:d1:bc:60:4f:29:76:6d:28:2f:3b:09: +# e6:47:53:49:04:15:67:1d:af:0d:51:f8:43:92:c8: +# ab:ea:f0:09:9e:47:87:2e:62:d8:91:6e:40:de:ac: +# 1b:e1:6a:47:41:c3:7d:cf:90:e0:e9:34:80:d0:56: +# 9a:92:83:18:0a:c4:61:b7:60:3d:9a:4c:db:61:0a: +# d0:d0:71:f1:ee:de:11:ad:fa:ee:4b:8f:fe:15:ed: +# 6d:e4:b0:ba:70:9c:30:ea:52:4d:31:a4:95:35:a1: +# 1c:d9:15:9f:9c:ab:06:50:eb:ae:d4:bb:17:74:27: +# 44:b9:35:fa:15:61:e1:13:f6:1e:46:88:9c:d3:67: +# ca:bc:a5:7c:db:b9:7e:23:1c:24:77:fa:84:8f:38: +# 7f:2a:42:d5:49:e0:33:09:5d:29:28:2f:93:33:20: +# f9:cf:21 +# Exponent: 65537 (0x10001) +# X509v3 extensions: +# X509v3 Subject Key Identifier: +# 9B:F9:84:06:6A:FC:D2:EB:08:93:FB:E4:EE:2F:D8:C1:C2:89:7A:A7 +# X509v3 Authority Key Identifier: +# keyid:12:B9:C3:48:79:ED:7D:30:C9:78:78:61:94:58:37:07:40:76:38:18 +# +# X509v3 Basic Constraints: critical +# CA:TRUE +# X509v3 Key Usage: +# Certificate Sign, CRL Sign +# Signature Algorithm: sha256WithRSAEncryption +# 79:28:d5:46:92:1f:6b:25:de:b0:1e:e2:44:d3:7b:a3:4a:6e: +# 05:43:dd:85:47:4d:ca:d0:d9:43:65:34:38:a0:c2:6c:fb:49: +# 85:6d:f3:dc:10:8c:73:37:49:22:c3:87:dd:28:8a:b0:b2:2c: +# a3:9c:f6:15:4d:98:39:95:a1:21:72:36:ff:04:67:e5:ba:3e: +# bd:5e:d4:81:ac:f4:1c:f5:ab:8d:dd:73:e9:37:d9:d2:80:39: +# 5b:f5:ec:fe:9c:56:ec:10:f7:86:42:17:d1:f1:4b:c5:38:fe: +# 0e:85:2c:6e:ac:6f:52:e5:a8:b9:fe:af:f5:dc:35:0a:74:f8: +# 72:4f:51:d5:95:f4:fe:8f:fa:3f:d5:d2:1f:44:3b:63:60:4a: +# e2:99:37:bf:09:40:32:6c:ea:3c:61:85:77:bc:63:6e:11:f9: +# 41:5f:cb:4c:99:39:2a:37:66:79:4d:5a:7e:93:91:53:33:ce: +# b1:c0:1c:68:97:2e:5a:e1:66:59:41:52:07:cf:4a:02:24:54: +# dd:01:97:2f:f1:85:db:50:9c:3b:16:95:d2:08:ca:f6:93:9a: +# 01:33:36:40:7c:39:e3:df:f8:7b:a7:b5:ea:60:06:a5:74:3a: +# dc:ea:36:08:6b:c1:59:03:01:77:17:0e:6b:e1:9a:48:68:06: +# 31:03:28:0b:cb:dd:61:93:80:0c:f1:16:e4:87:26:86:72:b4: +# 12:32:7b:f7:85:59:9a:e3:1c:c4:d8:6e:55:a9:7e:c5:ce:8b: +# be:d2:bf:57:34:62:83:f1:d0:3a:73:e1:75:e1:f4:77:5b:a3: +# a3:35:7a:fb:b6:85:68:d5:ad:26:95:71:60:62:92:30:d3:5c: +# 7b:8e:42:14:e8:7b:27:13:e6:aa:cb:35:42:2c:db:e9:1f:ff: +# fd:4c:8f:fc:04:d8:05:16:da:a8:93:db:3b:f2:51:17:ff:dc: +# c7:11:97:14:ac:d8:5a:e7:ad:38:fa:17:bf:bd:4b:92:84:0d: +# 96:20:7d:17:ee:31:a6:56:57:5e:a4:0d:d2:cb:47:e8:45:14: +# e4:6a:4a:a1:40:da:b7:bc:e8:aa:60:59:4c:4a:3b:0c:ef:26: +# 39:fc:cb:8c:fe:79:c3:35:34:f5:3a:11:d3:e6:e7:fe:fd:bc: +# 89:6a:c5:d0:5b:a2:b9:84:9d:b4:53:d1:1f:c0:f6:fd:80:8a: +# 88:f8:aa:04:8f:5d:83:4a:91:ed:90:f0:f6:0a:bb:1a:01:d7: +# a4:bb:3c:c4:c1:e1:38:ca:03:8b:61:d8:18:ab:bc:ef:7e:18: +# aa:df:61:d1:1f:64:10:04:e9:25:7d:c3:bb:10:e0:11:55:29: +# e6:56:87:80:bf:95:20:c5 +#-----BEGIN CERTIFICATE----- +#MIIFIDCCAwigAwIBAgIBAjANBgkqhkiG9w0BAQsFADAiMQ0wCwYDVQQKDARUZXN0 +#MREwDwYDVQQDDAhUZXN0Um9vdDAeFw0xNTAyMjQwMDU5NTFaFw0xNzAyMTMwMDU5 +#NTFaMCMxDTALBgNVBAoMBFRlc3QxEjAQBgNVBAMMCVRlc3RJbnRDQTCCAiIwDQYJ +#KoZIhvcNAQEBBQADggIPADCCAgoCggIBAL8KKQJUAJfDgeYziXQDzKf0jVQXNkiX +#ajJOuIdtYo6Hf5FkO3XVPZMZF9IA2NvDkXw1I1nUKaPh2ihmKIVr00QJOIJCL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R+hFFORqSqFA2re86KpgWUxK +OwzvJjn8y4z+ecM1NPU6EdPm5/79vIlqxdBbormEnbRT0R/A9v2Aioj4qgSPXYNK +ke2Q8PYKuxoB16S7PMTB4TjKA4th2BirvO9+GKrfYdEfZBAE6SV9w7sQ4BFVKeZW +h4C/lSDF diff --git a/jdk/test/sun/security/provider/certpath/OCSP/ocsp-good-withnext.resp b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-good-withnext.resp new file mode 100644 index 00000000000..eebbd219486 --- /dev/null +++ b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-good-withnext.resp @@ -0,0 +1,317 @@ +#OCSP Response Data: +# OCSP Response Status: successful (0x0) +# Response Type: Basic OCSP Response +# Version: 1 (0x0) +# Responder Id: O = Test, CN = TestOCSP +# Produced At: Feb 28 00:42:58 2015 GMT +# Responses: +# Certificate ID: +# Hash Algorithm: sha1 +# Issuer Name Hash: 1056578B741813261FD9712ADA60077FF7C61E8F +# Issuer Key Hash: 9BF984066AFCD2EB0893FBE4EE2FD8C1C2897AA7 +# Serial Number: 1500 +# Cert Status: good +# This Update: Feb 28 00:42:58 2015 GMT +# Next Update: Mar 1 00:42:58 2015 GMT +# +# Response Extensions: +# OCSP Nonce: +# 04100F63A02D306A7951078F9E6F4C7A8A53 +# Signature Algorithm: sha1WithRSAEncryption +# 49:b4:7f:24:29:9a:31:30:16:7d:23:74:53:83:e9:4c:db:08: +# 09:20:c9:78:ea:3d:a5:df:25:fd:4e:de:88:24:35:0b:fa:6f: +# 88:b0:6f:6a:92:c6:73:29:4d:1e:70:8c:e3:b2:42:df:f5:d2: +# 0a:a1:4b:bb:77:af:97:07:05:d6:ec:6b:87:8d:ff:23:95:22: +# 58:41:9f:15:70:44:33:4a:1e:0a:50:bb:17:56:dc:19:ef:a8: +# 20:3f:71:8e:f2:04:4c:80:22:01:0b:ab:34:df:3d:ff:2e:04: +# 0f:80:66:b2:bf:d0:9c:bf:73:39:18:06:bd:46:0e:0e:78:f1: +# 40:bb:8c:59:23:0c:67:3c:bb:a9:bb:14:d9:39:fe:e8:44:87: +# ae:39:98:a3:36:83:8f:20:ad:35:c7:36:58:c7:03:78:37:6d: +# 6a:a0:5f:7d:87:6f:4f:37:04:3f:d1:fd:e4:c1:e1:70:07:4a: +# c6:69:fa:7f:1d:82:1b:1d:b1:fa:d3:9c:82:42:f5:38:cf:4b: +# 85:9b:fd:f2:4b:d1:81:7e:fc:70:41:f4:3a:7d:66:40:6b:c5: +# 76:47:2a:f1:79:ff:a0:6f:13:6b:13:fe:86:c3:cd:6b:08:28: +# 1f:64:c1:b1:23:1d:01:b0:aa:15:81:23:5b:ee:65:00:1d:ef: +# 46:45:9c:1f +#Certificate: +# Data: +# Version: 3 (0x2) +# Serial Number: 257 (0x101) +# Signature Algorithm: sha256WithRSAEncryption +# Issuer: O=Test, CN=TestIntCA +# Validity +# Not Before: Feb 24 01:22:24 2015 GMT +# Not After : Feb 24 01:22:24 2016 GMT +# Subject: O=Test, CN=TestOCSP +# Subject Public Key Info: +# Public Key Algorithm: rsaEncryption +# Public-Key: (2048 bit) +# Modulus: +# 00:d2:5c:ae:11:f6:c6:ae:97:ba:31:ed:2b:b6:e1: +# c7:58:03:e5:9b:ee:78:53:cb:33:a5:15:fd:c6:49: +# 16:83:0e:c8:21:7d:cf:a8:eb:18:31:32:0a:62:0c: +# 4e:c7:a5:a5:75:9d:db:72:90:e3:5a:ae:53:0a:1b: +# 59:3f:bd:3a:67:b1:bf:98:64:a4:85:f0:97:10:8b: +# 0e:7e:7b:5e:d4:32:ab:b5:ef:c3:de:22:c0:11:90: +# c8:37:e4:48:b0:5e:fc:1a:2c:7a:85:2b:a6:bd:18: +# 64:08:d3:e3:b8:d8:ab:2e:b5:d8:e8:12:2e:58:45: +# 69:ac:56:94:62:e3:c2:c4:3c:08:ea:b3:bb:a4:89: +# 7e:fb:84:5e:95:49:6f:b9:33:66:1a:c2:7f:36:55: +# 18:a7:21:e4:1b:75:c0:e8:c9:02:1b:9c:f1:8b:b1: +# 58:b0:8c:da:5c:24:a5:f4:a5:36:52:1c:76:d3:5a: +# 71:ee:f0:c8:4b:65:58:0b:d6:d6:6c:23:3b:d0:8f: +# f5:3a:66:d4:f4:fd:34:90:c2:35:a1:6d:70:49:39: +# a6:71:3d:0d:7c:85:d3:d1:f5:6e:30:05:42:a1:88: +# ab:94:1f:25:f2:76:85:57:cb:77:b6:9e:a3:03:26: +# ff:b1:47:71:67:20:75:8d:83:10:17:6c:9a:93:4b: +# f6:31 +# Exponent: 65537 (0x10001) +# X509v3 extensions: +# X509v3 Subject Key Identifier: +# 58:78:83:0E:47:61:C2:C9:E0:77:A7:FE:AD:9C:A4:5F:00:E8:A6:6C +# X509v3 Authority Key Identifier: +# keyid:9B:F9:84:06:6A:FC:D2:EB:08:93:FB:E4:EE:2F:D8:C1:C2:89:7A:A7 +# +# X509v3 Key Usage: critical +# Digital Signature +# X509v3 Extended Key Usage: +# OCSP Signing +# OCSP No Check: +# +# Signature Algorithm: sha256WithRSAEncryption +# 55:13:0c:0b:4a:35:14:25:ef:36:48:59:86:07:e8:c0:cd:d0: +# 9c:19:d1:36:63:85:d1:f0:46:ff:af:39:37:80:bd:3e:c4:88: +# fa:66:2d:57:08:97:1b:20:00:37:30:38:14:cf:ff:5d:01:c4: +# e0:06:aa:82:c9:64:3f:ed:89:1e:da:2a:02:c5:1d:4f:8b:d0: +# 15:f3:26:43:b1:a8:09:f7:1e:d4:0f:37:bd:50:6c:cd:b1:8b: +# a7:77:1a:e9:95:ec:fc:45:31:36:e4:23:c6:63:5e:64:61:ac: +# a9:a3:a8:7c:26:f5:91:57:aa:0d:51:d3:df:ad:29:d3:ef:58: +# ab:74:2f:81:dc:9e:97:35:0d:94:88:0f:34:5d:b7:80:ed:49: +# 2a:39:f4:c9:51:b8:8d:8d:db:e6:ec:04:39:ba:69:55:67:24: +# fe:8f:26:f1:1c:62:0c:ad:95:dc:de:5c:7b:6c:0e:e9:d4:fe: +# e3:cf:9e:d1:5d:da:aa:f9:17:8d:92:ab:2d:54:67:05:c2:7a: +# 51:84:72:c9:ab:f0:32:6b:86:f3:1f:c4:93:3b:9b:8d:73:12: +# 4f:58:2d:59:43:32:1d:0a:0c:a5:58:59:da:ce:9d:12:b4:d3: +# 4f:29:98:dc:a5:44:bd:93:23:65:ad:19:30:ab:72:44:15:48: +# a0:7a:9e:ea:d5:f5:9a:9e:fa:70:32:aa:51:b3:04:b6:91:c4: +# b8:d7:61:ae:c0:41:ec:5a:93:b4:62:bc:09:c4:04:d8:d4:33: +# 09:f9:63:20:d5:01:ed:b9:60:47:14:77:d1:f7:c5:41:3b:3b: +# e7:5d:73:d9:ad:ad:95:20:9c:40:1f:e4:47:0a:f6:54:bb:b8: +# 09:63:00:49:db:2e:7c:2a:79:96:86:1b:96:3b:54:97:48:b4: +# 39:46:f2:27:ef:8c:96:46:cd:af:8e:55:70:9d:6c:8f:d1:1a: +# 4c:fa:e8:90:a4:29:10:04:d1:bf:b2:de:04:28:2a:af:ae:dd: +# df:a6:f9:4a:66:19:76:7a:aa:cf:b0:68:c3:ef:83:3b:7b:e9: +# 6f:12:97:1d:db:1e:2a:da:07:03:d0:ba:c1:87:02:cd:59:be: +# b4:21:22:3b:d8:5d:7d:b4:a3:c7:2a:56:3e:09:6c:6b:6f:54: +# 22:03:bb:b2:d7:98:8a:2f:51:ec:fa:7d:3e:dc:c8:6f:db:2a: +# 6f:46:56:2e:08:b9:41:81:d8:58:a4:6e:2a:c8:46:db:63:52: +# 38:c6:45:1a:6a:a3:04:3e:48:0e:84:3d:29:47:8b:80:fc:ee: +# b4:c8:12:f0:03:ef:7b:48:2d:94:80:a2:51:c3:14:92:7e:57: +# 83:cd:56:7e:9b:8d:c5:c2 +#-----BEGIN CERTIFICATE----- +#MIIEOTCCAiGgAwIBAgICAQEwDQYJKoZIhvcNAQELBQAwIzENMAsGA1UECgwEVGVz +#dDESMBAGA1UEAwwJVGVzdEludENBMB4XDTE1MDIyNDAxMjIyNFoXDTE2MDIyNDAx +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FQTs7511z2a2tlSCcQB/kRwr2VLu4CWMASdsufCp5loYbljtU +#l0i0OUbyJ++MlkbNr45VcJ1sj9EaTProkKQpEATRv7LeBCgqr67d36b5SmYZdnqq +#z7Bow++DO3vpbxKXHdseKtoHA9C6wYcCzVm+tCEiO9hdfbSjxypWPglsa29UIgO7 +#steYii9R7Pp9PtzIb9sqb0ZWLgi5QYHYWKRuKshG22NSOMZFGmqjBD5IDoQ9KUeL +#gPzutMgS8APve0gtlICiUcMUkn5Xg81WfpuNxcI= +#-----END CERTIFICATE----- +#Certificate: +# Data: +# Version: 3 (0x2) +# Serial Number: 2 (0x2) +# Signature Algorithm: sha256WithRSAEncryption +# Issuer: O=Test, CN=TestRoot +# Validity +# Not Before: Feb 24 00:59:51 2015 GMT +# Not After : Feb 13 00:59:51 2017 GMT +# Subject: O=Test, CN=TestIntCA +# Subject Public Key Info: +# Public Key Algorithm: rsaEncryption +# Public-Key: (4096 bit) +# Modulus: +# 00:bf:0a:29:02:54:00:97:c3:81:e6:33:89:74:03: +# cc:a7:f4:8d:54:17:36:48:97:6a:32:4e:b8:87:6d: +# 62:8e:87:7f:91:64:3b:75:d5:3d:93:19:17:d2:00: +# d8:db:c3:91:7c:35:23:59:d4:29:a3:e1:da:28:66: +# 28:85:6b:d3:44:09:38:82:42:2f:23:ab:e6:1b:2f: +# 8c:c3:12:40:99:8d:2e:a6:95:16:9c:75:b1:07:bd: +# 76:f6:17:bc:a4:93:8f:9f:cd:eb:6d:1c:8c:5c:0c: +# 2a:8d:b8:71:2c:ed:ad:fe:7b:ed:3e:c3:e7:24:d4: +# ae:53:42:34:c5:82:f9:fa:15:71:ba:9e:16:a7:1e: +# c5:5c:a7:48:b3:26:f4:a9:34:71:84:b8:7b:77:a7: +# f1:a2:8e:f5:e8:cd:25:f9:63:89:b1:98:2a:8e:4d: +# da:9e:2d:d2:a5:96:ca:32:1e:e2:22:b1:0b:b9:0f: +# 98:0a:ae:08:2f:a8:fe:90:2f:d8:0d:16:79:2d:c8: +# 62:22:69:f3:18:2b:a9:c7:d1:85:f7:5d:d5:ab:44: +# 6f:91:9a:1a:86:22:0b:7e:57:97:98:6a:bd:bb:55: +# 1e:e6:44:62:18:0b:af:a4:3e:ba:a7:5f:f1:a6:28: +# 5c:fe:df:19:9a:cd:39:e3:9a:5e:bc:aa:49:0c:22: +# 24:b7:1c:d4:21:99:0b:c4:48:95:b8:de:ad:4c:e1: +# 39:e8:34:5d:c6:0c:4f:2c:22:c8:e8:cd:19:b7:d3: +# 8f:d3:cd:76:76:0f:b1:bb:0a:45:be:9d:5f:2a:5d: +# 51:1c:47:79:bc:c9:d1:bc:30:33:ae:2d:db:27:b9: +# 1b:ff:2c:cb:b2:af:7d:e5:a6:9b:6f:23:98:7e:76: +# 74:45:5f:41:15:73:c1:9c:f5:88:c6:8f:ca:9b:78: +# 70:ee:8b:ba:d1:bc:60:4f:29:76:6d:28:2f:3b:09: +# e6:47:53:49:04:15:67:1d:af:0d:51:f8:43:92:c8: +# ab:ea:f0:09:9e:47:87:2e:62:d8:91:6e:40:de:ac: +# 1b:e1:6a:47:41:c3:7d:cf:90:e0:e9:34:80:d0:56: +# 9a:92:83:18:0a:c4:61:b7:60:3d:9a:4c:db:61:0a: +# d0:d0:71:f1:ee:de:11:ad:fa:ee:4b:8f:fe:15:ed: +# 6d:e4:b0:ba:70:9c:30:ea:52:4d:31:a4:95:35:a1: +# 1c:d9:15:9f:9c:ab:06:50:eb:ae:d4:bb:17:74:27: +# 44:b9:35:fa:15:61:e1:13:f6:1e:46:88:9c:d3:67: +# ca:bc:a5:7c:db:b9:7e:23:1c:24:77:fa:84:8f:38: +# 7f:2a:42:d5:49:e0:33:09:5d:29:28:2f:93:33:20: +# f9:cf:21 +# Exponent: 65537 (0x10001) +# X509v3 extensions: +# X509v3 Subject Key Identifier: +# 9B:F9:84:06:6A:FC:D2:EB:08:93:FB:E4:EE:2F:D8:C1:C2:89:7A:A7 +# X509v3 Authority Key Identifier: +# keyid:12:B9:C3:48:79:ED:7D:30:C9:78:78:61:94:58:37:07:40:76:38:18 +# +# X509v3 Basic Constraints: critical +# CA:TRUE +# X509v3 Key Usage: +# Certificate Sign, CRL Sign +# Signature Algorithm: sha256WithRSAEncryption +# 79:28:d5:46:92:1f:6b:25:de:b0:1e:e2:44:d3:7b:a3:4a:6e: +# 05:43:dd:85:47:4d:ca:d0:d9:43:65:34:38:a0:c2:6c:fb:49: +# 85:6d:f3:dc:10:8c:73:37:49:22:c3:87:dd:28:8a:b0:b2:2c: +# a3:9c:f6:15:4d:98:39:95:a1:21:72:36:ff:04:67:e5:ba:3e: +# bd:5e:d4:81:ac:f4:1c:f5:ab:8d:dd:73:e9:37:d9:d2:80:39: +# 5b:f5:ec:fe:9c:56:ec:10:f7:86:42:17:d1:f1:4b:c5:38:fe: +# 0e:85:2c:6e:ac:6f:52:e5:a8:b9:fe:af:f5:dc:35:0a:74:f8: +# 72:4f:51:d5:95:f4:fe:8f:fa:3f:d5:d2:1f:44:3b:63:60:4a: +# e2:99:37:bf:09:40:32:6c:ea:3c:61:85:77:bc:63:6e:11:f9: +# 41:5f:cb:4c:99:39:2a:37:66:79:4d:5a:7e:93:91:53:33:ce: +# b1:c0:1c:68:97:2e:5a:e1:66:59:41:52:07:cf:4a:02:24:54: +# dd:01:97:2f:f1:85:db:50:9c:3b:16:95:d2:08:ca:f6:93:9a: +# 01:33:36:40:7c:39:e3:df:f8:7b:a7:b5:ea:60:06:a5:74:3a: +# dc:ea:36:08:6b:c1:59:03:01:77:17:0e:6b:e1:9a:48:68:06: +# 31:03:28:0b:cb:dd:61:93:80:0c:f1:16:e4:87:26:86:72:b4: +# 12:32:7b:f7:85:59:9a:e3:1c:c4:d8:6e:55:a9:7e:c5:ce:8b: +# be:d2:bf:57:34:62:83:f1:d0:3a:73:e1:75:e1:f4:77:5b:a3: +# a3:35:7a:fb:b6:85:68:d5:ad:26:95:71:60:62:92:30:d3:5c: +# 7b:8e:42:14:e8:7b:27:13:e6:aa:cb:35:42:2c:db:e9:1f:ff: +# fd:4c:8f:fc:04:d8:05:16:da:a8:93:db:3b:f2:51:17:ff:dc: +# c7:11:97:14:ac:d8:5a:e7:ad:38:fa:17:bf:bd:4b:92:84:0d: +# 96:20:7d:17:ee:31:a6:56:57:5e:a4:0d:d2:cb:47:e8:45:14: +# e4:6a:4a:a1:40:da:b7:bc:e8:aa:60:59:4c:4a:3b:0c:ef:26: +# 39:fc:cb:8c:fe:79:c3:35:34:f5:3a:11:d3:e6:e7:fe:fd:bc: +# 89:6a:c5:d0:5b:a2:b9:84:9d:b4:53:d1:1f:c0:f6:fd:80:8a: +# 88:f8:aa:04:8f:5d:83:4a:91:ed:90:f0:f6:0a:bb:1a:01:d7: +# a4:bb:3c:c4:c1:e1:38:ca:03:8b:61:d8:18:ab:bc:ef:7e:18: +# aa:df:61:d1:1f:64:10:04:e9:25:7d:c3:bb:10:e0:11:55:29: +# e6:56:87:80:bf:95:20:c5 +#-----BEGIN CERTIFICATE----- +#MIIFIDCCAwigAwIBAgIBAjANBgkqhkiG9w0BAQsFADAiMQ0wCwYDVQQKDARUZXN0 +#MREwDwYDVQQDDAhUZXN0Um9vdDAeFw0xNTAyMjQwMDU5NTFaFw0xNzAyMTMwMDU5 +#NTFaMCMxDTALBgNVBAoMBFRlc3QxEjAQBgNVBAMMCVRlc3RJbnRDQTCCAiIwDQYJ +#KoZIhvcNAQEBBQADggIPADCCAgoCggIBAL8KKQJUAJfDgeYziXQDzKf0jVQXNkiX +#ajJOuIdtYo6Hf5FkO3XVPZMZF9IA2NvDkXw1I1nUKaPh2ihmKIVr00QJOIJCLyOr +#5hsvjMMSQJmNLqaVFpx1sQe9dvYXvKSTj5/N620cjFwMKo24cSztrf577T7D5yTU +#rlNCNMWC+foVcbqeFqcexVynSLMm9Kk0cYS4e3en8aKO9ejNJfljibGYKo5N2p4t +#0qWWyjIe4iKxC7kPmAquCC+o/pAv2A0WeS3IYiJp8xgrqcfRhfdd1atEb5GaGoYi +#C35Xl5hqvbt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2RWfnKsGUOuu1LsXdCdEuTX6FWHhE/YeRoic02fKvKV827l+ +Ixwkd/qEjzh/KkLVSeAzCV0pKC+TMyD5zyECAwEAAaNgMF4wHQYDVR0OBBYEFJv5 +hAZq/NLrCJP75O4v2MHCiXqnMB8GA1UdIwQYMBaAFBK5w0h57X0wyXh4YZRYNwdA +djgYMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBCwUA +A4ICAQB5KNVGkh9rJd6wHuJE03ujSm4FQ92FR03K0NlDZTQ4oMJs+0mFbfPcEIxz +N0kiw4fdKIqwsiyjnPYVTZg5laEhcjb/BGfluj69XtSBrPQc9auN3XPpN9nSgDlb +9ez+nFbsEPeGQhfR8UvFOP4OhSxurG9S5ai5/q/13DUKdPhyT1HVlfT+j/o/1dIf +RDtjYErimTe/CUAybOo8YYV3vGNuEflBX8tMmTkqN2Z5TVp+k5FTM86xwBxoly5a +4WZZQVIHz0oCJFTdAZcv8YXbUJw7FpXSCMr2k5oBMzZAfDnj3/h7p7XqYAaldDrc +6jYIa8FZAwF3Fw5r4ZpIaAYxAygLy91hk4AM8RbkhyaGcrQSMnv3hVma4xzE2G5V +qX7Fzou+0r9XNGKD8dA6c+F14fR3W6OjNXr7toVo1a0mlXFgYpIw01x7jkIU6Hsn +E+aqyzVCLNvpH//9TI/8BNgFFtqok9s78lEX/9zHEZcUrNha5604+he/vUuShA2W +IH0X7jGmVldepA3Sy0foRRTkakqhQNq3vOiqYFlMSjsM7yY5/MuM/nnDNTT1OhHT +5uf+/byJasXQW6K5hJ20U9EfwPb9gIqI+KoEj12DSpHtkPD2CrsaAdekuzzEweE4 +ygOLYdgYq7zvfhiq32HRH2QQBOklfcO7EOARVSnmVoeAv5UgxQ== diff --git a/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-bad-sr-tag.resp b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-bad-sr-tag.resp new file mode 100644 index 00000000000..3244266e5c4 --- /dev/null +++ b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-bad-sr-tag.resp @@ -0,0 +1,60 @@ +# This is an invalid OCSP response and cannot be displayed using openssl's +# ocsp utility. Below is an asn1parse of the BasicOCSPResponse. The bytes +# normally corresponding to a nextUpdate field have been changed from +# [CONTEXT 0] to an OCTET_STRING (see offset 170 below) +# +# 0:d=0 hl=4 l= 528 cons: SEQUENCE +# 4:d=1 hl=3 l= 249 cons: SEQUENCE +# 7:d=2 hl=2 l= 36 cons: cont [ 1 ] +# 9:d=3 hl=2 l= 34 cons: SEQUENCE +# 11:d=4 hl=2 l= 13 cons: SET +# 13:d=5 hl=2 l= 11 cons: SEQUENCE +# 15:d=6 hl=2 l= 3 prim: OBJECT :organizationName +# 20:d=6 hl=2 l= 4 prim: UTF8STRING :Test +# 26:d=4 hl=2 l= 17 cons: SET +# 28:d=5 hl=2 l= 15 cons: SEQUENCE +# 30:d=6 hl=2 l= 3 prim: OBJECT :commonName +# 35:d=6 hl=2 l= 8 prim: UTF8STRING :TestOCSP +# 45:d=2 hl=2 l= 15 prim: GENERALIZEDTIME :20150303165544Z +# 62:d=2 hl=3 l= 154 cons: SEQUENCE +# 65:d=3 hl=3 l= 151 cons: SEQUENCE +# 68:d=4 hl=2 l= 59 cons: SEQUENCE +# 70:d=5 hl=2 l= 9 cons: SEQUENCE +# 72:d=6 hl=2 l= 5 prim: OBJECT :sha1 +# 79:d=6 hl=2 l= 0 prim: NULL +# 81:d=5 hl=2 l= 20 prim: OCTET STRING [HEX DUMP]:1056578B741813261FD9712ADA60077FF7C61E8F +# 103:d=5 hl=2 l= 20 prim: OCTET STRING [HEX DUMP]:9BF984066AFCD2EB0893FBE4EE2FD8C1C2897AA7 +# 125:d=5 hl=2 l= 2 prim: INTEGER :1500 +# 129:d=4 hl=2 l= 22 cons: cont [ 1 ] +# 131:d=5 hl=2 l= 15 prim: GENERALIZEDTIME :20150219155030Z +# 148:d=5 hl=2 l= 3 cons: cont [ 0 ] +# 150:d=6 hl=2 l= 1 prim: ENUMERATED :01 +# 153:d=4 hl=2 l= 15 prim: GENERALIZEDTIME :20150303165544Z +# 170:d=4 hl=2 l= 17 prim: OCTET STRING [HEX DUMP]:180F32303135303330343136353534345A +# 189:d=4 hl=2 l= 28 cons: cont [ 1 ] +# 191:d=5 hl=2 l= 26 cons: SEQUENCE +# 193:d=6 hl=2 l= 24 cons: SEQUENCE +# 195:d=7 hl=2 l= 3 prim: OBJECT :Invalidity Date +# 200:d=7 hl=2 l= 17 prim: OCTET STRING [HEX DUMP]:180F32303135303231393134303030305A +# 219:d=2 hl=2 l= 35 cons: cont [ 1 ] +# 221:d=3 hl=2 l= 33 cons: SEQUENCE +# 223:d=4 hl=2 l= 31 cons: SEQUENCE +# 225:d=5 hl=2 l= 9 prim: OBJECT :OCSP Nonce +# 236:d=5 hl=2 l= 18 prim: OCTET STRING [HEX DUMP]:0410381EF873C4A3B4C64B22873751071B53 +# 256:d=1 hl=2 l= 13 cons: SEQUENCE +# 258:d=2 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption +# 269:d=2 hl=2 l= 0 prim: NULL +# 271:d=1 hl=4 l= 257 prim: BIT STRING + +MIICLgoBAKCCAicwggIjBgkrBgEFBQcwAQEEggIUMIICEDCB+aEkMCIxDTALBgNV +BAoMBFRlc3QxETAPBgNVBAMMCFRlc3RPQ1NQGA8yMDE1MDMwMzE2NTU0NFowgZow +gZcwOzAJBgUrDgMCGgUABBQQVleLdBgTJh/ZcSraYAd/98YejwQUm/mEBmr80usI +k/vk7i/YwcKJeqcCAhUAoRYYDzIwMTUwMjE5MTU1MDMwWqADCgEBGA8yMDE1MDMw +MzE2NTU0NFoEERgPMjAxNTAzMDQxNjU1NDRaoRwwGjAYBgNVHRgEERgPMjAxNTAy +MTkxNDAwMDBaoSMwITAfBgkrBgEFBQcwAQIEEgQQOB74c8SjtMZLIoc3UQcbUzAN +BgkqhkiG9w0BAQUFAAOCAQEAbcY28K9+oXtDfNb2yxlzauMaeEoD477ouC7DIwCb +TgpkcjGCTjmvwg4A3sG95Z02x1xuW48XK2YkFytsBmdcfZvEnoK/WqG+qd9Aiytf +NoecsMjF8MyatHcJdQ+jq59jPWAqMGWCPmPVZ6TxHF5Ag2DAU5aL5sAjY2zvxYnl +Uc+FShl4K6Nk+mSSfu6ji8hkUEPx5rU1H0jBomMm4GMyNkxVj3NkOKSCxNWi/1Oe +utUk8Eir8Krqfd7yOn0flfroHZ2I0zf95VduxvVCsN7pgAf8Q1BAkbuq/8JRNrDr +a0kHSpO7QAv6iE7YT/SsHN5MDjtRJ780VEggV3td56R37g== diff --git a/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-nocerts.resp b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-nocerts.resp new file mode 100644 index 00000000000..5f41b69d4d3 --- /dev/null +++ b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-nocerts.resp @@ -0,0 +1,53 @@ +#OCSP Response Data: +# OCSP Response Status: successful (0x0) +# Response Type: Basic OCSP Response +# Version: 1 (0x0) +# Responder Id: O = Test, CN = TestOCSP +# Produced At: Mar 3 16:55:44 2015 GMT +# Responses: +# Certificate ID: +# Hash Algorithm: sha1 +# Issuer Name Hash: 1056578B741813261FD9712ADA60077FF7C61E8F +# Issuer Key Hash: 9BF984066AFCD2EB0893FBE4EE2FD8C1C2897AA7 +# Serial Number: 1500 +# Cert Status: revoked +# Revocation Time: Feb 19 15:50:30 2015 GMT +# Revocation Reason: keyCompromise (0x1) +# This Update: Mar 3 16:55:44 2015 GMT +# Next Update: Mar 4 16:55:44 2015 GMT +# Response Single Extensions: +# Invalidity Date: +# Feb 19 14:00:00 2015 GMT +# +# Response Extensions: +# OCSP Nonce: +# 0410381EF873C4A3B4C64B22873751071B53 +# Signature Algorithm: sha1WithRSAEncryption +# 6d:c6:36:f0:af:7e:a1:7b:43:7c:d6:f6:cb:19:73:6a:e3:1a: +# 78:4a:03:e3:be:e8:b8:2e:c3:23:00:9b:4e:0a:64:72:31:82: +# 4e:39:af:c2:0e:00:de:c1:bd:e5:9d:36:c7:5c:6e:5b:8f:17: +# 2b:66:24:17:2b:6c:06:67:5c:7d:9b:c4:9e:82:bf:5a:a1:be: +# a9:df:40:8b:2b:5f:36:87:9c:b0:c8:c5:f0:cc:9a:b4:77:09: +# 75:0f:a3:ab:9f:63:3d:60:2a:30:65:82:3e:63:d5:67:a4:f1: +# 1c:5e:40:83:60:c0:53:96:8b:e6:c0:23:63:6c:ef:c5:89:e5: +# 51:cf:85:4a:19:78:2b:a3:64:fa:64:92:7e:ee:a3:8b:c8:64: +# 50:43:f1:e6:b5:35:1f:48:c1:a2:63:26:e0:63:32:36:4c:55: +# 8f:73:64:38:a4:82:c4:d5:a2:ff:53:9e:ba:d5:24:f0:48:ab: +# f0:aa:ea:7d:de:f2:3a:7d:1f:95:fa:e8:1d:9d:88:d3:37:fd: +# e5:57:6e:c6:f5:42:b0:de:e9:80:07:fc:43:50:40:91:bb:aa: +# ff:c2:51:36:b0:eb:6b:49:07:4a:93:bb:40:0b:fa:88:4e:d8: +# 4f:f4:ac:1c:de:4c:0e:3b:51:27:bf:34:54:48:20:57:7b:5d: +# e7:a4:77:ee + +MIICLgoBAKCCAicwggIjBgkrBgEFBQcwAQEEggIUMIICEDCB+aEkMCIxDTALBgNV +BAoMBFRlc3QxETAPBgNVBAMMCFRlc3RPQ1NQGA8yMDE1MDMwMzE2NTU0NFowgZow +gZcwOzAJBgUrDgMCGgUABBQQVleLdBgTJh/ZcSraYAd/98YejwQUm/mEBmr80usI +k/vk7i/YwcKJeqcCAhUAoRYYDzIwMTUwMjE5MTU1MDMwWqADCgEBGA8yMDE1MDMw +MzE2NTU0NFqgERgPMjAxNTAzMDQxNjU1NDRaoRwwGjAYBgNVHRgEERgPMjAxNTAy +MTkxNDAwMDBaoSMwITAfBgkrBgEFBQcwAQIEEgQQOB74c8SjtMZLIoc3UQcbUzAN +BgkqhkiG9w0BAQUFAAOCAQEAbcY28K9+oXtDfNb2yxlzauMaeEoD477ouC7DIwCb +TgpkcjGCTjmvwg4A3sG95Z02x1xuW48XK2YkFytsBmdcfZvEnoK/WqG+qd9Aiytf +NoecsMjF8MyatHcJdQ+jq59jPWAqMGWCPmPVZ6TxHF5Ag2DAU5aL5sAjY2zvxYnl +Uc+FShl4K6Nk+mSSfu6ji8hkUEPx5rU1H0jBomMm4GMyNkxVj3NkOKSCxNWi/1Oe +utUk8Eir8Krqfd7yOn0flfroHZ2I0zf95VduxvVCsN7pgAf8Q1BAkbuq/8JRNrDr +a0kHSpO7QAv6iE7YT/SsHN5MDjtRJ780VEggV3td56R37g== diff --git a/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-nonext-noinv.resp b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-nonext-noinv.resp new file mode 100644 index 00000000000..7a1563bf7e0 --- /dev/null +++ b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-nonext-noinv.resp @@ -0,0 +1,317 @@ +#OCSP Response Data: +# OCSP Response Status: successful (0x0) +# Response Type: Basic OCSP Response +# Version: 1 (0x0) +# Responder Id: O = Test, CN = TestOCSP +# Produced At: Feb 28 00:45:34 2015 GMT +# Responses: +# Certificate ID: +# Hash Algorithm: sha1 +# Issuer Name Hash: 1056578B741813261FD9712ADA60077FF7C61E8F +# Issuer Key Hash: 9BF984066AFCD2EB0893FBE4EE2FD8C1C2897AA7 +# Serial Number: 1500 +# Cert Status: revoked +# Revocation Time: Feb 19 15:50:30 2015 GMT +# This Update: Feb 28 00:45:34 2015 GMT +# +# Response Extensions: +# OCSP Nonce: +# 04103E7008EC23A3AF6407E2DBADF1824550 +# Signature Algorithm: sha1WithRSAEncryption +# 80:e7:3c:82:51:51:30:56:7c:9b:10:a3:14:62:86:b7:48:5f: +# c7:18:3a:d6:a1:63:f4:8b:83:dc:87:0f:41:39:89:b6:60:40: +# 11:5e:71:2a:dd:f0:c2:3d:bb:9a:9e:d5:05:c5:6a:6b:a1:02: +# ab:1d:24:94:ae:70:77:19:ba:08:87:05:39:1a:73:82:77:bd: +# f2:58:5b:a6:94:05:2e:2d:62:99:2d:ec:0a:cc:0c:89:5b:5d: +# 94:dc:08:b4:79:96:18:4e:79:13:cd:2e:44:02:b3:af:b2:1f: +# 66:99:2a:37:0a:7d:fb:1b:60:94:97:7a:68:dd:75:15:d3:97: +# 00:6e:dc:45:b4:92:06:38:26:ce:71:e4:5a:5c:cd:67:1d:f6: +# 4f:19:b1:51:83:8a:db:9a:cd:6b:63:a1:1f:ea:e5:23:62:20: +# 73:41:28:bd:e8:51:c7:8a:79:8e:6b:dd:33:a0:a0:db:e5:23: +# 59:a3:1d:84:48:f5:b2:20:1a:04:a2:ec:07:f6:1d:e5:06:1c: +# ab:81:49:f1:ea:69:f8:34:8f:59:2a:ee:7a:97:f8:cf:c5:55: +# 37:2b:fb:ab:8d:76:4f:48:94:16:34:3c:81:61:9a:ae:4b:b5: +# 2c:39:df:d8:77:d0:02:0c:0c:51:99:1b:37:8e:6b:3f:9d:96: +# 5a:09:4c:ae +#Certificate: +# Data: +# Version: 3 (0x2) +# Serial Number: 257 (0x101) +# Signature Algorithm: sha256WithRSAEncryption +# Issuer: O=Test, CN=TestIntCA +# Validity +# Not Before: Feb 24 01:22:24 2015 GMT +# Not After : Feb 24 01:22:24 2016 GMT +# Subject: O=Test, CN=TestOCSP +# Subject Public Key Info: +# Public Key Algorithm: rsaEncryption +# Public-Key: (2048 bit) +# Modulus: +# 00:d2:5c:ae:11:f6:c6:ae:97:ba:31:ed:2b:b6:e1: +# c7:58:03:e5:9b:ee:78:53:cb:33:a5:15:fd:c6:49: +# 16:83:0e:c8:21:7d:cf:a8:eb:18:31:32:0a:62:0c: +# 4e:c7:a5:a5:75:9d:db:72:90:e3:5a:ae:53:0a:1b: +# 59:3f:bd:3a:67:b1:bf:98:64:a4:85:f0:97:10:8b: +# 0e:7e:7b:5e:d4:32:ab:b5:ef:c3:de:22:c0:11:90: +# c8:37:e4:48:b0:5e:fc:1a:2c:7a:85:2b:a6:bd:18: +# 64:08:d3:e3:b8:d8:ab:2e:b5:d8:e8:12:2e:58:45: +# 69:ac:56:94:62:e3:c2:c4:3c:08:ea:b3:bb:a4:89: +# 7e:fb:84:5e:95:49:6f:b9:33:66:1a:c2:7f:36:55: +# 18:a7:21:e4:1b:75:c0:e8:c9:02:1b:9c:f1:8b:b1: +# 58:b0:8c:da:5c:24:a5:f4:a5:36:52:1c:76:d3:5a: +# 71:ee:f0:c8:4b:65:58:0b:d6:d6:6c:23:3b:d0:8f: +# f5:3a:66:d4:f4:fd:34:90:c2:35:a1:6d:70:49:39: +# a6:71:3d:0d:7c:85:d3:d1:f5:6e:30:05:42:a1:88: +# ab:94:1f:25:f2:76:85:57:cb:77:b6:9e:a3:03:26: +# ff:b1:47:71:67:20:75:8d:83:10:17:6c:9a:93:4b: +# f6:31 +# Exponent: 65537 (0x10001) +# X509v3 extensions: +# X509v3 Subject Key Identifier: +# 58:78:83:0E:47:61:C2:C9:E0:77:A7:FE:AD:9C:A4:5F:00:E8:A6:6C +# X509v3 Authority Key Identifier: +# keyid:9B:F9:84:06:6A:FC:D2:EB:08:93:FB:E4:EE:2F:D8:C1:C2:89:7A:A7 +# +# X509v3 Key Usage: critical +# Digital Signature +# X509v3 Extended Key Usage: +# OCSP Signing +# OCSP No Check: +# +# Signature Algorithm: sha256WithRSAEncryption +# 55:13:0c:0b:4a:35:14:25:ef:36:48:59:86:07:e8:c0:cd:d0: +# 9c:19:d1:36:63:85:d1:f0:46:ff:af:39:37:80:bd:3e:c4:88: +# fa:66:2d:57:08:97:1b:20:00:37:30:38:14:cf:ff:5d:01:c4: +# e0:06:aa:82:c9:64:3f:ed:89:1e:da:2a:02:c5:1d:4f:8b:d0: +# 15:f3:26:43:b1:a8:09:f7:1e:d4:0f:37:bd:50:6c:cd:b1:8b: +# a7:77:1a:e9:95:ec:fc:45:31:36:e4:23:c6:63:5e:64:61:ac: +# a9:a3:a8:7c:26:f5:91:57:aa:0d:51:d3:df:ad:29:d3:ef:58: +# ab:74:2f:81:dc:9e:97:35:0d:94:88:0f:34:5d:b7:80:ed:49: +# 2a:39:f4:c9:51:b8:8d:8d:db:e6:ec:04:39:ba:69:55:67:24: +# fe:8f:26:f1:1c:62:0c:ad:95:dc:de:5c:7b:6c:0e:e9:d4:fe: +# e3:cf:9e:d1:5d:da:aa:f9:17:8d:92:ab:2d:54:67:05:c2:7a: +# 51:84:72:c9:ab:f0:32:6b:86:f3:1f:c4:93:3b:9b:8d:73:12: +# 4f:58:2d:59:43:32:1d:0a:0c:a5:58:59:da:ce:9d:12:b4:d3: +# 4f:29:98:dc:a5:44:bd:93:23:65:ad:19:30:ab:72:44:15:48: +# a0:7a:9e:ea:d5:f5:9a:9e:fa:70:32:aa:51:b3:04:b6:91:c4: +# b8:d7:61:ae:c0:41:ec:5a:93:b4:62:bc:09:c4:04:d8:d4:33: +# 09:f9:63:20:d5:01:ed:b9:60:47:14:77:d1:f7:c5:41:3b:3b: +# e7:5d:73:d9:ad:ad:95:20:9c:40:1f:e4:47:0a:f6:54:bb:b8: +# 09:63:00:49:db:2e:7c:2a:79:96:86:1b:96:3b:54:97:48:b4: +# 39:46:f2:27:ef:8c:96:46:cd:af:8e:55:70:9d:6c:8f:d1:1a: +# 4c:fa:e8:90:a4:29:10:04:d1:bf:b2:de:04:28:2a:af:ae:dd: +# df:a6:f9:4a:66:19:76:7a:aa:cf:b0:68:c3:ef:83:3b:7b:e9: +# 6f:12:97:1d:db:1e:2a:da:07:03:d0:ba:c1:87:02:cd:59:be: +# b4:21:22:3b:d8:5d:7d:b4:a3:c7:2a:56:3e:09:6c:6b:6f:54: +# 22:03:bb:b2:d7:98:8a:2f:51:ec:fa:7d:3e:dc:c8:6f:db:2a: +# 6f:46:56:2e:08:b9:41:81:d8:58:a4:6e:2a:c8:46:db:63:52: +# 38:c6:45:1a:6a:a3:04:3e:48:0e:84:3d:29:47:8b:80:fc:ee: +# b4:c8:12:f0:03:ef:7b:48:2d:94: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VWck/o8m8RxiDK2V3N5ce2wO6dT+48+e0V3aqvkXjZKrLVRn +#BcJ6UYRyyavwMmuG8x/EkzubjXMST1gtWUMyHQoMpVhZ2s6dErTTTymY3KVEvZMj +#Za0ZMKtyRBVIoHqe6tX1mp76cDKqUbMEtpHEuNdhrsBB7FqTtGK8CcQE2NQzCflj +#INUB7blgRxR30ffFQTs7511z2a2tlSCcQB/kRwr2VLu4CWMASdsufCp5loYbljtU +#l0i0OUbyJ++MlkbNr45VcJ1sj9EaTProkKQpEATRv7LeBCgqr67d36b5SmYZdnqq +#z7Bow++DO3vpbxKXHdseKtoHA9C6wYcCzVm+tCEiO9hdfbSjxypWPglsa29UIgO7 +#steYii9R7Pp9PtzIb9sqb0ZWLgi5QYHYWKRuKshG22NSOMZFGmqjBD5IDoQ9KUeL +#gPzutMgS8APve0gtlICiUcMUkn5Xg81WfpuNxcI= +#-----END CERTIFICATE----- +#Certificate: +# Data: +# Version: 3 (0x2) +# Serial Number: 2 (0x2) +# Signature Algorithm: sha256WithRSAEncryption +# Issuer: O=Test, CN=TestRoot +# Validity +# Not Before: Feb 24 00:59:51 2015 GMT +# Not After : Feb 13 00:59:51 2017 GMT +# Subject: O=Test, CN=TestIntCA +# Subject Public Key Info: +# Public Key Algorithm: rsaEncryption +# Public-Key: (4096 bit) +# Modulus: +# 00:bf:0a:29:02:54:00:97:c3:81:e6:33:89:74:03: +# cc:a7:f4:8d:54:17:36:48:97:6a:32:4e:b8:87:6d: +# 62:8e:87:7f:91:64:3b:75:d5:3d:93:19:17:d2:00: +# d8:db:c3:91:7c:35:23:59:d4:29:a3:e1:da:28:66: +# 28:85:6b:d3:44:09:38:82:42:2f:23:ab:e6:1b:2f: +# 8c:c3:12:40:99:8d:2e:a6:95:16:9c:75:b1:07:bd: +# 76:f6:17:bc:a4:93:8f:9f:cd:eb:6d:1c:8c:5c:0c: +# 2a:8d:b8:71:2c:ed:ad:fe:7b:ed:3e:c3:e7:24:d4: +# ae:53:42:34:c5:82:f9:fa:15:71:ba:9e:16:a7:1e: +# c5:5c:a7:48:b3:26:f4:a9:34:71:84:b8:7b:77:a7: +# f1:a2:8e:f5:e8:cd:25:f9:63:89:b1:98:2a:8e:4d: +# da:9e:2d:d2:a5:96:ca:32:1e:e2:22:b1:0b:b9:0f: +# 98:0a:ae:08:2f:a8:fe:90:2f:d8:0d:16:79:2d:c8: +# 62:22:69:f3:18:2b:a9:c7:d1:85:f7:5d:d5:ab:44: +# 6f:91:9a:1a:86:22:0b:7e:57:97:98:6a:bd:bb:55: +# 1e:e6:44:62:18:0b:af:a4:3e:ba:a7:5f:f1:a6:28: +# 5c:fe:df:19:9a:cd:39:e3:9a:5e:bc:aa:49:0c:22: +# 24:b7:1c:d4:21:99:0b:c4:48:95:b8:de:ad:4c:e1: +# 39:e8:34:5d:c6:0c:4f:2c:22:c8:e8:cd:19:b7:d3: +# 8f:d3:cd:76:76:0f:b1:bb:0a:45:be:9d:5f:2a:5d: +# 51:1c:47:79:bc:c9:d1:bc:30:33:ae:2d:db:27:b9: +# 1b:ff:2c:cb:b2:af:7d:e5:a6:9b:6f:23:98:7e:76: +# 74:45:5f:41:15:73:c1:9c:f5:88:c6:8f:ca:9b:78: +# 70:ee:8b:ba:d1:bc:60:4f:29:76:6d:28:2f:3b:09: +# e6:47:53:49:04:15:67:1d:af:0d:51:f8:43:92:c8: +# ab:ea:f0:09:9e:47:87:2e:62:d8:91:6e:40:de:ac: +# 1b:e1:6a:47:41:c3:7d:cf:90:e0:e9:34:80:d0:56: +# 9a:92:83:18:0a:c4:61:b7:60:3d:9a:4c:db:61:0a: +# d0:d0:71:f1:ee:de:11:ad:fa:ee:4b:8f:fe:15:ed: +# 6d:e4:b0:ba:70:9c:30:ea:52:4d:31:a4:95:35:a1: +# 1c:d9:15:9f:9c:ab:06:50:eb:ae:d4:bb:17:74:27: +# 44:b9:35:fa:15:61:e1:13:f6:1e:46:88:9c:d3:67: +# ca:bc:a5:7c:db:b9:7e:23:1c:24:77:fa:84:8f:38: +# 7f:2a:42:d5:49:e0:33:09:5d:29:28:2f:93:33:20: +# f9:cf:21 +# Exponent: 65537 (0x10001) +# X509v3 extensions: +# X509v3 Subject Key Identifier: +# 9B:F9:84:06:6A:FC:D2:EB:08:93:FB:E4:EE:2F:D8:C1:C2:89:7A:A7 +# X509v3 Authority Key Identifier: +# keyid:12:B9:C3:48:79:ED:7D:30:C9:78:78:61:94:58:37:07:40:76:38:18 +# +# X509v3 Basic Constraints: critical +# CA:TRUE +# X509v3 Key Usage: +# Certificate Sign, CRL Sign +# Signature Algorithm: sha256WithRSAEncryption +# 79:28:d5:46:92:1f:6b:25:de:b0:1e:e2:44:d3:7b:a3:4a:6e: +# 05:43:dd:85:47:4d:ca:d0:d9:43:65:34:38:a0:c2:6c:fb:49: +# 85:6d:f3:dc:10:8c:73:37:49:22:c3:87:dd:28:8a:b0:b2:2c: +# a3:9c:f6:15:4d:98:39:95:a1:21:72:36:ff:04:67:e5:ba:3e: +# bd:5e:d4:81:ac:f4:1c:f5:ab:8d:dd:73:e9:37:d9:d2:80:39: +# 5b:f5:ec:fe:9c:56:ec:10:f7:86:42:17:d1:f1:4b:c5:38:fe: +# 0e:85:2c:6e:ac:6f:52:e5:a8:b9:fe:af:f5:dc:35:0a:74:f8: +# 72:4f:51:d5:95:f4:fe:8f:fa:3f:d5:d2:1f:44:3b:63:60:4a: +# e2:99:37:bf:09:40:32:6c:ea:3c:61:85:77:bc:63:6e:11:f9: +# 41:5f:cb:4c:99:39:2a:37:66:79:4d:5a:7e:93:91:53:33:ce: +# b1:c0:1c:68:97:2e:5a:e1:66:59:41:52:07:cf:4a:02:24:54: +# dd:01:97:2f:f1:85:db:50:9c:3b:16:95:d2:08:ca:f6:93:9a: +# 01:33:36:40:7c:39:e3:df:f8:7b:a7:b5:ea:60:06:a5:74:3a: +# dc:ea:36:08:6b:c1:59:03:01:77:17:0e:6b:e1:9a:48:68:06: +# 31:03:28:0b:cb:dd:61:93:80:0c:f1:16:e4:87:26:86:72:b4: +# 12:32:7b:f7:85:59:9a:e3:1c:c4:d8:6e:55:a9:7e:c5:ce:8b: +# be:d2:bf:57:34:62:83:f1:d0:3a:73:e1:75:e1:f4:77:5b:a3: +# a3:35:7a:fb:b6:85:68:d5:ad:26:95:71:60:62:92:30:d3:5c: +# 7b:8e:42:14:e8:7b:27:13:e6:aa:cb:35:42:2c:db:e9:1f:ff: +# fd:4c:8f:fc:04:d8:05:16:da:a8:93:db:3b:f2:51:17:ff:dc: +# c7:11:97:14:ac:d8:5a:e7:ad:38:fa:17:bf:bd:4b:92:84:0d: +# 96:20:7d:17:ee:31:a6:56:57:5e:a4:0d:d2:cb:47:e8:45:14: +# e4:6a:4a:a1:40:da:b7:bc:e8:aa:60:59:4c:4a:3b:0c:ef:26: +# 39:fc:cb:8c:fe:79:c3:35:34:f5:3a:11:d3:e6:e7:fe:fd:bc: +# 89:6a:c5:d0:5b:a2:b9:84:9d:b4:53:d1:1f:c0:f6:fd:80:8a: +# 88:f8:aa:04:8f:5d:83:4a:91:ed:90:f0:f6:0a:bb:1a:01:d7: +# a4:bb:3c:c4:c1:e1:38:ca:03:8b:61:d8:18:ab:bc:ef:7e:18: +# aa:df:61:d1:1f:64:10:04:e9:25:7d:c3:bb:10:e0:11:55:29: +# e6:56:87:80:bf:95:20:c5 +#-----BEGIN CERTIFICATE----- +#MIIFIDCCAwigAwIBAgIBAjANBgkqhkiG9w0BAQsFADAiMQ0wCwYDVQQKDARUZXN0 +#MREwDwYDVQQDDAhUZXN0Um9vdDAeFw0xNTAyMjQwMDU5NTFaFw0xNzAyMTMwMDU5 +#NTFaMCMxDTALBgNVBAoMBFRlc3QxEjAQBgNVBAMMCVRlc3RJbnRDQTCCAiIwDQYJ +#KoZIhvcNAQEBBQADggIPADCCAgoCggIBAL8KKQJUAJfDgeYziXQDzKf0jVQXNkiX +#ajJOuIdtYo6Hf5FkO3XVPZMZF9IA2NvDkXw1I1nUKaPh2ihmKIVr00QJOIJCLyOr +#5hsvjMMS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YSdtFPRH8D2/YCKiPiqBI9dg0qR7ZDw9gq7GgHXpLs8xMHhOMoD +i2HYGKu8734Yqt9h0R9kEATpJX3DuxDgEVUp5laHgL+VIMU= diff --git a/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-nonext-withinv.resp b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-nonext-withinv.resp new file mode 100644 index 00000000000..a4d12fc7d05 --- /dev/null +++ b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-nonext-withinv.resp @@ -0,0 +1,323 @@ +#OCSP Response Data: +# OCSP Response Status: successful (0x0) +# Response Type: Basic OCSP Response +# Version: 1 (0x0) +# Responder Id: O = Test, CN = TestOCSP +# Produced At: Feb 28 00:47:40 2015 GMT +# Responses: +# Certificate ID: +# Hash Algorithm: sha1 +# Issuer Name Hash: 1056578B741813261FD9712ADA60077FF7C61E8F +# Issuer Key Hash: 9BF984066AFCD2EB0893FBE4EE2FD8C1C2897AA7 +# Serial Number: 1500 +# Cert Status: revoked +# Revocation Time: Feb 19 15:50:30 2015 GMT +# Revocation Reason: keyCompromise (0x1) +# This Update: Feb 28 00:47:40 2015 GMT +# Response Single Extensions: +# Invalidity Date: +# Feb 19 14:00:00 2015 GMT +# +# Response Extensions: +# OCSP Nonce: +# 0410DB5B1C50F6601DC4533D159DB197D8AE +# Signature Algorithm: sha1WithRSAEncryption +# c0:41:55:17:3d:df:31:a4:f6:9b:2a:24:cd:05:43:b2:e5:15: +# fb:95:cf:19:a9:70:3b:58:d0:41:14:7d:b8:53:f3:ec:d5:ba: +# e1:de:f8:a0:f8:3a:0e:b0:5c:50:81:5b:05:a5:5e:10:6f:46: +# 8f:25:17:10:5c:33:7a:e8:70:6a:93:37:f7:75:4d:69:d3:3a: +# 51:56:38:07:cd:42:70:09:92:ae:e8:8e:d8:52:b0:e9:3f:64: +# c2:0a:98:63:15:0c:d7:36:90:72:9f:fb:ac:4c:4d:cb:92:ce: +# 87:54:b6:49:3b:a8:f5:9c:cd:9f:11:69:f1:af:68:c1:76:4a: +# c0:90:58:2e:81:e2:e9:28:af:83:06:c3:ae:34:95:ad:42:75: +# cd:7b:50:12:9c:3a:50:86:b4:36:36:ac:3f:27:2a:6f:06:31: +# cd:27:7f:f0:eb:8d:c2:e6:37:dd:39:03:e5:0e:a2:83:26:71: +# bf:dd:a6:4c:a0:fe:47:94:65:82:f3:27:89:78:e0:3b:a5:30: +# a6:12:9e:1d:0d:fc:c3:41:fc:53:29:e6:04:ab:c0:00:d2:2d: +# f8:13:d8:b9:e6:64:10:d2:a7:02:e7:3e:aa:ac:52:67:69:46: +# 3b:8f:a2:96:4f:b3:55:fc:e8:c1:90:61:71:f5:a0:c8:3c:b6: +# 48:60:c8:5c +#Certificate: +# Data: +# Version: 3 (0x2) +# Serial Number: 257 (0x101) +# Signature Algorithm: sha256WithRSAEncryption +# Issuer: O=Test, CN=TestIntCA +# Validity +# Not Before: Feb 24 01:22:24 2015 GMT +# Not After : Feb 24 01:22:24 2016 GMT +# Subject: O=Test, CN=TestOCSP +# Subject Public Key Info: +# Public Key Algorithm: rsaEncryption +# Public-Key: (2048 bit) +# Modulus: +# 00:d2:5c:ae:11:f6:c6:ae:97:ba:31:ed:2b:b6:e1: +# c7:58:03:e5:9b:ee:78:53:cb:33:a5:15:fd:c6:49: +# 16:83:0e:c8:21:7d:cf:a8:eb:18:31:32:0a:62:0c: +# 4e:c7:a5:a5:75:9d:db:72:90:e3:5a:ae:53:0a:1b: +# 59:3f:bd:3a:67:b1:bf:98:64:a4:85:f0:97:10:8b: +# 0e:7e:7b:5e:d4:32:ab:b5:ef:c3:de:22:c0:11:90: +# c8:37:e4:48:b0:5e:fc:1a:2c:7a:85:2b:a6:bd:18: +# 64:08:d3:e3:b8:d8:ab:2e:b5:d8:e8:12:2e:58:45: +# 69:ac:56:94:62:e3:c2:c4:3c:08:ea:b3:bb:a4:89: +# 7e:fb:84:5e:95:49:6f:b9:33:66:1a:c2:7f:36:55: +# 18:a7:21:e4:1b:75:c0:e8:c9:02:1b:9c:f1:8b:b1: +# 58:b0:8c:da:5c:24:a5:f4:a5:36:52:1c:76:d3:5a: +# 71:ee:f0:c8:4b:65:58:0b:d6:d6:6c:23:3b:d0:8f: +# f5:3a:66:d4:f4:fd:34:90:c2:35:a1:6d:70:49:39: +# a6:71:3d:0d:7c:85:d3:d1:f5:6e:30:05:42:a1:88: +# ab:94:1f:25:f2:76:85:57:cb:77:b6:9e:a3:03:26: +# ff:b1:47:71:67:20:75:8d:83:10:17:6c:9a:93:4b: +# f6:31 +# Exponent: 65537 (0x10001) +# X509v3 extensions: +# X509v3 Subject Key Identifier: +# 58:78:83:0E:47:61:C2:C9:E0:77:A7:FE:AD:9C:A4:5F:00:E8:A6:6C +# X509v3 Authority Key Identifier: +# keyid:9B:F9:84:06:6A:FC:D2:EB:08:93:FB:E4:EE:2F:D8:C1:C2:89:7A:A7 +# +# X509v3 Key Usage: critical +# Digital Signature +# X509v3 Extended Key Usage: +# OCSP Signing +# OCSP No Check: +# +# Signature Algorithm: sha256WithRSAEncryption +# 55:13:0c:0b:4a:35:14:25:ef:36:48:59:86:07:e8:c0:cd:d0: +# 9c:19:d1:36:63:85:d1:f0:46:ff:af:39:37:80:bd:3e:c4:88: +# fa:66:2d:57:08:97:1b:20:00:37:30:38:14:cf:ff:5d:01:c4: +# e0:06:aa:82:c9:64:3f:ed:89:1e:da:2a:02:c5:1d:4f:8b:d0: +# 15:f3:26:43:b1:a8:09:f7:1e:d4:0f:37:bd:50:6c:cd:b1:8b: +# a7:77:1a:e9:95:ec:fc:45:31:36:e4:23:c6:63:5e:64:61:ac: +# a9:a3:a8:7c:26:f5:91:57:aa:0d:51:d3:df:ad:29:d3:ef:58: +# ab:74:2f:81:dc:9e:97:35:0d:94:88:0f:34:5d:b7:80:ed:49: +# 2a:39:f4:c9:51:b8:8d:8d:db:e6:ec:04:39:ba:69:55:67:24: +# fe:8f:26:f1:1c:62:0c:ad:95:dc:de:5c:7b:6c:0e:e9:d4:fe: +# e3:cf:9e:d1:5d:da:aa:f9:17:8d:92:ab:2d:54:67:05:c2:7a: +# 51:84:72:c9:ab:f0:32:6b:86:f3:1f:c4:93:3b:9b:8d:73:12: +# 4f:58:2d:59:43:32:1d:0a:0c:a5:58:59:da:ce:9d:12:b4:d3: +# 4f:29:98:dc:a5:44:bd:93:23:65:ad:19:30:ab:72:44:15:48: +# a0:7a:9e:ea:d5:f5:9a:9e:fa:70:32:aa:51:b3:04:b6:91:c4: +# b8:d7:61:ae:c0:41:ec:5a:93:b4:62:bc:09:c4:04:d8:d4:33: +# 09:f9:63:20:d5:01:ed:b9:60:47:14:77:d1:f7:c5:41:3b:3b: +# e7:5d:73:d9:ad:ad:95:20:9c:40:1f:e4:47:0a:f6:54:bb:b8: +# 09:63:00:49:db:2e:7c:2a:79:96:86:1b:96:3b:54:97:48:b4: +# 39:46:f2:27:ef:8c:96:46:cd:af:8e:55:70:9d:6c:8f:d1:1a: +# 4c:fa:e8:90:a4:29:10:04:d1:bf:b2:de:04:28:2a:af:ae:dd: +# df:a6:f9:4a:66:19:76:7a:aa:cf:b0:68:c3:ef:83:3b:7b:e9: +# 6f:12:97:1d:db:1e:2a:da:07:03:d0:ba:c1:87:02:cd:59:be: +# b4:21:22:3b:d8:5d:7d:b4:a3:c7:2a:56:3e:09:6c:6b:6f:54: +# 22:03:bb:b2:d7:98:8a:2f:51:ec:fa:7d:3e:dc:c8:6f:db:2a: +# 6f:46:56:2e:08:b9:41:81:d8:58:a4:6e:2a:c8:46:db:63:52: +# 38:c6:45:1a:6a:a3:04:3e:48:0e:84:3d:29:47:8b:80:fc:ee: +# b4:c8:12:f0:03:ef:7b:48:2d:94:80:a2:51:c3:14:92:7e:57: +# 83:cd:56:7e:9b:8d:c5:c2 +#-----BEGIN CERTIFICATE----- +#MIIEOTCCAiGgAwIBAgICAQEwDQYJKoZIhvcNAQELBQAwIzENMAsGA1UECgwEVGVz +#dDESMBAGA1UEAwwJVGVzdEludENBMB4XDTE1MDIyND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QE2NQzCflj +#INUB7blgRxR30ffFQTs7511z2a2tlSCcQB/kRwr2VLu4CWMASdsufCp5loYbljtU +#l0i0OUbyJ++MlkbNr45VcJ1sj9EaTProkKQpEATRv7LeBCgqr67d36b5SmYZdnqq +#z7Bow++DO3vpbxKXHdseKtoHA9C6wYcCzVm+tCEiO9hdfbSjxypWPglsa29UIgO7 +#steYii9R7Pp9PtzIb9sqb0ZWLgi5QYHYWKRuKshG22NSOMZFGmqjBD5IDoQ9KUeL +#gPzutMgS8APve0gtlICiUcMUkn5Xg81WfpuNxcI= +#-----END CERTIFICATE----- +#Certificate: +# Data: +# Version: 3 (0x2) +# Serial Number: 2 (0x2) +# Signature Algorithm: sha256WithRSAEncryption +# Issuer: O=Test, CN=TestRoot +# Validity +# Not Before: Feb 24 00:59:51 2015 GMT +# Not After : Feb 13 00:59:51 2017 GMT +# Subject: O=Test, CN=TestIntCA +# Subject Public Key Info: +# Public Key Algorithm: rsaEncryption +# Public-Key: (4096 bit) +# Modulus: +# 00:bf:0a:29:02:54:00:97:c3:81:e6:33:89:74:03: +# cc:a7:f4:8d:54:17:36:48:97:6a:32:4e:b8:87:6d: +# 62:8e:87:7f:91:64:3b:75:d5:3d:93:19:17:d2:00: +# d8:db:c3:91:7c:35:23:59:d4:29:a3:e1:da:28:66: +# 28:85:6b:d3:44:09:38:82:42:2f:23:ab:e6:1b:2f: +# 8c:c3:12:40:99:8d:2e:a6:95:16:9c:75:b1:07:bd: +# 76:f6:17:bc:a4:93:8f:9f:cd:eb:6d:1c:8c:5c:0c: +# 2a:8d:b8:71:2c:ed:ad:fe:7b:ed:3e:c3:e7:24:d4: +# ae:53:42:34:c5:82:f9:fa:15:71:ba:9e:16:a7:1e: +# c5:5c:a7:48:b3:26:f4:a9:34:71:84:b8:7b:77:a7: +# f1:a2:8e:f5:e8:cd:25:f9:63:89:b1:98:2a:8e:4d: +# da:9e:2d:d2:a5:96:ca:32:1e:e2:22:b1:0b:b9:0f: +# 98:0a:ae:08:2f:a8:fe:90:2f:d8:0d:16:79:2d:c8: +# 62:22:69:f3:18:2b:a9:c7:d1:85:f7:5d:d5:ab:44: +# 6f:91:9a:1a:86:22:0b:7e:57:97:98:6a:bd:bb:55: +# 1e:e6:44:62:18:0b:af:a4:3e:ba:a7:5f:f1:a6:28: +# 5c:fe:df:19:9a:cd:39:e3:9a:5e:bc:aa:49:0c:22: +# 24:b7:1c:d4:21:99:0b:c4:48:95:b8:de:ad:4c:e1: +# 39:e8:34:5d:c6:0c:4f:2c:22:c8:e8:cd:19:b7:d3: +# 8f:d3:cd:76:76:0f:b1:bb:0a:45:be:9d:5f:2a:5d: +# 51:1c:47:79:bc:c9:d1:bc:30:33:ae:2d:db:27:b9: +# 1b:ff:2c:cb:b2:af:7d:e5:a6:9b:6f:23:98:7e:76: +# 74:45:5f:41:15:73:c1:9c:f5:88:c6:8f:ca:9b:78: +# 70:ee:8b:ba:d1:bc:60:4f:29:76:6d:28:2f:3b:09: +# e6:47:53:49:04:15:67:1d:af:0d:51:f8:43:92:c8: +# ab:ea:f0:09:9e:47:87:2e:62:d8:91:6e:40:de:ac: +# 1b:e1:6a:47:41:c3:7d:cf:90:e0:e9:34:80:d0:56: +# 9a:92:83:18:0a:c4:61:b7:60:3d:9a:4c:db:61:0a: +# d0:d0:71:f1:ee:de:11:ad:fa:ee:4b:8f:fe:15:ed: +# 6d:e4:b0:ba:70:9c:30:ea:52:4d:31:a4:95:35:a1: +# 1c:d9:15:9f:9c:ab:06:50:eb:ae:d4:bb:17:74:27: +# 44:b9:35:fa:15:61:e1:13:f6:1e:46:88:9c:d3:67: +# ca:bc:a5:7c:db:b9:7e:23:1c:24:77:fa:84:8f:38: +# 7f:2a:42:d5:49:e0:33:09:5d:29:28:2f:93:33:20: +# f9:cf:21 +# Exponent: 65537 (0x10001) +# X509v3 extensions: +# X509v3 Subject Key Identifier: +# 9B:F9:84:06:6A:FC:D2:EB:08:93:FB:E4:EE:2F:D8:C1:C2:89:7A:A7 +# X509v3 Authority Key Identifier: +# keyid:12:B9:C3:48:79:ED:7D:30:C9:78:78:61:94:58:37:07:40:76:38:18 +# +# X509v3 Basic Constraints: critical +# CA:TRUE +# X509v3 Key Usage: +# Certificate Sign, CRL Sign +# Signature Algorithm: sha256WithRSAEncryption +# 79:28:d5:46:92:1f:6b:25:de:b0:1e:e2:44:d3:7b:a3:4a:6e: +# 05:43:dd:85:47:4d:ca:d0:d9:43:65:34:38:a0:c2:6c:fb:49: +# 85:6d:f3:dc:10:8c:73:37:49:22:c3:87:dd:28:8a:b0:b2:2c: +# a3:9c:f6:15:4d:98:39:95:a1:21:72:36:ff:04:67:e5:ba:3e: +# bd:5e:d4:81:ac:f4:1c:f5:ab:8d:dd:73:e9:37:d9:d2:80:39: +# 5b:f5:ec:fe:9c:56:ec:10:f7:86:42:17:d1:f1:4b:c5:38:fe: +# 0e:85:2c:6e:ac:6f:52:e5:a8:b9:fe:af:f5:dc:35:0a:74:f8: +# 72:4f:51:d5:95:f4:fe:8f:fa:3f:d5:d2:1f:44:3b:63:60:4a: +# e2:99:37:bf:09:40:32:6c:ea:3c:61:85:77:bc:63:6e:11:f9: +# 41:5f:cb:4c:99:39:2a:37:66:79:4d:5a:7e:93:91:53:33:ce: +# b1:c0:1c:68:97:2e:5a:e1:66:59:41:52:07:cf:4a:02:24:54: +# dd:01:97:2f:f1:85:db:50:9c:3b:16:95:d2:08:ca:f6:93:9a: +# 01:33:36:40:7c:39:e3:df:f8:7b:a7:b5:ea:60:06:a5:74:3a: +# dc:ea:36:08:6b:c1:59:03:01:77:17:0e:6b:e1:9a:48:68:06: +# 31:03:28:0b:cb:dd:61:93:80:0c:f1:16:e4:87:26:86:72:b4: +# 12:32:7b:f7:85:59:9a:e3:1c:c4:d8:6e:55:a9:7e:c5:ce:8b: +# be:d2:bf:57:34:62:83:f1:d0:3a:73:e1:75:e1:f4:77:5b:a3: +# a3:35:7a:fb:b6:85:68:d5:ad:26:95:71:60:62:92:30:d3:5c: +# 7b:8e:42:14:e8:7b:27:13:e6:aa:cb:35:42:2c:db:e9:1f:ff: +# fd:4c:8f:fc:04:d8:05:16:da:a8:93:db:3b:f2:51:17:ff:dc: +# c7:11:97:14:ac:d8:5a:e7:ad:38:fa:17:bf:bd:4b:92:84:0d: +# 96:20:7d:17:ee:31:a6:56:57:5e:a4:0d:d2:cb:47:e8:45:14: +# e4:6a:4a:a1:40:da:b7:bc:e8:aa:60:59:4c:4a:3b:0c:ef:26: +# 39:fc:cb:8c:fe:79:c3:35:34:f5:3a:11:d3:e6:e7:fe:fd:bc: +# 89:6a:c5:d0:5b:a2:b9:84:9d:b4:53:d1:1f:c0:f6:fd:80:8a: +# 88:f8:aa:04:8f:5d:83:4a:91:ed:90:f0:f6:0a:bb:1a:01:d7: +# a4:bb:3c:c4:c1:e1:38:ca:03:8b:61:d8:18:ab:bc:ef:7e:18: +# aa:df:61:d1:1f:64:10:04:e9:25:7d:c3:bb:10:e0:11:55:29: +# e6:56:87:80:bf:95:20:c5 +#-----BEGIN CERTIFICATE----- +#MIIFIDCCAwigAwIBAgIBAjANBgkqhkiG9w0BAQsFADAiMQ0wCwYDVQQKDARUZXN0 +#MREwDwYDVQQDDAhUZXN0Um9vdDAeFw0xNTAyMjQwMDU5NTFaFw0xNzAyMTMwMDU5 +#NTFaMCMxDTALBgNVBAoMBFRlc3QxEjAQBgNVBAMMCVRlc3RJbnRDQTCCAiIwDQYJ +#KoZIhvcNAQEBBQADggIPADCCAgoCggIBAL8KKQJUAJfDgeYziXQDzKf0jVQXNkiX +#ajJOuIdtYo6Hf5FkO3XVPZMZF9IA2NvDkXw1I1nUKaPh2ihmKIVr00QJOIJCLyOr +#5hsvjMMSQJmNLqaVFpx1sQe9dvYXvKSTj5/N620cjFwMKo24cSztrf577T7D5yTU +#rlNCNMWC+foVcbqeFqcexVynSLMm9Kk0cYS4e3en8aKO9ejNJfljibGYKo5N2p4t +#0qWWyjIe4iKxC7kPmAquCC+o/pAv2A0WeS3IYiJp8xgrqcfRhfdd1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4C/lSDF diff --git a/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-sr-cont-reverse.resp b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-sr-cont-reverse.resp new file mode 100644 index 00000000000..a54259d86c1 --- /dev/null +++ b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-sr-cont-reverse.resp @@ -0,0 +1,61 @@ +# This is an invalid OCSP response and cannot be displayed using openssl's +# ocsp utility. Below is an asn1parse of the BasicOCSPResponse. In this +# case the singleExtensions field (offset 170) precedes the nextUpdate +# (offset 200). +# +# 0:d=0 hl=4 l= 528 cons: SEQUENCE +# 4:d=1 hl=3 l= 249 cons: SEQUENCE +# 7:d=2 hl=2 l= 36 cons: cont [ 1 ] +# 9:d=3 hl=2 l= 34 cons: SEQUENCE +# 11:d=4 hl=2 l= 13 cons: SET +# 13:d=5 hl=2 l= 11 cons: SEQUENCE +# 15:d=6 hl=2 l= 3 prim: OBJECT :organizationName +# 20:d=6 hl=2 l= 4 prim: UTF8STRING :Test +# 26:d=4 hl=2 l= 17 cons: SET +# 28:d=5 hl=2 l= 15 cons: SEQUENCE +# 30:d=6 hl=2 l= 3 prim: OBJECT :commonName +# 35:d=6 hl=2 l= 8 prim: UTF8STRING :TestOCSP +# 45:d=2 hl=2 l= 15 prim: GENERALIZEDTIME :20150303165544Z +# 62:d=2 hl=3 l= 154 cons: SEQUENCE +# 65:d=3 hl=3 l= 151 cons: SEQUENCE +# 68:d=4 hl=2 l= 59 cons: SEQUENCE +# 70:d=5 hl=2 l= 9 cons: SEQUENCE +# 72:d=6 hl=2 l= 5 prim: OBJECT :sha1 +# 79:d=6 hl=2 l= 0 prim: NULL +# 81:d=5 hl=2 l= 20 prim: OCTET STRING [HEX DUMP]:1056578B741813261FD9712ADA60077FF7C61E8F +# 103:d=5 hl=2 l= 20 prim: OCTET STRING [HEX DUMP]:9BF984066AFCD2EB0893FBE4EE2FD8C1C2897AA7 +# 125:d=5 hl=2 l= 2 prim: INTEGER :1500 +# 129:d=4 hl=2 l= 22 cons: cont [ 1 ] +# 131:d=5 hl=2 l= 15 prim: GENERALIZEDTIME :20150219155030Z +# 148:d=5 hl=2 l= 3 cons: cont [ 0 ] +# 150:d=6 hl=2 l= 1 prim: ENUMERATED :01 +# 153:d=4 hl=2 l= 15 prim: GENERALIZEDTIME :20150303165544Z +# 170:d=4 hl=2 l= 28 cons: cont [ 1 ] +# 172:d=5 hl=2 l= 26 cons: SEQUENCE +# 174:d=6 hl=2 l= 24 cons: SEQUENCE +# 176:d=7 hl=2 l= 3 prim: OBJECT :Invalidity Date +# 181:d=7 hl=2 l= 17 prim: OCTET STRING [HEX DUMP]:180F32303135303231393134303030305A +# 200:d=4 hl=2 l= 17 cons: cont [ 0 ] +# 202:d=5 hl=2 l= 15 prim: GENERALIZEDTIME :20150304165544Z +# 219:d=2 hl=2 l= 35 cons: cont [ 1 ] +# 221:d=3 hl=2 l= 33 cons: SEQUENCE +# 223:d=4 hl=2 l= 31 cons: SEQUENCE +# 225:d=5 hl=2 l= 9 prim: OBJECT :OCSP Nonce +# 236:d=5 hl=2 l= 18 prim: OCTET STRING [HEX DUMP]:0410381EF873C4A3B4C64B22873751071B53 +# 256:d=1 hl=2 l= 13 cons: SEQUENCE +# 258:d=2 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption +# 269:d=2 hl=2 l= 0 prim: NULL +# 271:d=1 hl=4 l= 257 prim: BIT STRING + +MIICLgoBAKCCAicwggIjBgkrBgEFBQcwAQEEggIUMIICEDCB+aEkMCIxDTALBgNV +BAoMBFRlc3QxETAPBgNVBAMMCFRlc3RPQ1NQGA8yMDE1MDMwMzE2NTU0NFowgZow +gZcwOzAJBgUrDgMCGgUABBQQVleLdBgTJh/ZcSraYAd/98YejwQUm/mEBmr80usI +k/vk7i/YwcKJeqcCAhUAoRYYDzIwMTUwMjE5MTU1MDMwWqADCgEBGA8yMDE1MDMw +MzE2NTU0NFqhHDAaMBgGA1UdGAQRGA8yMDE1MDIxOTE0MDAwMFqgERgPMjAxNTAz +MDQxNjU1NDRaoSMwITAfBgkrBgEFBQcwAQIEEgQQOB74c8SjtMZLIoc3UQcbUzAN +BgkqhkiG9w0BAQUFAAOCAQEAbcY28K9+oXtDfNb2yxlzauMaeEoD477ouC7DIwCb +TgpkcjGCTjmvwg4A3sG95Z02x1xuW48XK2YkFytsBmdcfZvEnoK/WqG+qd9Aiytf +NoecsMjF8MyatHcJdQ+jq59jPWAqMGWCPmPVZ6TxHF5Ag2DAU5aL5sAjY2zvxYnl +Uc+FShl4K6Nk+mSSfu6ji8hkUEPx5rU1H0jBomMm4GMyNkxVj3NkOKSCxNWi/1Oe +utUk8Eir8Krqfd7yOn0flfroHZ2I0zf95VduxvVCsN7pgAf8Q1BAkbuq/8JRNrDr +a0kHSpO7QAv6iE7YT/SsHN5MDjtRJ780VEggV3td56R37g== diff --git a/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-twonext.resp b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-twonext.resp new file mode 100644 index 00000000000..dc289c250f3 --- /dev/null +++ b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-twonext.resp @@ -0,0 +1,58 @@ +# This is an invalid OCSP response and cannot be displayed using openssl's +# ocsp utility. Below is an asn1parse of the BasicOCSPResponse. Additional +# bytes have been inserted into the SingleResponse which add a second +# nextUpdate field (beginning at offset 189) +# +# 0:d=0 hl=4 l= 517 cons: SEQUENCE +# 4:d=1 hl=3 l= 238 cons: SEQUENCE +# 7:d=2 hl=2 l= 36 cons: cont [ 1 ] +# 9:d=3 hl=2 l= 34 cons: SEQUENCE +# 11:d=4 hl=2 l= 13 cons: SET +# 13:d=5 hl=2 l= 11 cons: SEQUENCE +# 15:d=6 hl=2 l= 3 prim: OBJECT :organizationName +# 20:d=6 hl=2 l= 4 prim: UTF8STRING :Test +# 26:d=4 hl=2 l= 17 cons: SET +# 28:d=5 hl=2 l= 15 cons: SEQUENCE +# 30:d=6 hl=2 l= 3 prim: OBJECT :commonName +# 35:d=6 hl=2 l= 8 prim: UTF8STRING :TestOCSP +# 45:d=2 hl=2 l= 15 prim: GENERALIZEDTIME :20150303165544Z +# 62:d=2 hl=3 l= 143 cons: SEQUENCE +# 65:d=3 hl=3 l= 140 cons: SEQUENCE +# 68:d=4 hl=2 l= 59 cons: SEQUENCE +# 70:d=5 hl=2 l= 9 cons: SEQUENCE +# 72:d=6 hl=2 l= 5 prim: OBJECT :sha1 +# 79:d=6 hl=2 l= 0 prim: NULL +# 81:d=5 hl=2 l= 20 prim: OCTET STRING [HEX DUMP]:1056578B741813261FD9712ADA60077FF7C61E8F +# 103:d=5 hl=2 l= 20 prim: OCTET STRING [HEX DUMP]:9BF984066AFCD2EB0893FBE4EE2FD8C1C2897AA7 +# 125:d=5 hl=2 l= 2 prim: INTEGER :1500 +# 129:d=4 hl=2 l= 22 cons: cont [ 1 ] +# 131:d=5 hl=2 l= 15 prim: GENERALIZEDTIME :20150219155030Z +# 148:d=5 hl=2 l= 3 cons: cont [ 0 ] +# 150:d=6 hl=2 l= 1 prim: ENUMERATED :01 +# 153:d=4 hl=2 l= 15 prim: GENERALIZEDTIME :20150303165544Z +# 170:d=4 hl=2 l= 17 cons: cont [ 0 ] +# 172:d=5 hl=2 l= 15 prim: GENERALIZEDTIME :20150304165544Z +# 189:d=4 hl=2 l= 17 cons: cont [ 0 ] +# 191:d=5 hl=2 l= 15 prim: GENERALIZEDTIME :20150304165544Z +# 208:d=2 hl=2 l= 35 cons: cont [ 1 ] +# 210:d=3 hl=2 l= 33 cons: SEQUENCE +# 212:d=4 hl=2 l= 31 cons: SEQUENCE +# 214:d=5 hl=2 l= 9 prim: OBJECT :OCSP Nonce +# 225:d=5 hl=2 l= 18 prim: OCTET STRING [HEX DUMP]:0410381EF873C4A3B4C64B22873751071B53 +# 245:d=1 hl=2 l= 13 cons: SEQUENCE +# 247:d=2 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption +# 258:d=2 hl=2 l= 0 prim: NULL +# 260:d=1 hl=4 l= 257 prim: BIT STRING + +MIICIwoBAKCCAhwwggIYBgkrBgEFBQcwAQEEggIJMIICBTCB7qEkMCIxDTALBgNV +BAoMBFRlc3QxETAPBgNVBAMMCFRlc3RPQ1NQGA8yMDE1MDMwMzE2NTU0NFowgY8w +gYwwOzAJBgUrDgMCGgUABBQQVleLdBgTJh/ZcSraYAd/98YejwQUm/mEBmr80usI +k/vk7i/YwcKJeqcCAhUAoRYYDzIwMTUwMjE5MTU1MDMwWqADCgEBGA8yMDE1MDMw +MzE2NTU0NFqgERgPMjAxNTAzMDQxNjU1NDRaoBEYDzIwMTUwMzA0MTY1NTQ0WqEj +MCEwHwYJKwYBBQUHMAECBBIEEDge+HPEo7TGSyKHN1EHG1MwDQYJKoZIhvcNAQEF +BQADggEBAG3GNvCvfqF7Q3zW9ssZc2rjGnhKA+O+6LguwyMAm04KZHIxgk45r8IO +AN7BveWdNsdcbluPFytmJBcrbAZnXH2bxJ6Cv1qhvqnfQIsrXzaHnLDIxfDMmrR3 +CXUPo6ufYz1gKjBlgj5j1Wek8RxeQINgwFOWi+bAI2Ns78WJ5VHPhUoZeCujZPpk +kn7uo4vIZFBD8ea1NR9IwaJjJuBjMjZMVY9zZDikgsTVov9TnrrVJPBIq/Cq6n3e +8jp9H5X66B2diNM3/eVXbsb1QrDe6YAH/ENQQJG7qv/CUTaw62tJB0qTu0AL+ohO +2E/0rBzeTA47USe/NFRIIFd7Xeekd+4= diff --git a/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-withnext-noinv.resp b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-withnext-noinv.resp new file mode 100644 index 00000000000..3145186e581 --- /dev/null +++ b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-withnext-noinv.resp @@ -0,0 +1,319 @@ +#OCSP Response Data: +# OCSP Response Status: successful (0x0) +# Response Type: Basic OCSP Response +# Version: 1 (0x0) +# Responder Id: O = Test, CN = TestOCSP +# Produced At: Feb 28 00:46:08 2015 GMT +# Responses: +# Certificate ID: +# Hash Algorithm: sha1 +# Issuer Name Hash: 1056578B741813261FD9712ADA60077FF7C61E8F +# Issuer Key Hash: 9BF984066AFCD2EB0893FBE4EE2FD8C1C2897AA7 +# Serial Number: 1500 +# Cert Status: revoked +# Revocation Time: Feb 19 15:50:30 2015 GMT +# This Update: Feb 28 00:46:08 2015 GMT +# Next Update: Mar 1 00:46:08 2015 GMT +# +# Response Extensions: +# OCSP Nonce: +# 041024C5D6772FC53AE6DE208A1C1D6F0913 +# Signature Algorithm: sha1WithRSAEncryption +# a6:dd:66:77:7d:99:3a:0d:41:21:1a:d6:5a:67:8c:51:88:6f: +# 77:44:f8:fc:35:99:14:b9:ef:67:c1:fe:5e:36:a1:b8:78:93: +# 6e:c6:11:08:96:fc:a3:37:55:3c:b3:08:c5:d2:ce:c4:c8:59: +# 32:1b:05:7c:33:65:66:41:2e:71:2b:d0:25:8d:f4:91:ef:f1: +# c5:1e:16:55:6a:60:df:28:c8:3c:fe:44:74:4e:2f:80:36:58: +# 62:56:d4:9a:00:82:49:81:b6:d7:ce:0a:b2:70:ae:69:8f:38: +# 64:ff:c4:b4:52:34:ad:9d:50:d2:0a:d5:d0:93:2b:61:03:12: +# 05:28:4f:91:b7:4c:f5:26:c3:a6:76:f9:62:d4:42:e1:ea:c1: +# 13:e7:d8:a1:3a:49:fd:12:96:9d:c2:d0:45:fc:c1:fe:30:19: +# fe:ff:73:b4:e4:03:0b:dc:6f:bf:41:b2:fe:23:20:c9:02:d8: +# 11:3c:8b:f4:a3:07:3a:fe:c2:3d:d9:54:b2:b6:36:5b:3a:24: +# cb:f3:e8:a7:97:de:62:5c:80:79:0d:cd:68:73:31:c8:ba:bc: +# 7a:d3:26:04:2b:f0:08:45:ba:d3:21:2f:60:fc:c9:4b:24:8f: +# ff:e6:6c:11:81:69:87:5f:f9:28:b7:65:6b:f4:ee:f3:ed:6c: +# b4:c8:ae:0b +#Certificate: +# Data: +# Version: 3 (0x2) +# Serial Number: 257 (0x101) +# Signature Algorithm: sha256WithRSAEncryption +# Issuer: O=Test, CN=TestIntCA +# Validity +# Not Before: Feb 24 01:22:24 2015 GMT +# Not After : Feb 24 01:22:24 2016 GMT +# Subject: O=Test, CN=TestOCSP +# Subject Public Key Info: +# Public Key Algorithm: rsaEncryption +# Public-Key: (2048 bit) +# Modulus: +# 00:d2:5c:ae:11:f6:c6:ae:97:ba:31:ed:2b:b6:e1: +# c7:58:03:e5:9b:ee:78:53:cb:33:a5:15:fd:c6:49: +# 16:83:0e:c8:21:7d:cf:a8:eb:18:31:32:0a:62:0c: +# 4e:c7:a5:a5:75:9d:db:72:90:e3:5a:ae:53:0a:1b: +# 59:3f:bd:3a:67:b1:bf:98:64:a4:85:f0:97:10:8b: +# 0e:7e:7b:5e:d4:32:ab:b5:ef:c3:de:22:c0:11:90: +# c8:37:e4:48:b0:5e:fc:1a:2c:7a:85:2b:a6:bd:18: +# 64:08:d3:e3:b8:d8:ab:2e:b5:d8:e8:12:2e:58:45: +# 69:ac:56:94:62:e3:c2:c4:3c:08:ea:b3:bb:a4:89: +# 7e:fb:84:5e:95:49:6f:b9:33:66:1a:c2:7f:36:55: +# 18:a7:21:e4:1b:75:c0:e8:c9:02:1b:9c:f1:8b:b1: +# 58:b0:8c:da:5c:24:a5:f4:a5:36:52:1c:76:d3:5a: +# 71:ee:f0:c8:4b:65:58:0b:d6:d6:6c:23:3b:d0:8f: +# f5:3a:66:d4:f4:fd:34:90:c2:35:a1:6d:70:49:39: +# a6:71:3d:0d:7c:85:d3:d1:f5:6e:30:05:42:a1:88: +# ab:94:1f:25:f2:76:85:57:cb:77:b6:9e:a3:03:26: +# ff:b1:47:71:67:20:75:8d:83:10:17:6c:9a:93:4b: +# f6:31 +# Exponent: 65537 (0x10001) +# X509v3 extensions: +# X509v3 Subject Key Identifier: +# 58:78:83:0E:47:61:C2:C9:E0:77:A7:FE:AD:9C:A4:5F:00:E8:A6:6C +# X509v3 Authority Key Identifier: +# keyid:9B:F9:84:06:6A:FC:D2:EB:08:93:FB:E4:EE:2F:D8:C1:C2:89:7A:A7 +# +# X509v3 Key Usage: critical +# Digital Signature +# X509v3 Extended Key Usage: +# OCSP Signing +# OCSP No Check: +# +# Signature Algorithm: sha256WithRSAEncryption +# 55:13:0c:0b:4a:35:14:25:ef:36:48:59:86:07:e8:c0:cd:d0: +# 9c:19:d1:36:63:85:d1:f0:46:ff:af:39:37:80:bd:3e:c4:88: +# fa:66:2d:57:08:97:1b:20:00:37:30:38:14:cf:ff:5d:01:c4: +# e0:06:aa:82:c9:64:3f:ed:89:1e:da:2a:02:c5:1d:4f:8b:d0: +# 15:f3:26:43:b1:a8:09:f7:1e:d4:0f:37:bd:50:6c:cd:b1:8b: +# a7:77:1a:e9:95:ec:fc:45:31:36:e4:23:c6:63:5e:64:61:ac: +# a9:a3:a8:7c:26:f5:91:57:aa:0d:51:d3:df:ad:29:d3:ef:58: +# ab:74:2f:81:dc:9e:97:35:0d:94:88:0f:34:5d:b7:80:ed:49: +# 2a:39:f4:c9:51:b8:8d:8d:db:e6:ec:04:39:ba:69:55:67:24: +# fe:8f:26:f1:1c:62:0c:ad:95:dc:de:5c:7b:6c:0e:e9:d4:fe: +# e3:cf:9e:d1:5d:da:aa:f9:17:8d:92:ab:2d:54:67:05:c2:7a: +# 51:84:72:c9:ab:f0:32:6b:86:f3:1f:c4:93:3b:9b:8d:73:12: +# 4f:58:2d:59:43:32:1d:0a:0c:a5:58:59:da:ce:9d:12:b4:d3: +# 4f:29:98:dc:a5:44:bd:93:23:65:ad:19:30:ab:72:44:15:48: +# a0:7a:9e:ea:d5:f5:9a:9e:fa:70:32:aa:51:b3:04:b6:91:c4: +# b8:d7:61:ae:c0:41:ec:5a:93:b4:62:bc:09:c4:04:d8:d4:33: +# 09:f9:63:20:d5:01:ed:b9:60:47:14:77:d1:f7:c5:41:3b:3b: +# e7:5d:73:d9:ad:ad:95:20:9c:40:1f:e4:47:0a:f6:54:bb:b8: +# 09:63:00:49:db:2e:7c:2a:79:96:86:1b:96:3b:54:97:48:b4: +# 39:46:f2:27:ef:8c:96:46:cd:af:8e:55:70:9d:6c:8f:d1:1a: +# 4c:fa:e8:90:a4:29:10:04:d1:bf:b2:de:04:28:2a:af:ae:dd: +# df:a6:f9:4a:66:19:76:7a:aa:cf:b0:68:c3:ef:83:3b:7b:e9: +# 6f:12:97:1d:db:1e:2a:da:07:03:d0:ba:c1:87:02:cd:59:be: +# b4:21:22:3b:d8:5d:7d:b4:a3:c7:2a:56:3e:09:6c:6b:6f:54: +# 22:03:bb:b2:d7:98:8a:2f:51:ec:fa:7d:3e:dc:c8:6f:db:2a: +# 6f:46:56:2e:08:b9:41:81:d8:58:a4:6e:2a:c8:46:db:63:52: +# 38:c6:45:1a:6a:a3:04:3e:48:0e:84:3d:29:47:8b:80:fc:ee: +# b4:c8:12:f0:03:ef:7b:48:2d:94:80:a2:51:c3:14:92:7e:57: +# 83:cd:56:7e:9b:8d:c5:c2 +#-----BEGIN CERTIFICATE----- +#MIIEOTCCAiGgAwIBAgICAQEwDQYJKoZIhvcNAQELBQAwIzENMAsGA1UECgwEVGVz +#dDESMBAGA1UEAwwJVGVzdEludENBMB4XDTE1MDIyNDAxMjIyNFoXDTE2MDIyNDAx +#MjIyNFowIjENMAsGA1UECgwEVGVzdDERMA8GA1UEAwwIVGVzdE9DU1AwggEiMA0G +#CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDSXK4R9saul7ox7Su24cdYA+Wb7nhT +#yzOlFf3GSRaDDsghfc+o6xgxMgpiDE7HpaV1ndtykONarlMKG1k/vTpnsb+YZKSF +#8JcQiw5+e17UMqu178PeIsARkMg35EiwXvwaLHqFK6a9GGQI0+O42KsutdjoEi5Y +#RWmsVpRi48LEPAjqs7ukiX77hF6VSW+5M2Yawn82VRinIeQbdcDoyQIbnPGLsViw +#jNpcJKX0pTZSHHbTWnHu8MhLZVgL1tZsIzvQj/U6ZtT0/TSQwjWhbXBJOaZxPQ18 +#hdPR9W4wBUKhiKuUHyXydoVXy3e2nqMDJv+xR3FnIHWNgxAXbJqTS/YxAgMBAAGj +#eDB2MB0GA1UdDgQWBBRYeIMOR2HCyeB3p/6tnKRfAOimbDAfBgNVHSMEGDAWgBSb +#+YQGavzS6wiT++TuL9jBwol6pzAOBgNVHQ8BAf8EBAMCB4AwEwYDVR0lBAwwCgYI +#KwYBBQUHAwkwDwYJKwYBBQUHMAEFBAIFADANBgkqhkiG9w0BAQsFAAOCAgEAVRMM +#C0o1FCXvNkhZhgfowM3QnBnRNmOF0fBG/685N4C9PsSI+mYtVwiXGyAANzA4FM// +#XQHE4AaqgslkP+2JHtoqAsUdT4vQFfMmQ7GoCfce1A83vVBszbGLp3ca6ZXs/EUx +#NuQjxmNeZGGsqaOofCb1kVeqDVHT360p0+9Yq3QvgdyelzUNlIgPNF23gO1JKjn0 +#yVG4jY3b5uwEObppVWck/o8m8RxiDK2V3N5ce2wO6dT+48+e0V3aqvkXjZKrLVRn +#BcJ6UYRyyavwMmuG8x/EkzubjXMST1gtWUMyHQoMpVhZ2s6dErTTTymY3KVEvZMj +#Za0ZMKtyRBVIoHqe6tX1mp76cDKqUbMEtpHEuNdhrsBB7FqTtGK8CcQE2NQzCflj +#INUB7blgRxR30ffFQTs7511z2a2tlSCcQB/kRwr2VLu4CWMASdsufCp5loYbljtU +#l0i0OUbyJ++MlkbNr45VcJ1sj9EaTProkKQpEATRv7LeBCgqr67d36b5SmYZdnqq +#z7Bow++DO3vpbxKXHdseKtoHA9C6wYcCzVm+tCEiO9hdfbSjxypWPglsa29UIgO7 +#steYii9R7Pp9PtzIb9sqb0ZWLgi5QYHYWKRuKshG22NSOMZFGmqjBD5IDoQ9KUeL +#gPzutMgS8APve0gtlICiUcMUkn5Xg81WfpuNxcI= +#-----END CERTIFICATE----- +#Certificate: +# Data: +# Version: 3 (0x2) +# Serial Number: 2 (0x2) +# Signature Algorithm: sha256WithRSAEncryption +# Issuer: O=Test, CN=TestRoot +# Validity +# Not Before: Feb 24 00:59:51 2015 GMT +# Not After : Feb 13 00:59:51 2017 GMT +# Subject: O=Test, CN=TestIntCA +# Subject Public Key Info: +# Public Key Algorithm: rsaEncryption +# Public-Key: (4096 bit) +# Modulus: +# 00:bf:0a:29:02:54:00:97:c3:81:e6:33:89:74:03: +# cc:a7:f4:8d:54:17:36:48:97:6a:32:4e:b8:87:6d: +# 62:8e:87:7f:91:64:3b:75:d5:3d:93:19:17:d2:00: +# d8:db:c3:91:7c:35:23:59:d4:29:a3:e1:da:28:66: +# 28:85:6b:d3:44:09:38:82:42:2f:23:ab:e6:1b:2f: +# 8c:c3:12:40:99:8d:2e:a6:95:16:9c:75:b1:07:bd: +# 76:f6:17:bc:a4:93:8f:9f:cd:eb:6d:1c:8c:5c:0c: +# 2a:8d:b8:71:2c:ed:ad:fe:7b:ed:3e:c3:e7:24:d4: +# ae:53:42:34:c5:82:f9:fa:15:71:ba:9e:16:a7:1e: +# c5:5c:a7:48:b3:26:f4:a9:34:71:84:b8:7b:77:a7: +# f1:a2:8e:f5:e8:cd:25:f9:63:89:b1:98:2a:8e:4d: +# da:9e:2d:d2:a5:96:ca:32:1e:e2:22:b1:0b:b9:0f: +# 98:0a:ae:08:2f:a8:fe:90:2f:d8:0d:16:79:2d:c8: +# 62:22:69:f3:18:2b:a9:c7:d1:85:f7:5d:d5:ab:44: +# 6f:91:9a:1a:86:22:0b:7e:57:97:98:6a:bd:bb:55: +# 1e:e6:44:62:18:0b:af:a4:3e:ba:a7:5f:f1:a6:28: +# 5c:fe:df:19:9a:cd:39:e3:9a:5e:bc:aa:49:0c:22: +# 24:b7:1c:d4:21:99:0b:c4:48:95:b8:de:ad:4c:e1: +# 39:e8:34:5d:c6:0c:4f:2c:22:c8:e8:cd:19:b7:d3: +# 8f:d3:cd:76:76:0f:b1:bb:0a:45:be:9d:5f:2a:5d: +# 51:1c:47:79:bc:c9:d1:bc:30:33:ae:2d:db:27:b9: +# 1b:ff:2c:cb:b2:af:7d:e5:a6:9b:6f:23:98:7e:76: +# 74:45:5f:41:15:73:c1:9c:f5:88:c6:8f:ca:9b:78: +# 70:ee:8b:ba:d1:bc:60:4f:29:76:6d:28:2f:3b:09: +# e6:47:53:49:04:15:67:1d:af:0d:51:f8:43:92:c8: +# ab:ea:f0:09:9e:47:87:2e:62:d8:91:6e:40:de:ac: +# 1b:e1:6a:47:41:c3:7d:cf:90:e0:e9:34:80:d0:56: +# 9a:92:83:18:0a:c4:61:b7:60:3d:9a:4c:db:61:0a: +# d0:d0:71:f1:ee:de:11:ad:fa:ee:4b:8f:fe:15:ed: +# 6d:e4:b0:ba:70:9c:30:ea:52:4d:31:a4:95:35:a1: +# 1c:d9:15:9f:9c:ab:06:50:eb:ae:d4:bb:17:74:27: +# 44:b9:35:fa:15:61:e1:13:f6:1e:46:88:9c:d3:67: +# ca:bc:a5:7c:db:b9:7e:23:1c:24:77:fa:84:8f:38: +# 7f:2a:42:d5:49:e0:33:09:5d:29:28:2f:93:33:20: +# f9:cf:21 +# Exponent: 65537 (0x10001) +# X509v3 extensions: +# X509v3 Subject Key Identifier: +# 9B:F9:84:06:6A:FC:D2:EB:08:93:FB:E4:EE:2F:D8:C1:C2:89:7A:A7 +# X509v3 Authority Key Identifier: +# keyid:12:B9:C3:48:79:ED:7D:30:C9:78:78:61:94:58:37:07:40:76:38:18 +# +# X509v3 Basic Constraints: critical +# CA:TRUE +# X509v3 Key Usage: +# Certificate Sign, CRL Sign +# Signature Algorithm: sha256WithRSAEncryption +# 79:28:d5:46:92:1f:6b:25:de:b0:1e:e2:44:d3:7b:a3:4a:6e: +# 05:43:dd:85:47:4d:ca:d0:d9:43:65:34:38:a0:c2:6c:fb:49: +# 85:6d:f3:dc:10:8c:73:37:49:22:c3:87:dd:28:8a:b0:b2:2c: +# a3:9c:f6:15:4d:98:39:95:a1:21:72:36:ff:04:67:e5:ba:3e: +# bd:5e:d4:81:ac:f4:1c:f5:ab:8d:dd:73:e9:37:d9:d2:80:39: +# 5b:f5:ec:fe:9c:56:ec:10:f7:86:42:17:d1:f1:4b:c5:38:fe: +# 0e:85:2c:6e:ac:6f:52:e5:a8:b9:fe:af:f5:dc:35:0a:74:f8: +# 72:4f:51:d5:95:f4:fe:8f:fa:3f:d5:d2:1f:44:3b:63:60:4a: +# e2:99:37:bf:09:40:32:6c:ea:3c:61:85:77:bc:63:6e:11:f9: +# 41:5f:cb:4c:99:39:2a:37:66:79:4d:5a:7e:93:91:53:33:ce: +# b1:c0:1c:68:97:2e:5a:e1:66:59:41:52:07:cf:4a:02:24:54: +# dd:01:97:2f:f1:85:db:50:9c:3b:16:95:d2:08:ca:f6:93:9a: +# 01:33:36:40:7c:39:e3:df:f8:7b:a7:b5:ea:60:06:a5:74:3a: +# dc:ea:36:08:6b:c1:59:03:01:77:17:0e:6b:e1:9a:48:68:06: +# 31:03:28:0b:cb:dd:61:93:80:0c:f1:16:e4:87:26:86:72:b4: +# 12:32:7b:f7:85:59:9a:e3:1c:c4:d8:6e:55:a9:7e:c5:ce:8b: +# be:d2:bf:57:34:62:83:f1:d0:3a:73:e1:75:e1:f4:77:5b:a3: +# a3:35:7a:fb:b6:85:68:d5:ad:26:95:71:60:62:92:30:d3:5c: +# 7b:8e:42:14:e8:7b:27:13:e6:aa:cb:35:42:2c:db:e9:1f:ff: +# fd:4c:8f:fc:04:d8:05:16:da:a8:93:db:3b:f2:51:17:ff:dc: +# c7:11:97:14:ac:d8:5a:e7:ad:38:fa:17:bf:bd:4b:92:84:0d: +# 96:20:7d:17:ee:31:a6:56:57:5e:a4:0d:d2:cb:47:e8:45:14: +# e4:6a:4a:a1:40:da:b7:bc:e8:aa:60:59:4c:4a:3b:0c:ef:26: +# 39:fc:cb:8c:fe:79:c3:35:34:f5:3a:11:d3:e6:e7:fe:fd:bc: +# 89:6a:c5:d0:5b:a2:b9:84:9d:b4:53:d1:1f:c0:f6:fd:80:8a: +# 88:f8:aa:04:8f:5d:83:4a:91:ed:90:f0:f6:0a:bb:1a:01:d7: +# a4:bb:3c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oirCyLKOc9hVNmDmVoSFyNv8EZ+W6Pr1e +1IGs9Bz1q43dc+k32dKAOVv17P6cVuwQ94ZCF9HxS8U4/g6FLG6sb1LlqLn+r/Xc +NQp0+HJPUdWV9P6P+j/V0h9EO2NgSuKZN78JQDJs6jxhhXe8Y24R+UFfy0yZOSo3 +ZnlNWn6TkVMzzrHAHGiXLlrhZllBUgfPSgIkVN0Bly/xhdtQnDsWldIIyvaTmgEz +NkB8OePf+HuntepgBqV0OtzqNghrwVkDAXcXDmvhmkhoBjEDKAvL3WGTgAzxFuSH +JoZytBIye/eFWZrjHMTYblWpfsXOi77Sv1c0YoPx0Dpz4XXh9Hdbo6M1evu2hWjV +rSaVcWBikjDTXHuOQhToeycT5qrLNUIs2+kf//1Mj/wE2AUW2qiT2zvyURf/3McR +lxSs2FrnrTj6F7+9S5KEDZYgfRfuMaZWV16kDdLLR+hFFORqSqFA2re86KpgWUxK +OwzvJjn8y4z+ecM1NPU6EdPm5/79vIlqxdBbormEnbRT0R/A9v2Aioj4qgSPXYNK +ke2Q8PYKuxoB16S7PMTB4TjKA4th2BirvO9+GKrfYdEfZBAE6SV9w7sQ4BFVKeZW +h4C/lSDF diff --git a/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-withnext-withinv.resp b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-withnext-withinv.resp new file mode 100644 index 00000000000..6122889c5ac --- /dev/null +++ b/jdk/test/sun/security/provider/certpath/OCSP/ocsp-rev-withnext-withinv.resp @@ -0,0 +1,323 @@ +#OCSP Response Data: +# OCSP Response Status: successful (0x0) +# Response Type: Basic OCSP Response +# Version: 1 (0x0) +# Responder Id: O = Test, CN = TestOCSP +# Produced At: Feb 28 00:46:49 2015 GMT +# Responses: +# Certificate ID: +# Hash Algorithm: sha1 +# Issuer Name Hash: 1056578B741813261FD9712ADA60077FF7C61E8F +# Issuer Key Hash: 9BF984066AFCD2EB0893FBE4EE2FD8C1C2897AA7 +# Serial Number: 1500 +# Cert Status: revoked +# Revocation Time: Feb 19 15:50:30 2015 GMT +# Revocation Reason: keyCompromise (0x1) +# This Update: Feb 28 00:46:49 2015 GMT +# Next Update: Mar 1 00:46:49 2015 GMT +# Response Single Extensions: +# Invalidity Date: +# Feb 19 14:00:00 2015 GMT +# +# Response Extensions: +# OCSP Nonce: +# 0410F17C49C52CC233FD13FDF79DE32B162D +# Signature Algorithm: sha1WithRSAEncryption +# 54:58:00:0a:36:2e:f5:4e:ba:1c:aa:72:e0:be:40:7a:c8:84: +# 62:5e:2c:ce:bd:e9:7f:fb:fc:f8:e6:d4:e5:19:d2:a5:cd:5b: +# 31:a5:bf:52:d7:89:29:73:98:e9:1e:c2:dc:e5:e2:6d:18:f1: +# 18:8a:03:c5:01:e9:c3:3c:d1:a6:22:d4:77:42:83:7b:82:27: +# f8:eb:89:b8:3f:50:10:fd:0b:59:6f:37:d4:2c:ef:cd:8f:83: +# 4c:e1:92:e2:3b:cf:5c:b3:86:ed:c6:88:62:e1:53:3c:0f:e3: +# 14:bb:3f:ad:53:de:d6:e3:4b:ab:e0:3f:c5:b9:2e:00:ec:67: +# 01:6e:f4:3a:1f:e6:c3:78:b2:61:bd:7d:62:12:35:0e:ab:87: +# ce:5d:0e:9d:5b:96:21:67:66:da:e4:48:b6:aa:0d:bc:d1:78: +# ec:41:25:87:ee:d2:48:c1:d1:f5:59:17:1c:fb:43:89:df:4f: +# 5a:d7:7a:62:a5:ef:aa:f4:b9:99:a5:34:f9:aa:15:d9:89:b2: +# d4:38:c1:cd:f8:2d:fc:07:dd:10:7a:20:75:bd:1a:0d:23:24: +# f8:59:0a:9b:56:ae:50:11:f6:b7:c6:8e:4a:c6:e5:f4:3f:5b: +# 4b:a0:72:91:06:3e:a4:f1:6e:73:6f:d6:f3:3f:2b:6e:49:fb: +# b0:bc:8a:91 +#Certificate: +# Data: +# Version: 3 (0x2) +# Serial Number: 257 (0x101) +# Signature Algorithm: sha256WithRSAEncryption +# Issuer: O=Test, CN=TestIntCA +# Validity +# Not Before: Feb 24 01:22:24 2015 GMT +# Not After : Feb 24 01:22:24 2016 GMT +# Subject: O=Test, CN=TestOCSP +# Subject Public Key Info: +# Public Key Algorithm: rsaEncryption +# Public-Key: (2048 bit) +# Modulus: +# 00:d2:5c:ae:11:f6:c6:ae:97:ba:31:ed:2b:b6:e1: +# c7:58:03:e5:9b:ee:78:53:cb:33:a5:15:fd:c6:49: +# 16:83:0e:c8:21:7d:cf:a8:eb:18:31:32:0a:62:0c: +# 4e:c7:a5:a5:75:9d:db:72:90:e3:5a:ae:53:0a:1b: +# 59:3f:bd:3a:67:b1:bf:98:64:a4:85:f0:97:10:8b: +# 0e:7e:7b:5e:d4:32:ab:b5:ef:c3:de:22:c0:11:90: +# c8:37:e4:48:b0:5e:fc:1a:2c:7a:85:2b:a6:bd:18: +# 64:08:d3:e3:b8:d8:ab:2e:b5:d8:e8:12:2e:58:45: +# 69:ac:56:94:62:e3:c2:c4:3c:08:ea:b3:bb:a4:89: +# 7e:fb:84:5e:95:49:6f:b9:33:66:1a:c2:7f:36:55: +# 18:a7:21:e4:1b:75:c0:e8:c9:02:1b:9c:f1:8b:b1: +# 58:b0:8c:da:5c:24:a5:f4:a5:36:52:1c:76:d3:5a: +# 71:ee:f0:c8:4b:65:58:0b:d6:d6:6c:23:3b:d0:8f: +# f5:3a:66:d4:f4:fd:34:90:c2:35:a1:6d:70:49:39: +# a6:71:3d:0d:7c:85:d3:d1:f5:6e:30:05:42:a1:88: +# ab:94:1f:25:f2:76:85:57:cb:77:b6:9e:a3:03:26: +# ff:b1:47:71:67:20:75:8d:83:10:17:6c:9a:93:4b: +# f6:31 +# Exponent: 65537 (0x10001) +# X509v3 extensions: +# X509v3 Subject Key Identifier: +# 58:78:83:0E:47:61:C2:C9:E0:77:A7:FE:AD:9C:A4:5F:00:E8:A6:6C +# X509v3 Authority Key Identifier: +# keyid:9B:F9:84:06:6A:FC:D2:EB:08:93:FB:E4:EE:2F:D8:C1:C2:89:7A:A7 +# +# X509v3 Key Usage: critical +# Digital Signature +# X509v3 Extended Key Usage: +# OCSP Signing +# OCSP No Check: +# +# Signature Algorithm: sha256WithRSAEncryption +# 55:13:0c:0b:4a:35:14:25:ef:36:48:59:86:07:e8:c0:cd:d0: +# 9c:19:d1:36:63:85:d1:f0:46:ff:af:39:37:80:bd:3e:c4:88: +# fa:66:2d:57:08:97:1b:20:00:37:30:38:14:cf:ff:5d:01:c4: +# e0:06:aa:82:c9:64:3f:ed:89:1e:da:2a:02:c5:1d:4f:8b:d0: +# 15:f3:26:43:b1:a8:09:f7:1e:d4:0f:37:bd:50:6c:cd:b1:8b: +# a7:77:1a:e9:95:ec:fc:45:31:36:e4:23:c6:63:5e:64:61:ac: +# a9:a3:a8:7c:26:f5:91:57:aa:0d:51:d3:df:ad:29:d3:ef:58: +# ab:74:2f:81:dc:9e:97:35:0d:94:88:0f:34:5d:b7:80:ed:49: +# 2a:39:f4:c9:51:b8:8d:8d:db:e6:ec:04:39:ba:69:55:67:24: +# fe:8f:26:f1:1c:62:0c:ad:95:dc:de:5c:7b:6c:0e:e9:d4:fe: +# e3:cf:9e:d1:5d:da:aa:f9:17:8d:92:ab:2d:54:67:05:c2:7a: +# 51:84:72:c9:ab:f0:32:6b:86:f3:1f:c4:93:3b:9b:8d:73:12: +# 4f:58:2d:59:43:32:1d:0a:0c:a5:58:59:da:ce:9d:12:b4:d3: +# 4f:29:98:dc:a5:44:bd:93:23:65:ad:19:30:ab:72:44:15:48: +# a0:7a:9e:ea:d5:f5:9a:9e:fa:70:32:aa:51:b3:04:b6:91:c4: +# b8:d7:61:ae:c0:41:ec:5a:93:b4:62:bc:09:c4:04:d8:d4:33: +# 09:f9:63:20:d5:01:ed:b9:60:47:14:77:d1:f7:c5:41:3b:3b: +# e7:5d:73:d9:ad:ad:95:20:9c:40:1f:e4:47:0a:f6:54:bb:b8: +# 09:63:00:49:db:2e:7c:2a:79:96:86:1b:96:3b:54:97:48:b4: +# 39:46:f2:27:ef:8c:96:46:cd:af:8e:55:70:9d:6c:8f:d1:1a: +# 4c:fa:e8:90:a4:29:10:04:d1:bf:b2:de:04:28:2a:af:ae:dd: +# df:a6:f9:4a:66:19:76:7a:aa:cf:b0:68:c3:ef:83:3b:7b:e9: +# 6f:12:97:1d:db:1e:2a:da:07:03:d0:ba:c1:87:02:cd:59:be: +# b4:21:22:3b:d8:5d:7d:b4:a3:c7:2a:56:3e:09:6c:6b:6f:54: +# 22:03:bb:b2:d7:98:8a:2f:51:ec:fa:7d:3e:dc:c8:6f:db:2a: +# 6f:46:56:2e:08:b9:41:81:d8:58:a4:6e:2a:c8:46:db:63:52: +# 38:c6:45:1a:6a:a3:04:3e:48:0e:84:3d:29:47:8b:80:fc:ee: +# b4:c8:12:f0:03:ef:7b:48:2d:94:80:a2:51:c3:14:92:7e:57: +# 83:cd:56:7e:9b:8d:c5:c2 +#-----BEGIN CERTIFICATE----- +#MIIEOTCCAiGgAwIBAgICAQEwDQYJKoZIhvcNAQELBQAwIzENMAsGA1UECgwEVGVz +#dDESMBAGA1UEAwwJVGVzdEludENBMB4XDTE1MDIyNDAxMjIyNFoXDTE2MDIyNDAx +#MjIyNFowIjENMAsGA1UECgwEVGVzdDERMA8GA1UEAwwIVGVzdE9DU1AwggEiMA0G +#CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDSXK4R9saul7ox7Su24cdYA+Wb7nhT +#yzOlFf3GSRaDDsghfc+o6xgxMgpiDE7HpaV1ndtykONarlMKG1k/vTpnsb+YZKSF +#8JcQiw5+e17UMqu178PeIsARkMg35EiwXvwaLHqFK6a9GGQI0+O42KsutdjoEi5Y +#RWmsVpRi48LEPAjqs7ukiX77hF6VSW+5M2Yawn82VRinIeQbdcDoyQIbnPGLsViw +#jNpcJKX0pTZSHHbTWnHu8MhLZVgL1tZsIzvQj/U6ZtT0/TSQwjWhbXBJOaZxPQ18 +#hdPR9W4wBUKhiKuUHyXydoVXy3e2nqMDJv+xR3FnIHWNgxAXbJqTS/YxAgMBAAGj +#eDB2MB0GA1UdDgQWBBRYeIMOR2HCyeB3p/6tnKRfAOimbDAfBgNVHSMEGDAWgBSb +#+YQGavzS6wiT++TuL9jBwol6pzAOBgNVHQ8BAf8EBAMCB4AwEwYDVR0lBAwwCgYI +#KwYBBQUHAwkwDwYJKwYBBQUHMAEFBAIFADANBgkqhkiG9w0BAQsFAAOCAgEAVRMM +#C0o1FCXvNkhZhgfowM3QnBnRNmOF0fBG/685N4C9PsSI+mYtVwiXGyAANzA4FM// +#XQHE4AaqgslkP+2JHtoqAsUdT4vQFfMmQ7GoCfce1A83vVBszbGLp3ca6ZXs/EUx +#NuQjxmNeZGGsqaOofCb1kVeqDVHT360p0+9Yq3QvgdyelzUNlIgPNF23gO1JKjn0 +#yVG4jY3b5uwEObppVWck/o8m8RxiDK2V3N5ce2wO6dT+48+e0V3aqvkXjZKrLVRn +#BcJ6UYRyyavwMmuG8x/EkzubjXMST1gtWUMyHQoMpVhZ2s6dErTTTymY3KVEvZMj +#Za0ZMKtyRBVIoHqe6tX1mp76cDKqUbMEtpHEuNdhrsBB7FqTtGK8CcQE2NQzCflj +#INUB7blgRxR30ffFQTs7511z2a2tlSCcQB/kRwr2VLu4CWMASdsufCp5loYbljtU +#l0i0OUbyJ++MlkbNr45VcJ1sj9EaTProkKQpEATRv7LeBCgqr67d36b5SmYZdnqq +#z7Bow++DO3vpbxKXHdseKtoHA9C6wYcCzVm+tCEiO9hdfbSjxypWPglsa29UIgO7 +#steYii9R7Pp9PtzIb9sqb0ZWLgi5QYHYWKRuKshG22NSOMZFGmqjBD5IDoQ9KUeL +#gPzutMgS8APve0gtlICiUcMUkn5Xg81WfpuNxcI= +#-----END CERTIFICATE----- +#Certificate: +# Data: +# Version: 3 (0x2) +# Serial Number: 2 (0x2) +# Signature Algorithm: sha256WithRSAEncryption +# Issuer: O=Test, CN=TestRoot +# Validity +# Not Before: Feb 24 00:59:51 2015 GMT +# Not After : Feb 13 00:59:51 2017 GMT +# Subject: O=Test, CN=TestIntCA +# Subject Public Key Info: +# Public Key Algorithm: rsaEncryption +# Public-Key: (4096 bit) +# Modulus: +# 00:bf:0a:29:02:54:00:97:c3:81:e6:33:89:74:03: +# cc:a7:f4:8d:54:17:36:48:97:6a:32:4e:b8:87:6d: +# 62:8e:87:7f:91:64:3b:75:d5:3d:93:19:17:d2:00: +# d8:db:c3:91:7c:35:23:59:d4:29:a3:e1:da:28:66: +# 28:85:6b:d3:44:09:38:82:42:2f:23:ab:e6:1b:2f: +# 8c:c3:12:40:99:8d:2e:a6:95:16:9c:75:b1:07:bd: +# 76:f6:17:bc:a4:93:8f:9f:cd:eb:6d:1c:8c:5c:0c: +# 2a:8d:b8:71:2c:ed:ad:fe:7b:ed:3e:c3:e7:24:d4: +# ae:53:42:34:c5:82:f9:fa:15:71:ba:9e:16:a7:1e: +# c5:5c:a7:48:b3:26:f4:a9:34:71:84:b8:7b:77:a7: +# f1:a2:8e:f5:e8:cd:25:f9:63:89:b1:98:2a:8e:4d: +# da:9e:2d:d2:a5:96:ca:32:1e:e2:22:b1:0b:b9:0f: +# 98:0a:ae:08:2f:a8:fe:90:2f:d8:0d:16:79:2d:c8: +# 62:22:69:f3:18:2b:a9:c7:d1:85:f7:5d:d5:ab:44: +# 6f:91:9a:1a:86:22:0b:7e:57:97:98:6a:bd:bb:55: +# 1e:e6:44:62:18:0b:af:a4:3e:ba:a7:5f:f1:a6:28: +# 5c:fe:df:19:9a:cd:39:e3:9a:5e:bc:aa:49:0c:22: +# 24:b7:1c:d4:21:99:0b:c4:48:95:b8:de:ad:4c:e1: +# 39:e8:34:5d:c6:0c:4f:2c:22:c8:e8:cd:19:b7:d3: +# 8f:d3:cd:76:76:0f:b1:bb:0a:45:be:9d:5f:2a:5d: +# 51:1c:47:79:bc:c9:d1:bc:30:33:ae:2d:db:27:b9: +# 1b:ff:2c:cb:b2:af:7d:e5:a6:9b:6f:23:98:7e:76: +# 74:45:5f:41:15:73:c1:9c:f5:88:c6:8f:ca:9b:78: +# 70:ee:8b:ba:d1:bc:60:4f:29:76:6d:28:2f:3b:09: +# e6:47:53:49:04:15:67:1d:af:0d:51:f8:43:92:c8: +# ab:ea:f0:09:9e:47:87:2e:62:d8:91:6e:40:de:ac: +# 1b:e1:6a:47:41:c3:7d:cf:90:e0:e9:34:80:d0:56: +# 9a:92:83:18:0a:c4:61:b7:60:3d:9a:4c:db:61:0a: +# d0:d0:71:f1:ee:de:11:ad:fa:ee:4b:8f:fe:15:ed: +# 6d:e4:b0:ba:70:9c:30:ea:52:4d:31:a4:95:35:a1: +# 1c:d9:15:9f:9c:ab:06:50:eb:ae:d4:bb:17:74:27: +# 44:b9:35:fa:15:61:e1:13:f6:1e:46:88:9c:d3:67: +# ca:bc:a5:7c:db:b9:7e:23:1c:24:77:fa:84:8f:38: +# 7f:2a:42:d5:49:e0:33:09:5d:29:28:2f:93:33:20: +# f9:cf:21 +# Exponent: 65537 (0x10001) +# X509v3 extensions: +# X509v3 Subject Key Identifier: +# 9B:F9:84:06:6A:FC:D2:EB:08:93:FB:E4:EE:2F:D8:C1:C2:89:7A:A7 +# X509v3 Authority Key Identifier: +# keyid:12:B9:C3:48:79:ED:7D:30:C9:78:78:61:94:58:37:07:40:76:38:18 +# +# X509v3 Basic Constraints: critical +# CA:TRUE +# X509v3 Key Usage: +# Certificate Sign, CRL Sign +# Signature Algorithm: sha256WithRSAEncryption +# 79:28:d5:46:92:1f:6b:25:de:b0:1e:e2:44:d3:7b:a3:4a:6e: +# 05:43:dd:85:47:4d:ca:d0:d9:43:65:34:38:a0:c2:6c:fb:49: +# 85:6d:f3:dc:10:8c:73:37:49:22:c3:87:dd:28:8a:b0:b2:2c: +# a3:9c:f6:15:4d:98:39:95:a1:21:72:36:ff:04:67:e5:ba:3e: +# bd:5e:d4:81:ac:f4:1c:f5:ab:8d:dd:73:e9:37:d9:d2:80:39: +# 5b:f5:ec:fe:9c:56:ec:10:f7:86:42:17:d1:f1:4b:c5:38:fe: +# 0e:85:2c:6e:ac:6f:52:e5:a8:b9:fe:af:f5:dc:35:0a:74:f8: +# 72:4f:51:d5:95:f4:fe:8f:fa:3f:d5:d2:1f:44:3b:63:60:4a: +# e2:99:37:bf:09:40:32:6c:ea:3c:61:85:77:bc:63:6e:11:f9: +# 41:5f:cb:4c:99:39:2a:37:66:79:4d:5a:7e:93:91:53:33:ce: +# b1:c0:1c:68:97:2e:5a:e1:66:59:41:52:07:cf:4a:02:24:54: +# dd:01:97:2f:f1:85:db:50:9c:3b:16:95:d2:08:ca:f6:93:9a: +# 01:33:36:40:7c:39:e3:df:f8:7b:a7:b5:ea:60:06:a5:74:3a: +# dc:ea:36:08:6b:c1:59:03:01:77:17:0e:6b:e1:9a:48:68:06: +# 31:03:28:0b:cb:dd:61:93:80:0c:f1:16:e4:87:26:86:72:b4: +# 12:32:7b:f7:85:59:9a:e3:1c:c4:d8:6e:55:a9:7e:c5:ce:8b: +# be:d2:bf:57:34:62:83:f1:d0:3a:73:e1:75:e1:f4:77:5b:a3: +# a3:35:7a:fb:b6:85:68:d5:ad:26:95:71:60:62:92:30:d3:5c: +# 7b:8e:42:14:e8:7b:27:13:e6:aa:cb:35:42:2c:db:e9:1f:ff: +# fd:4c:8f:fc:04:d8:05:16:da:a8:93:db:3b:f2:51:17:ff:dc: +# c7:11:97:14:ac:d8:5a:e7:ad:38:fa:17:bf:bd:4b:92:84:0d: +# 96:20:7d:17:ee:31:a6:56:57:5e:a4:0d:d2:cb:47:e8:45:14: +# e4:6a:4a:a1:40:da:b7:bc:e8:aa:60:59:4c:4a:3b:0c:ef:26: +# 39:fc:cb:8c:fe:79:c3:35:34:f5:3a:11:d3:e6:e7:fe:fd:bc: +# 89:6a:c5:d0:5b:a2:b9:84:9d:b4:53:d1:1f:c0:f6:fd:80:8a: +# 88:f8:aa:04:8f:5d:83:4a:91:ed:90:f0:f6:0a:bb:1a:01:d7: +# a4:bb:3c:c4:c1:e1:38:ca:03:8b:61:d8:18:ab:bc:ef:7e:18: +# aa:df:61:d1:1f:64:10:04:e9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fR8UvFOP4OhSxurG9S5ai5/q/13DUKdPhyT1HVlfT+ +j/o/1dIfRDtjYErimTe/CUAybOo8YYV3vGNuEflBX8tMmTkqN2Z5TVp+k5FTM86x +wBxoly5a4WZZQVIHz0oCJFTdAZcv8YXbUJw7FpXSCMr2k5oBMzZAfDnj3/h7p7Xq +YAaldDrc6jYIa8FZAwF3Fw5r4ZpIaAYxAygLy91hk4AM8RbkhyaGcrQSMnv3hVma +4xzE2G5VqX7Fzou+0r9XNGKD8dA6c+F14fR3W6OjNXr7toVo1a0mlXFgYpIw01x7 +jkIU6HsnE+aqyzVCLNvpH//9TI/8BNgFFtqok9s78lEX/9zHEZcUrNha5604+he/ +vUuShA2WIH0X7jGmVldepA3Sy0foRRTkakqhQNq3vOiqYFlMSjsM7yY5/MuM/nnD +NTT1OhHT5uf+/byJasXQW6K5hJ20U9EfwPb9gIqI+KoEj12DSpHtkPD2CrsaAdek +uzzEweE4ygOLYdgYq7zvfhiq32HRH2QQBOklfcO7EOARVSnmVoeAv5UgxQ== From 1382affe60f0cab6ea8c159255ddb6d6d79e27cd Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Fri, 13 Mar 2015 11:34:37 -0700 Subject: [PATCH 43/58] 8075160: Add javadoc to serialver class Reviewed-by: lancea --- .../share/classes/sun/tools/serialver/SerialVer.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jdk/src/jdk.compiler/share/classes/sun/tools/serialver/SerialVer.java b/jdk/src/jdk.compiler/share/classes/sun/tools/serialver/SerialVer.java index f031e110b46..268ed516474 100644 --- a/jdk/src/jdk.compiler/share/classes/sun/tools/serialver/SerialVer.java +++ b/jdk/src/jdk.compiler/share/classes/sun/tools/serialver/SerialVer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2015, 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 @@ -37,6 +37,9 @@ import java.net.MalformedURLException; import java.util.StringTokenizer; import sun.net.www.ParseUtil; +/** + * Supporting class for the serialver tool. + */ public class SerialVer { /* @@ -117,6 +120,10 @@ public class SerialVer { } } + /** + * Entry point for serialver tool. + * @param args the arguments + */ public static void main(String[] args) { String envcp = null; int i = 0; From 17f8ee8cf0ec64b243c634151a69c8370b28bce9 Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Fri, 13 Mar 2015 14:54:40 -0700 Subject: [PATCH 44/58] 8073214: javadoc of Properties methods should specify NullPointerExceptions Add test for null parameter and corresponding throws clause to load() methods Reviewed-by: darcy --- .../share/classes/java/util/Properties.java | 8 +- jdk/test/java/util/Properties/Basic.java | 75 +++++++++++++++++++ 2 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 jdk/test/java/util/Properties/Basic.java diff --git a/jdk/src/java.base/share/classes/java/util/Properties.java b/jdk/src/java.base/share/classes/java/util/Properties.java index e313c9716d0..04397c3f9f2 100644 --- a/jdk/src/java.base/share/classes/java/util/Properties.java +++ b/jdk/src/java.base/share/classes/java/util/Properties.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2015, 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 @@ -34,8 +34,6 @@ import java.io.Reader; import java.io.Writer; import java.io.OutputStreamWriter; import java.io.BufferedWriter; -import java.security.AccessController; -import java.security.PrivilegedAction; import jdk.internal.util.xml.PropertiesDefaultHandler; @@ -311,9 +309,11 @@ class Properties extends Hashtable { * input stream. * @throws IllegalArgumentException if a malformed Unicode escape * appears in the input. + * @throws NullPointerException if {@code reader} is null. * @since 1.6 */ public synchronized void load(Reader reader) throws IOException { + Objects.requireNonNull(reader, "reader parameter is null"); load0(new LineReader(reader)); } @@ -335,9 +335,11 @@ class Properties extends Hashtable { * input stream. * @throws IllegalArgumentException if the input stream contains a * malformed Unicode escape sequence. + * @throws NullPointerException if {@code inStream} is null. * @since 1.2 */ public synchronized void load(InputStream inStream) throws IOException { + Objects.requireNonNull(inStream, "inStream parameter is null"); load0(new LineReader(inStream)); } diff --git a/jdk/test/java/util/Properties/Basic.java b/jdk/test/java/util/Properties/Basic.java new file mode 100644 index 00000000000..7827ed02957 --- /dev/null +++ b/jdk/test/java/util/Properties/Basic.java @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2015, 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. + * + * 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. + */ +import java.io.InputStream; +import java.io.OutputStream; +import java.io.Reader; +import java.io.Writer; +import java.util.Properties; + +/* + * @test + * @bug 8073214 + * @summary Basic tests of Properties methods. + */ +public class Basic +{ + public static void main(String[] args) throws Exception + { + int failures = 0; + + Properties props = new Properties(); + + try { + props.store((OutputStream)null, "comments"); + failures++; + } catch (NullPointerException e) { + // do nothing + } + + try { + props.store((Writer)null, "comments"); + failures++; + } catch (NullPointerException e) { + // do nothing + } + + try { + props.load((InputStream)null); + failures++; + } catch (NullPointerException e) { + // do nothing + } + + try { + props.load((Reader)null); + failures++; + } catch (NullPointerException e) { + // do nothing + } + + if (failures != 0) { + throw new RuntimeException("Basic failed with " + + failures + " errors!"); + } + } +} From 6290291b273e047a8a0fed33ff039842236030b8 Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Fri, 13 Mar 2015 15:03:42 -0700 Subject: [PATCH 45/58] 8075110: (prefs) CodePointZeroPrefsTest fails on certain platforms Contrain test to the Linux and Solaris OS families Reviewed-by: darcy --- jdk/test/java/util/prefs/CodePointZeroPrefsTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/test/java/util/prefs/CodePointZeroPrefsTest.java b/jdk/test/java/util/prefs/CodePointZeroPrefsTest.java index 8a63b86caf9..eb7299b4d98 100644 --- a/jdk/test/java/util/prefs/CodePointZeroPrefsTest.java +++ b/jdk/test/java/util/prefs/CodePointZeroPrefsTest.java @@ -27,6 +27,7 @@ import java.util.prefs.PreferencesFactory; /* * @test * @bug 8068373 + * @requires os.family == "linux" | os.family == "solaris" * @summary Ensure writing a code point U+0000 null control character is detected. */ public class CodePointZeroPrefsTest From 2349ff99bc1e696aafdde8c8d82eb0bb75f8219f Mon Sep 17 00:00:00 2001 From: Jamil Nimeh Date: Sat, 14 Mar 2015 09:38:52 -0700 Subject: [PATCH 46/58] 6996366: convert MacAlg to an enum Reviewed-by: xuelei --- .../classes/sun/security/ssl/CipherBox.java | 4 +- .../classes/sun/security/ssl/CipherSuite.java | 495 ++++++++---------- .../share/classes/sun/security/ssl/MAC.java | 3 +- .../security/ssl/SSLAlgorithmConstraints.java | 10 +- 4 files changed, 241 insertions(+), 271 deletions(-) diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/CipherBox.java b/jdk/src/java.base/share/classes/sun/security/ssl/CipherBox.java index e9f22055bb9..92f12ce9b67 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/CipherBox.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/CipherBox.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2015, 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 @@ -257,7 +257,7 @@ final class CipherBox { throw new NoSuchAlgorithmException("Unsupported cipher " + cipher); } - if (cipher == B_NULL) { + if (cipher == BulkCipher.B_NULL) { return NULL; } else { return new CipherBox(version, cipher, key, iv, random, encrypt); diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/CipherSuite.java b/jdk/src/java.base/share/classes/sun/security/ssl/CipherSuite.java index 6d52cc68435..09e7afcae26 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/CipherSuite.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/CipherSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2015, 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 @@ -41,6 +41,8 @@ import javax.crypto.spec.SecretKeySpec; import static sun.security.ssl.CipherSuite.KeyExchange.*; import static sun.security.ssl.CipherSuite.PRF.*; import static sun.security.ssl.CipherSuite.CipherType.*; +import static sun.security.ssl.CipherSuite.MacAlg.*; +import static sun.security.ssl.CipherSuite.BulkCipher.*; import static sun.security.ssl.JsseJce.*; /** @@ -129,33 +131,15 @@ final class CipherSuite implements Comparable { * Constructor for implemented CipherSuites. */ private CipherSuite(String name, int id, int priority, - KeyExchange keyExchange, BulkCipher cipher, + KeyExchange keyExchange, BulkCipher cipher, MacAlg mac, boolean allowed, int obsoleted, int supported, PRF prfAlg) { this.name = name; this.id = id; this.priority = priority; this.keyExchange = keyExchange; this.cipher = cipher; + this.macAlg = mac; this.exportable = cipher.exportable; - if (cipher.cipherType == CipherType.AEAD_CIPHER) { - macAlg = M_NULL; - } else if (name.endsWith("_MD5")) { - macAlg = M_MD5; - } else if (name.endsWith("_SHA")) { - macAlg = M_SHA; - } else if (name.endsWith("_SHA256")) { - macAlg = M_SHA256; - } else if (name.endsWith("_SHA384")) { - macAlg = M_SHA384; - } else if (name.endsWith("_NULL")) { - macAlg = M_NULL; - } else if (name.endsWith("_SCSV")) { - macAlg = M_NULL; - } else { - throw new IllegalArgumentException - ("Unknown MAC algorithm for ciphersuite " + name); - } - allowed &= keyExchange.allowed; allowed &= cipher.allowed; this.allowed = allowed; @@ -269,11 +253,11 @@ final class CipherSuite implements Comparable { * TLS 1.2+ that doesn't use the "default" PRF. */ private static void add(String name, int id, int priority, - KeyExchange keyExchange, BulkCipher cipher, + KeyExchange keyExchange, BulkCipher cipher, MacAlg mac, boolean allowed, int obsoleted, int supported, PRF prf) { CipherSuite c = new CipherSuite(name, id, priority, keyExchange, - cipher, allowed, obsoleted, supported, prf); + cipher, mac, allowed, obsoleted, supported, prf); if (idMap.put(id, c) != null) { throw new RuntimeException("Duplicate ciphersuite definition: " + id + ", " + name); @@ -294,16 +278,13 @@ final class CipherSuite implements Comparable { * All cipher suites in this document use P_SHA256. */ private static void add(String name, int id, int priority, - KeyExchange keyExchange, BulkCipher cipher, + KeyExchange keyExchange, BulkCipher cipher, MacAlg mac, boolean allowed, int obsoleted) { // If this is an obsoleted suite, then don't let the TLS 1.2 // protocol have a valid PRF value. - PRF prf = P_SHA256; - if (obsoleted < ProtocolVersion.TLS12.v) { - prf = P_NONE; - } + PRF prf = obsoleted < ProtocolVersion.TLS12.v ? P_NONE : P_SHA256; - add(name, id, priority, keyExchange, cipher, allowed, obsoleted, + add(name, id, priority, keyExchange, cipher, mac, allowed, obsoleted, ProtocolVersion.LIMIT_MIN_VALUE, prf); } @@ -312,9 +293,10 @@ final class CipherSuite implements Comparable { * suites which have not been obsoleted. */ private static void add(String name, int id, int priority, - KeyExchange keyExchange, BulkCipher cipher, boolean allowed) { - add(name, id, priority, keyExchange, - cipher, allowed, ProtocolVersion.LIMIT_MAX_VALUE); + KeyExchange keyExchange, BulkCipher cipher, MacAlg mac, + boolean allowed) { + add(name, id, priority, keyExchange, cipher, mac, allowed, + ProtocolVersion.LIMIT_MAX_VALUE); } /* @@ -402,7 +384,23 @@ final class CipherSuite implements Comparable { * Also contains a factory method to obtain in initialized CipherBox * for this algorithm. */ - final static class BulkCipher { + static enum BulkCipher { + + // export strength ciphers + B_NULL("NULL", STREAM_CIPHER, 0, 0, 0, 0, true), + B_RC4_40(CIPHER_RC4, STREAM_CIPHER, 5, 16, 0, 0, true), + B_RC2_40("RC2", BLOCK_CIPHER, 5, 16, 8, 0, false), + B_DES_40(CIPHER_DES, BLOCK_CIPHER, 5, 8, 8, 0, true), + + // domestic strength ciphers + B_RC4_128(CIPHER_RC4, STREAM_CIPHER, 16, 0, 0, true), + B_DES(CIPHER_DES, BLOCK_CIPHER, 8, 8, 0, true), + B_3DES(CIPHER_3DES, BLOCK_CIPHER, 24, 8, 0, true), + B_IDEA("IDEA", BLOCK_CIPHER, 16, 8, 0, false), + B_AES_128(CIPHER_AES, BLOCK_CIPHER, 16, 16, 0, true), + B_AES_256(CIPHER_AES, BLOCK_CIPHER, 32, 16, 0, true), + B_AES_128_GCM(CIPHER_AES_GCM, AEAD_CIPHER, 16, 12, 4, true), + B_AES_256_GCM(CIPHER_AES_GCM, AEAD_CIPHER, 32, 12, 4, true); // Map BulkCipher -> Boolean(available) private final static Map availableCache = @@ -600,7 +598,13 @@ final class CipherSuite implements Comparable { * Also contains a factory method to obtain an initialized MAC * for this algorithm. */ - final static class MacAlg { + static enum MacAlg { + // MACs + M_NULL ("NULL", 0, 0, 0), + M_MD5 ("MD5", 16, 64, 9), + M_SHA ("SHA", 20, 64, 9), + M_SHA256 ("SHA256", 32, 64, 9), + M_SHA384 ("SHA384", 48, 128, 17); // descriptive name, e.g. MD5 final String name; @@ -639,41 +643,6 @@ final class CipherSuite implements Comparable { } } - // export strength ciphers - final static BulkCipher B_NULL = - new BulkCipher("NULL", STREAM_CIPHER, 0, 0, 0, 0, true); - final static BulkCipher B_RC4_40 = - new BulkCipher(CIPHER_RC4, STREAM_CIPHER, 5, 16, 0, 0, true); - final static BulkCipher B_RC2_40 = - new BulkCipher("RC2", BLOCK_CIPHER, 5, 16, 8, 0, false); - final static BulkCipher B_DES_40 = - new BulkCipher(CIPHER_DES, BLOCK_CIPHER, 5, 8, 8, 0, true); - - // domestic strength ciphers - final static BulkCipher B_RC4_128 = - new BulkCipher(CIPHER_RC4, STREAM_CIPHER, 16, 0, 0, true); - final static BulkCipher B_DES = - new BulkCipher(CIPHER_DES, BLOCK_CIPHER, 8, 8, 0, true); - final static BulkCipher B_3DES = - new BulkCipher(CIPHER_3DES, BLOCK_CIPHER, 24, 8, 0, true); - final static BulkCipher B_IDEA = - new BulkCipher("IDEA", BLOCK_CIPHER, 16, 8, 0, false); - final static BulkCipher B_AES_128 = - new BulkCipher(CIPHER_AES, BLOCK_CIPHER, 16, 16, 0, true); - final static BulkCipher B_AES_256 = - new BulkCipher(CIPHER_AES, BLOCK_CIPHER, 32, 16, 0, true); - final static BulkCipher B_AES_128_GCM = - new BulkCipher(CIPHER_AES_GCM, AEAD_CIPHER, 16, 12, 4, true); - final static BulkCipher B_AES_256_GCM = - new BulkCipher(CIPHER_AES_GCM, AEAD_CIPHER, 32, 12, 4, true); - - // MACs - final static MacAlg M_NULL = new MacAlg("NULL", 0, 0, 0); - final static MacAlg M_MD5 = new MacAlg("MD5", 16, 64, 9); - final static MacAlg M_SHA = new MacAlg("SHA", 20, 64, 9); - final static MacAlg M_SHA256 = new MacAlg("SHA256", 32, 64, 9); - final static MacAlg M_SHA384 = new MacAlg("SHA384", 48, 128, 17); - /** * PRFs (PseudoRandom Function) from TLS specifications. * @@ -958,8 +927,8 @@ final class CipherSuite implements Comparable { * 0xFF,0x00-FF Reserved for Private Use [RFC5246] */ - add("SSL_NULL_WITH_NULL_NULL", - 0x0000, 1, K_NULL, B_NULL, F); + add("SSL_NULL_WITH_NULL_NULL", 0x0000, + 1, K_NULL, B_NULL, M_NULL, F); /* * Definition of the CipherSuites that are enabled by default. @@ -992,134 +961,134 @@ final class CipherSuite implements Comparable { // of RFC 6460. In this section, only two cipher suites are listed // so that applications can make use of Suite-B compliant cipher // suite firstly. - add("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", - 0xc02c, --p, K_ECDHE_ECDSA, B_AES_256_GCM, T, max, tls12, P_SHA384); - add("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", - 0xc02b, --p, K_ECDHE_ECDSA, B_AES_128_GCM, T, max, tls12, P_SHA256); + add("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", 0xc02c, --p, + K_ECDHE_ECDSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384); + add("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", 0xc02b, --p, + K_ECDHE_ECDSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256); // AES_256(GCM) - add("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", - 0xc030, --p, K_ECDHE_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384); - add("TLS_RSA_WITH_AES_256_GCM_SHA384", - 0x009d, --p, K_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384); - add("TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384", - 0xc02e, --p, K_ECDH_ECDSA, B_AES_256_GCM, T, max, tls12, P_SHA384); - add("TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384", - 0xc032, --p, K_ECDH_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384); - add("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", - 0x009f, --p, K_DHE_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384); - add("TLS_DHE_DSS_WITH_AES_256_GCM_SHA384", - 0x00a3, --p, K_DHE_DSS, B_AES_256_GCM, T, max, tls12, P_SHA384); + add("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", 0xc030, --p, + K_ECDHE_RSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384); + add("TLS_RSA_WITH_AES_256_GCM_SHA384", 0x009d, --p, + K_RSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384); + add("TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384", 0xc02e, --p, + K_ECDH_ECDSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384); + add("TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384", 0xc032, --p, + K_ECDH_RSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384); + add("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", 0x009f, --p, + K_DHE_RSA, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384); + add("TLS_DHE_DSS_WITH_AES_256_GCM_SHA384", 0x00a3, --p, + K_DHE_DSS, B_AES_256_GCM, M_NULL, T, max, tls12, P_SHA384); // AES_128(GCM) - add("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", - 0xc02f, --p, K_ECDHE_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256); - add("TLS_RSA_WITH_AES_128_GCM_SHA256", - 0x009c, --p, K_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256); - add("TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256", - 0xc02d, --p, K_ECDH_ECDSA, B_AES_128_GCM, T, max, tls12, P_SHA256); - add("TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256", - 0xc031, --p, K_ECDH_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256); - add("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", - 0x009e, --p, K_DHE_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256); - add("TLS_DHE_DSS_WITH_AES_128_GCM_SHA256", - 0x00a2, --p, K_DHE_DSS, B_AES_128_GCM, T, max, tls12, P_SHA256); + add("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", 0xc02f, --p, + K_ECDHE_RSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256); + add("TLS_RSA_WITH_AES_128_GCM_SHA256", 0x009c, --p, + K_RSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256); + add("TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256", 0xc02d, --p, + K_ECDH_ECDSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256); + add("TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256", 0xc031, --p, + K_ECDH_RSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256); + add("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", 0x009e, --p, + K_DHE_RSA, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256); + add("TLS_DHE_DSS_WITH_AES_128_GCM_SHA256", 0x00a2, --p, + K_DHE_DSS, B_AES_128_GCM, M_NULL, T, max, tls12, P_SHA256); // AES_256(CBC) - add("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", - 0xc024, --p, K_ECDHE_ECDSA, B_AES_256, T, max, tls12, P_SHA384); - add("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", - 0xc028, --p, K_ECDHE_RSA, B_AES_256, T, max, tls12, P_SHA384); - add("TLS_RSA_WITH_AES_256_CBC_SHA256", - 0x003d, --p, K_RSA, B_AES_256, T, max, tls12, P_SHA256); - add("TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384", - 0xc026, --p, K_ECDH_ECDSA, B_AES_256, T, max, tls12, P_SHA384); - add("TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384", - 0xc02a, --p, K_ECDH_RSA, B_AES_256, T, max, tls12, P_SHA384); - add("TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", - 0x006b, --p, K_DHE_RSA, B_AES_256, T, max, tls12, P_SHA256); - add("TLS_DHE_DSS_WITH_AES_256_CBC_SHA256", - 0x006a, --p, K_DHE_DSS, B_AES_256, T, max, tls12, P_SHA256); + add("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", 0xc024, --p, + K_ECDHE_ECDSA, B_AES_256, M_SHA384, T, max, tls12, P_SHA384); + add("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", 0xc028, --p, + K_ECDHE_RSA, B_AES_256, M_SHA384, T, max, tls12, P_SHA384); + add("TLS_RSA_WITH_AES_256_CBC_SHA256", 0x003d, --p, + K_RSA, B_AES_256, M_SHA256, T, max, tls12, P_SHA256); + add("TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384", 0xc026, --p, + K_ECDH_ECDSA, B_AES_256, M_SHA384, T, max, tls12, P_SHA384); + add("TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384", 0xc02a, --p, + K_ECDH_RSA, B_AES_256, M_SHA384, T, max, tls12, P_SHA384); + add("TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", 0x006b, --p, + K_DHE_RSA, B_AES_256, M_SHA256, T, max, tls12, P_SHA256); + add("TLS_DHE_DSS_WITH_AES_256_CBC_SHA256", 0x006a, --p, + K_DHE_DSS, B_AES_256, M_SHA256, T, max, tls12, P_SHA256); - add("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", - 0xC00A, --p, K_ECDHE_ECDSA, B_AES_256, T); - add("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", - 0xC014, --p, K_ECDHE_RSA, B_AES_256, T); - add("TLS_RSA_WITH_AES_256_CBC_SHA", - 0x0035, --p, K_RSA, B_AES_256, T); - add("TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA", - 0xC005, --p, K_ECDH_ECDSA, B_AES_256, T); - add("TLS_ECDH_RSA_WITH_AES_256_CBC_SHA", - 0xC00F, --p, K_ECDH_RSA, B_AES_256, T); - add("TLS_DHE_RSA_WITH_AES_256_CBC_SHA", - 0x0039, --p, K_DHE_RSA, B_AES_256, T); - add("TLS_DHE_DSS_WITH_AES_256_CBC_SHA", - 0x0038, --p, K_DHE_DSS, B_AES_256, T); + add("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", 0xC00A, --p, + K_ECDHE_ECDSA, B_AES_256, M_SHA, T); + add("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", 0xC014, --p, + K_ECDHE_RSA, B_AES_256, M_SHA, T); + add("TLS_RSA_WITH_AES_256_CBC_SHA", 0x0035, --p, + K_RSA, B_AES_256, M_SHA, T); + add("TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA", 0xC005, --p, + K_ECDH_ECDSA, B_AES_256, M_SHA, T); + add("TLS_ECDH_RSA_WITH_AES_256_CBC_SHA", 0xC00F, --p, + K_ECDH_RSA, B_AES_256, M_SHA, T); + add("TLS_DHE_RSA_WITH_AES_256_CBC_SHA", 0x0039, --p, + K_DHE_RSA, B_AES_256, M_SHA, T); + add("TLS_DHE_DSS_WITH_AES_256_CBC_SHA", 0x0038, --p, + K_DHE_DSS, B_AES_256, M_SHA, T); // AES_128(CBC) - add("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", - 0xc023, --p, K_ECDHE_ECDSA, B_AES_128, T, max, tls12, P_SHA256); - add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", - 0xc027, --p, K_ECDHE_RSA, B_AES_128, T, max, tls12, P_SHA256); - add("TLS_RSA_WITH_AES_128_CBC_SHA256", - 0x003c, --p, K_RSA, B_AES_128, T, max, tls12, P_SHA256); - add("TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256", - 0xc025, --p, K_ECDH_ECDSA, B_AES_128, T, max, tls12, P_SHA256); - add("TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256", - 0xc029, --p, K_ECDH_RSA, B_AES_128, T, max, tls12, P_SHA256); - add("TLS_DHE_RSA_WITH_AES_128_CBC_SHA256", - 0x0067, --p, K_DHE_RSA, B_AES_128, T, max, tls12, P_SHA256); - add("TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", - 0x0040, --p, K_DHE_DSS, B_AES_128, T, max, tls12, P_SHA256); + add("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", 0xc023, --p, + K_ECDHE_ECDSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256); + add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", 0xc027, --p, + K_ECDHE_RSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256); + add("TLS_RSA_WITH_AES_128_CBC_SHA256", 0x003c, --p, + K_RSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256); + add("TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256", 0xc025, --p, + K_ECDH_ECDSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256); + add("TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256", 0xc029, --p, + K_ECDH_RSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256); + add("TLS_DHE_RSA_WITH_AES_128_CBC_SHA256", 0x0067, --p, + K_DHE_RSA, B_AES_128, M_SHA256, T, max, tls12, P_SHA256); + add("TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", 0x0040, --p, + K_DHE_DSS, B_AES_128, M_SHA256, T, max, tls12, P_SHA256); - add("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", - 0xC009, --p, K_ECDHE_ECDSA, B_AES_128, T); - add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", - 0xC013, --p, K_ECDHE_RSA, B_AES_128, T); - add("TLS_RSA_WITH_AES_128_CBC_SHA", - 0x002f, --p, K_RSA, B_AES_128, T); - add("TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA", - 0xC004, --p, K_ECDH_ECDSA, B_AES_128, T); - add("TLS_ECDH_RSA_WITH_AES_128_CBC_SHA", - 0xC00E, --p, K_ECDH_RSA, B_AES_128, T); - add("TLS_DHE_RSA_WITH_AES_128_CBC_SHA", - 0x0033, --p, K_DHE_RSA, B_AES_128, T); - add("TLS_DHE_DSS_WITH_AES_128_CBC_SHA", - 0x0032, --p, K_DHE_DSS, B_AES_128, T); + add("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", 0xC009, --p, + K_ECDHE_ECDSA, B_AES_128, M_SHA, T); + add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", 0xC013, --p, + K_ECDHE_RSA, B_AES_128, M_SHA, T); + add("TLS_RSA_WITH_AES_128_CBC_SHA", 0x002f, --p, + K_RSA, B_AES_128, M_SHA, T); + add("TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA", 0xC004, --p, + K_ECDH_ECDSA, B_AES_128, M_SHA, T); + add("TLS_ECDH_RSA_WITH_AES_128_CBC_SHA", 0xC00E, --p, + K_ECDH_RSA, B_AES_128, M_SHA, T); + add("TLS_DHE_RSA_WITH_AES_128_CBC_SHA", 0x0033, --p, + K_DHE_RSA, B_AES_128, M_SHA, T); + add("TLS_DHE_DSS_WITH_AES_128_CBC_SHA", 0x0032, --p, + K_DHE_DSS, B_AES_128, M_SHA, T); // 3DES_EDE - add("TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA", - 0xC008, --p, K_ECDHE_ECDSA, B_3DES, T); - add("TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", - 0xC012, --p, K_ECDHE_RSA, B_3DES, T); - add("SSL_RSA_WITH_3DES_EDE_CBC_SHA", - 0x000a, --p, K_RSA, B_3DES, T); - add("TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA", - 0xC003, --p, K_ECDH_ECDSA, B_3DES, T); - add("TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA", - 0xC00D, --p, K_ECDH_RSA, B_3DES, T); - add("SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA", - 0x0016, --p, K_DHE_RSA, B_3DES, T); - add("SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA", - 0x0013, --p, K_DHE_DSS, B_3DES, N); + add("TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA", 0xC008, --p, + K_ECDHE_ECDSA, B_3DES, M_SHA, T); + add("TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", 0xC012, --p, + K_ECDHE_RSA, B_3DES, M_SHA, T); + add("SSL_RSA_WITH_3DES_EDE_CBC_SHA", 0x000a, --p, + K_RSA, B_3DES, M_SHA, T); + add("TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA", 0xC003, --p, + K_ECDH_ECDSA, B_3DES, M_SHA, T); + add("TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA", 0xC00D, --p, + K_ECDH_RSA, B_3DES, M_SHA, T); + add("SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA", 0x0016, --p, + K_DHE_RSA, B_3DES, M_SHA, T); + add("SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA", 0x0013, --p, + K_DHE_DSS, B_3DES, M_SHA, 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); + add("TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", 0xC007, --p, + K_ECDHE_ECDSA, B_RC4_128, M_SHA, N); + add("TLS_ECDHE_RSA_WITH_RC4_128_SHA", 0xC011, --p, + K_ECDHE_RSA, B_RC4_128, M_SHA, N); + add("SSL_RSA_WITH_RC4_128_SHA", 0x0005, --p, + K_RSA, B_RC4_128, M_SHA, N); + add("TLS_ECDH_ECDSA_WITH_RC4_128_SHA", 0xC002, --p, + K_ECDH_ECDSA, B_RC4_128, M_SHA, N); + add("TLS_ECDH_RSA_WITH_RC4_128_SHA", 0xC00C, --p, + K_ECDH_RSA, B_RC4_128, M_SHA, N); + add("SSL_RSA_WITH_RC4_128_MD5", 0x0004, --p, + K_RSA, B_RC4_128, M_MD5, N); // Renegotiation protection request Signalling Cipher Suite Value (SCSV) - add("TLS_EMPTY_RENEGOTIATION_INFO_SCSV", - 0x00ff, --p, K_SCSV, B_NULL, T); + add("TLS_EMPTY_RENEGOTIATION_INFO_SCSV", 0x00ff, --p, + K_SCSV, B_NULL, M_NULL, T); /* * Definition of the CipherSuites that are supported but not enabled @@ -1142,98 +1111,98 @@ final class CipherSuite implements Comparable { */ p = DEFAULT_SUITES_PRIORITY; - add("TLS_DH_anon_WITH_AES_256_GCM_SHA384", - 0x00a7, --p, K_DH_ANON, B_AES_256_GCM, N, max, tls12, P_SHA384); - add("TLS_DH_anon_WITH_AES_128_GCM_SHA256", - 0x00a6, --p, K_DH_ANON, B_AES_128_GCM, N, max, tls12, P_SHA256); + add("TLS_DH_anon_WITH_AES_256_GCM_SHA384", 0x00a7, --p, + K_DH_ANON, B_AES_256_GCM, M_NULL, N, max, tls12, P_SHA384); + add("TLS_DH_anon_WITH_AES_128_GCM_SHA256", 0x00a6, --p, + K_DH_ANON, B_AES_128_GCM, M_NULL, N, max, tls12, P_SHA256); - add("TLS_DH_anon_WITH_AES_256_CBC_SHA256", - 0x006d, --p, K_DH_ANON, B_AES_256, N, max, tls12, P_SHA256); - add("TLS_ECDH_anon_WITH_AES_256_CBC_SHA", - 0xC019, --p, K_ECDH_ANON, B_AES_256, N); - add("TLS_DH_anon_WITH_AES_256_CBC_SHA", - 0x003a, --p, K_DH_ANON, B_AES_256, N); + add("TLS_DH_anon_WITH_AES_256_CBC_SHA256", 0x006d, --p, + K_DH_ANON, B_AES_256, M_SHA256, N, max, tls12, P_SHA256); + add("TLS_ECDH_anon_WITH_AES_256_CBC_SHA", 0xC019, --p, + K_ECDH_ANON, B_AES_256, M_SHA, N); + add("TLS_DH_anon_WITH_AES_256_CBC_SHA", 0x003a, --p, + K_DH_ANON, B_AES_256, M_SHA, N); - add("TLS_DH_anon_WITH_AES_128_CBC_SHA256", - 0x006c, --p, K_DH_ANON, B_AES_128, N, max, tls12, P_SHA256); - add("TLS_ECDH_anon_WITH_AES_128_CBC_SHA", - 0xC018, --p, K_ECDH_ANON, B_AES_128, N); - add("TLS_DH_anon_WITH_AES_128_CBC_SHA", - 0x0034, --p, K_DH_ANON, B_AES_128, N); + add("TLS_DH_anon_WITH_AES_128_CBC_SHA256", 0x006c, --p, + K_DH_ANON, B_AES_128, M_SHA256, N, max, tls12, P_SHA256); + add("TLS_ECDH_anon_WITH_AES_128_CBC_SHA", 0xC018, --p, + K_ECDH_ANON, B_AES_128, M_SHA, N); + add("TLS_DH_anon_WITH_AES_128_CBC_SHA", 0x0034, --p, + K_DH_ANON, B_AES_128, M_SHA, 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_ECDH_anon_WITH_3DES_EDE_CBC_SHA", 0xC017, --p, + K_ECDH_ANON, B_3DES, M_SHA, N); + add("SSL_DH_anon_WITH_3DES_EDE_CBC_SHA", 0x001b, --p, + K_DH_ANON, B_3DES, M_SHA, 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_RC4_128_SHA", 0xC016, --p, + K_ECDH_ANON, B_RC4_128, M_SHA, N); + add("SSL_DH_anon_WITH_RC4_128_MD5", 0x0018, --p, + K_DH_ANON, B_RC4_128, M_MD5, N); // weak cipher suites obsoleted in TLS 1.2 - add("SSL_RSA_WITH_DES_CBC_SHA", - 0x0009, --p, K_RSA, B_DES, N, tls12); - add("SSL_DHE_RSA_WITH_DES_CBC_SHA", - 0x0015, --p, K_DHE_RSA, B_DES, N, tls12); - add("SSL_DHE_DSS_WITH_DES_CBC_SHA", - 0x0012, --p, K_DHE_DSS, B_DES, N, tls12); - add("SSL_DH_anon_WITH_DES_CBC_SHA", - 0x001a, --p, K_DH_ANON, B_DES, N, tls12); + add("SSL_RSA_WITH_DES_CBC_SHA", 0x0009, --p, + K_RSA, B_DES, M_SHA, N, tls12); + add("SSL_DHE_RSA_WITH_DES_CBC_SHA", 0x0015, --p, + K_DHE_RSA, B_DES, M_SHA, N, tls12); + add("SSL_DHE_DSS_WITH_DES_CBC_SHA", 0x0012, --p, + K_DHE_DSS, B_DES, M_SHA, N, tls12); + add("SSL_DH_anon_WITH_DES_CBC_SHA", 0x001a, --p, + K_DH_ANON, B_DES, M_SHA, N, tls12); // weak cipher suites obsoleted in TLS 1.1 - 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", - 0x0014, --p, K_DHE_RSA, B_DES_40, N, tls11); - add("SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA", - 0x0011, --p, K_DHE_DSS, B_DES_40, N, tls11); - add("SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA", - 0x0019, --p, K_DH_ANON, B_DES_40, N, tls11); + add("SSL_RSA_EXPORT_WITH_DES40_CBC_SHA", 0x0008, --p, + K_RSA_EXPORT, B_DES_40, M_SHA, N, tls11); + add("SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA", 0x0014, --p, + K_DHE_RSA, B_DES_40, M_SHA, N, tls11); + add("SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA", 0x0011, --p, + K_DHE_DSS, B_DES_40, M_SHA, N, tls11); + add("SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA", 0x0019, --p, + K_DH_ANON, B_DES_40, M_SHA, 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("SSL_RSA_EXPORT_WITH_RC4_40_MD5", 0x0003, --p, + K_RSA_EXPORT, B_RC4_40, M_MD5, N, tls11); + add("SSL_DH_anon_EXPORT_WITH_RC4_40_MD5", 0x0017, --p, + K_DH_ANON, B_RC4_40, M_MD5, 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); + add("TLS_RSA_WITH_NULL_SHA256", 0x003b, --p, + K_RSA, B_NULL, M_SHA256, N, max, tls12, P_SHA256); + add("TLS_ECDHE_ECDSA_WITH_NULL_SHA", 0xC006, --p, + K_ECDHE_ECDSA, B_NULL, M_SHA, N); + add("TLS_ECDHE_RSA_WITH_NULL_SHA", 0xC010, --p, + K_ECDHE_RSA, B_NULL, M_SHA, N); + add("SSL_RSA_WITH_NULL_SHA", 0x0002, --p, + K_RSA, B_NULL, M_SHA, N); + add("TLS_ECDH_ECDSA_WITH_NULL_SHA", 0xC001, --p, + K_ECDH_ECDSA, B_NULL, M_SHA, N); + add("TLS_ECDH_RSA_WITH_NULL_SHA", 0xC00B, --p, + K_ECDH_RSA, B_NULL, M_SHA, N); + add("TLS_ECDH_anon_WITH_NULL_SHA", 0xC015, --p, + K_ECDH_ANON, B_NULL, M_SHA, N); + add("SSL_RSA_WITH_NULL_MD5", 0x0001, --p, + K_RSA, B_NULL, M_MD5, N); // Supported Kerberos ciphersuites from RFC2712 - 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_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); + add("TLS_KRB5_WITH_3DES_EDE_CBC_SHA", 0x001f, --p, + K_KRB5, B_3DES, M_SHA, N); + add("TLS_KRB5_WITH_3DES_EDE_CBC_MD5", 0x0023, --p, + K_KRB5, B_3DES, M_MD5, N); + add("TLS_KRB5_WITH_RC4_128_SHA", 0x0020, --p, + K_KRB5, B_RC4_128, M_SHA, N); + add("TLS_KRB5_WITH_RC4_128_MD5", 0x0024, --p, + K_KRB5, B_RC4_128, M_MD5, N); + add("TLS_KRB5_WITH_DES_CBC_SHA", 0x001e, --p, + K_KRB5, B_DES, M_SHA, N, tls12); + add("TLS_KRB5_WITH_DES_CBC_MD5", 0x0022, --p, + K_KRB5, B_DES, M_MD5, N, tls12); + add("TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA", 0x0026, --p, + K_KRB5_EXPORT, B_DES_40, M_SHA, N, tls11); + add("TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5", 0x0029, --p, + K_KRB5_EXPORT, B_DES_40, M_MD5, N, tls11); + add("TLS_KRB5_EXPORT_WITH_RC4_40_SHA", 0x0028, --p, + K_KRB5_EXPORT, B_RC4_40, M_SHA, N, tls11); + add("TLS_KRB5_EXPORT_WITH_RC4_40_MD5", 0x002b, --p, + K_KRB5_EXPORT, B_RC4_40, M_MD5, N, tls11); /* * Other values from the TLS Cipher Suite Registry, as of August 2010. diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/MAC.java b/jdk/src/java.base/share/classes/sun/security/ssl/MAC.java index dc03a3a2bb0..f1d9b9e635b 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/MAC.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/MAC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2015, 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 @@ -36,6 +36,7 @@ import javax.crypto.SecretKey; import sun.security.ssl.CipherSuite.MacAlg; import static sun.security.ssl.CipherSuite.*; +import static sun.security.ssl.CipherSuite.MacAlg.*; /** * This class computes the "Message Authentication Code" (MAC) for each diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/SSLAlgorithmConstraints.java b/jdk/src/java.base/share/classes/sun/security/ssl/SSLAlgorithmConstraints.java index 14d76d8a8f5..80cc7a5fae6 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLAlgorithmConstraints.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLAlgorithmConstraints.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2015, 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 @@ -382,18 +382,18 @@ final class SSLAlgorithmConstraints implements AlgorithmConstraints { protected Set decomposes(MacAlg macAlg) { Set components = new HashSet<>(); - if (macAlg == CipherSuite.M_MD5) { + if (macAlg == CipherSuite.MacAlg.M_MD5) { components.add("MD5"); components.add("HmacMD5"); - } else if (macAlg == CipherSuite.M_SHA) { + } else if (macAlg == CipherSuite.MacAlg.M_SHA) { components.add("SHA1"); components.add("SHA-1"); components.add("HmacSHA1"); - } else if (macAlg == CipherSuite.M_SHA256) { + } else if (macAlg == CipherSuite.MacAlg.M_SHA256) { components.add("SHA256"); components.add("SHA-256"); components.add("HmacSHA256"); - } else if (macAlg == CipherSuite.M_SHA384) { + } else if (macAlg == CipherSuite.MacAlg.M_SHA384) { components.add("SHA384"); components.add("SHA-384"); components.add("HmacSHA384"); From cb566c6ce55ddeacbf7e3284113a8717a576c1da Mon Sep 17 00:00:00 2001 From: Aggelos Biboudis Date: Mon, 16 Mar 2015 10:19:49 +0100 Subject: [PATCH 47/58] 8067969: Optimize Stream.count for SIZED Streams Reviewed-by: psandoz, chegar --- .../java/util/stream/DoublePipeline.java | 4 +- .../java/util/stream/DoubleStream.java | 18 ++ .../classes/java/util/stream/IntPipeline.java | 4 +- .../classes/java/util/stream/IntStream.java | 18 ++ .../java/util/stream/LongPipeline.java | 4 +- .../classes/java/util/stream/LongStream.java | 18 ++ .../classes/java/util/stream/ReduceOps.java | 189 +++++++++++++++++- .../java/util/stream/ReferencePipeline.java | 5 +- .../classes/java/util/stream/Stream.java | 19 ++ .../java/util/stream/CountLargeTest.java | 68 +++++-- .../tests/java/util/stream/CountTest.java | 52 ++++- 11 files changed, 368 insertions(+), 31 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/util/stream/DoublePipeline.java b/jdk/src/java.base/share/classes/java/util/stream/DoublePipeline.java index 3e9cddbd324..eb1d97195e5 100644 --- a/jdk/src/java.base/share/classes/java/util/stream/DoublePipeline.java +++ b/jdk/src/java.base/share/classes/java/util/stream/DoublePipeline.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2015, 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 @@ -447,7 +447,7 @@ abstract class DoublePipeline @Override public final long count() { - return mapToLong(e -> 1L).sum(); + return evaluate(ReduceOps.makeDoubleCounting()); } @Override diff --git a/jdk/src/java.base/share/classes/java/util/stream/DoubleStream.java b/jdk/src/java.base/share/classes/java/util/stream/DoubleStream.java index be6cc98aa60..8f272bf4b1d 100644 --- a/jdk/src/java.base/share/classes/java/util/stream/DoubleStream.java +++ b/jdk/src/java.base/share/classes/java/util/stream/DoubleStream.java @@ -581,6 +581,24 @@ public interface DoubleStream extends BaseStream { * *

    This is a terminal operation. * + * @apiNote + * An implementation may choose to not execute the stream pipeline (either + * sequentially or in parallel) if it is capable of computing the count + * directly from the stream source. In such cases no source elements will + * be traversed and no intermediate operations will be evaluated. + * Behavioral parameters with side-effects, which are strongly discouraged + * except for harmless cases such as debugging, may be affected. For + * example, consider the following stream: + *

    {@code
    +     *     DoubleStream s = DoubleStream.of(1, 2, 3, 4);
    +     *     long count = s.peek(System.out::println).count();
    +     * }
    + * The number of elements covered by the stream source is known and the + * intermediate operation, {@code peek}, does not inject into or remove + * elements from the stream (as may be the case for {@code flatMap} or + * {@code filter} operations). Thus the count is 4 and there is no need to + * execute the pipeline and, as a side-effect, print out the elements. + * * @return the count of elements in this stream */ long count(); diff --git a/jdk/src/java.base/share/classes/java/util/stream/IntPipeline.java b/jdk/src/java.base/share/classes/java/util/stream/IntPipeline.java index 313045f96c7..9c0162f1ce3 100644 --- a/jdk/src/java.base/share/classes/java/util/stream/IntPipeline.java +++ b/jdk/src/java.base/share/classes/java/util/stream/IntPipeline.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2015, 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 @@ -427,7 +427,7 @@ abstract class IntPipeline @Override public final long count() { - return mapToLong(e -> 1L).sum(); + return evaluate(ReduceOps.makeIntCounting()); } @Override diff --git a/jdk/src/java.base/share/classes/java/util/stream/IntStream.java b/jdk/src/java.base/share/classes/java/util/stream/IntStream.java index b68084b5d40..4bb1ab5b97e 100644 --- a/jdk/src/java.base/share/classes/java/util/stream/IntStream.java +++ b/jdk/src/java.base/share/classes/java/util/stream/IntStream.java @@ -504,6 +504,24 @@ public interface IntStream extends BaseStream { * *

    This is a terminal operation. * + * @apiNote + * An implementation may choose to not execute the stream pipeline (either + * sequentially or in parallel) if it is capable of computing the count + * directly from the stream source. In such cases no source elements will + * be traversed and no intermediate operations will be evaluated. + * Behavioral parameters with side-effects, which are strongly discouraged + * except for harmless cases such as debugging, may be affected. For + * example, consider the following stream: + *

    {@code
    +     *     IntStream s = IntStream.of(1, 2, 3, 4);
    +     *     long count = s.peek(System.out::println).count();
    +     * }
    + * The number of elements covered by the stream source is known and the + * intermediate operation, {@code peek}, does not inject into or remove + * elements from the stream (as may be the case for {@code flatMap} or + * {@code filter} operations). Thus the count is 4 and there is no need to + * execute the pipeline and, as a side-effect, print out the elements. + * * @return the count of elements in this stream */ long count(); diff --git a/jdk/src/java.base/share/classes/java/util/stream/LongPipeline.java b/jdk/src/java.base/share/classes/java/util/stream/LongPipeline.java index fab01a21118..7a84ff997e7 100644 --- a/jdk/src/java.base/share/classes/java/util/stream/LongPipeline.java +++ b/jdk/src/java.base/share/classes/java/util/stream/LongPipeline.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2015, 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 @@ -425,7 +425,7 @@ abstract class LongPipeline @Override public final long count() { - return map(e -> 1L).sum(); + return evaluate(ReduceOps.makeLongCounting()); } @Override diff --git a/jdk/src/java.base/share/classes/java/util/stream/LongStream.java b/jdk/src/java.base/share/classes/java/util/stream/LongStream.java index 14d6d0b5eb9..4f9c72bef42 100644 --- a/jdk/src/java.base/share/classes/java/util/stream/LongStream.java +++ b/jdk/src/java.base/share/classes/java/util/stream/LongStream.java @@ -509,6 +509,24 @@ public interface LongStream extends BaseStream { * *

    This is a terminal operation. * + * @apiNote + * An implementation may choose to not execute the stream pipeline (either + * sequentially or in parallel) if it is capable of computing the count + * directly from the stream source. In such cases no source elements will + * be traversed and no intermediate operations will be evaluated. + * Behavioral parameters with side-effects, which are strongly discouraged + * except for harmless cases such as debugging, may be affected. For + * example, consider the following stream: + *

    {@code
    +     *     LongStream s = LongStream.of(1, 2, 3, 4);
    +     *     long count = s.peek(System.out::println).count();
    +     * }
    + * The number of elements covered by the stream source is known and the + * intermediate operation, {@code peek}, does not inject into or remove + * elements from the stream (as may be the case for {@code flatMap} or + * {@code filter} operations). Thus the count is 4 and there is no need to + * execute the pipeline and, as a side-effect, print out the elements. + * * @return the count of elements in this stream */ long count(); diff --git a/jdk/src/java.base/share/classes/java/util/stream/ReduceOps.java b/jdk/src/java.base/share/classes/java/util/stream/ReduceOps.java index 3a0f81a0f72..97433010ec3 100644 --- a/jdk/src/java.base/share/classes/java/util/stream/ReduceOps.java +++ b/jdk/src/java.base/share/classes/java/util/stream/ReduceOps.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2015, 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 @@ -233,6 +233,40 @@ final class ReduceOps { }; } + /** + * Constructs a {@code TerminalOp} that counts the number of stream + * elements. If the size of the pipeline is known then count is the size + * and there is no need to evaluate the pipeline. If the size of the + * pipeline is non known then count is produced, via reduction, using a + * {@link CountingSink}. + * + * @param the type of the input elements + * @return a {@code TerminalOp} implementing the counting + */ + public static TerminalOp + makeRefCounting() { + return new ReduceOp>(StreamShape.REFERENCE) { + @Override + public CountingSink makeSink() { return new CountingSink.OfRef<>(); } + + @Override + public Long evaluateSequential(PipelineHelper helper, + Spliterator spliterator) { + if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags())) + return spliterator.getExactSizeIfKnown(); + return super.evaluateSequential(helper, spliterator); + } + + @Override + public Long evaluateParallel(PipelineHelper helper, + Spliterator spliterator) { + if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags())) + return spliterator.getExactSizeIfKnown(); + return super.evaluateParallel(helper, spliterator); + } + }; + } + /** * Constructs a {@code TerminalOp} that implements a functional reduce on * {@code int} values. @@ -369,6 +403,39 @@ final class ReduceOps { }; } + /** + * Constructs a {@code TerminalOp} that counts the number of stream + * elements. If the size of the pipeline is known then count is the size + * and there is no need to evaluate the pipeline. If the size of the + * pipeline is non known then count is produced, via reduction, using a + * {@link CountingSink}. + * + * @return a {@code TerminalOp} implementing the counting + */ + public static TerminalOp + makeIntCounting() { + return new ReduceOp>(StreamShape.REFERENCE) { + @Override + public CountingSink makeSink() { return new CountingSink.OfInt(); } + + @Override + public Long evaluateSequential(PipelineHelper helper, + Spliterator spliterator) { + if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags())) + return spliterator.getExactSizeIfKnown(); + return super.evaluateSequential(helper, spliterator); + } + + @Override + public Long evaluateParallel(PipelineHelper helper, + Spliterator spliterator) { + if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags())) + return spliterator.getExactSizeIfKnown(); + return super.evaluateParallel(helper, spliterator); + } + }; + } + /** * Constructs a {@code TerminalOp} that implements a functional reduce on * {@code long} values. @@ -505,6 +572,39 @@ final class ReduceOps { }; } + /** + * Constructs a {@code TerminalOp} that counts the number of stream + * elements. If the size of the pipeline is known then count is the size + * and there is no need to evaluate the pipeline. If the size of the + * pipeline is non known then count is produced, via reduction, using a + * {@link CountingSink}. + * + * @return a {@code TerminalOp} implementing the counting + */ + public static TerminalOp + makeLongCounting() { + return new ReduceOp>(StreamShape.REFERENCE) { + @Override + public CountingSink makeSink() { return new CountingSink.OfLong(); } + + @Override + public Long evaluateSequential(PipelineHelper helper, + Spliterator spliterator) { + if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags())) + return spliterator.getExactSizeIfKnown(); + return super.evaluateSequential(helper, spliterator); + } + + @Override + public Long evaluateParallel(PipelineHelper helper, + Spliterator spliterator) { + if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags())) + return spliterator.getExactSizeIfKnown(); + return super.evaluateParallel(helper, spliterator); + } + }; + } + /** * Constructs a {@code TerminalOp} that implements a functional reduce on * {@code double} values. @@ -641,6 +741,91 @@ final class ReduceOps { }; } + /** + * Constructs a {@code TerminalOp} that counts the number of stream + * elements. If the size of the pipeline is known then count is the size + * and there is no need to evaluate the pipeline. If the size of the + * pipeline is non known then count is produced, via reduction, using a + * {@link CountingSink}. + * + * @return a {@code TerminalOp} implementing the counting + */ + public static TerminalOp + makeDoubleCounting() { + return new ReduceOp>(StreamShape.REFERENCE) { + @Override + public CountingSink makeSink() { return new CountingSink.OfDouble(); } + + @Override + public Long evaluateSequential(PipelineHelper helper, + Spliterator spliterator) { + if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags())) + return spliterator.getExactSizeIfKnown(); + return super.evaluateSequential(helper, spliterator); + } + + @Override + public Long evaluateParallel(PipelineHelper helper, + Spliterator spliterator) { + if (StreamOpFlag.SIZED.isKnown(helper.getStreamAndOpFlags())) + return spliterator.getExactSizeIfKnown(); + return super.evaluateParallel(helper, spliterator); + } + }; + } + + /** + * A sink that counts elements + */ + static abstract class CountingSink + extends Box + implements AccumulatingSink> { + long count; + + @Override + public void begin(long size) { + count = 0L; + } + + @Override + public Long get() { + return count; + } + + @Override + public void combine(CountingSink other) { + count += other.count; + } + + static final class OfRef extends CountingSink { + @Override + public void accept(T t) { + count++; + } + } + + static final class OfInt extends CountingSink implements Sink.OfInt { + @Override + public void accept(int t) { + count++; + } + } + + static final class OfLong extends CountingSink implements Sink.OfLong { + @Override + public void accept(long t) { + count++; + } + } + + static final class OfDouble extends CountingSink implements Sink.OfDouble { + @Override + public void accept(double t) { + count++; + } + } + } + /** * A type of {@code TerminalSink} that implements an associative reducing * operation on elements of type {@code T} and producing a result of type @@ -652,7 +837,7 @@ final class ReduceOps { */ private interface AccumulatingSink> extends TerminalSink { - public void combine(K other); + void combine(K other); } /** diff --git a/jdk/src/java.base/share/classes/java/util/stream/ReferencePipeline.java b/jdk/src/java.base/share/classes/java/util/stream/ReferencePipeline.java index 8f5da0e55e7..4402997958b 100644 --- a/jdk/src/java.base/share/classes/java/util/stream/ReferencePipeline.java +++ b/jdk/src/java.base/share/classes/java/util/stream/ReferencePipeline.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2015, 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 @@ -523,10 +523,9 @@ abstract class ReferencePipeline @Override public final long count() { - return mapToLong(e -> 1L).sum(); + return evaluate(ReduceOps.makeRefCounting()); } - // /** diff --git a/jdk/src/java.base/share/classes/java/util/stream/Stream.java b/jdk/src/java.base/share/classes/java/util/stream/Stream.java index b5eb2c9f566..e0e26ff385f 100644 --- a/jdk/src/java.base/share/classes/java/util/stream/Stream.java +++ b/jdk/src/java.base/share/classes/java/util/stream/Stream.java @@ -851,6 +851,25 @@ public interface Stream extends BaseStream> { * *

    This is a terminal operation. * + * @apiNote + * An implementation may choose to not execute the stream pipeline (either + * sequentially or in parallel) if it is capable of computing the count + * directly from the stream source. In such cases no source elements will + * be traversed and no intermediate operations will be evaluated. + * Behavioral parameters with side-effects, which are strongly discouraged + * except for harmless cases such as debugging, may be affected. For + * example, consider the following stream: + *

    {@code
    +     *     List l = Arrays.asList("A", "B", "C", "D");
    +     *     long count = l.stream().peek(System.out::println).count();
    +     * }
    + * The number of elements covered by the stream source, a {@code List}, is + * known and the intermediate operation, {@code peek}, does not inject into + * or remove elements from the stream (as may be the case for + * {@code flatMap} or {@code filter} operations). Thus the count is the + * size of the {@code List} and there is no need to execute the pipeline + * and, as a side-effect, print out the list elements. + * * @return the count of elements in this stream */ long count(); diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CountLargeTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CountLargeTest.java index 9b87a09f344..8ddb3fc6890 100644 --- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CountLargeTest.java +++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CountLargeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2015, 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 @@ -24,7 +24,7 @@ /** * @test * @summary Tests counting of streams containing Integer.MAX_VALUE + 1 elements - * @bug 8031187 + * @bug 8031187 8067969 */ package org.openjdk.tests.java.util.stream; @@ -41,30 +41,62 @@ public class CountLargeTest { static final long EXPECTED_LARGE_COUNT = 1L + Integer.MAX_VALUE; public void testRefLarge() { - long count = LongStream.range(0, EXPECTED_LARGE_COUNT) - .mapToObj(e -> null).count(); - - assertEquals(count, EXPECTED_LARGE_COUNT); + // Test known sized stream + { + long count = LongStream.range(0, EXPECTED_LARGE_COUNT) + .mapToObj(e -> null).count(); + assertEquals(count, EXPECTED_LARGE_COUNT); + } + // Test unknown sized stream + { + long count = LongStream.range(0, EXPECTED_LARGE_COUNT) + .mapToObj(e -> null).filter(e -> true).count(); + assertEquals(count, EXPECTED_LARGE_COUNT); + } } public void testIntLarge() { - long count = LongStream.range(0, EXPECTED_LARGE_COUNT) - .mapToInt(e -> 0).count(); - - assertEquals(count, EXPECTED_LARGE_COUNT); + // Test known sized stream + { + long count = LongStream.range(0, EXPECTED_LARGE_COUNT) + .mapToInt(e -> 0).count(); + assertEquals(count, EXPECTED_LARGE_COUNT); + } + // Test unknown sized stream + { + long count = LongStream.range(0, EXPECTED_LARGE_COUNT) + .mapToInt(e -> 0).filter(e -> true).count(); + assertEquals(count, EXPECTED_LARGE_COUNT); + } } public void testLongLarge() { - long count = LongStream.range(0, EXPECTED_LARGE_COUNT) - .count(); - - assertEquals(count, EXPECTED_LARGE_COUNT); + // Test known sized stream + { + long count = LongStream.range(0, EXPECTED_LARGE_COUNT) + .count(); + assertEquals(count, EXPECTED_LARGE_COUNT); + } + // Test unknown sized stream + { + long count = LongStream.range(0, EXPECTED_LARGE_COUNT) + .filter(e -> true).count(); + assertEquals(count, EXPECTED_LARGE_COUNT); + } } public void testDoubleLarge() { - long count = LongStream.range(0, EXPECTED_LARGE_COUNT) - .mapToDouble(e -> 0.0).count(); - - assertEquals(count, EXPECTED_LARGE_COUNT); + // Test known sized stream + { + long count = LongStream.range(0, EXPECTED_LARGE_COUNT) + .mapToDouble(e -> 0.0).count(); + assertEquals(count, EXPECTED_LARGE_COUNT); + } + // Test unknown sized stream + { + long count = LongStream.range(0, EXPECTED_LARGE_COUNT) + .mapToDouble(e -> 0.0).filter(e -> true).count(); + assertEquals(count, EXPECTED_LARGE_COUNT); + } } } diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CountTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CountTest.java index c5d337e8539..0ed5ddc1a17 100644 --- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CountTest.java +++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CountTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2015, 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 @@ -24,11 +24,12 @@ /** * @test * @summary Tests counting of streams - * @bug 8031187 + * @bug 8031187 8067969 */ package org.openjdk.tests.java.util.stream; +import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.DoubleStream; import java.util.stream.DoubleStreamTestDataProvider; import java.util.stream.IntStream; @@ -52,6 +53,12 @@ public class CountTest extends OpTestCase { terminal(Stream::count). expectedResult(expectedCount). exercise(); + + // Test with an unknown sized stream + withData(data). + terminal(s -> s.filter(e -> true), Stream::count). + expectedResult(expectedCount). + exercise(); } @Test(dataProvider = "IntStreamTestData", dataProviderClass = IntStreamTestDataProvider.class) @@ -62,6 +69,11 @@ public class CountTest extends OpTestCase { terminal(IntStream::count). expectedResult(expectedCount). exercise(); + + withData(data). + terminal(s -> s.filter(e -> true), IntStream::count). + expectedResult(expectedCount). + exercise(); } @Test(dataProvider = "LongStreamTestData", dataProviderClass = LongStreamTestDataProvider.class) @@ -72,6 +84,11 @@ public class CountTest extends OpTestCase { terminal(LongStream::count). expectedResult(expectedCount). exercise(); + + withData(data). + terminal(s -> s.filter(e -> true), LongStream::count). + expectedResult(expectedCount). + exercise(); } @Test(dataProvider = "DoubleStreamTestData", dataProviderClass = DoubleStreamTestDataProvider.class) @@ -82,5 +99,36 @@ public class CountTest extends OpTestCase { terminal(DoubleStream::count). expectedResult(expectedCount). exercise(); + + withData(data). + terminal(s -> s.filter(e -> true), DoubleStream::count). + expectedResult(expectedCount). + exercise(); + } + + public void testNoEvaluationForSizedStream() { + { + AtomicInteger ai = new AtomicInteger(); + Stream.of(1, 2, 3, 4).peek(e -> ai.getAndIncrement()).count(); + assertEquals(ai.get(), 0); + } + + { + AtomicInteger ai = new AtomicInteger(); + IntStream.of(1, 2, 3, 4).peek(e -> ai.getAndIncrement()).count(); + assertEquals(ai.get(), 0); + } + + { + AtomicInteger ai = new AtomicInteger(); + LongStream.of(1, 2, 3, 4).peek(e -> ai.getAndIncrement()).count(); + assertEquals(ai.get(), 0); + } + + { + AtomicInteger ai = new AtomicInteger(); + DoubleStream.of(1, 2, 3, 4).peek(e -> ai.getAndIncrement()).count(); + assertEquals(ai.get(), 0); + } } } From b8770ac0354afdffa97016d9fb90f9cc5a8abd87 Mon Sep 17 00:00:00 2001 From: Amy Lu Date: Mon, 16 Mar 2015 10:24:16 +0100 Subject: [PATCH 48/58] 8075111: Mark testFlatMappingClose (from CollectorsTest) as serialization hostile Reviewed-by: psandoz --- .../test/org/openjdk/tests/java/util/stream/CollectorsTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CollectorsTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CollectorsTest.java index 18ba487edec..08d731dc96e 100644 --- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CollectorsTest.java +++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CollectorsTest.java @@ -517,7 +517,7 @@ public class CollectorsTest extends OpTestCase { new ToListAssertion<>()))); } - @Test + @Test(groups = { "serialization-hostile" }) public void testFlatMappingClose() { Function classifier = i -> i; AtomicInteger ai = new AtomicInteger(); From d5d207d635691e83ae9b96b0504f40c2d39d536c Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Mon, 16 Mar 2015 18:08:01 +0800 Subject: [PATCH 49/58] 8074836: Resolve disabled warnings for libosxkrb5 8074835: Resolve disabled warnings for libj2gss Reviewed-by: erikj --- jdk/make/lib/Lib-java.security.jgss.gmk | 5 +++-- .../macosx/native/libosxkrb5/nativeccache.c | 2 ++ .../java.security.jgss/share/native/libj2gss/GSSLibStub.c | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/jdk/make/lib/Lib-java.security.jgss.gmk b/jdk/make/lib/Lib-java.security.jgss.gmk index a92212f4b0e..c2cee4e109b 100644 --- a/jdk/make/lib/Lib-java.security.jgss.gmk +++ b/jdk/make/lib/Lib-java.security.jgss.gmk @@ -41,7 +41,6 @@ ifneq ($(OPENJDK_TARGET_OS), windows) CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2GSS_SRC)) \ $(LIBJAVA_HEADER_FLAGS) \ -I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \ - DISABLED_WARNINGS_gcc := pointer-to-int-cast, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2gss/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ @@ -74,6 +73,8 @@ ifneq ($(BUILD_CRYPTO), no) endif ifneq ($(BUILD_LIBKRB5_NAME), ) + # libosxkrb5 needs to call deprecated krb5 APIs so that java + # can use the native credentials cache. $(eval $(call SetupNativeCompilation,BUILD_LIBKRB5, \ LIBRARY := $(BUILD_LIBKRB5_NAME), \ OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ @@ -83,7 +84,7 @@ ifneq ($(BUILD_CRYPTO), no) CFLAGS := $(CFLAGS_JDKLIB) \ $(addprefix -I, $(BUILD_LIBKRB5_SRC)) \ -I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \ - DISABLED_WARNINGS_clang := implicit-function-declaration, \ + DISABLED_WARNINGS_clang := deprecated-declarations, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS), \ diff --git a/jdk/src/java.security.jgss/macosx/native/libosxkrb5/nativeccache.c b/jdk/src/java.security.jgss/macosx/native/libosxkrb5/nativeccache.c index 667313dcee1..518462e6ae2 100644 --- a/jdk/src/java.security.jgss/macosx/native/libosxkrb5/nativeccache.c +++ b/jdk/src/java.security.jgss/macosx/native/libosxkrb5/nativeccache.c @@ -25,6 +25,8 @@ #import "sun_security_krb5_Credentials.h" #import +#import +#import /* * Based largely on klist.c, diff --git a/jdk/src/java.security.jgss/share/native/libj2gss/GSSLibStub.c b/jdk/src/java.security.jgss/share/native/libj2gss/GSSLibStub.c index b9bfb929830..b5abb9c0860 100644 --- a/jdk/src/java.security.jgss/share/native/libj2gss/GSSLibStub.c +++ b/jdk/src/java.security.jgss/share/native/libj2gss/GSSLibStub.c @@ -430,11 +430,11 @@ Java_sun_security_jgss_wrapper_GSSLibStub_canonicalizeName(JNIEnv *env, checkStatus(env, jobj, major, minor, "[GSSLibStub_canonicalizeName]"); if ((*env)->ExceptionCheck(env)) { - return (jlong) GSS_C_NO_NAME; + return ptr_to_jlong(GSS_C_NO_NAME); } return ptr_to_jlong(mnNameHdl); } - return (jlong) GSS_C_NO_NAME; + return ptr_to_jlong(GSS_C_NO_NAME); } /* From 765a1e44350ed452bfac954ac9e5fb9552615040 Mon Sep 17 00:00:00 2001 From: Alexander Stepanov Date: Mon, 16 Mar 2015 19:09:13 +0400 Subject: [PATCH 50/58] 8028266: Tidy warnings cleanup for packages java.security/javax.security Some tidy warnings in docs were fixed Reviewed-by: mullan, wetmore --- .../java/security/AccessControlContext.java | 12 ++--- .../classes/java/security/AllPermission.java | 5 +- .../java/security/BasicPermission.java | 14 ++--- .../classes/java/security/DomainCombiner.java | 6 +-- .../share/classes/java/security/KeyRep.java | 6 +-- .../share/classes/java/security/KeyStore.java | 5 +- .../classes/java/security/KeyStoreSpi.java | 3 +- .../classes/java/security/Permissions.java | 6 +-- .../java/security/ProtectionDomain.java | 3 -- .../java/security/SecureClassLoader.java | 10 ++-- .../java/security/UnresolvedPermission.java | 6 +-- .../java/security/cert/Certificate.java | 10 ++-- .../javax/crypto/CipherInputStream.java | 3 +- .../share/classes/javax/crypto/package.html | 10 ++-- .../javax/net/ssl/KeyManagerFactory.java | 3 +- .../classes/javax/net/ssl/SSLParameters.java | 3 +- .../javax/security/auth/AuthPermission.java | 10 ++-- .../security/auth/DestroyFailedException.java | 4 +- .../javax/security/auth/Destroyable.java | 4 +- .../classes/javax/security/auth/Policy.java | 14 ++--- .../auth/PrivateCredentialPermission.java | 24 ++------- .../security/auth/RefreshFailedException.java | 4 +- .../javax/security/auth/Refreshable.java | 8 +-- .../classes/javax/security/auth/Subject.java | 4 +- .../security/auth/SubjectDomainCombiner.java | 22 +++----- .../auth/callback/CallbackHandler.java | 4 +- .../auth/callback/ChoiceCallback.java | 23 ++------ .../auth/callback/ConfirmationCallback.java | 44 ++++------------ .../auth/callback/LanguageCallback.java | 6 +-- .../security/auth/callback/NameCallback.java | 16 +----- .../auth/callback/PasswordCallback.java | 16 ++---- .../auth/callback/TextInputCallback.java | 16 +----- .../auth/callback/TextOutputCallback.java | 12 ++--- .../UnsupportedCallbackException.java | 10 +--- .../security/auth/login/AccountException.java | 4 +- .../auth/login/AccountExpiredException.java | 4 +- .../auth/login/AccountLockedException.java | 4 +- .../auth/login/AccountNotFoundException.java | 4 +- .../auth/login/AppConfigurationEntry.java | 6 +-- .../security/auth/login/Configuration.java | 14 ++--- .../security/auth/login/ConfigurationSpi.java | 8 ++- .../auth/login/CredentialException.java | 4 +- .../login/CredentialExpiredException.java | 4 +- .../login/CredentialNotFoundException.java | 4 +- .../auth/login/FailedLoginException.java | 4 +- .../security/auth/login/LoginContext.java | 52 ++++++------------- .../security/auth/login/LoginException.java | 4 +- .../javax/security/auth/spi/LoginModule.java | 18 ++----- .../auth/x500/X500PrivateCredential.java | 14 ++--- .../auth/kerberos/DelegationPermission.java | 9 ++-- .../security/auth/kerberos/EncryptionKey.java | 4 +- .../auth/kerberos/KerberosCredMessage.java | 4 +- .../security/auth/kerberos/KerberosKey.java | 4 +- .../javax/security/auth/kerberos/KeyTab.java | 4 +- .../auth/kerberos/ServicePermission.java | 8 +-- .../security/auth/kerberos/package-info.java | 2 +- 56 files changed, 159 insertions(+), 370 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/security/AccessControlContext.java b/jdk/src/java.base/share/classes/java/security/AccessControlContext.java index 22cb1005ed7..feed0cf11e1 100644 --- a/jdk/src/java.base/share/classes/java/security/AccessControlContext.java +++ b/jdk/src/java.base/share/classes/java/security/AccessControlContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -153,8 +153,6 @@ public final class AccessControlContext { * {@code DomainCombiner} with the provided * {@code AccessControlContext}. * - *

    - * * @param acc the {@code AccessControlContext} associated * with the provided {@code DomainCombiner}. * @@ -338,8 +336,6 @@ public final class AccessControlContext { * Get the {@code DomainCombiner} associated with this * {@code AccessControlContext}. * - *

    - * * @return the {@code DomainCombiner} associated with this * {@code AccessControlContext}, or {@code null} * if there is none. @@ -738,12 +734,12 @@ public final class AccessControlContext { /** * Checks two AccessControlContext objects for equality. - * Checks that obj is + * Checks that {@code obj} is * an AccessControlContext and has the same set of ProtectionDomains * as this context. - *

    + * * @param obj the object we are testing for equality with this object. - * @return true if obj is an AccessControlContext, and has the + * @return true if {@code obj} is an AccessControlContext, and has the * same set of ProtectionDomains as this context, false otherwise. */ public boolean equals(Object obj) { diff --git a/jdk/src/java.base/share/classes/java/security/AllPermission.java b/jdk/src/java.base/share/classes/java/security/AllPermission.java index c01b134f074..b830b884c59 100644 --- a/jdk/src/java.base/share/classes/java/security/AllPermission.java +++ b/jdk/src/java.base/share/classes/java/security/AllPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, 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 @@ -96,7 +96,7 @@ public final class AllPermission extends Permission { * objects are always equal. * * @param obj the object we are testing for equality with this object. - * @return true if obj is an AllPermission, false otherwise. + * @return true if {@code obj} is an AllPermission, false otherwise. */ public boolean equals(Object obj) { return (obj instanceof AllPermission); @@ -124,7 +124,6 @@ public final class AllPermission extends Permission { /** * Returns a new PermissionCollection object for storing AllPermission * objects. - *

    * * @return a new PermissionCollection object suitable for * storing AllPermissions. diff --git a/jdk/src/java.base/share/classes/java/security/BasicPermission.java b/jdk/src/java.base/share/classes/java/security/BasicPermission.java index 0abbfa7c047..7e0f4fb85b4 100644 --- a/jdk/src/java.base/share/classes/java/security/BasicPermission.java +++ b/jdk/src/java.base/share/classes/java/security/BasicPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -56,7 +56,7 @@ import java.io.IOException; * named permission or you don't.) * Subclasses may implement actions on top of BasicPermission, * if desired. - *

    + * * @see java.security.Permission * @see java.security.Permissions * @see java.security.PermissionCollection @@ -154,8 +154,8 @@ public abstract class BasicPermission extends Permission *

    * More specifically, this method returns true if: *

      - *
    • p's class is the same as this object's class, and - *
    • p's name equals or (in the case of wildcards) + *
    • {@code p}'s class is the same as this object's class, and + *
    • {@code p}'s name equals or (in the case of wildcards) * is implied by this object's * name. For example, "a.b.*" implies "a.b.c". *
    @@ -193,11 +193,11 @@ public abstract class BasicPermission extends Permission /** * Checks two BasicPermission objects for equality. - * Checks that obj's class is the same as this object's class + * Checks that {@code obj}'s class is the same as this object's class * and has the same name as this object. - *

    + * * @param obj the object we are testing for equality with this object. - * @return true if obj's class is the same as this object's class + * @return true if {@code obj}'s class is the same as this object's class * and has the same name as this BasicPermission object, false otherwise. */ public boolean equals(Object obj) { diff --git a/jdk/src/java.base/share/classes/java/security/DomainCombiner.java b/jdk/src/java.base/share/classes/java/security/DomainCombiner.java index 4785df4cd80..0e1ccf9112f 100644 --- a/jdk/src/java.base/share/classes/java/security/DomainCombiner.java +++ b/jdk/src/java.base/share/classes/java/security/DomainCombiner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2015, 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 @@ -87,8 +87,6 @@ public interface DomainCombiner { * Individual ProtectionDomains may be modified (with a new * set of Permissions, for example). * - *

    - * * @param currentDomains the ProtectionDomains associated with the * current execution Thread, up to the most recent * privileged {@code ProtectionDomain}. @@ -96,7 +94,7 @@ public interface DomainCombiner { * with the most recently executing {@code ProtectionDomain} * residing at the beginning of the array. This parameter may * be {@code null} if the current execution Thread - * has no associated ProtectionDomains.

    + * has no associated ProtectionDomains. * * @param assignedDomains an array of inherited ProtectionDomains. * ProtectionDomains may be inherited from a parent Thread, diff --git a/jdk/src/java.base/share/classes/java/security/KeyRep.java b/jdk/src/java.base/share/classes/java/security/KeyRep.java index 0b1412c1563..f97208f1083 100644 --- a/jdk/src/java.base/share/classes/java/security/KeyRep.java +++ b/jdk/src/java.base/share/classes/java/security/KeyRep.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2015, 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 @@ -112,8 +112,6 @@ public class KeyRep implements Serializable { /** * Construct the alternate Key class. * - *

    - * * @param type either one of Type.SECRET, Type.PUBLIC, or Type.PRIVATE * @param algorithm the algorithm returned from * {@code Key.getAlgorithm()} @@ -157,8 +155,6 @@ public class KeyRep implements Serializable { * encoded key bytes, and generates a private key from the spec * * - *

    - * * @return the resolved Key object * * @exception ObjectStreamException if the Type/format diff --git a/jdk/src/java.base/share/classes/java/security/KeyStore.java b/jdk/src/java.base/share/classes/java/security/KeyStore.java index 71df7dbd5a2..8fde796e041 100644 --- a/jdk/src/java.base/share/classes/java/security/KeyStore.java +++ b/jdk/src/java.base/share/classes/java/security/KeyStore.java @@ -120,7 +120,7 @@ import sun.security.util.Debug; * KeyStore ks = KeyStore.getInstance("JKS"); * * The system will return the most preferred implementation of the - * specified keystore type available in the environment.

    + * specified keystore type available in the environment. * * *

    Before a keystore can be accessed, it must be @@ -617,7 +617,6 @@ public class KeyStore { /** * Retrieves the attributes associated with an entry. - *

    * * @return an unmodifiable {@code Set} of attributes, possibly empty * @@ -708,7 +707,6 @@ public class KeyStore { /** * Retrieves the attributes associated with an entry. - *

    * * @return an unmodifiable {@code Set} of attributes, possibly empty * @@ -792,7 +790,6 @@ public class KeyStore { /** * Retrieves the attributes associated with an entry. - *

    * * @return an unmodifiable {@code Set} of attributes, possibly empty * diff --git a/jdk/src/java.base/share/classes/java/security/KeyStoreSpi.java b/jdk/src/java.base/share/classes/java/security/KeyStoreSpi.java index ceb41d87063..ea11dab2e9a 100644 --- a/jdk/src/java.base/share/classes/java/security/KeyStoreSpi.java +++ b/jdk/src/java.base/share/classes/java/security/KeyStoreSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, 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 @@ -595,7 +595,6 @@ public abstract class KeyStoreSpi { * Probes the specified input stream to determine whether it contains a * keystore that is supported by this implementation, or not. * - *

    * @implSpec * This method returns false by default. Keystore implementations should * override this method to peek at the data stream directly or to use other diff --git a/jdk/src/java.base/share/classes/java/security/Permissions.java b/jdk/src/java.base/share/classes/java/security/Permissions.java index cce9f5f56f3..cc9c69358ee 100644 --- a/jdk/src/java.base/share/classes/java/security/Permissions.java +++ b/jdk/src/java.base/share/classes/java/security/Permissions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -111,7 +111,7 @@ implements Serializable * * This method creates * a new PermissionCollection object (and adds the permission to it) - * if an appropriate collection does not yet exist.

    + * if an appropriate collection does not yet exist. * * @param permission the Permission object to add. * @@ -162,7 +162,7 @@ implements Serializable * *

    Additionally, if this PermissionCollection contains the * AllPermission, this method will always return true. - *

    + * * @param permission the Permission object to check. * * @return true if "permission" is implied by the permissions in the diff --git a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java index 2e505d74554..6e7056ddc92 100644 --- a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java +++ b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java @@ -51,7 +51,6 @@ import sun.misc.SharedSecrets; * ProtectionDomain can also be constructed such that it is dynamically * mapped to a set of permissions by the current Policy whenever a permission * is checked. - *

    * * @author Li Gong * @author Roland Schemers @@ -168,7 +167,6 @@ public class ProtectionDomain { * this domain. This constructor affords the * Policy provider the opportunity to augment the supplied * PermissionCollection to reflect policy changes. - *

    * * @param codesource the CodeSource associated with this domain * @param permissions the permissions granted to this domain @@ -263,7 +261,6 @@ public class ProtectionDomain { * permissions, then the permission will be checked against the * combination of the PermissionCollection supplied at construction and * the current Policy binding. - *

    * * @param permission the Permission object to check. * diff --git a/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java b/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java index 145f4fc482b..41b84dbe683 100644 --- a/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java +++ b/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -65,7 +65,7 @@ public class SecureClassLoader extends ClassLoader { *

    If there is a security manager, this method first * calls the security manager's {@code checkCreateClassLoader} * method to ensure creation of a class loader is allowed. - *

    + * * @param parent the parent ClassLoader * @exception SecurityException if a security manager exists and its * {@code checkCreateClassLoader} method doesn't allow @@ -112,7 +112,7 @@ public class SecureClassLoader extends ClassLoader { *

    * If a non-null CodeSource is supplied a ProtectionDomain is * constructed and associated with the class being defined. - *

    + * * @param name the expected name of the class, or {@code null} * if not known, using '.' and not '/' as the separator * and without a trailing ".class" suffix. @@ -149,7 +149,7 @@ public class SecureClassLoader extends ClassLoader { *

    * If a non-null CodeSource is supplied a ProtectionDomain is * constructed and associated with the class being defined. - *

    + * * @param name the expected name of the class, or {@code null} * if not known, using '.' and not '/' as the separator * and without a trailing ".class" suffix. @@ -180,7 +180,7 @@ public class SecureClassLoader extends ClassLoader { * This method is invoked by the defineClass method which takes * a CodeSource as an argument when it is constructing the * ProtectionDomain for the class being defined. - *

    + * * @param codesource the codesource. * * @return the permissions granted to the codesource. diff --git a/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java b/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java index 98ab2d13f9f..9dff324920e 100644 --- a/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java +++ b/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -310,7 +310,7 @@ implements java.io.Serializable /** * Checks two UnresolvedPermission objects for equality. - * Checks that obj is an UnresolvedPermission, and has + * Checks that {@code obj} is an UnresolvedPermission, and has * the same type (class) name, permission name, actions, and * certificates as this object. * @@ -491,7 +491,7 @@ implements java.io.Serializable /** * Returns a new PermissionCollection object for storing * UnresolvedPermission objects. - *

    + * * @return a new PermissionCollection object suitable for * storing UnresolvedPermissions. */ diff --git a/jdk/src/java.base/share/classes/java/security/cert/Certificate.java b/jdk/src/java.base/share/classes/java/security/cert/Certificate.java index 10544983d2c..6923627ce7b 100644 --- a/jdk/src/java.base/share/classes/java/security/cert/Certificate.java +++ b/jdk/src/java.base/share/classes/java/security/cert/Certificate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -41,7 +41,7 @@ import sun.security.x509.X509CertImpl; * An identity certificate is a binding of a principal to a public key which * is vouched for by another principal. (A principal represents * an entity such as an individual user, a group, or a corporation.) - *

    + *

    * This class is an abstraction for certificates that have different * formats but important common uses. For example, different types of * certificates, such as X.509 and PGP, share general certificate @@ -248,9 +248,7 @@ public abstract class Certificate implements java.io.Serializable { * Construct the alternate Certificate class with the Certificate * type and Certificate encoding bytes. * - *

    - * - * @param type the standard name of the Certificate type.

    + * @param type the standard name of the Certificate type. * * @param data the Certificate data. */ @@ -262,8 +260,6 @@ public abstract class Certificate implements java.io.Serializable { /** * Resolve the Certificate Object. * - *

    - * * @return the resolved Certificate Object * * @throws java.io.ObjectStreamException if the Certificate diff --git a/jdk/src/java.base/share/classes/javax/crypto/CipherInputStream.java b/jdk/src/java.base/share/classes/javax/crypto/CipherInputStream.java index 37520a1b5ec..691ce46078f 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/CipherInputStream.java +++ b/jdk/src/java.base/share/classes/javax/crypto/CipherInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -172,7 +172,6 @@ public class CipherInputStream extends FilterInputStream { * -1 is returned. This method blocks until input data * is available, the end of the stream is detected, or an exception * is thrown. - *

    * * @return the next byte of data, or -1 if the end of the * stream is reached. diff --git a/jdk/src/java.base/share/classes/javax/crypto/package.html b/jdk/src/java.base/share/classes/javax/crypto/package.html index 15185738e59..c1d46ff528c 100644 --- a/jdk/src/java.base/share/classes/javax/crypto/package.html +++ b/jdk/src/java.base/share/classes/javax/crypto/package.html @@ -1,5 +1,5 @@