All Packages Class Hierarchy This Package Previous Next Index
Class semper.certificate.CertificateBrowserApp
java.lang.Object
|
+----semper.util.browser.Browser
|
+----semper.certificate.CertificateBrowserApp
- public class CertificateBrowserApp
- extends Browser
- implements BrowseableActions
-
ACTIONS
-
-
NUMBER_OF_KEYS
-
-
CertificateBrowserApp()
- Empty constructor.
-
CertificateBrowserApp(CertBag, CertBag, ModuleInformation)
- Constructs the CertificateBrowserApp for the user 's certificates and the
received ones, taking into account the existing initialised modules.
-
certificateBrowser()
- Interacts with the user via a TINGUIN session.
-
certificatePolicy(CertBag, TinguinSession)
- The user has chosen which certificates he wants to browse.
-
compareTo(Browseable, Browseable, int, boolean)
-
Compare with given object.
-
exportToFile(Certificate)
- Exports a certificate object to a file with extension *.crt, as well as the
corresponding private key to a file with extension *.key.
-
getActions()
- Sets the names of the actions that should be displayed on the TINGUIN.This method
is dynamically invoked by the method interact2 of the Browser class.
-
getCertificates(CertBag, TinguinSession)
- Retrieves the certificates and creates the table containing the browseable objects.
-
getKeys()
-
Obtain the names of the keys which can be used to sort.
-
getMethodName(int)
- Finds the name of the method that for the selected action.
-
getNewPolicy(TinguinSession, boolean, CertBag, int, Certificate, String)
- Changes an already stored policy or adds a new one to the selected certificate.
-
importFromFile(CertBag, TinguinSession)
- Imports a certificate object from a file (*.crt), as well as the
corresponding private key from a file with extension *.key.
-
launch()
- Implements the MenuLaunchable interface.
-
policyList(CertBag, TinguinSession)
-
Lists all the policies found in certificate bag.
-
remove(Certificate)
-
Removes a certificate of the archive and the CertBag, that stores it.
-
removePolicy(TinguinSession, CertBag, Situation, Certificate)
- Removes an already stored policy of the selected certificate.
-
verify(Certificate)
- Verifies the correctness of the selected certificate (ie whether signature matches its contents).
-
viewFingerprints(Certificate)
- Displays the fingerprint of the certificate 's public key, as well as the fingerprint of the CA 's public key.
-
viewPolicy(Certificate)
- Displays the policy for a selected certificate.
-
viewPolicyCertificates(CertBag, int, TinguinSession)
- Lists all the certificates that can be used with the selected policy.
NUMBER_OF_KEYS
protected static int NUMBER_OF_KEYS
ACTIONS
protected static final String ACTIONS[]
CertificateBrowserApp
public CertificateBrowserApp()
- Empty constructor.
CertificateBrowserApp
public CertificateBrowserApp(CertBag identityBag,
CertBag peerBag,
ModuleInformation initialisedModules)
- Constructs the CertificateBrowserApp for the user 's certificates and the
received ones, taking into account the existing initialised modules.
- Parameters:
- identityBag - the CertBag that holds all the certificates of the user
- peerBag - the CertBag that holds all the received certificates of the user.
- initialisedModules - the information about the initialised modules.
launch
public void launch()
- Implements the MenuLaunchable interface.
- Overrides:
- launch in class Browser
getCertificates
public Browseable[] getCertificates(CertBag certBag,
TinguinSession display) throws Exception
- Retrieves the certificates and creates the table containing the browseable objects.
If there are no certificates it prompts the user to import one.
- Parameters:
- certBag - the CertBag that contains the certificates and the situations.
- display - the TinguinSession created for the Certificate Browser Application.
- Returns:
- a table of Browseable objects (Certificates).
certificateBrowser
public void certificateBrowser() throws Exception
- Interacts with the user via a TINGUIN session.
The user can select between browsing his own certificates or the ones he has received.
certificatePolicy
public void certificatePolicy(CertBag certBag,
TinguinSession display) throws Exception
- The user has chosen which certificates he wants to browse. This method displays
3 options : viewing the certificate list, viewing the policy list, or import
a certificate from a file.
- Parameters:
- certBag - the CertBag that contains the certificates and the situations.
- display - is the session created for the Certificate Browser Application
policyList
public void policyList(CertBag certBag,
TinguinSession display)
- Lists all the policies found in certificate bag.
- Parameters:
- certBag - the CertBag that contains the certificates and the situations.
- display - is the session created for the Certificate Browser Application
viewPolicyCertificates
public void viewPolicyCertificates(CertBag certBag,
int target,
TinguinSession display)
- Lists all the certificates that can be used with the selected policy.
- Parameters:
- certBag - the CertBag that contains the certificates and the situations.
- target - identifies the policy that the user has selected
- display - is the session created for the Certificate Browser Application.
remove
public void remove(Certificate cert) throws Exception
- Removes a certificate of the archive and the CertBag, that stores it.
- Parameters:
- cert - certificate that will be removed.
viewFingerprints
public void viewFingerprints(Certificate cert) throws CertificateManException
- Displays the fingerprint of the certificate 's public key, as well as the fingerprint of the CA 's public key.
- Parameters:
- cert - is the certificate for which the fingerprint will be displayed.
- Throws: CertificateManException,
- if for some reason, the fingerprint could not be displayed.
verify
public void verify(Certificate cert) throws CertificateManException
- Verifies the correctness of the selected certificate (ie whether signature matches its contents).
- Parameters:
- cert - is the certificate to be verified.
- Throws: CertificateManException,
- if for some reason, the Public Key of the CA is not stored.
viewPolicy
public void viewPolicy(Certificate cert)
- Displays the policy for a selected certificate.
- Parameters:
- cert - is the certificates of which the policy is displayed.
getNewPolicy
public void getNewPolicy(TinguinSession display,
boolean change,
CertBag certBag,
int target,
Certificate cert,
String s)
- Changes an already stored policy or adds a new one to the selected certificate.
- Parameters:
- display - is the session created for the Certificate Browser Application.
- change - if it is true then a policy will be changed, otherwise a new one will be added.
- certBag - the CertBag that contains the certificates and the situations.
- target - identifies the selected policy.
- cert - is the selected certificate.
- s - is the string that should be displayed on the window (in case a policy is changed or added).
removePolicy
public boolean removePolicy(TinguinSession display,
CertBag certBag,
Situation policyId,
Certificate cert)
- Removes an already stored policy of the selected certificate.
- Parameters:
- display - is the session created for the Certificate Browser Application.
- certBag - the CertBag that contains the certificates and the situations.
- policyId - identifies the selected policy.
- cert - is the selected certificate.
- Returns:
- true if the policy is removed, false otherwise.
exportToFile
public void exportToFile(Certificate cert) throws IOException, CryptoManException, CertificateManException
- Exports a certificate object to a file with extension *.crt, as well as the
corresponding private key to a file with extension *.key.
- Parameters:
- cert - the certificate that will be exported.
importFromFile
public void importFromFile(CertBag certBag,
TinguinSession display) throws Exception, CryptoManException
- Imports a certificate object from a file (*.crt), as well as the
corresponding private key from a file with extension *.key.
- Parameters:
- certBag - the CertBag that contains the certificates and the situations.
- display - is the session created for the Certificate Browser Application.
compareTo
public int compareTo(Browseable one,
Browseable two,
int keyno,
boolean reverse)
- Compare with given object.
- Returns:
- an integer that shows which should be displayed first
- See Also:
- compareTo
getKeys
public String[] getKeys()
- Obtain the names of the keys which can be used to sort.
- Returns:
- the names of the keys
- See Also:
- getKeys
getActions
public String[] getActions()
- Sets the names of the actions that should be displayed on the TINGUIN.This method
is dynamically invoked by the method interact2 of the Browser class.
- Returns:
- a table containing the names of the actions.
getMethodName
public String getMethodName(int n)
- Finds the name of the method that for the selected action.
- Parameters:
- n - identifies the selected action.
- Returns:
- the name of the method.
All Packages Class Hierarchy This Package Previous Next Index