summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/certsrv/security/ISigningUnit.java
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/security/ISigningUnit.java')
-rw-r--r--pki/base/common/src/com/netscape/certsrv/security/ISigningUnit.java42
1 files changed, 20 insertions, 22 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/security/ISigningUnit.java b/pki/base/common/src/com/netscape/certsrv/security/ISigningUnit.java
index 664d5c1f8..7fbed0b6c 100644
--- a/pki/base/common/src/com/netscape/certsrv/security/ISigningUnit.java
+++ b/pki/base/common/src/com/netscape/certsrv/security/ISigningUnit.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.security;
-
import java.security.PublicKey;
import netscape.security.x509.X509CertImpl;
@@ -30,7 +29,7 @@ import com.netscape.certsrv.base.EBaseException;
/**
* A class represents the signing unit which is
* capable of signing data.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ISigningUnit {
@@ -46,11 +45,11 @@ public interface ISigningUnit {
/**
* Retrieves the nickname of the signing certificate.
*/
- public String getNickname();
+ public String getNickname();
/**
* Retrieves the new nickname in the renewal process.
- *
+ *
* @return new nickname
* @exception EBaseException failed to get new nickname
*/
@@ -58,39 +57,39 @@ public interface ISigningUnit {
/**
* Sets new nickname of the signing certificate.
- *
+ *
* @param name nickname
*/
public void setNewNickName(String name);
/**
* Retrieves the signing certificate.
- *
+ *
* @return signing certificate
*/
public X509Certificate getCert();
/**
* Retrieves the signing certificate.
- *
+ *
* @return signing certificate
*/
public X509CertImpl getCertImpl();
/**
* Signs the given data in specific algorithm.
- *
+ *
* @param data data to be signed
* @param algname signing algorithm to be used
* @return signed data
* @exception EBaseException failed to sign
*/
public byte[] sign(byte[] data, String algname)
- throws EBaseException;
-
+ throws EBaseException;
+
/**
* Verifies the signed data.
- *
+ *
* @param data signed data
* @param signature signature
* @param algname signing algorithm
@@ -98,18 +97,18 @@ public interface ISigningUnit {
* @exception EBaseException failed to verify
*/
public boolean verify(byte[] data, byte[] signature, String algname)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves the default algorithm.
- *
+ *
* @return default signing algorithm
*/
public SignatureAlgorithm getDefaultSignatureAlgorithm();
/**
* Retrieves the default algorithm name.
- *
+ *
* @return default signing algorithm name
*/
public String getDefaultAlgorithm();
@@ -124,15 +123,15 @@ public interface ISigningUnit {
/**
* Retrieves all supported signing algorithm of this unit.
- *
+ *
* @return a list of signing algorithms
* @exception EBaseException failed to list
- */
+ */
public String[] getAllAlgorithms() throws EBaseException;
/**
* Retrieves the token name of this unit.
- *
+ *
* @return token name
* @exception EBaseException failed to retrieve name
*/
@@ -140,7 +139,7 @@ public interface ISigningUnit {
/**
* Updates new nickname and tokename in the configuration file.
- *
+ *
* @param nickname new nickname
* @param tokenname new tokenname
*/
@@ -148,19 +147,18 @@ public interface ISigningUnit {
/**
* Checks if the given algorithm name is supported.
- *
+ *
* @param algname algorithm name
* @return signing algorithm
* @exception EBaseException failed to check signing algorithm
*/
public SignatureAlgorithm checkSigningAlgorithmFromName(String algname)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves the public key associated in this unit.
- *
+ *
* @return public key
*/
public PublicKey getPublicKey();
}
-