|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuc3m.it.CKCertManager.CertManagerCK
This class serves as a Java wrapper for UC3M Cryptoki library. The different calls to the library are made with native methods that are private in the class. They are called by public methods which work as an "interface" with the external world.
Constructor Summary | |
CertManagerCK()
Creates a new instance of CertManagerCK |
Method Summary | |
boolean |
checkPrivateKeyOwnership(byte[] serial)
|
boolean |
checkPrivateKeyOwnership(byte[] serial,
byte[] pk)
|
java.lang.String |
dataSign(byte[] data,
byte[] serial)
This public method signs a data byte array with the private key of the certificate selected by serial This method calls private method signData(byte[], byte[], byte[]) signData() . |
boolean |
DoorControl()
|
java.lang.String |
getCertificateBySerial(byte[] serial)
This public method searchs for a Certificate by its serial. |
java.lang.String |
getCertificateList()
This public method gets the list of certificates stored in the card as a tagged String. |
java.util.Vector |
getCertificateVectorList()
This public method gets the list of certificates stored in the card as CertBeans Vector. |
void |
getpublickKey(byte[] serial,
byte[] mod,
byte[] exp)
This public method uses the libray to made a polling based wait for card. |
static void |
main(java.lang.String[] args)
|
boolean |
verifySignature(byte[] Mod,
byte[] Exp,
byte[] clear,
byte[] signed)
|
void |
waitForCard()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CertManagerCK()
Method Detail |
public void getpublickKey(byte[] serial, byte[] mod, byte[] exp) throws java.lang.Exception
wait4Card()
.
An
- exception showing where is the problem.
java.lang.Exception
public boolean DoorControl() throws java.lang.Exception
java.lang.Exception
public boolean verifySignature(byte[] Mod, byte[] Exp, byte[] clear, byte[] signed) throws java.lang.Exception
java.lang.Exception
public void waitForCard() throws java.lang.Exception
java.lang.Exception
public java.lang.String getCertificateList() throws java.lang.Exception
getCertificateListNative() getCertificateListNative()
.
getCertificateList
in interface IJCCM
An
- exception showing where is the problem.
java.lang.Exception
public java.util.Vector getCertificateVectorList() throws java.lang.Exception
processCertificatesList(StreamTokenizer) processCertificatesList()
.
getCertificateVectorList
in interface IJCCM
An
- exception showing where is the problem.
java.lang.Exception
public java.lang.String getCertificateBySerial(byte[] serial) throws java.lang.Exception
searchCertificateBySerial(byte[]) searchCertificateBySerial
.
getCertificateBySerial
in interface IJCCM
An
- exception showing where is the problem.
java.lang.Exception
public boolean checkPrivateKeyOwnership(byte[] serial) throws java.lang.Exception
checkPrivateKeyOwnership
in interface IJCCM
java.lang.Exception
public boolean checkPrivateKeyOwnership(byte[] serial, byte[] pk) throws java.lang.Exception
checkPrivateKeyOwnership
in interface IJCCM
java.lang.Exception
public java.lang.String dataSign(byte[] data, byte[] serial) throws java.lang.Exception
signData(byte[], byte[], byte[]) signData()
.
dataSign
in interface IJCCM
An
- exception showing where is the problem.
java.lang.Exception
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |