|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--pki.PKIDatabase
This class manages the PKIs database.
Field Summary | |
protected java.sql.Connection |
c
The database connection object. |
static int |
DB_FILE
|
static int |
DB_MYSQL
|
static boolean |
debug
|
Constructor Summary | |
PKIDatabase(java.util.Properties settings)
Constructor for selecting the database type to use |
Method Summary | |
void |
addCertificate(java.math.BigInteger person,
java.security.cert.X509Certificate cert)
Inserts a pseudonym certificate into the database |
void |
addPersonCertificate(java.security.cert.X509Certificate cert)
Inserts a person certificate into the database |
void |
addRoleCertificate(java.math.BigInteger person,
java.security.cert.X509Certificate cert)
Inserts a role certificate into the database |
java.security.cert.X509Certificate |
getCertificate(java.math.BigInteger serial)
Returns a certificate for a pseudonym according to the given serial number |
java.math.BigInteger |
getLastSerial()
Returns last (used) serial number |
java.math.BigInteger |
getNextSerialNumber()
Returns the next free serial number, and stores it into database |
java.security.cert.X509Certificate |
getPersonCertificate(java.math.BigInteger serial)
Returns a certificate for a person pseudonym according to the given serial number |
java.security.cert.X509Certificate |
getRoleCertificate(java.math.BigInteger serial)
Returns a certificate for a role pseudonym according to the given serial number |
boolean |
initDB()
Initializes a new database. |
boolean |
initDBFile()
Initializes the file database. |
boolean |
initDBMysql()
Initializes a MySQL database. |
boolean |
isConnected()
|
boolean |
openDBFile()
Opens a file database. |
boolean |
openDBMysql()
Opens a MySQL database. |
void |
run()
|
void |
setCertifier(pki.PKICert cert)
Sets the certifier object to be used by this database instance. |
boolean |
start()
Opens the database. |
void |
stop()
Stops the database object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean debug
protected java.sql.Connection c
public static final int DB_FILE
public static final int DB_MYSQL
Constructor Detail |
public PKIDatabase(java.util.Properties settings)
settings
- Settings for DatabaseMethod Detail |
public boolean isConnected()
public java.math.BigInteger getNextSerialNumber()
public java.math.BigInteger getLastSerial()
public java.security.cert.X509Certificate getPersonCertificate(java.math.BigInteger serial)
public java.security.cert.X509Certificate getRoleCertificate(java.math.BigInteger serial)
public java.security.cert.X509Certificate getCertificate(java.math.BigInteger serial)
public void addRoleCertificate(java.math.BigInteger person, java.security.cert.X509Certificate cert)
public void addPersonCertificate(java.security.cert.X509Certificate cert)
public void addCertificate(java.math.BigInteger person, java.security.cert.X509Certificate cert)
public void setCertifier(pki.PKICert cert)
public boolean start()
public boolean initDB()
public boolean openDBFile()
public boolean initDBFile()
public boolean openDBMysql()
public boolean initDBMysql()
public void stop()
public void run()
run
in interface java.lang.Runnable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |