01: /*
02: * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.monitoring.security.ssl;
06:
07: import java.security.KeyStore;
08:
09: public class DemoManagersBase {
10: public SslContext getSslContext() {
11: return sslContext;
12: }
13:
14: public void setSslContext(SslContext sslContext) {
15: this .sslContext = sslContext;
16: }
17:
18: public KeyStore getKeyStore() {
19: return keyStore;
20: }
21:
22: public void setKeyStore(KeyStore keyStore) {
23: this .keyStore = keyStore;
24: }
25:
26: public KeyStore getTrustStore() {
27: return trustStore;
28: }
29:
30: public void setTrustStore(KeyStore trustStore) {
31: this .trustStore = trustStore;
32: }
33:
34: public void gearUp() throws SslException {
35: KeyStoreFactory keyStoreFactory = new KeyStoreFactory();
36: keyStoreFactory.setSslContext(sslContext);
37: keyStore = keyStoreFactory.getKeyStore(Boolean.FALSE);
38: trustStore = keyStoreFactory.getKeyStore(Boolean.TRUE);
39: }
40:
41: private SslContext sslContext;
42: private KeyStore keyStore;
43: private KeyStore trustStore;
44: }
|