|
Oracle Fusion Middleware PKI SDK CMP Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10666-05 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.crypto.cmp.PKIMessageBody
oracle.security.crypto.cmp.POPChallenge
public class POPChallenge
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.
Challenge
, POPResponse
Nested Class Summary |
---|
Nested classes/interfaces 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, java.security.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 |
---|
public POPChallenge()
POPChallenge
message body. Since such an object is not valid, this constructor is intended primarily for use with the input(java.io.InputStream)
method.public POPChallenge(Challenge challenge)
POPChallenge
message body with the specified challenge.public POPChallenge(java.io.InputStream is) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void addChallenge(Challenge challenge)
Challenge
to this challenge message body.public java.util.Vector getChallenges()
Vector
containing the challenges if any, otherwise null
.public boolean verify(int challengeIndex, oracle.security.crypto.cert.GeneralName sender, java.security.PrivateKey privKey) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, javax.crypto.BadPaddingException, javax.crypto.NoSuchPaddingException, javax.crypto.IllegalBlockSizeException
This method verifies the challenge by:
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.true
if the challenge is verified, otherwise false
.
Note the changes in the method signature
Previously public boolean verify (int , GeneralName , oracle.security.crypto.core.PrivateKey )
Now public boolean verify (int, GeneralName , java.security.PrivateKey )
Note the changes in the exceptions thrown
Exceptions no longer thrown -- AlgorithmIdentifierException
Exceptions introduced -- NoSuchAlgorithmException, java.security.InvalidKeyException, BadPaddingException,NoSuchPaddingException, IllegalBlockSizeException
java.security.NoSuchAlgorithmException
- if the witness digest algorithm in the challenge is invalid.java.security.InvalidKeyException
- if the private key is invalid.BadPaddingException,NoSuchPaddingException,IllegalBlockSizeException
- if an error occurs while decrypting the challenge.javax.crypto.BadPaddingException
javax.crypto.NoSuchPaddingException
javax.crypto.IllegalBlockSizeException
public PKIMessageBody.Type getType()
PKIMessageBody
PKIMessageBody.Type
.getType
in class PKIMessageBody
public java.lang.String toString()
toString
in class java.lang.Object
public void input(java.io.InputStream is) throws java.io.IOException
java.io.IOException
|
Oracle Fusion Middleware PKI SDK CMP Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10666-05 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |