issrg.acm
Class DefaultSigningUtility

java.lang.Object
  extended by issrg.acm.SigningUtility
      extended by issrg.acm.DefaultSigningUtility
All Implemented Interfaces:
Utility, Signer, java.security.Principal

public final class DefaultSigningUtility
extends SigningUtility
implements java.security.Principal

This is the default signing utility class. It does no signing, but just lets the Manager work and create ACs with Issuer DN in it.

It returns a StubX509Certificate when getVerificationCertificate is invoked. Then it can be used to retrieve the Issuer DN and other default values (Serial Number, Algorithm ID, etc). Note that other methods of the StubX509Certificate throw run-time exceptions, so the object is useless as an X509Certificate otherwise than just getting information to be embedded in the ACs.

As the Principal, it can return the name of the Signer, as input at login time.

Version:
1.0
Author:
A Otenko

Field Summary
static java.lang.String NO_SIGNATURE_ALGORITHM_ID
          This is the algorithm Identifier corresponding to "no signing".
protected  java.lang.String signerName
           
 
Constructor Summary
DefaultSigningUtility()
           
DefaultSigningUtility(Registry where)
           
 
Method Summary
 java.lang.String getName()
          This is the stub method for the Principal for retrieving the name of the Principal.
 java.lang.String getSigningAlgorithmID()
          This method returns NO_SIGNATURE_ALGORITHM_ID as the signature algorithm identifier.
 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 returns an empty array as a signature of any AC.
 
Methods inherited from class issrg.acm.SigningUtility
registerMe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, hashCode, toString
 

Field Detail

signerName

protected java.lang.String signerName

NO_SIGNATURE_ALGORITHM_ID

public static final java.lang.String NO_SIGNATURE_ALGORITHM_ID
This is the algorithm Identifier corresponding to "no signing". Its OID is "1.2.826.0.1.3344810.8.0".

Note that this algorithm Identifier has been invented for the purpose of creating test ACs.

See Also:
Constant Field Values
Constructor Detail

DefaultSigningUtility

public DefaultSigningUtility()

DefaultSigningUtility

public DefaultSigningUtility(Registry where)
Method Detail

sign

public byte[] sign(byte[] aci)
This method returns an empty array as a signature of any AC.

Specified by:
sign in interface Signer
Parameters:
aci - is the binary data to be signed
Returns:
a byte array of the signature

login

public void login(java.awt.Frame frame,
                  java.util.Map Environment)
           throws SecurityException
Specified by:
login in class SigningUtility
Throws:
SecurityException

logout

public void logout(java.awt.Frame frame,
                   java.util.Map Environment)
Specified by:
logout in class SigningUtility

getSigningAlgorithmID

public java.lang.String getSigningAlgorithmID()
This method returns NO_SIGNATURE_ALGORITHM_ID as the signature algorithm identifier. This OID should result in a stupor of any certificate verification software, which is the purpose of such reply. Its meaning is "no signing", which, certainly, is not implemented by any signature verification routines. It would be implemented for testing purposes only.

Note that this algorithm Identifier has been invented for the purposes of creating test ACs.

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

isLoggedIn

public boolean isLoggedIn()

getVerificationCertificate

public java.security.cert.X509Certificate getVerificationCertificate()
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.

Specified by:
getVerificationCertificate in interface Signer
Returns:
the X509 PKC of the signer

getName

public java.lang.String getName()
This is the stub method for the Principal for retrieving the name of the Principal.

Specified by:
getName in interface java.security.Principal