changeset 531:4a17cd579c2b

7096936: issue in jsse/runtime Reviewed-by: xuelei, wetmore
author coffeys
date Wed, 05 Oct 2011 19:51:17 +0100
parents 9a4fc5068e5f
children 0c65618b5ae1
files src/share/classes/com/sun/net/ssl/HttpsURLConnection.java src/share/classes/javax/net/ssl/HttpsURLConnection.java
diffstat 2 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/net/ssl/HttpsURLConnection.java	Mon Sep 19 10:55:16 2011 +0100
+++ b/src/share/classes/com/sun/net/ssl/HttpsURLConnection.java	Wed Oct 05 19:51:17 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, 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
@@ -179,6 +179,12 @@
             throw new IllegalArgumentException(
                 "no SSLSocketFactory specified");
         }
+
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            sm.checkSetFactory();
+        }
+
         sslSocketFactory = sf;
     }
 
--- a/src/share/classes/javax/net/ssl/HttpsURLConnection.java	Mon Sep 19 10:55:16 2011 +0100
+++ b/src/share/classes/javax/net/ssl/HttpsURLConnection.java	Wed Oct 05 19:51:17 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, 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
@@ -368,6 +368,10 @@
                 "no SSLSocketFactory specified");
         }
 
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            sm.checkSetFactory();
+        }
         sslSocketFactory = sf;
     }