palio.modules
Class Cert

java.lang.Object
  extended by palio.modules.core.Module
      extended by palio.modules.Cert
All Implemented Interfaces:
palio.modules.core.CurrentModuleDataKeys

public final class Cert
extends palio.modules.core.Module

Moduł pozwala na pobranie informacji o certyfikacie klienta.

Moduł jest dostępny w każdej instancji jPalio.

Version:
1.0.3
Author:
Krzysztof Synowiec (ksynowiec@torn.com.pl), Tomasz Żołnierzak

Field Summary
 
Fields inherited from interface palio.modules.core.CurrentModuleDataKeys
DESIGNER_ACTIONS_BUFFER, HTML_FORM_BUILDER, HTML_MAP_BUILDER, HTML_MENU_BUILDER, HTML_TOOLTIPS_BUFFER, ITEXT_DOCUMENT, MAIL_MESSAGE, XLS_DOCUMENT, XML_DOCUMENT
 
Constructor Summary
Cert(palio.Instance instance, java.util.Properties parameters)
           
 
Method Summary
static byte[] getDerEncoded()
          Gets the DER-encoded certificate information, the tbsCertificate from this certificate.
static byte[] getEncoded()
          Returns the encoded form of this certificate.
static java.lang.String getEntityName()
          Returns the subject name (subject distinguished name) value from the certificate as an X500Principal
static java.util.Date getNotAfter()
          Gets the notAfter date from the validity period of the certificate.
static java.util.Date getNotBefore()
          Gets the notBefore date from the validity period of the certificate.
static java.lang.String getSerialNumber()
          Gets the serialNumber value from the certificate.
static byte[] getSignature()
          Gets the signature value (the raw signature bits) from the certificate.
 java.lang.String getVersion()
          Returns the module version
static java.lang.Boolean isSupplied()
          Check if the certificate is enabled.
static java.lang.Boolean isValid()
          Checks that the given date is within the certificate's validity period.
static java.lang.Boolean isValid(java.util.Date date)
          Checks that the given date is within the certificate's validity period.
 
Methods inherited from class palio.modules.core.Module
getConfigParam, getDescription, getModuleTranslation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cert

public Cert(palio.Instance instance,
            java.util.Properties parameters)
Method Detail

getVersion

public java.lang.String getVersion()
Description copied from class: palio.modules.core.Module
Returns the module version

Specified by:
getVersion in class palio.modules.core.Module

getDerEncoded

public static byte[] getDerEncoded()
Gets the DER-encoded certificate information, the tbsCertificate from this certificate. This can be used to verify the signature independently.

Returns:
the DER-encoded certificate information.

getEncoded

public static byte[] getEncoded()
Returns the encoded form of this certificate. It is assumed that each certificate type would have only a single form of encoding; for example, X.509 certificates would be encoded as ASN.1 DER.

Returns:
the encoded form of this certificate

getSignature

public static byte[] getSignature()
Gets the signature value (the raw signature bits) from the certificate.

Returns:
the signature

getEntityName

public static java.lang.String getEntityName()
Returns the subject name (subject distinguished name) value from the certificate as an X500Principal

Returns:
the distinguished name of this X500Principal

getNotAfter

public static java.util.Date getNotAfter()
Gets the notAfter date from the validity period of the certificate. See getNotBefore for relevant ASN.1 definitions.

Returns:
the end date of the validity period

getNotBefore

public static java.util.Date getNotBefore()
Gets the notBefore date from the validity period of the certificate. The relevant ASN.1 definitions are: validity Validity Validity ::= SEQUENCE { notBefore CertificateValidityDate, notAfter CertificateValidityDate } CertificateValidityDate ::= CHOICE { utcTime UTCTime, generalTime GeneralizedTime }

Returns:
the start date of the validity period

isSupplied

public static java.lang.Boolean isSupplied()
Check if the certificate is enabled.

Returns:
true if supplied otherwise false

getSerialNumber

public static java.lang.String getSerialNumber()
Gets the serialNumber value from the certificate. The serial number is assigned by the certification authority to each certificate. It must be unique for each certificate issued by a given CA (i.e., the issuer name and serial number identify a unique certificate).

Returns:
the serial number

isValid

public static java.lang.Boolean isValid()
Checks that the given date is within the certificate's validity period. In other words, this determines whether the certificate would be valid at the given date/time.

Returns:
true if valid otherwise false
Since:
module 1.0.2, jPALIO 7.0.27

isValid

public static java.lang.Boolean isValid(java.util.Date date)
Checks that the given date is within the certificate's validity period. In other words, this determines whether the certificate would be valid at the given date/time.

Returns:
true if valid otherwise false
Since:
module 1.0.2, jPALIO 7.0.27