issrg.pa.extensions
Class EntrustSigningUtility

java.lang.Object
  extended by issrg.pa.SigningUtility
      extended by issrg.pa.extensions.EntrustSigningUtility
All Implemented Interfaces:
Utility, Signer

public class EntrustSigningUtility
extends SigningUtility

This class provides signing by employing Entrust Java toolkit.

The user is asked to pick the Entrust profile file, and then authenticate himself by entering the password. Signer's identity is picked from the PKC.

Version:
1.0
Author:
Sassa

Field Summary
static java.lang.String DEFAULT_PROFILE
          This is the filename of the EPF file that will be used by default in case the DEFAULT_PROFILE_STING variable is missing from the Environment.
static java.lang.String DEFAULT_PROFILE_STRING
          This variable names the configuration variable in the pa.cfg file that points to the default profile file.
 
Constructor Summary
EntrustSigningUtility()
          This was used before; left for compliancy.
 
Method Summary
 java.lang.String getSigningAlgorithmID()
          The user must be logged in at this point.
 java.security.cert.X509Certificate getVerificationCertificate()
          This method lets the caller get the verification certificate so it can be provided in some form to the signature verifier, or can be used to extract the necessary data to form the correct signature information (signer's name, etc).
 boolean isLoggedIn()
           
 void login(java.awt.Frame frame, java.util.Map Environment)
           
 void logout(java.awt.Frame frame, java.util.Map Environment)
           
 byte[] sign(byte[] aci)
          This method lets the caller sign any data and returns the signature of it.
 
Methods inherited from class issrg.pa.SigningUtility
registerMe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PROFILE_STRING

public static final java.lang.String DEFAULT_PROFILE_STRING
This variable names the configuration variable in the pa.cfg file that points to the default profile file. This file will be selected as the initial signer's choice, but can be changed at run-time.

At the moment its value is "EntrustSigningUtility.DefaultProfile".

See Also:
Constant Field Values

DEFAULT_PROFILE

public static final java.lang.String DEFAULT_PROFILE
This is the filename of the EPF file that will be used by default in case the DEFAULT_PROFILE_STING variable is missing from the Environment.

See Also:
Constant Field Values
Constructor Detail

EntrustSigningUtility

public EntrustSigningUtility()
This was used before; left for compliancy.

Method Detail

sign

public byte[] sign(byte[] aci)
            throws EntrustSecurityException
Description copied from interface: Signer
This method lets the caller sign any data and returns the signature of it.

Parameters:
aci - is the binary data to be signed
Returns:
a byte array of the signature
Throws:
EntrustSecurityException

isLoggedIn

public boolean isLoggedIn()

login

public void login(java.awt.Frame frame,
                  java.util.Map Environment)
           throws EntrustSecurityException
Throws:
EntrustSecurityException

logout

public void logout(java.awt.Frame frame,
                   java.util.Map Environment)
            throws EntrustSecurityException
Throws:
EntrustSecurityException

getSigningAlgorithmID

public java.lang.String getSigningAlgorithmID()
                                       throws ACCreationException
The user must be logged in at this point.

Specified by:
getSigningAlgorithmID in interface Signer
Specified by:
getSigningAlgorithmID in class SigningUtility
Returns:
the String representation of the Signing Algorithm ID, as an OID
Throws:
ACCreationException

getVerificationCertificate

public java.security.cert.X509Certificate getVerificationCertificate()
                                                              throws EntrustSecurityException
Description copied from interface: Signer
This method lets the caller get the verification certificate so it can be provided in some form to the signature verifier, or can be used to extract the necessary data to form the correct signature information (signer's name, etc). If the user has got several signing certificates (and corresponding verification certificates), he must select the one to use at the login time, not at this point. This method should not display any GUI.

Returns:
the X509 PKC of the signer
Throws:
EntrustSecurityException