Source Code Cross Referenced for SecConst.java in  » Authentication-Authorization » ejbca » org » ejbca » core » model » 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 » Authentication Authorization » ejbca » org.ejbca.core.model 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*************************************************************************
002:         *                                                                       *
003:         *  EJBCA: The OpenSource Certificate Authority                          *
004:         *                                                                       *
005:         *  This software is free software; you can redistribute it and/or       *
006:         *  modify it under the terms of the GNU Lesser General Public           *
007:         *  License as published by the Free Software Foundation; either         *
008:         *  version 2.1 of the License, or any later version.                    *
009:         *                                                                       *
010:         *  See terms of license at gnu.org.                                     *
011:         *                                                                       *
012:         *************************************************************************/package org.ejbca.core.model;
013:
014:        /**
015:         * Constants for users and certificates. Constants for Type of user: Type is constructed as a mask
016:         * since one user can be of several types. To test a user type:
017:         * <pre>
018:         * if (((type & USER_ENDUSER) == USER_ENDUSER) && ((type & USER_CAADMIN) == USER_ADMINISTOR) || ...
019:         *    ...
020:         * </pre>
021:         * Bit usage: bits 0-7   (1:st byte):  user types bits 8-15  (2:nd byte):  unused bits 16-23 (3:rd
022:         * byte):  unused bits 24-30 (4:th byte):  unused Constants for certificates are simple integer
023:         * types. Constants for Token Types Token type is constructed of integer constants since only one
024:         * token type can be generated.
025:         *
026:         * @version $Id: SecConst.java,v 1.9 2007/11/23 10:37:54 anatom Exp $
027:         */
028:        public class SecConst extends Object {
029:            // User types
030:
031:            /** Dummy type. */
032:            public static final int USER_INVALID = 0x0;
033:
034:            /** This is an end user certificate (default). */
035:            public static final int USER_ENDUSER = 0x1;
036:
037:            /** This user is an administrator. */
038:            public static final int USER_ADMINISTRATOR = 0x40;
039:
040:            /** This users keystores are key recoverable. */
041:            public static final int USER_KEYRECOVERABLE = 0x80;
042:
043:            /** Notification will be sent to this users emailaddress */
044:            public static final int USER_SENDNOTIFICATION = 0x100;
045:
046:            /** Registration data will be printed for this user */
047:            public static final int USER_PRINT = 0x200;
048:
049:            // Token types.
050:
051:            /** Indicates that a browser generated token should be used. */
052:            public static final int TOKEN_SOFT_BROWSERGEN = 1;
053:
054:            /** Indicates that a p12 token should be generated. */
055:            public static final int TOKEN_SOFT_P12 = 2;
056:
057:            /** Indicates that a jks token should be generated. */
058:            public static final int TOKEN_SOFT_JKS = 3;
059:
060:            /** Indicates that a pem token should be generated. */
061:            public static final int TOKEN_SOFT_PEM = 4;
062:
063:            /** All values equal or below this constant should be treated as a soft token. */
064:            public static final int TOKEN_SOFT = 100;
065:
066:            public static final String[] TOKENTEXTS = { "TOKENSOFTBROWSERGEN",
067:                    "TOKENSOFTP12", "TOKENSOFTJKS", "TOKENSOFTPEM" };
068:
069:            public static final int[] TOKENIDS = {
070:                    SecConst.TOKEN_SOFT_BROWSERGEN, SecConst.TOKEN_SOFT_P12,
071:                    SecConst.TOKEN_SOFT_JKS, SecConst.TOKEN_SOFT_PEM };
072:
073:            /** Constant indicating a standard hard token, defined in scaper. */
074:            public static final int TOKEN_HARD_DEFAULT = 101;
075:
076:            /** Constant indicating a eid hard token.  
077:             *   OBSERVE This class should only be used for backward compability with EJBCA 2.0
078:             */
079:            public static final int TOKEN_EID = 102;
080:
081:            /**Constant indicating a swedish eid hard token.  */
082:            public static final int TOKEN_SWEDISHEID = 103;
083:
084:            /**Constant indicating a enhanced eid hard token.  */
085:            public static final int TOKEN_ENHANCEDEID = 104;
086:
087:            /**Constant indicating a enhanced eid hard token.  */
088:            public static final int TOKEN_TURKISHEID = 105;
089:
090:            // Certificate profiles.
091:
092:            public static final int NO_HARDTOKENISSUER = 0;
093:
094:            public static final int CERTPROFILE_FIXED_ENDUSER = 1;
095:            public static final int CERTPROFILE_FIXED_SUBCA = 2;
096:            public static final int CERTPROFILE_FIXED_ROOTCA = 3;
097:            public static final int CERTPROFILE_FIXED_OCSPSIGNER = 4;
098:            public static final int CERTPROFILE_FIXED_HARDTOKENAUTH = 5;
099:            public static final int CERTPROFILE_FIXED_HARDTOKENAUTHENC = 6;
100:            public static final int CERTPROFILE_FIXED_HARDTOKENENC = 7;
101:            public static final int CERTPROFILE_FIXED_HARDTOKENSIGN = 8;
102:
103:            public static final int EMPTY_ENDENTITYPROFILE = 1;
104:
105:            public static final int ALLCAS = 1;
106:
107:            /**
108:             * Constants defining range of id's reserved for fixed certificate types. Observe fixed
109:             * certificates cannot have value 0.
110:             */
111:            public static final int FIXED_CERTIFICATEPROFILE_BOUNDRY = 1000;
112:            public static final int PROFILE_NO_PROFILE = 0;
113:
114:            /**
115:             * Constants used in the RSASignSessionBean indicating the userdata defined CA should be used.
116:             */
117:            public static final int CAID_USEUSERDEFINED = 0;
118:
119:            /** Constant used to determine the size of the result from SQL select queries */
120:            public static final int MAXIMUM_QUERY_ROWCOUNT = 100;
121:
122:            /** Constans used to indicate status of a CA. */
123:            public static final int CA_ACTIVE = 1;
124:            public static final int CA_WAITING_CERTIFICATE_RESPONSE = 2;
125:            public static final int CA_EXPIRED = 3;
126:            public static final int CA_REVOKED = 4;
127:            public static final int CA_OFFLINE = 5;
128:            public static final int CA_EXTERNAL = 6;
129:
130:            /** signs certificates issued by the CA */
131:            public static final int CAKEYPURPOSE_CERTSIGN = 1;
132:            /** igns CRLs issues by the CA */
133:            public static final int CAKEYPURPOSE_CRLSIGN = 2;
134:            /** encrypts entity keys stored in the database for key recovery */
135:            public static final int CAKEYPURPOSE_KEYENCRYPT = 3;
136:            /** used for testing if the CA token is functioning and on-line */
137:            public static final int CAKEYPURPOSE_KEYTEST = 4;
138:            /** encrypts hard token PIN/PUK codes etc */
139:            public static final int CAKEYPURPOSE_HARDTOKENENCRYPT = 5;
140:
141:            /**
142:             * Default key lengths. Users are allowed to choose from these key lengths when
143:             * lookup of available bit lengths fails. 
144:             * @see org.ejbca.core.model.ApplyBean
145:             */
146:            public static final int[] DEFAULT_KEY_LENGTHS = new int[] { 512,
147:                    1024, 2048 };
148:
149:            /**
150:             * Prevents creation of new SecConst
151:             */
152:            private SecConst() {
153:            }
154:        }
155:
156:        // SecConst
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.