| 
 | Oracle Fusion Middleware PKI SDK TSP Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10677-05 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
   oracle.security.crypto.tsp.TSPUtils
oracle.security.crypto.tsp.TSPUtils
public class TSPUtils
Defines various utility methods for the oracle.security.crypto.cert.tsp</code. package.
| Field Summary | |
|---|---|
| static java.lang.String | DEFAULT_RandomGenerator_ALGO | 
| static java.lang.String | HASH_ALG_MD2 | 
| static java.lang.String | HASH_ALG_MD5 | 
| static java.lang.String | HASH_ALG_SHA_1 | 
| Constructor Summary | |
|---|---|
| TSPUtils() | |
| Method Summary | |
|---|---|
| static oracle.security.crypto.cert.X509 | convertX509(java.security.cert.X509Certificate cert)Converts an X509Certificate object to an X509 object | 
| static oracle.security.crypto.core.AlgorithmIdentifier | getAlgoID(java.lang.String name)Algoname to algoId mapping | 
| static java.lang.String | getAlgoName(oracle.security.crypto.core.AlgorithmIdentifier oid)Algoid to algoname mapping | 
| static java.lang.String | getAlgoName(oracle.security.crypto.core.AlgorithmIdentifier oid, boolean removeMode)Algoid to algoname mapping | 
| static oracle.security.crypto.cert.X509ExtensionSet | getExtensionSet(java.security.cert.X509Certificate cert)Returns a list of Extensions associated with an X509Certificate | 
| static void | validateMessageImprint(MessageImprint mi)Verifies that the algorithm specified in the given MessageImprint object is supported and that the length of the hash in the MessageImprint object is correct for the specified algorithm. | 
| static void | validateStatus(TSPTimeStampResp tsr)Validates the status field for the given TimeStampResp message. | 
| static void | verifyKeyPurposeID(java.security.cert.X509Certificate cert)Verifies that the id-kp-timeStamping KeyPuposeID is present in the given X.509 certificate. | 
| static void | verifyTimeStampTokenSignature(oracle.security.crypto.cms.CMSSignedDataContentInfo timeStampToken, java.security.cert.X509Certificate tsaCert)Verifies the signature of the given timeStampToken using the given X.509 certificate. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String DEFAULT_RandomGenerator_ALGO
public static final java.lang.String HASH_ALG_MD5
public static final java.lang.String HASH_ALG_MD2
public static final java.lang.String HASH_ALG_SHA_1
| Constructor Detail | 
|---|
public TSPUtils()
| Method Detail | 
|---|
public static void verifyKeyPurposeID(java.security.cert.X509Certificate cert)
                               throws TSPException,
                                      java.io.IOException
Note the changes in the method signature
Previously public static void verifyKeyPurposeID (X509)
Now public static void verifyKeyPurposeID (X509Certificate)
cert - The certificateTSPException - If the id-kp-timeStamping KeyPuposeID is not present.java.io.IOException
public static void validateMessageImprint(MessageImprint mi)
                                   throws TSPException,
                                          java.security.NoSuchAlgorithmException
Note the changes in the exceptions thrown
NoSuchAlgorithmException is introduced
AlgorithmIdentifierException is no longer thrown
mi - The MessageImprint object.java.security.NoSuchAlgorithmException - If the algorithm is not supported.TSPException - If the hash length is incorrect.
public static void validateStatus(TSPTimeStampResp tsr)
                           throws TSPException
tsr - The TimeStampResp message.TSPException - Can occur under the following circumstances:
public static void verifyTimeStampTokenSignature(oracle.security.crypto.cms.CMSSignedDataContentInfo timeStampToken,
                                                 java.security.cert.X509Certificate tsaCert)
                                          throws TSPException
Note the changes in the method signature
Previouslypublic static void verifyTimeStampTokenSignature (CMSSignedDataContentInfo, X509)
Now public static void verifyTimeStampTokenSignature (CMSSignedDataContentInfo. X509Certificate)
timeStampToken - The given timeStampToken.tsaCert - The given X.509 certificate.TSPException
public static oracle.security.crypto.cert.X509ExtensionSet getExtensionSet(java.security.cert.X509Certificate cert)
                                                                    throws java.io.IOException
cert - java.security.X509Certificatejava.io.IOException
public static oracle.security.crypto.core.AlgorithmIdentifier getAlgoID(java.lang.String name)
                                                                 throws java.security.NoSuchAlgorithmException
name - Name of the algorithmjava.security.NoSuchAlgorithmException
public static java.lang.String getAlgoName(oracle.security.crypto.core.AlgorithmIdentifier oid)
                                    throws java.security.NoSuchAlgorithmException
oid - Algorithmidentifier for which algorithm name is requiredjava.security.NoSuchAlgorithmException
public static java.lang.String getAlgoName(oracle.security.crypto.core.AlgorithmIdentifier oid,
                                           boolean removeMode)
                                    throws java.security.NoSuchAlgorithmException
oid - Algorithmidentifier for which algorithm name is requiredjava.security.NoSuchAlgorithmException
public static oracle.security.crypto.cert.X509 convertX509(java.security.cert.X509Certificate cert)
                                                    throws java.security.cert.CertificateEncodingException
cert - X509Certificate objectjava.security.cert.CertificateEncodingException| 
 | Oracle Fusion Middleware PKI SDK TSP Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10677-05 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||