org.apache.ws.security
Class PublicKeyCallback

java.lang.Object
  extended by org.apache.ws.security.PublicKeyCallback
All Implemented Interfaces:
javax.security.auth.callback.Callback

public class PublicKeyCallback
extends java.lang.Object
implements javax.security.auth.callback.Callback


Constructor Summary
PublicKeyCallback(java.security.PublicKey publicKey)
           
 
Method Summary
 java.security.PublicKey getPublicKey()
           
 boolean isVerified()
           
 void setPublicKey(java.security.PublicKey publicKey)
           
 void setVerified(boolean b)
           
 boolean verifyTrust(java.security.KeyStore keyStore)
          Evaluate whether a given public key should be trusted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PublicKeyCallback

public PublicKeyCallback(java.security.PublicKey publicKey)
Method Detail

setPublicKey

public void setPublicKey(java.security.PublicKey publicKey)

getPublicKey

public java.security.PublicKey getPublicKey()

setVerified

public void setVerified(boolean b)

isVerified

public boolean isVerified()

verifyTrust

public boolean verifyTrust(java.security.KeyStore keyStore)
                    throws WSSecurityException
Evaluate whether a given public key should be trusted. Essentially, this amounts to checking to see if there is a certificate in the keystore, whose public key matches the transmitted public key.

Throws:
WSSecurityException


Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.