001: /*
002: * BEGIN_HEADER - DO NOT EDIT
003: *
004: * The contents of this file are subject to the terms
005: * of the Common Development and Distribution License
006: * (the "License"). You may not use this file except
007: * in compliance with the License.
008: *
009: * You can obtain a copy of the license at
010: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011: * See the License for the specific language governing
012: * permissions and limitations under the License.
013: *
014: * When distributing Covered Code, include this CDDL
015: * HEADER in each file and include the License file at
016: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017: * If applicable add the following below this CDDL HEADER,
018: * with the fields enclosed by brackets "[]" replaced with
019: * your own identifying information: Portions Copyright
020: * [year] [name of copyright owner]
021: */
022:
023: /*
024: * @(#)SecurityContextInfo.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: /**
030: * SecurityContextInfo.java
031: *
032: * SUN PROPRIETARY/CONFIDENTIAL.
033: * This software is the proprietary information of Sun Microsystems, Inc.
034: * Use is subject to license terms.
035: *
036: * Created on August 25, 2004, 1:11 PM
037: */package com.sun.jbi.internal.security.https.jregress;
038:
039: import java.io.File;
040: import java.io.FileReader;
041: import java.io.BufferedReader;
042:
043: /**
044: *
045: * @author Sun Microsystems, Inc.
046: */
047: public class SecurityContextInfo {
048: // private String config = null;
049: private String mSrcroot = null;
050:
051: // -- Server ( Server ) Settings
052: public static String[] serverKeyAliases = new String[] { "s1as" };
053: public static String[] serverKeyPasswords = new String[] { "changeit" };
054:
055: public static String serverTrustStoreURL = null;
056: public static String serverTrustStorePassword = "changeit";
057: public static String serverTrustStoreType = "JKS";
058:
059: public static String serverKeyStoreURL = null;
060: public static String serverKeyStorePassword = "changeit";
061: public static String serverKeyStoreType = "JKS";
062:
063: // -- Client Settings
064: public static String[] clientKeyAliases = new String[] { "xws-security-client" };
065: public static String[] clientKeyPasswords = new String[] { "changeit" };
066:
067: public static String clientTrustStoreURL = null;
068: public static String clientTrustStorePassword = "changeit";
069: public static String clientTrustStoreType = "JKS";
070:
071: public static String clientKeyStoreURL = null;
072: public static String clientKeyStorePassword = "changeit";
073: public static String clientKeyStoreType = "JKS";
074:
075: public SecurityContextInfo(String keystoreBase) {
076: serverTrustStoreURL = keystoreBase + "/server-truststore.jks";
077: serverKeyStoreURL = keystoreBase + "/server-keystore.jks";
078:
079: clientTrustStoreURL = keystoreBase + "/client-truststore.jks";
080: clientKeyStoreURL = keystoreBase + "/client-keystore.jks";
081:
082: }
083:
084: // -- Accessors
085:
086: // -- Server Key store / Trust Store information
087: /**
088: * @return the Server KeyStore URL
089: */
090: public String getServerKeyStoreURL() {
091: return serverKeyStoreURL;
092: }
093:
094: /**
095: * @return the Server KeyStore Passowrd
096: */
097: public String getServerKeyStorePassword() {
098: return serverKeyStorePassword;
099: }
100:
101: /**
102: * @return the Server KeyStore Type
103: */
104: public String getServerKeyStoreType() {
105: return serverKeyStoreType;
106: }
107:
108: /**
109: * @return the Server TrustStore URL
110: */
111: public String getServerTrustStoreURL() {
112: return serverTrustStoreURL;
113: }
114:
115: /**
116: * @return the Server TrustStore Passowrd
117: */
118: public String getServerTrustStorePassword() {
119: return serverTrustStorePassword;
120: }
121:
122: /**
123: * @return the Server TrustStore Type
124: */
125: public String getServerTrustStoreType() {
126: return serverTrustStoreType;
127: }
128:
129: /**
130: * @return Server Key Aliases
131: */
132: public String[] getServerKeyAliases() {
133: return serverKeyAliases;
134: }
135:
136: /**
137: * @return Server Key Passwords
138: */
139: public String[] getServerKeyPasswords() {
140: return serverKeyPasswords;
141: }
142:
143: // -- Client Key store / Trust Store information
144: /**
145: * @return the Client KeyStore URL
146: */
147: public String getClientKeyStoreURL() {
148: return clientKeyStoreURL;
149: }
150:
151: /**
152: * @return the Client KeyStore Passowrd
153: */
154: public String getClientKeyStorePassword() {
155: return clientKeyStorePassword;
156: }
157:
158: /**
159: * @return the Client Key Store Type
160: */
161: public String getClientKeyStoreType() {
162: return clientKeyStoreType;
163: }
164:
165: /**
166: * @return the Client Trust URL
167: */
168: public String getClientTrustStoreURL() {
169: return clientTrustStoreURL;
170: }
171:
172: /**
173: * @return the Client Trust Passowrd
174: */
175: public String getClientTrustStorePassword() {
176: return clientTrustStorePassword;
177: }
178:
179: /**
180: * @return the Client Trust Store Type
181: */
182: public String getClientTrustStoreType() {
183: return clientTrustStoreType;
184: }
185:
186: /**
187: * @return Client Key Aliases
188: */
189: public String[] getClientKeyAliases() {
190: return clientKeyAliases;
191: }
192:
193: /**
194: * @return Server Key Passwords
195: */
196: public String[] getClientKeyPasswords() {
197: return clientKeyPasswords;
198: }
199: }
|