< prev index next >

test/javax/net/ssl/GetInstance.java

Print this page




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4898428 7022855
  27  * @summary verify getInstance() works using Provider.getService()
  28  *          Export "PKIX" as the standard algorithm name of KeyManagerFactory
  29  * @author Andreas Sterbenz

  30  */
  31 
  32 import java.security.*;
  33 
  34 import javax.net.ssl.*;
  35 
  36 public class GetInstance {
  37 
  38     private static void same(Provider p1, Provider p2) throws Exception {
  39         if (p1 != p2) {
  40             throw new Exception("not same object");
  41         }
  42     }
  43 
  44     public static void main(String[] args) throws Exception {
  45         long start = System.currentTimeMillis();
  46 
  47         Provider p = Security.getProvider("SunJSSE");
  48 
  49         SSLContext context;




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4898428 7022855
  27  * @summary verify getInstance() works using Provider.getService()
  28  *          Export "PKIX" as the standard algorithm name of KeyManagerFactory
  29  * @author Andreas Sterbenz
  30  * @modules java.base/com.sun.net.ssl
  31  */
  32 
  33 import java.security.*;
  34 
  35 import javax.net.ssl.*;
  36 
  37 public class GetInstance {
  38 
  39     private static void same(Provider p1, Provider p2) throws Exception {
  40         if (p1 != p2) {
  41             throw new Exception("not same object");
  42         }
  43     }
  44 
  45     public static void main(String[] args) throws Exception {
  46         long start = System.currentTimeMillis();
  47 
  48         Provider p = Security.getProvider("SunJSSE");
  49 
  50         SSLContext context;


< prev index next >