1 package jsdsi;
2
3 import java.security.InvalidAlgorithmParameterException;
4
5 /***
6 * Parameters to the cert path builder and validator. Specifies the
7 * statement (a SPKI/SDSI cert) that needs to be proved or validated and
8 * the certificate store from which to fetch certificates.
9 *
10 * @see CertStore
11 * @see CertPathBuilder
12 * @see CertPathValidator
13 *
14 * @author Sameer Ajmani
15 * @version $Revision: 1.1.6.1 $ $Date: 2005/11/08 03:12:52 $
16 */
17 public class CertPathParameters
18 implements java.security.cert.CertPathParameters {
19 /***
20 * The certs to prove.
21 */
22 private Cert cert;
23
24 /***
25 * The cert store to use.
26 */
27 private java.security.cert.CertStore store;
28
29 /***
30 * Creates a new <code>CertPathParameters</code> object from a given
31 * <code>Cert</code> and a given <code>CertStore</code>.
32 *
33 * @see Name
34 *
35 * @param c <code>Cert</code> to create the object from.
36 * @param s <code>CertStore</code> to create the object from.
37 * @throws InvalidAlgorithmParameterException if the subject of
38 * <code>c</code> is not a <code>Name</code>.
39 */
40 public CertPathParameters(Cert c, java.security.cert.CertStore s)
41 throws InvalidAlgorithmParameterException {
42 if (c.getSubject() instanceof Name) {
43 throw new InvalidAlgorithmParameterException(
44 "cert subject must not be a name");
45 }
46 cert = c;
47 store = s;
48 }
49
50 /***
51 * @return the <code>Cert</code> of this <code>CertPathParameters</code>.
52 */
53 public Cert getCert() {
54 return cert;
55 }
56
57 /***
58 * @return the <code>CertStore</code> of this
59 * <code>CertPathParameters</code>.
60 */
61 public java.security.cert.CertStore getStore() {
62 return store;
63 }
64
65 /***
66 * @see java.lang.Object#clone()
67 */
68 public Object clone() {
69 try {
70 return new CertPathParameters(cert, store);
71 } catch (InvalidAlgorithmParameterException e) {
72 throw (IllegalStateException)
73 new IllegalStateException().initCause(e);
74 }
75 }
76 }
This page was automatically generated by Maven