org.hardtokenmgmt.core.ui
Class DefaultCertSelector
java.lang.Object
org.hardtokenmgmt.core.ui.DefaultCertSelector
- All Implemented Interfaces:
- CertSelector
public class DefaultCertSelector
- extends java.lang.Object
- implements CertSelector
Default cert selector that selects logo and name according to the following
Default is : cert.gif
If cert have non-rep key usage set : sign_cert.gif
If cert contains a UPN in altname set : mscert.gif
- Version:
- $Id$
- Author:
- Philip Vendil 2007 apr 17
|
Method Summary |
java.lang.String |
getAssociatedPINType(java.security.cert.X509Certificate cert)
Method that should return only one of the IToken.PINTYPE_ constant
of which pin type a certificate should be associated with. |
java.lang.String |
getCertLabel(java.security.cert.X509Certificate cert)
Method that should return the certificate label for a specified
certificate. |
java.lang.String |
getLogo(java.security.cert.X509Certificate cert)
|
java.lang.String |
getName(java.security.cert.X509Certificate cert)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCertSelector
public DefaultCertSelector()
getLogo
public java.lang.String getLogo(java.security.cert.X509Certificate cert)
- Specified by:
getLogo in interface CertSelector
- Parameters:
cert - that should be analysed
- Returns:
- the image filename of the logotype.
getName
public java.lang.String getName(java.security.cert.X509Certificate cert)
- Specified by:
getName in interface CertSelector
- Parameters:
cert - that should be analysed
- Returns:
- name related to the certificate.
getAssociatedPINType
public java.lang.String getAssociatedPINType(java.security.cert.X509Certificate cert)
- Description copied from interface:
CertSelector
- Method that should return only one of the IToken.PINTYPE_ constant
of which pin type a certificate should be associated with.
- Specified by:
getAssociatedPINType in interface CertSelector
- Parameters:
cert - to get the PIN type for
- Returns:
- a IToken.PINTYPE_ constant
getCertLabel
public java.lang.String getCertLabel(java.security.cert.X509Certificate cert)
- Description copied from interface:
CertSelector
- Method that should return the certificate label for a specified
certificate.
A certificate label is a marking in the card profile to identify
the certificate.
- Specified by:
getCertLabel in interface CertSelector
- Parameters:
cert - to retrieve the certificate label for.
- Returns:
- the certificate label.