|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--spki.demo.Certifier
spki.demo Certifier class.
| Field Summary | |
private static String |
__ME
This class's full name. |
private HashDB |
cert_db
the live master certificates database object. |
private static String |
CERT_DBNAME
the certificates database filename suffix. |
static String |
CERTIFICATION_TAG_STRING
|
private String |
db_id
|
private static String |
DBPATH
databases's pathname prefix. |
static int |
DEFAULT_KEY_LENGTH
|
static String |
DEFAULT_PUB_ALG
|
private int |
key_length
the key-length in bits. |
private static String |
KEY_LENGTH_DBKEY
the key-length's database index key. |
private String |
keyid
the key-chain master key-pair's key-id. |
private HashDB |
main_db
the main database object. |
private static String |
MAIN_DBNAME
the main database filename suffix. |
private static String |
MASTER_KEYPAIR_DBKEY
the certifier's key-pair's database index key. |
private PrivateKey |
privkey
the certifider's private key. |
private String |
pub_alg
the public-key algorithm-id. |
private static String |
PUB_ALG_DBKEY
the public-key algorithm-id's database index key. |
private PublicKey |
pubkey
the certifier's public key. |
private int |
state
|
static int |
STATE_ALIVE
|
static int |
STATE_DEAD
|
static String[] |
STATES
|
| Constructor Summary | |
Certifier()
Create a brand new certifier, using the default algorithm and key-length. |
|
Certifier(String db_id)
Restore a live certifier with the specified database id. |
|
Certifier(String pub_alg,
int key_length)
Create a brand new certifier, using the specified algorithm and key-length. |
|
| Method Summary | |
private String |
buildDBname(String dbname)
|
String |
certify(KeyChain chain)
certify and initialize the given key-chain. |
private void |
closeDB()
to be used by the finalize() method only! |
private void |
construct()
|
protected void |
finalize()
|
String |
getDBId()
get this certifier's database id. |
PublicKey |
getMasterKey()
get this certifier's public-key. |
static KeyChain |
getNewKeyChain()
generate a new key-chain. |
int |
getState()
get the current state. |
private void |
openDB()
to be used by construct() and restore() only! |
void |
restore(String db_id)
restore a Certifier object from the database with the given db-id. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private static final String __ME
private static final String DBPATH
private static final String MAIN_DBNAME
private HashDB main_db
private static final String CERT_DBNAME
private HashDB cert_db
private String db_id
private static final String MASTER_KEYPAIR_DBKEY
private static final String PUB_ALG_DBKEY
private static final String KEY_LENGTH_DBKEY
private PublicKey pubkey
private PrivateKey privkey
private String keyid
public static final String DEFAULT_PUB_ALG
private String pub_alg
public static final int DEFAULT_KEY_LENGTH
private int key_length
public static final int STATE_DEAD
public static final int STATE_ALIVE
private int state
public static final String[] STATES
public static final String CERTIFICATION_TAG_STRING
| Constructor Detail |
public Certifier()
throws SPKIException
Certifier(String,int)
public Certifier(String pub_alg,
int key_length)
throws SPKIException
Certifier()
public Certifier(String db_id)
throws SPKIException
Certifier(),
Certifier(String,int)| Method Detail |
protected void finalize()
throws Throwable
public int getState()
state,
STATESpublic String getDBId()
public PublicKey getMasterKey()
public static KeyChain getNewKeyChain()
throws SPKIException
KeyChain
public String certify(KeyChain chain)
throws SPKIException
CERTIFICATION_TAG_STRING,
KeyChain.initialize(PublicKey,Certificate)
private void openDB()
throws SPKIException
private void closeDB()
throws SPKIException
private String buildDBname(String dbname)
throws SPKIException
private void construct()
throws Exception
public void restore(String db_id)
throws Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||