KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > systest > securebasic > SetAllDataSecurityDataProvider


1 package org.objectweb.celtix.systest.securebasic;
2
3 import org.objectweb.celtix.bus.configuration.security.SSLClientPolicy;
4 import org.objectweb.celtix.bus.configuration.security.SSLServerPolicy;
5
6
7
8 public class SetAllDataSecurityDataProvider {
9
10     public static final long serialVersionUID = 1L;
11     
12     private static final String JavaDoc BACK_TO_SRC_DIR =
13         "../../../../../../../src/test/java/org/objectweb/celtix/systest/securebasic/";
14         
15     public SetAllDataSecurityDataProvider() {
16         
17     }
18     
19     public void configure(SSLServerPolicy sslPolicyParam) {
20         sslPolicyParam.setKeystore(getClass().getResource(".").getPath()
21                                    + BACK_TO_SRC_DIR + ".clientkeystore");
22         sslPolicyParam.setKeystoreType("JKS");
23         sslPolicyParam.setKeystorePassword("clientpass");
24         sslPolicyParam.setKeyPassword("clientpass");
25         sslPolicyParam.setWantClientAuthentication(Boolean.TRUE);
26         sslPolicyParam.setRequireClientAuthentication(Boolean.TRUE);
27         sslPolicyParam.setTrustStore(getClass().getResource(".").getPath()
28                                      + BACK_TO_SRC_DIR
29                                      + "truststore");
30     }
31     
32     public void configure(SSLClientPolicy sslPolicyParam) {
33         sslPolicyParam.setKeystore(getClass().getResource(".").getPath()
34                                    + BACK_TO_SRC_DIR + ".clientkeystore");
35         sslPolicyParam.setKeystoreType("JKS");
36         sslPolicyParam.setKeystorePassword("clientpass");
37         sslPolicyParam.setKeyPassword("clientpass");
38         sslPolicyParam.setTrustStore(getClass().getResource(".").getPath()
39                                    + BACK_TO_SRC_DIR + "truststore");
40     }
41     
42     
43 }
44
Popular Tags