Mercurial > hg > release > icedtea7-2.4
changeset 2694:c5db461b91c7
Fix broken bootstrap.
2014-01-15 Andrew John Hughes <gnu.andrew@redhat.com>
* patches/boot/ecj-multicatch.patch:
Add new cases in RSAClientKeyExchange
and Handshaker.
author | Andrew John Hughes <gnu_andrew@member.fsf.org> |
---|---|
date | Thu, 16 Jan 2014 05:20:16 +0000 |
parents | b02e2543e62a |
children | a41acae0ba85 |
files | ChangeLog patches/boot/ecj-multicatch.patch |
diffstat | 2 files changed, 55 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Jan 15 22:48:01 2014 +0000 +++ b/ChangeLog Thu Jan 16 05:20:16 2014 +0000 @@ -1,3 +1,9 @@ +2014-01-15 Andrew John Hughes <gnu.andrew@redhat.com> + + * patches/boot/ecj-multicatch.patch: + Add new cases in RSAClientKeyExchange + and Handshaker. + 2014-01-14 Andrew John Hughes <gnu.andrew@redhat.com> * NEWS: Add missing entry.
--- a/patches/boot/ecj-multicatch.patch Wed Jan 15 22:48:01 2014 +0000 +++ b/patches/boot/ecj-multicatch.patch Thu Jan 16 05:20:16 2014 +0000 @@ -466,3 +466,52 @@ ei = new EncodingInfo(null,null); } } +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); + }