KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > security > jauth > callback > CertStoreCallback


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.enterprise.security.jauth.callback;
25
26 import java.security.KeyStore JavaDoc;
27 import java.security.cert.CertStore JavaDoc;
28 import javax.security.auth.callback.Callback JavaDoc;
29
30 /**
31  * Callback for CertStore.
32  *
33  * <p> A CertStore is a generic repository for certificates.
34  * CertStores may be searched to locate public key certificates,
35  * as well as to put together certificate chains.
36  * Such a search may be necessary when the caller needs to
37  * verify a signature.
38  *
39  * @version %I%, %G%
40  */

41 public class CertStoreCallback implements Callback JavaDoc {
42
43     private CertStore JavaDoc certStore;
44
45     /**
46      * Create a CertStoreCallback.
47      */

48     public CertStoreCallback() { }
49
50     /**
51      * Set the CertStore.
52      *
53      * @param certStore the certificate store, which may be null
54      * If null, the requester is assumed to already have
55      * access to the relevant certificate and/or chain.
56      */

57     public void setStore(CertStore JavaDoc certStore) {
58     this.certStore = certStore;
59     }
60
61     /**
62      * Get the requested CertStore.
63      *
64      * @return the CertStore, or null.
65      * If null, the requester is assumed to already have
66      * access to the relevant certificate and/or chain.
67      */

68     public CertStore JavaDoc getCertStore() {
69     return certStore;
70     }
71 }
72
Popular Tags