commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r355223 - in /jakarta/commons/sandbox/openpgp/trunk/src: main/java/org/apache/commons/openpgp/ test/java/org/apache/commons/openpgp/
Date Thu, 08 Dec 2005 21:33:44 GMT
Author: brett
Date: Thu Dec  8 13:33:35 2005
New Revision: 355223

URL: http://svn.apache.org/viewcvs?rev=355223&view=rev
Log:
rename streaming signer, and add a streaming verifier

Added:
    jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSignatureVerifier.java
  (with props)
    jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSigner.java
  (contents, props changed)
      - copied, changed from r354747, jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignatureUpdater.java
    jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpStreamingSignatureVerifier.java
  (with props)
    jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpStreamingSigner.java
  (contents, props changed)
      - copied, changed from r354747, jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureUpdater.java
Removed:
    jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignatureUpdater.java
    jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureUpdater.java
Modified:
    jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignatureVerifier.java
    jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSigner.java
    jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/KeyRing.java
    jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureVerifier.java
    jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSigner.java
    jakarta/commons/sandbox/openpgp/trunk/src/test/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignerTest.java

Modified: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignatureVerifier.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignatureVerifier.java?rev=355223&r1=355222&r2=355223&view=diff
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignatureVerifier.java
(original)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignatureVerifier.java
Thu Dec  8 13:33:35 2005
@@ -16,21 +16,8 @@
  * limitations under the License.
  */
 
-import org.bouncycastle.bcpg.ArmoredInputStream;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-import org.bouncycastle.openpgp.PGPCompressedData;
-import org.bouncycastle.openpgp.PGPException;
-import org.bouncycastle.openpgp.PGPObjectFactory;
-import org.bouncycastle.openpgp.PGPPublicKey;
-import org.bouncycastle.openpgp.PGPSignature;
-import org.bouncycastle.openpgp.PGPSignatureList;
-import org.bouncycastle.openpgp.PGPUtil;
-
 import java.io.IOException;
 import java.io.InputStream;
