Oracle Security Developer Tools PKI SDK CMP Java API Reference
10g (10.1.4.0.1)

B28166-01


oracle.security.crypto.cmp
Class POPChallenge

java.lang.Object
  extended byoracle.security.crypto.cmp.PKIMessageBody
      extended byoracle.security.crypto.cmp.POPChallenge

All Implemented Interfaces:
oracle.security.crypto.asn1.ASN1Object, oracle.security.crypto.util.Streamable

public class POPChallenge
extends PKIMessageBody

PKI message body of type POP Challenge.

This message conveys a sequence of encrypted challenges, intended to demonstrate possession of a decryption private key, in the same order as the original certificate requests were presented.

See Also:
Challenge, POPResponse

Nested Class Summary

 

Nested classes inherited from class oracle.security.crypto.cmp.PKIMessageBody
PKIMessageBody.Type

 

Constructor Summary
POPChallenge()
          Create a new, empty POPChallenge message body.
POPChallenge(Challenge challenge)
          Create a new POPChallenge message body with the specified challenge.
POPChallenge(java.io.InputStream is)
           

 

Method Summary
 void addChallenge(Challenge challenge)
          Add a Challenge to this challenge message body.
 java.util.Vector getChallenges()
          Get challenges included in this message body.
 PKIMessageBody.Type getType()
          Returns one of the values defined in PKIMessageBody.Type.
 void input(java.io.InputStream is)
          Initializes this object by reading its encoding from the given input stream.
 java.lang.String toString()
           
 boolean verify(int challengeIndex, oracle.security.crypto.cert.GeneralName sender, oracle.security.crypto.core.PrivateKey privKey)
          Verifies that the specified challenge is valid.

 

Methods inherited from class oracle.security.crypto.cmp.PKIMessageBody
inputInstance, length, output

 

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

 

Constructor Detail

POPChallenge

public POPChallenge()
Create a new, empty POPChallenge message body. Since such an object is not valid, this constructor is intended primarily for use with the input(java.io.InputStream) method.

POPChallenge

public POPChallenge(Challenge challenge)
Create a new POPChallenge message body with the specified challenge.

POPChallenge

public POPChallenge(java.io.InputStream is)
             throws java.io.IOException

Method Detail

addChallenge

public void addChallenge(Challenge challenge)
Add a Challenge to this challenge message body.

getChallenges

public java.util.Vector getChallenges()
Get challenges included in this message body.
Returns:
a Vector containing the challenges if any, otherwise null.

verify

public boolean verify(int challengeIndex,
                      oracle.security.crypto.cert.GeneralName sender,
                      oracle.security.crypto.core.PrivateKey privKey)
               throws oracle.security.crypto.core.AlgorithmIdentifierException,
                      oracle.security.crypto.core.InvalidKeyException,
                      oracle.security.crypto.core.CipherException
Verifies that the specified challenge is valid.

This method verifies the challenge by:

Parameters:
challengeIndex - The sequential number of the challenge to verify (withing this POPChallenge's sequence of individual challenges).
sender - The GeneralName of the PKI message sender, to be compared with the challenge sender.
privKey - The private key to decrypt the challenge.
Returns:
true if the challenge is verified, otherwise false.
Throws:
oracle.security.crypto.core.AlgorithmIdentifierException - if the witness digest algorithm in the challenge is invalid.
oracle.security.crypto.core.InvalidKeyException - if the private key is invalid.
oracle.security.crypto.core.CipherException - if an error occurs while decrypting the challenge.

getType

public PKIMessageBody.Type getType()
Description copied from class: PKIMessageBody
Returns one of the values defined in PKIMessageBody.Type.
Specified by:
getType in class PKIMessageBody

toString

public java.lang.String toString()

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Initializes this object by reading its encoding from the given input stream.
Throws:
java.io.IOException

Oracle Security Developer Tools PKI SDK CMP Java API Reference
10g (10.1.4.0.1)

B28166-01


Copyright © 2005 ,2006 , Oracle. All rights reserved.