1 /*
2  * @(#) $Id: FileBasedCADatabaseParams.java,v 1.3 2003/07/08 08:13:52 pankaj Exp $
3  *
4  * Copyright (c) 2002-03 by Pankaj Kumar (http://www.pankaj-k.net). 
5  * All rights reserved.
6  *
7  * The license governing the use of this file can be found in the 
8  * root directory of the containing software.
9  */
10package org.jstk.cert.ca;
11
12import java.security.PrivateKey;
13import java.security.cert.Certificate;
14
15// A Marker interface
16public class FileBasedCADatabaseParams implements CADatabaseParams {
17    private String caDirName;
18    private boolean createCA;
19    private Certificate[] caCerts;
20    private PrivateKey caPrivateKey;
21    private String password;
22
23    public FileBasedCADatabaseParams(String caDirName){
24        this.caDirName = caDirName;
25        createCA = false;
26    }
27
28    public FileBasedCADatabaseParams(String caDirName, Certificate[] caCerts, PrivateKey caPrivateKey){
29        this.caDirName = caDirName;
30        createCA = true;
31        this.caCerts = caCerts;
32        this.caPrivateKey = caPrivateKey;
33    }
34
35    public void setPassword(String password){
36        this.password = password;
37    }
38
39    public String getCADirName(){
40        return caDirName;
41    }
42
43    public boolean getCreateCA(){
44        return createCA;
45    }
46
47    public Certificate[] getCACerts(){
48        return caCerts;
49    }
50
51    public PrivateKey getCAPrivateKey(){
52        return caPrivateKey;
53    }
54
55    public String getPassword(){
56        return password;
57    }
58}