org.kuali.rice.ksb.security
Class SignatureVerifyingInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by javax.servlet.ServletInputStream
          extended by org.kuali.rice.ksb.security.SignatureVerifyingInputStream
All Implemented Interfaces:
Closeable

public class SignatureVerifyingInputStream
extends javax.servlet.ServletInputStream

An InputStream which decorates another InputStream with a wrapper that verifies the digital signature of the data after the last piece of data is read. The digital signature to verify against is passed into the constructor of this stream.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
SignatureVerifyingInputStream(byte[] digitalSignature, Signature signature, InputStream wrappedInputStream)
           
 
Method Summary
 int read()
           
protected  void verifySignature()
           
 
Methods inherited from class javax.servlet.ServletInputStream
readLine
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SignatureVerifyingInputStream

public SignatureVerifyingInputStream(byte[] digitalSignature,
                                     Signature signature,
                                     InputStream wrappedInputStream)
Method Detail

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

verifySignature

protected void verifySignature()
                        throws IOException,
                               GeneralSecurityException
Throws:
IOException
GeneralSecurityException


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.