jdk/src/java.base/share/classes/com/sun/net/ssl/HttpsURLConnection.java
changeset 29615 b0057b63b4e7
parent 25859 3317bb8137f4
child 32649 2ee9017c7597
equal deleted inserted replaced
29614:c95b4a5f89d6 29615:b0057b63b4e7
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    30 package com.sun.net.ssl;
    30 package com.sun.net.ssl;
    31 
    31 
    32 import java.net.URL;
    32 import java.net.URL;
    33 import java.net.HttpURLConnection;
    33 import java.net.HttpURLConnection;
    34 import java.io.IOException;
    34 import java.io.IOException;
       
    35 import java.security.cert.Certificate;
    35 import javax.net.SocketFactory;
    36 import javax.net.SocketFactory;
    36 import javax.net.ssl.SSLSocketFactory;
    37 import javax.net.ssl.SSLSocketFactory;
    37 
    38 import javax.net.ssl.SSLPeerUnverifiedException;
    38 import javax.security.cert.X509Certificate;
       
    39 
    39 
    40 /**
    40 /**
    41  * HTTP URL connection with support for HTTPS-specific features. See
    41  * HTTP URL connection with support for HTTPS-specific features. See
    42  * <A HREF="http://www.w3.org/pub/WWW/Protocols/"> the spec </A> for
    42  * <A HREF="http://www.w3.org/pub/WWW/Protocols/"> the spec </A> for
    43  * details.
    43  * details.
    68     /**
    68     /**
    69      * Returns the server's X.509 certificate chain, or null if
    69      * Returns the server's X.509 certificate chain, or null if
    70      * the server did not authenticate.
    70      * the server did not authenticate.
    71      * @return the server certificate chain
    71      * @return the server certificate chain
    72      */
    72      */
    73     public abstract X509Certificate [] getServerCertificateChain();
    73     public abstract Certificate[] getServerCertificates()
       
    74         throws SSLPeerUnverifiedException;
    74 
    75 
    75     /**
    76     /**
    76      * HostnameVerifier provides a callback mechanism so that
    77      * HostnameVerifier provides a callback mechanism so that
    77      * implementers of this interface can supply a policy for
    78      * implementers of this interface can supply a policy for
    78      * handling the case where the host to connect to and
    79      * handling the case where the host to connect to and