Source Code Cross Referenced for SSLSupport.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » tomcat » util » net » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » org.apache.tomcat.util.net 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Licensed to the Apache Software Foundation (ASF) under one or more
003:         *  contributor license agreements.  See the NOTICE file distributed with
004:         *  this work for additional information regarding copyright ownership.
005:         *  The ASF licenses this file to You under the Apache License, Version 2.0
006:         *  (the "License"); you may not use this file except in compliance with
007:         *  the License.  You may obtain a copy of the License at
008:         *
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         *  Unless required by applicable law or agreed to in writing, software
012:         *  distributed under the License is distributed on an "AS IS" BASIS,
013:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         *  See the License for the specific language governing permissions and
015:         *  limitations under the License.
016:         */
017:
018:        package org.apache.tomcat.util.net;
019:
020:        import java.io.IOException;
021:
022:        /* SSLSupport
023:
024:         Interface for SSL-specific functions
025:
026:         @author EKR
027:         */
028:
029:        public interface SSLSupport {
030:            /**
031:             * The Request attribute key for the cipher suite.
032:             */
033:            public static final String CIPHER_SUITE_KEY = "javax.servlet.request.cipher_suite";
034:
035:            /**
036:             * The Request attribute key for the key size.
037:             */
038:            public static final String KEY_SIZE_KEY = "javax.servlet.request.key_size";
039:
040:            /**
041:             * The Request attribute key for the client certificate chain.
042:             */
043:            public static final String CERTIFICATE_KEY = "javax.servlet.request.X509Certificate";
044:
045:            /**
046:             * The Request attribute key for the session id.
047:             * This one is a Tomcat extension to the Servlet spec.
048:             */
049:            public static final String SESSION_ID_KEY = "javax.servlet.request.ssl_session";
050:
051:            /**
052:             * A mapping table to determine the number of effective bits in the key
053:             * when using a cipher suite containing the specified cipher name.  The
054:             * underlying data came from the TLS Specification (RFC 2246), Appendix C.
055:             */
056:            static final CipherData ciphers[] = {
057:                    new CipherData("_WITH_NULL_", 0),
058:                    new CipherData("_WITH_IDEA_CBC_", 128),
059:                    new CipherData("_WITH_RC2_CBC_40_", 40),
060:                    new CipherData("_WITH_RC4_40_", 40),
061:                    new CipherData("_WITH_RC4_128_", 128),
062:                    new CipherData("_WITH_DES40_CBC_", 40),
063:                    new CipherData("_WITH_DES_CBC_", 56),
064:                    new CipherData("_WITH_3DES_EDE_CBC_", 168) };
065:
066:            /**
067:             * The cipher suite being used on this connection.
068:             */
069:            public String getCipherSuite() throws IOException;
070:
071:            /**
072:             * The client certificate chain (if any).
073:             */
074:            public Object[] getPeerCertificateChain() throws IOException;
075:
076:            /**
077:             * The client certificate chain (if any).
078:             * @param force If <code>true</code>, then re-negotiate the 
079:             *              connection if necessary.
080:             */
081:            public Object[] getPeerCertificateChain(boolean force)
082:                    throws IOException;
083:
084:            /**
085:             * Get the keysize.
086:             *
087:             * What we're supposed to put here is ill-defined by the
088:             * Servlet spec (S 4.7 again). There are at least 4 potential
089:             * values that might go here:
090:             *
091:             * (a) The size of the encryption key
092:             * (b) The size of the MAC key
093:             * (c) The size of the key-exchange key
094:             * (d) The size of the signature key used by the server
095:             *
096:             * Unfortunately, all of these values are nonsensical.
097:             **/
098:            public Integer getKeySize() throws IOException;
099:
100:            /**
101:             * The current session Id.
102:             */
103:            public String getSessionId() throws IOException;
104:
105:            /**
106:             * Simple data class that represents the cipher being used, along with the
107:             * corresponding effective key size.  The specified phrase must appear in the
108:             * name of the cipher suite to be recognized.
109:             */
110:
111:            final class CipherData {
112:
113:                public String phrase = null;
114:
115:                public int keySize = 0;
116:
117:                public CipherData(String phrase, int keySize) {
118:                    this.phrase = phrase;
119:                    this.keySize = keySize;
120:                }
121:
122:            }
123:
124:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.