-import java.security.NoSuchProviderException;
-import java.security.Security;
-import java.security.SignatureException;
 
 /**
  * Verify signatures using the Bouncy Castle OpenPGP provider.
@@ -40,6 +27,8 @@
 public class BouncyCastleOpenPgpSignatureVerifier
     implements OpenPgpSignatureVerifier
 {
+    private static final int BUFFER_SIZE = 1024;
+
     public SignatureStatus verifySignature( InputStream data, KeyRing keyRing )
         throws OpenPgpException, UnknownKeyException
     {
@@ -51,71 +40,22 @@
                                                     boolean asciiArmored )
         throws OpenPgpException, UnknownKeyException, IOException
     {
-        // TODO: better location for this?
-        Security.addProvider( new BouncyCastleProvider() );
+        OpenPgpStreamingSignatureVerifier verifier =
+            new BouncyCastleOpenPgpStreamingSignatureVerifier( signature, keyRing, asciiArmored
);
 
-        signature = PGPUtil.getDecoderStream( signature );
-        if ( asciiArmored )
-        {
-            signature = new ArmoredInputStream( signature );
-        }
+        byte[] buf = new byte[BUFFER_SIZE];
 
-        PGPObjectFactory pgpFact = new PGPObjectFactory( signature );
-        PGPSignatureList p3;
-
-        try
+        int len;
+        do
         {
-            Object o = pgpFact.nextObject();
-            if ( o instanceof PGPCompressedData )
-            {
-                PGPCompressedData c1 = (PGPCompressedData) o;
-
-                pgpFact = new PGPObjectFactory( c1.getDataStream() );
-
-                p3 = (PGPSignatureList) pgpFact.nextObject();
-            }
-            else
+            len = data.read( buf );
+            if ( len > 0 )
             {
-                p3 = (PGPSignatureList) o;
-            }
-
-            int ch;
-
-            PGPSignature sig = p3.get( 0 );
-            PGPPublicKey key = keyRing.getPublicKey( sig.getKeyID() );
-
-            sig.initVerify( key, "BC" );
-
-            while ( ( ch = data.read() ) >= 0 )
-            {
-                sig.update( (byte) ch );
-            }
-
-            if ( sig.verify() )
-            {
-                // TODO: how do we assess trust?
-                return SignatureStatus.VALID_UNTRUSTED;
-            }
-            else
-            {
-                return SignatureStatus.INVALID;
+                verifier.update( buf, 0, len );
             }
         }
-        catch ( PGPException e )
-        {
-            // TODO: more details
-            throw new OpenPgpException( "Error verifying detached signature", e );
-        }
-        catch ( NoSuchProviderException e )
-        {
-            throw new OpenPgpException(
-                "Unable to find the correct provider for PGP - check that the Bouncy Castle
provider is correctly installed",
-                e );
-        }
-        catch ( SignatureException e )
-        {
-            // TODO: more details
-            throw new OpenPgpException( "Error calculating detached signature", e );
-        }
+        while ( len >= 0 );
+
+        return verifier.finish();
     }
 }

Modified: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSigner.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSigner.java?rev=355223&r1=355222&r2=355223&view=diff
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSigner.java
(original)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSigner.java
Thu Dec  8 13:33:35 2005
@@ -40,8 +40,8 @@
                               boolean asciiArmor )
         throws OpenPgpException, IOException
     {
-        OpenPgpSignatureUpdater updater =
-            new BouncyCastleOpenPgpSignatureUpdater( signature, keyId, keyRing, asciiArmor
);
+        OpenPgpStreamingSigner updater =
+            new BouncyCastleOpenPgpStreamingSigner( signature, keyId, keyRing, asciiArmor
);
 
         byte[] buf = new byte[BUFFER_SIZE];
 

Added: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSignatureVerifier.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSignatureVerifier.java?rev=355223&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSignatureVerifier.java
(added)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSignatureVerifier.java
Thu Dec  8 13:33:35 2005
@@ -0,0 +1,157 @@
+package org.apache.commons.openpgp;
+
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.bouncycastle.bcpg.BCPGOutputStream;
+import org.bouncycastle.bcpg.ArmoredInputStream;
+import org.bouncycastle.jce.provider.BouncyCastleProvider;
+import org.bouncycastle.openpgp.PGPException;
+import org.bouncycastle.openpgp.PGPSignature;
+import org.bouncycastle.openpgp.PGPSignatureGenerator;
+import org.bouncycastle.openpgp.PGPUtil;
+import org.bouncycastle.openpgp.PGPObjectFactory;
+import org.bouncycastle.openpgp.PGPSignatureList;
+import org.bouncycastle.openpgp.PGPCompressedData;
+import org.bouncycastle.openpgp.PGPPublicKey;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.InputStream;
+import java.security.NoSuchProviderException;
+import java.security.Security;
+import java.security.SignatureException;
+
+/**
+ * Bouncy Castle implementation of the OpenPGP signer.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ */
+public class BouncyCastleOpenPgpStreamingSignatureVerifier
+    implements OpenPgpStreamingSignatureVerifier
+{
+    private static final String PROVIDER = "BC";
+
+    private PGPSignature sig;
+
+    public BouncyCastleOpenPgpStreamingSignatureVerifier( InputStream signature, KeyRing
keyRing, boolean asciiArmor )
+        throws OpenPgpException, IOException
+    {
+        init( asciiArmor, signature, keyRing );
+    }
+
+    private void init( boolean asciiArmor, InputStream signature, KeyRing keyRing )
+        throws OpenPgpException, IOException
+    {
+        // TODO: better location for this?
+        Security.addProvider( new BouncyCastleProvider() );
+
+        try
+        {
+            signature = PGPUtil.getDecoderStream( signature );
+            if ( asciiArmor )
+            {
+                signature = new ArmoredInputStream( signature );
+            }
+
+            PGPObjectFactory pgpFact = new PGPObjectFactory( signature );
+            PGPSignatureList p3;
+
+            Object o = pgpFact.nextObject();
+            if ( o instanceof PGPCompressedData )
+            {
+                PGPCompressedData c1 = (PGPCompressedData) o;
+
+                pgpFact = new PGPObjectFactory( c1.getDataStream() );
+
+                p3 = (PGPSignatureList) pgpFact.nextObject();
+            }
+            else
+            {
+                p3 = (PGPSignatureList) o;
+            }
+
+            sig = p3.get( 0 );
+            PGPPublicKey key = keyRing.getPublicKey( sig.getKeyID() );
+
+            sig.initVerify( key, "BC" );
+        }
+        catch ( NoSuchProviderException e )
+        {
+            throw new OpenPgpException(
+                "Unable to find the correct provider for PGP - check that the Bouncy Castle
provider is correctly installed",
+                e );
+        }
+        catch ( PGPException e )
+        {
+            // TODO: more details
+            throw new OpenPgpException( "Error calculating detached signature", e );
+        }
+    }
+
+    public void update( byte[] buf )
+        throws OpenPgpException
+    {
+        update( buf, 0, buf.length );
+    }
+
+    public void update( byte[] buf, int offset, int length )
+        throws OpenPgpException
+    {
+        try
+        {
+            sig.update( buf, offset, length );
+        }
+        catch ( SignatureException e )
+        {
+            // TODO: more details
+            throw new OpenPgpException( "Error calculating detached signature", e );
+        }
+    }
+
+    public SignatureStatus finish()
+        throws OpenPgpException, IOException
+    {
+        try
+        {
+            if ( sig.verify() )
+            {
+                // TODO: how do we assess trust?
+                return SignatureStatus.VALID_UNTRUSTED;
+            }
+            else
+            {
+                return SignatureStatus.INVALID;
+            }
+        }
+        catch ( PGPException e )
+        {
+            // TODO: more details
+            throw new OpenPgpException( "Error calculating detached signature", e );
+        }
+        catch ( SignatureException e )
+        {
+            // TODO: more details
+            throw new OpenPgpException( "Error calculating detached signature", e );
+        }
+    }
+
+    public SignatureStatus verify()
+    {
+        return null;  //To change body of implemented methods use File | Settings | File
Templates.
+    }
+}

Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSignatureVerifier.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSignatureVerifier.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Copied: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSigner.java
(from r354747, jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignatureUpdater.java)
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSigner.java?p2=jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSigner.java&p1=jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignatureUpdater.java&r1=354747&r2=355223&rev=355223&view=diff
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignatureUpdater.java
(original)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSigner.java
Thu Dec  8 13:33:35 2005
@@ -39,8 +39,8 @@
  *
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
  */
