--- 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 @@ class HttpsURLConnection extends HttpURL
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 @@ class HttpsURLConnection extends HttpURL
"no SSLSocketFactory specified");
}
+ SecurityManager sm = System.getSecurityManager();
+ if (sm != null) {
+ sm.checkSetFactory();
+ }
sslSocketFactory = sf;
}