# HG changeset patch # User Andrew John Hughes # Date 1389849616 0 # Node ID 54a01fed7fe2d23b289438e3e6aaa07281564a7d # Parent 541d09b193008d2f401083c289632e69b71d4da7 Fix broken bootstrap. 2014-01-15 Andrew John Hughes * patches/boot/ecj-multicatch.patch: Add new cases in RSAClientKeyExchange and Handshaker. diff -r 541d09b19300 -r 54a01fed7fe2 ChangeLog --- a/ChangeLog Mon Feb 24 18:59:38 2014 +0000 +++ b/ChangeLog Thu Jan 16 05:20:16 2014 +0000 @@ -1,3 +1,9 @@ +2014-01-15 Andrew John Hughes + + * patches/boot/ecj-multicatch.patch: + Add new cases in RSAClientKeyExchange + and Handshaker. + 2014-02-19 Andrew John Hughes PR1677: Update PaX support to detect running PaX diff -r 541d09b19300 -r 54a01fed7fe2 patches/boot/ecj-multicatch.patch --- a/patches/boot/ecj-multicatch.patch Mon Feb 24 18:59:38 2014 +0000 +++ b/patches/boot/ecj-multicatch.patch Thu Jan 16 05:20:16 2014 +0000 @@ -205,6 +205,55 @@ throw new Error("Failed to record hashSeed offset", e); } } +diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/security/ssl/Handshaker.java openjdk-boot/jdk/src/share/classes/sun/security/ssl/Handshaker.java +--- openjdk-boot.orig/jdk/src/share/classes/sun/security/ssl/Handshaker.java 2014-01-16 00:34:01.264963408 +0000 ++++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/Handshaker.java 2014-01-16 00:35:24.562264096 +0000 +@@ -1051,8 +1051,7 @@ + KeyGenerator kg = JsseJce.getKeyGenerator(masterAlg); + kg.init(spec); + return kg.generateKey(); +- } catch (InvalidAlgorithmParameterException | +- NoSuchAlgorithmException iae) { ++ } catch (InvalidAlgorithmParameterException iae) { + // unlikely to happen, otherwise, must be a provider exception + // + // For RSA premaster secrets, do not signal a protocol error +@@ -1060,6 +1059,12 @@ + if (debug != null && Debug.isOn("handshake")) { + System.out.println("RSA master secret generation error:"); + iae.printStackTrace(System.out); ++ } ++ throw new ProviderException(iae); ++ } catch (NoSuchAlgorithmException iae) { ++ if (debug != null && Debug.isOn("handshake")) { ++ System.out.println("RSA master secret generation error:"); ++ iae.printStackTrace(System.out); + } + throw new ProviderException(iae); + } +diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java openjdk-boot/jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java +--- openjdk-boot.orig/jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java 2014-01-16 00:34:14.005162368 +0000 ++++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java 2014-01-16 00:36:09.446964834 +0000 +@@ -271,12 +271,17 @@ + kg.init(new TlsRsaPremasterSecretParameterSpec( + version.major, version.minor, encodedSecret), generator); + return kg.generateKey(); +- } catch (InvalidAlgorithmParameterException | +- NoSuchAlgorithmException iae) { ++ } catch (InvalidAlgorithmParameterException iae) { + // unlikely to happen, otherwise, must be a provider exception + if (debug != null && Debug.isOn("handshake")) { + System.out.println("RSA premaster secret generation error:"); + iae.printStackTrace(System.out); ++ } ++ throw new RuntimeException("Could not generate dummy secret", iae); ++ } catch (NoSuchAlgorithmException iae) { ++ if (debug != null && Debug.isOn("handshake")) { ++ System.out.println("RSA premaster secret generation error:"); ++ iae.printStackTrace(System.out); + } + throw new RuntimeException("Could not generate dummy secret", iae); + } diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/util/Hashtable.java openjdk-boot/jdk/src/share/classes/java/util/Hashtable.java --- openjdk-boot.orig/jdk/src/share/classes/java/util/Hashtable.java 2012-06-08 17:12:17.000000000 +0100 +++ openjdk-boot/jdk/src/share/classes/java/util/Hashtable.java 2012-06-11 14:54:40.275511896 +0100