|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.crypto.keystore.CertificateStatusManager
public final class CertificateStatusManager
Coordinates all status methods required to use access and modify
the CertificateStatus
of any Certificate
on the device.
Method Summary | ||
---|---|---|
|
void |
addCollectionListener(Object listener)
Registers a listener to receive collection events. |
|
boolean |
checkTicket(CertificateStatusManagerTicket ticket)
Checks the validity of the ticket. |
|
static CertificateStatusManager |
getInstance()
This method returns an instance of the CertificateStatusManager . |
|
static long |
getStaleTime()
Returns the current stale time for the handheld. |
|
CertificateStatus |
getStatus(Certificate certificate)
This method will return the status of the certificate that is passed into this method. |
|
CertificateStatusManagerTicket |
getTicket()
Returns a ticket for the KeyStoreManager assuming that the password was entered correctly. |
|
boolean |
isTicketRequired(byte[] certificateEncoding,
String certificateType,
CertificateStatus newStatus)
This method will determine whether a setStatus call using the certificate and status passed into this method will require a password prompt on the part of the user. |
|
boolean |
isTicketRequired(Certificate certificate,
CertificateStatus newStatus)
This method will determine whether a setStatus call using the certificate and status passed into this method will require a password prompt on the part of the user. |
|
void |
removeCollectionListener(Object listener)
Removes a listener object from the list of those receiving events. |
|
void |
revoke(CertificateRevocationList crl)
Revokes the certificate specified by the CRL. |
|
void |
setStatus(byte[] encoding,
String type,
CertificateStatus status,
CertificateStatusManagerTicket ticket)
This method will ensure that the certificate has been added to the keystore and if so, it will update the status. |
|
void |
setStatus(Certificate certificate,
int reason,
CertificateStatusManagerTicket ticket)
This method creates a new Certificate status object that contains the reason given as one of the parameters. |
|
void |
setStatus(Certificate certificate,
CertificateStatus status,
CertificateStatusManagerTicket ticket)
This method will ensure that the certificate has been added to the keystore and if so, it will update the status. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CertificateStatusManager getInstance()
CertificateStatusManager
.
CertificateStatusManager
object.public static long getStaleTime()
public void revoke(CertificateRevocationList crl) throws CertificateStatusException
crl
- The certificate revocation list.
CertificateStatusException
- Thrown if the certificate status is incorrect
or if the method had trouble building up the lists of certificates for verification.public void setStatus(Certificate certificate, CertificateStatus status, CertificateStatusManagerTicket ticket) throws KeyStoreCancelException, InvalidTimeException, BackwardStatusException
It is important to note that this method will NOT allow you to change the status of a certificate back to a state that it was already in. For example, a revoked certificate cannot be changed to a status of GOOD.
certificate
- The certificate whose status has changed.status
- The new status of the certificate.ticket
- The specified key store ticket.
KeyStoreCancelException
- Thrown if the user does not enter a
password or cancels the password dialog.
InvalidTimeException
- Thrown if the specified time or date is
invalid.
BackwardStatusException
- Thrown if the user attempts to set the
certificate to an invalid status.
IllegalArgumentException
- Thrown if the CertificateStatus object is null.CertificateStatusManager.getStatus(net.rim.device.api.crypto.certificate.Certificate)
public void setStatus(Certificate certificate, int reason, CertificateStatusManagerTicket ticket) throws KeyStoreCancelException, InvalidTimeException, BackwardStatusException
certificate
- The certificate to be revoked.reason
- An integer describing the reason the certificate was revoked referencing
the RevocationReason interface.ticket
- The specified key store ticket.
KeyStoreCancelException
- Thrown if the user does not enter a
password or cancels the password dialog.
InvalidTimeException
- Thrown if the specified time or date is
invalid.
BackwardStatusException
- Thrown if the user attempts to set the
certificate to an invalid status.
IllegalArgumentException
- Thrown if the CertificateStatus object is null.CertificateStatusManager.getStatus(net.rim.device.api.crypto.certificate.Certificate)
public void setStatus(byte[] encoding, String type, CertificateStatus status, CertificateStatusManagerTicket ticket) throws KeyStoreCancelException, InvalidTimeException, BackwardStatusException
It is important to note that this method will NOT allow you to change the status of a certificate back to a state that it was already in. For example, a revoked certificate cannot be changed to a status of GOOD.
encoding
- the byte[] containing the encoding of the certificate.type
- a string representing the type of the certificate. For example,
"WTLS" or "X509".status
- The new status of the certificate.ticket
- The specified key store ticket.
KeyStoreCancelException
- Thrown if the user does not enter a
password or cancels the password dialog.
InvalidTimeException
- Thrown if the specified time or date is
invalid.
BackwardStatusException
- Thrown if the user attempts to set the
certificate to an invalid status.
IllegalArgumentException
- Thrown if the CertificateStatus object is null.CertificateStatusManager.getStatus(net.rim.device.api.crypto.certificate.Certificate)
public boolean isTicketRequired(Certificate certificate, CertificateStatus newStatus) throws InvalidTimeException, BackwardStatusException
certificate
- the certificate to check the new status against..status
- the certificate status to check for the password prompt.
IllegalArgumentException
- if the certificate or status is null.
InvalidTimeException
- if the setStatus call will throw this exception
because the time is invalid.
BackwardStatusException
- if the setStatus call will throw this exception
because the status is going backwards compared to what is already stored in the
CertificateStatusManager.public boolean isTicketRequired(byte[] certificateEncoding, String certificateType, CertificateStatus newStatus) throws InvalidTimeException, BackwardStatusException
encoding
- the byte[] containing the encoding of the certificate.type
- a string representing the type of the certificate. For example,
"WTLS" or "X509".status
- the certificate status to check for the password prompt.
IllegalArgumentException
- if the certificate or status is null.
InvalidTimeException
- if the setStatus call will throw this exception
because the time is invalid.
BackwardStatusException
- if the setStatus call will throw this exception
because the status is going backwards compared to what is already stored in the
CertificateStatusManager.public CertificateStatus getStatus(Certificate certificate)
certificate
- The certificate for which to find the status. The
equals method is used to find the matching certificates.
CertificateStatusManager.setStatus(net.rim.device.api.crypto.certificate.Certificate, net.rim.device.api.crypto.certificate.CertificateStatus, net.rim.device.api.crypto.keystore.CertificateStatusManagerTicket)
public CertificateStatusManagerTicket getTicket() throws KeyStoreCancelException
CertificateStatusManagerTicket
object.
KeyStoreCancelException
- Thrown if the user cancels out of the
password dialog.public boolean checkTicket(CertificateStatusManagerTicket ticket)
ticket
- The specified ticket.
public void addCollectionListener(Object listener)
Certificate
object.
addCollectionListener
in interface CollectionEventSource
listener
- Object to register as a listener which must implement
CollectionListener
or one of its derived interfaces.public void removeCollectionListener(Object listener)
Certificate
object.
removeCollectionListener
in interface CollectionEventSource
listener
- Listener to remove.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.