|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--spki.demo.Monitor
spki.demo Monitor class.
| Field Summary | |
private static String |
__ME
This class's full name. |
private Tag |
capability
|
private String |
db_id
|
private static String |
DBPATH
databases's pathname prefix. |
static int |
DEFAULT_KEY_LENGTH
|
static String |
DEFAULT_PUB_ALG
|
private PublicKey |
issuer
the trusted issuer's principal. |
private static String |
ISSUER_DBKEY
the issuer's database index key. |
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 monitor's key-pair's database index key. |
private Vector |
nonces
|
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 monitor's public key. |
private int |
state
|
static int |
STATE_ALIVE
|
static int |
STATE_DEAD
|
static String[] |
STATES
|
| Constructor Summary | |
protected |
Monitor()
Default constructor. |
|
Monitor(PublicKey issuer,
Tag capability)
Create a brand new monitor, using the default algorithm, key-length and specified issuer. |
|
Monitor(String db_id)
Restore a live monitor with the specified database id. |
|
Monitor(String pub_alg,
int key_length,
PublicKey issuer,
Tag capability)
Create a brand new monitor, using the specified algorithm, key-length and issuer. |
| Method Summary | |
Tag |
authorize(AuthorizationRequest request)
verify the given authorization request and issue the authorization result. |
private String |
buildDBname(String dbname)
|
private void |
closeDB()
to be used by the finalize() method only! |
private void |
construct()
|
protected void |
finalize()
|
Tag |
getCapability()
get this monitor's accepted capability. |
String |
getDBId()
get this monitor's id. |
PublicKey |
getIssuer()
get this monitor's trusted issuer's public key. |
PublicKey |
getMasterKey()
get this monitor's public key. |
int |
getState()
get the current state. |
Sexp |
newNonce()
generate a unique authorization nonce and save in the active nonce list. |
private void |
openDB()
to be used by construct() and restore() only! |
void |
restore(String db_id)
restore a monitor 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 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
private static final String ISSUER_DBKEY
private PublicKey issuer
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
private Vector nonces
private Tag capability
| Constructor Detail |
protected Monitor()
public Monitor(PublicKey issuer,
Tag capability)
throws SPKIException
Monitor(String,int,PublicKey,Tag)
public Monitor(String pub_alg,
int key_length,
PublicKey issuer,
Tag capability)
throws SPKIException
Monitor(PublicKey,Tag)
public Monitor(String db_id)
throws SPKIException
Monitor(PublicKey,Tag),
Monitor(String,int,PublicKey,Tag)| Method Detail |
protected void finalize()
throws Throwable
public int getState()
state,
STATESpublic String getDBId()
public PublicKey getMasterKey()
public PublicKey getIssuer()
public Tag getCapability()
public Sexp newNonce()
throws SPKIException
nonces
public Tag authorize(AuthorizationRequest request)
throws SPKIException
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 | ||||||||