Source Code Cross Referenced for X509CredentialsSourceTest.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » bus » security » credentials » 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 » ERP CRM Financial » Kuali Financial System » org.kuali.bus.security.credentials 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2007 The Kuali Foundation
003:         *
004:         * Licensed under the Educational Community License, Version 1.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         * http://www.opensource.org/licenses/ecl1.php
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        package org.kuali.bus.security.credentials;
017:
018:        import java.math.BigInteger;
019:        import java.security.InvalidKeyException;
020:        import java.security.NoSuchAlgorithmException;
021:        import java.security.NoSuchProviderException;
022:        import java.security.Principal;
023:        import java.security.PublicKey;
024:        import java.security.SignatureException;
025:        import java.security.cert.CertificateEncodingException;
026:        import java.security.cert.CertificateException;
027:        import java.security.cert.CertificateExpiredException;
028:        import java.security.cert.CertificateNotYetValidException;
029:        import java.security.cert.X509Certificate;
030:        import java.util.Date;
031:        import java.util.Set;
032:
033:        import junit.framework.TestCase;
034:
035:        /**
036:         * 
037:         * @author Kuali Rice Team (kuali-rice@googlegroups.com)
038:         * @version $Revision: 1.2.16.1.6.1 $ $Date: 2007/10/17 20:32:06 $
039:         * @since 0.9
040:         *
041:         */
042:        public class X509CredentialsSourceTest extends TestCase {
043:
044:            private X509CredentialsSource credentialsSource;
045:
046:            private X509Certificate cert = new KualiX509Certificate();
047:
048:            @Override
049:            protected void setUp() throws Exception {
050:                super .setUp();
051:
052:                this .credentialsSource = new X509CredentialsSource(cert);
053:            }
054:
055:            public void testX509Certificate() {
056:                final X509Credentials context = (X509Credentials) this .credentialsSource
057:                        .getCredentials("test");
058:                assertNotNull(context);
059:                final X509Certificate cert = context.getX509Certificate();
060:
061:                assertEquals(this .cert, cert);
062:            }
063:
064:            public static class KualiX509Certificate extends X509Certificate {
065:
066:                protected KualiX509Certificate() {
067:                    // nothing to do
068:                }
069:
070:                public void checkValidity() throws CertificateExpiredException,
071:                        CertificateNotYetValidException {
072:                    // nothing to do
073:                }
074:
075:                public void checkValidity(Date date)
076:                        throws CertificateExpiredException,
077:                        CertificateNotYetValidException {
078:                    // nothing to do
079:                }
080:
081:                public int getBasicConstraints() {
082:                    return 0;
083:                }
084:
085:                public Principal getIssuerDN() {
086:                    return null;
087:                }
088:
089:                public boolean[] getIssuerUniqueID() {
090:                    return null;
091:                }
092:
093:                public boolean[] getKeyUsage() {
094:                    return null;
095:                }
096:
097:                public Date getNotAfter() {
098:                    return null;
099:                }
100:
101:                public Date getNotBefore() {
102:                    return null;
103:                }
104:
105:                public BigInteger getSerialNumber() {
106:                    return null;
107:                }
108:
109:                public String getSigAlgName() {
110:                    return null;
111:                }
112:
113:                public String getSigAlgOID() {
114:                    return null;
115:                }
116:
117:                public byte[] getSigAlgParams() {
118:                    return null;
119:                }
120:
121:                public byte[] getSignature() {
122:                    return null;
123:                }
124:
125:                public Principal getSubjectDN() {
126:                    return null;
127:                }
128:
129:                public boolean[] getSubjectUniqueID() {
130:                    return null;
131:                }
132:
133:                public byte[] getTBSCertificate()
134:                        throws CertificateEncodingException {
135:                    return null;
136:                }
137:
138:                public int getVersion() {
139:                    return 0;
140:                }
141:
142:                public Set<String> getCriticalExtensionOIDs() {
143:                    return null;
144:                }
145:
146:                public byte[] getExtensionValue(String arg0) {
147:                    return null;
148:                }
149:
150:                public Set<String> getNonCriticalExtensionOIDs() {
151:                    return null;
152:                }
153:
154:                public boolean hasUnsupportedCriticalExtension() {
155:                    return false;
156:                }
157:
158:                public byte[] getEncoded() throws CertificateEncodingException {
159:                    return null;
160:                }
161:
162:                public PublicKey getPublicKey() {
163:                    return null;
164:                }
165:
166:                public String toString() {
167:                    return null;
168:                }
169:
170:                public void verify(PublicKey arg0, String arg1)
171:                        throws CertificateException, NoSuchAlgorithmException,
172:                        InvalidKeyException, NoSuchProviderException,
173:                        SignatureException {
174:                    // nothing to do
175:                }
176:
177:                public void verify(PublicKey arg0) throws CertificateException,
178:                        NoSuchAlgorithmException, InvalidKeyException,
179:                        NoSuchProviderException, SignatureException {
180:                    // nothing to do
181:                }
182:            }
183:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.