-public class BouncyCastleOpenPgpSignatureUpdater
-    implements OpenPgpSignatureUpdater
+public class BouncyCastleOpenPgpStreamingSigner
+    implements OpenPgpStreamingSigner
 {
     private static final String PROVIDER = "BC";
 
@@ -50,15 +50,15 @@
 
     private BCPGOutputStream bOut;
 
-    public BouncyCastleOpenPgpSignatureUpdater( String keyId, KeyRing keyRing, boolean asciiArmor
)
+    public BouncyCastleOpenPgpStreamingSigner( String keyId, KeyRing keyRing, boolean asciiArmor
)
         throws OpenPgpException
     {
         signatureBytes = new ByteArrayOutputStream();
         init( asciiArmor, signatureBytes, keyRing, keyId );
     }
 
-    public BouncyCastleOpenPgpSignatureUpdater( OutputStream signature, String keyId, KeyRing
keyRing,
-                                                boolean asciiArmor )
+    public BouncyCastleOpenPgpStreamingSigner( OutputStream signature, String keyId, KeyRing
keyRing,
+                                               boolean asciiArmor )
         throws OpenPgpException
     {
         signatureBytes = null;
@@ -147,5 +147,4 @@
         }
         return signatureBytes != null ? signatureBytes.toByteArray() : null;
     }
