com.rsa.certj.provider.pki.cmp

Class CMPProtectInfo

java.lang.Object
  |
  +--com.rsa.certj.spi.pki.ProtectInfo
        |
        +--com.rsa.certj.provider.pki.cmp.CMPProtectInfo

public final class CMPProtectInfo
extends ProtectInfo

This class is a subclass of the ProtectInfo class that is used to generate or verify protection of a CMP message.

Copyright © RSA Security Inc., 2000-2001. All rights reserved.


Constructor Summary

CMPProtectInfo(String algorithm, Certificate senderCert, Certificate recipCert, Certificate[] caCerts, DatabaseService database)

Constructs a CMPProtectInfo object which is used for signature protection.

CMPProtectInfo(String algorithm, char[] sharedSecret, byte[] keyID, Certificate recipCert, Certificate[] caCerts, DatabaseService database)

Constructs a CMPProtectInfo object which is used for PBM protection.

 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMPProtectInfo

public CMPProtectInfo(String algorithm,
                      Certificate senderCert,
                      Certificate recipCert,
                      Certificate[] caCerts,
                      DatabaseService database)
               throws InvalidParameterException
Constructs a CMPProtectInfo object which is used for signature protection.

Parameters

         algorithm  

A String object indicating a signature algorithm to be used, such as "SHA1/RSA/PKCS1Block01Pad".

         senderCert  

A Certificate object holding the certificate of a signing key.

         recipCert  

A Certificate object holding the certificate of the recipient.

         caCerts  

An Certificate array holding CA certificates.

         database  

A DatabaseService object that supplies both the certificates and the private key that might be needed to protect a message. The database should include the private key of the signer, as well as the private key whose certificate is requested if the key is an encryption key, as the returning certificate will be encrypted by the key.

Throws

InvalidParameterException - If any of the parameters is invalid.

CMPProtectInfo

public CMPProtectInfo(String algorithm,
                      char[] sharedSecret,
                      byte[] keyID,
                      Certificate recipCert,
                      Certificate[] caCerts,
                      DatabaseService database)
               throws InvalidParameterException
Constructs a CMPProtectInfo object which is used for PBM protection.

Parameters

         algorithm  

A String object indicating a PBM algorithm to be used, such as "PBE/HMAC/SHA1/PKIXPBE-1024".

         sharedSecret  

A char array holding a shared secret to be used.

         keyID  

A byte array holding the key ID that identifies the sharedSecret.

         recipCert  

A Certificate object holding the certificate of the recipient. This argument can be null. In that case, the recipient field of the message header will be null and some server may not accept it.

         caCerts  

An Certificate array holding CA certificates. This argument can be null. In that case, if a response is an error message and is signed instead of PBM-protected, you may not be able to verify the signature.

         database  

A DatabaseService object that supplies the private key whose certificate is requested if the key is an encryption key, as the returning certificate will be encrypted by the key. If the request is not for an encryption key, this argument can be null.

Throws

InvalidParameterException - If any of the parameters is invalid.


RSA BSAFE ® Cert-J 2.1.1 001-047007-211-001-000