tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net PureTLSSupport.java
Date Sat, 13 Apr 2002 06:01:52 GMT
billbarker    02/04/12 23:01:52

  Modified:    util/java/org/apache/tomcat/util/net PureTLSSupport.java
  Log:
  fix tabs.
  
  Revision  Changes    Path
  1.3       +41 -41    jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PureTLSSupport.java
  
  Index: PureTLSSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PureTLSSupport.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PureTLSSupport.java	13 Apr 2002 05:34:11 -0000	1.2
  +++ PureTLSSupport.java	13 Apr 2002 06:01:52 -0000	1.3
  @@ -85,63 +85,63 @@
       private SSLSocket ssl;
   
       PureTLSSupport(SSLSocket sock){
  -	ssl=sock;
  +        ssl=sock;
       }
   
       public String getCipherSuite() throws IOException {
  -	int cs=ssl.getCipherSuite();
  -	return SSLPolicyInt.getCipherSuiteName(cs);
  +        int cs=ssl.getCipherSuite();
  +        return SSLPolicyInt.getCipherSuiteName(cs);
       }
   
       public Object[] getPeerCertificateChain()
  -	throws IOException
  +        throws IOException
       {
  -	Vector v=ssl.getCertificateChain();
  +        Vector v=ssl.getCertificateChain();
   
  -	if(v==null)
  -	    return null;
  -	
  -	java.security.cert.X509Certificate[] chain=
  +        if(v==null)
  +            return null;
  +        
  +        java.security.cert.X509Certificate[] chain=
               new java.security.cert.X509Certificate[v.size()];
   
  -	try {
  -	  for(int i=1;i<=v.size();i++){
  -	    // PureTLS provides cert chains with the peer
  -	    // cert last but the Servlet 2.3 spec (S 4.7) requires
  -	    // the opposite order so we reverse the chain as we go
  -	    byte buffer[]=((X509Cert)v.elementAt(
  -		 v.size()-i)).getDER();
  -	    
  -	    CertificateFactory cf =
  -	      CertificateFactory.getInstance("X.509");
  -	    ByteArrayInputStream stream =
  -	      new ByteArrayInputStream(buffer);
  -	    
  -	    chain[i]=(java.security.cert.X509Certificate)
  -	      cf.generateCertificate(stream);
  -	  }
  -	} catch (java.security.cert.CertificateException e) {
  -	    throw new IOException("JDK's broken cert handling can't parse this certificate (which
PureTLS likes");
  -	}
  -	return chain;
  +        try {
  +          for(int i=1;i<=v.size();i++){
  +            // PureTLS provides cert chains with the peer
  +            // cert last but the Servlet 2.3 spec (S 4.7) requires
  +            // the opposite order so we reverse the chain as we go
  +            byte buffer[]=((X509Cert)v.elementAt(
  +                 v.size()-i)).getDER();
  +            
  +            CertificateFactory cf =
  +              CertificateFactory.getInstance("X.509");
  +            ByteArrayInputStream stream =
  +              new ByteArrayInputStream(buffer);
  +            
  +            chain[i]=(java.security.cert.X509Certificate)
  +              cf.generateCertificate(stream);
  +          }
  +        } catch (java.security.cert.CertificateException e) {
  +            throw new IOException("JDK's broken cert handling can't parse this certificate
(which PureTLS likes");
  +        }
  +        return chain;
       }
   
       public Integer getKeySize()
  -	throws IOException {
  -	/*
  -	int cs = ssl.getCipherSuite();
  -	int  ks = SSLCipherSuite.findCipherSuite(cs).getCipherKeyLength();
  -	return new Integer(ks);
  -	*/
  -	return null;
  +        throws IOException {
  +        /*
  +        int cs = ssl.getCipherSuite();
  +        int  ks = SSLCipherSuite.findCipherSuite(cs).getCipherKeyLength();
  +        return new Integer(ks);
  +        */
  +        return null;
       }
   
       public String getSessionId()
  -	throws IOException {
  -	byte [] ssl_session = ssl.getSessionID();
  -	if(ssl_session == null)
  -	    return null;
  -	return HexUtils.convert(ssl_session);
  +        throws IOException {
  +        byte [] ssl_session = ssl.getSessionID();
  +        if(ssl_session == null)
  +            return null;
  +        return HexUtils.convert(ssl_session);
       }
   
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message