< prev index next >

src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java

Print this page




 122     @Override
 123     protected int getDefaultPort() { return httpsPortNumber; }
 124 
 125     private HostnameVerifier hv;
 126     private SSLSocketFactory sslSocketFactory;
 127 
 128     // HttpClient.proxyDisabled will always be false, because we don't
 129     // use an application-level HTTP proxy.  We might tunnel through
 130     // our http proxy, though.
 131 
 132 
 133     // INSTANCE DATA
 134 
 135     // last negotiated SSL session
 136     private SSLSession  session;
 137 
 138     private String [] getCipherSuites() {
 139         //
 140         // If ciphers are assigned, sort them into an array.
 141         //
 142         String ciphers [];
 143         String cipherString =
 144                 GetPropertyAction.privilegedGetProperty("https.cipherSuites");
 145 
 146         if (cipherString == null || "".equals(cipherString)) {
 147             ciphers = null;
 148         } else {
 149             StringTokenizer     tokenizer;
 150             Vector<String>      v = new Vector<String>();
 151 
 152             tokenizer = new StringTokenizer(cipherString, ",");
 153             while (tokenizer.hasMoreTokens())
 154                 v.addElement(tokenizer.nextToken());
 155             ciphers = new String [v.size()];
 156             for (int i = 0; i < ciphers.length; i++)
 157                 ciphers [i] = v.elementAt(i);
 158         }
 159         return ciphers;
 160     }
 161 
 162     private String [] getProtocols() {
 163         //
 164         // If protocols are assigned, sort them into an array.
 165         //
 166         String protocols [];
 167         String protocolString =
 168                 GetPropertyAction.privilegedGetProperty("https.protocols");
 169 
 170         if (protocolString == null || "".equals(protocolString)) {
 171             protocols = null;
 172         } else {
 173             StringTokenizer     tokenizer;
 174             Vector<String>      v = new Vector<String>();
 175 
 176             tokenizer = new StringTokenizer(protocolString, ",");
 177             while (tokenizer.hasMoreTokens())
 178                 v.addElement(tokenizer.nextToken());
 179             protocols = new String [v.size()];
 180             for (int i = 0; i < protocols.length; i++) {
 181                 protocols [i] = v.elementAt(i);
 182             }
 183         }
 184         return protocols;
 185     }
 186 




 122     @Override
 123     protected int getDefaultPort() { return httpsPortNumber; }
 124 
 125     private HostnameVerifier hv;
 126     private SSLSocketFactory sslSocketFactory;
 127 
 128     // HttpClient.proxyDisabled will always be false, because we don't
 129     // use an application-level HTTP proxy.  We might tunnel through
 130     // our http proxy, though.
 131 
 132 
 133     // INSTANCE DATA
 134 
 135     // last negotiated SSL session
 136     private SSLSession  session;
 137 
 138     private String [] getCipherSuites() {
 139         //
 140         // If ciphers are assigned, sort them into an array.
 141         //
 142         String[] ciphers ;
 143         String cipherString =
 144                 GetPropertyAction.privilegedGetProperty("https.cipherSuites");
 145 
 146         if (cipherString == null || "".equals(cipherString)) {
 147             ciphers = null;
 148         } else {
 149             StringTokenizer     tokenizer;
 150             Vector<String>      v = new Vector<String>();
 151 
 152             tokenizer = new StringTokenizer(cipherString, ",");
 153             while (tokenizer.hasMoreTokens())
 154                 v.addElement(tokenizer.nextToken());
 155             ciphers = new String [v.size()];
 156             for (int i = 0; i < ciphers.length; i++)
 157                 ciphers [i] = v.elementAt(i);
 158         }
 159         return ciphers;
 160     }
 161 
 162     private String [] getProtocols() {
 163         //
 164         // If protocols are assigned, sort them into an array.
 165         //
 166         String[] protocols ;
 167         String protocolString =
 168                 GetPropertyAction.privilegedGetProperty("https.protocols");
 169 
 170         if (protocolString == null || "".equals(protocolString)) {
 171             protocols = null;
 172         } else {
 173             StringTokenizer     tokenizer;
 174             Vector<String>      v = new Vector<String>();
 175 
 176             tokenizer = new StringTokenizer(protocolString, ",");
 177             while (tokenizer.hasMoreTokens())
 178                 v.addElement(tokenizer.nextToken());
 179             protocols = new String [v.size()];
 180             for (int i = 0; i < protocols.length; i++) {
 181                 protocols [i] = v.elementAt(i);
 182             }
 183         }
 184         return protocols;
 185     }
 186 


< prev index next >