-
 }

Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSigner.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSigner.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/KeyRing.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/KeyRing.java?rev=355223&r1=355222&r2=355223&view=diff
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/KeyRing.java
(original)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/KeyRing.java
Thu Dec  8 13:33:35 2005
@@ -26,6 +26,8 @@
  */
 public interface KeyRing
 {
+    String ROLE = KeyRing.class.getName();
+
     /**
      * @return
      * @todo seems like the wrong place

Modified: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureVerifier.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureVerifier.java?rev=355223&r1=355222&r2=355223&view=diff
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureVerifier.java
(original)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureVerifier.java
Thu Dec  8 13:33:35 2005
@@ -28,6 +28,8 @@
  */
 public interface OpenPgpSignatureVerifier
 {
+    String ROLE = OpenPgpSignatureVerifier.class.getName();
+
     /**
      * Verify a piece of data that was signed with OpenPGP.
      *

Modified: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSigner.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSigner.java?rev=355223&r1=355222&r2=355223&view=diff
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSigner.java
(original)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSigner.java
Thu Dec  8 13:33:35 2005
@@ -29,6 +29,8 @@
  */
 public interface OpenPgpSigner
 {
+    String ROLE = OpenPgpSigner.class.getName();
+
     /**
      * Sign a piece of data with the given key.
      *

Added: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpStreamingSignatureVerifier.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpStreamingSignatureVerifier.java?rev=355223&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpStreamingSignatureVerifier.java
(added)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpStreamingSignatureVerifier.java
Thu Dec  8 13:33:35 2005
@@ -0,0 +1,58 @@
+package org.apache.commons.openpgp;
+
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.IOException;
+
+/**
+ * An interface for updating an OpenPGP signature on the fly with streaming data.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ */
+public interface OpenPgpStreamingSignatureVerifier
+{
+    String ROLE = OpenPgpStreamingSignatureVerifier.class.getName();
+
+    /**
+     * Update the signature with the next block from the data buffer.
+     *
+     * @param buf the buffer
+     * @throws org.apache.commons.openpgp.OpenPgpException if the buffer is not valid for
updating the signature
+     */
+    void update( byte[] buf )
+        throws OpenPgpException;
+
+    /**
+     * Update the signature with the next block from the data buffer.
+     *
+     * @param buf    the buffer
+     * @param offset offset within the buffer to start from
+     * @param length number of bytes in the buffer to read from
+     * @throws org.apache.commons.openpgp.OpenPgpException if the buffer is not valid for
updating the signature
+     */
+    void update( byte[] buf, int offset, int length )
+        throws OpenPgpException;
+
+    /**
+     * Finish and verify the signature that has been obtained.
+     *
+     * @return the status of the signature
+     * @throws org.apache.commons.openpgp.OpenPgpException if the signature is not in a consistent
or complete state
+     */
+    SignatureStatus finish()
+        throws OpenPgpException, IOException;
+}

Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpStreamingSignatureVerifier.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpStreamingSignatureVerifier.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Copied: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpStreamingSigner.java
(from r354747, jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureUpdater.java)
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpStreamingSigner.java?p2=jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpStreamingSigner.java&p1=jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureUpdater.java&r1=354747&r2=355223&rev=355223&view=diff
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureUpdater.java
(original)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpStreamingSigner.java
Thu Dec  8 13:33:35 2005
@@ -23,8 +23,10 @@
  *
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
  */
-public interface OpenPgpSignatureUpdater
+public interface OpenPgpStreamingSigner
 {
+    String ROLE = OpenPgpStreamingSigner.class.getName();
+
     /**
      * Update the signature with the next block from the data buffer.
      *
@@ -53,5 +55,4 @@
      */
     byte[] finish()
         throws OpenPgpException, IOException;
-
 }

Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpStreamingSigner.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpStreamingSigner.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: jakarta/commons/sandbox/openpgp/trunk/src/test/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignerTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/test/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignerTest.java?rev=355223&r1=355222&r2=355223&view=diff
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/test/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignerTest.java
(original)
+++ jakarta/commons/sandbox/openpgp/trunk/src/test/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignerTest.java
Thu Dec  8 13:33:35 2005
@@ -26,6 +26,7 @@
  * Test the open pgp signer.
  *
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @todo test text input as well as binary - apparently it fails cross platform
  */
 public class BouncyCastleOpenPgpSignerTest
     extends TestCase



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message