You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by br...@apache.org on 2005/12/07 00:26:52 UTC
svn commit: r354611 - in /jakarta/commons/sandbox/openpgp/trunk: ./ src/
src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/
src/main/java/org/apache/commons/ src/main/java/org/apache/commons/openpgp/
src/test/ src/test/java/ src/test...
Author: brett
Date: Tue Dec 6 15:00:39 2005
New Revision: 354611
URL: http://svn.apache.org/viewcvs?rev=354611&view=rev
Log:
first cut of the openpgp component
Added:
jakarta/commons/sandbox/openpgp/trunk/pom.xml (with props)
jakarta/commons/sandbox/openpgp/trunk/src/
jakarta/commons/sandbox/openpgp/trunk/src/main/
jakarta/commons/sandbox/openpgp/trunk/src/main/java/
jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/
jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/
jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/
jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/
jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleKeyRing.java (with props)
jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignatureVerifier.java (with props)
jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSigner.java (with props)
jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/KeyRing.java (with props)
jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpException.java (with props)
jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureUpdater.java (with props)
jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureVerifier.java (with props)
jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSigner.java (with props)
jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/SignatureStatus.java (with props)
jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/UnknownKeyException.java (with props)
jakarta/commons/sandbox/openpgp/trunk/src/test/
jakarta/commons/sandbox/openpgp/trunk/src/test/java/
jakarta/commons/sandbox/openpgp/trunk/src/test/java/org/
jakarta/commons/sandbox/openpgp/trunk/src/test/java/org/apache/
jakarta/commons/sandbox/openpgp/trunk/src/test/java/org/apache/commons/
jakarta/commons/sandbox/openpgp/trunk/src/test/java/org/apache/commons/openpgp/
jakarta/commons/sandbox/openpgp/trunk/src/test/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignerTest.java (with props)
jakarta/commons/sandbox/openpgp/trunk/src/test/resources/
jakarta/commons/sandbox/openpgp/trunk/src/test/resources/pubring.gpg (with props)
jakarta/commons/sandbox/openpgp/trunk/src/test/resources/secring.gpg (with props)
jakarta/commons/sandbox/openpgp/trunk/src/test/resources/test-input.txt (with props)
jakarta/commons/sandbox/openpgp/trunk/src/test/resources/test-signature.asc
Modified:
jakarta/commons/sandbox/openpgp/trunk/ (props changed)
Propchange: jakarta/commons/sandbox/openpgp/trunk/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Dec 6 15:00:39 2005
@@ -0,0 +1,4 @@
+*.iml
+*.ipr
+*.iws
+target
Added: jakarta/commons/sandbox/openpgp/trunk/pom.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/pom.xml?rev=354611&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/pom.xml (added)
+++ jakarta/commons/sandbox/openpgp/trunk/pom.xml Tue Dec 6 15:00:39 2005
@@ -0,0 +1,139 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-openpgp</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>Commons OpenPGP</name>
+ <url>http://jakarta.apache.org/commons/sandbox/openpgp/</url>
+ <ciManagement>
+ <system>continuum</system>
+ <notifiers>
+ <notifier>
+ <configuration>
+ <!-- TODO: temporary until the library is established -->
+ <address>brett@apache.org</address>
+ </configuration>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpg</artifactId>
+ <version>130</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.0</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <developers>
+ <developer>
+ <id>brett</id>
+ <name>Brett Porter</name>
+ <email>brett AT apache DOT org</email>
+ <organization>Apache</organization>
+ <timezone>+10</timezone>
+ </developer>
+ </developers>
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/jakarta/commons/sandbox/openpgp/trunk</connection>
+ <developerConnection>
+ scm:svn:https://svn.apache.org/repos/asf/jakarta/commons/sandbox/openpgp/trunk</developerConnection>
+ <url>http://svn.apache.org/repos/asf/jakarta/commons/sandbox/openpgp/trunk</url>
+ </scm>
+ <!-- TODO: these will be moved to a commons parent eventually -->
+ <organization>
+ <name>The Apache Software Foundation</name>
+ <url>http://jakarta.apache.org</url>
+ </organization>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>/LICENSE.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <mailingLists>
+ <mailingList>
+ <name>Commons Dev List</name>
+ <subscribe>commons-dev-subscribe@jakarta.apache.org</subscribe>
+ <unsubscribe>commons-dev-unsubscribe@jakarta.apache.org</unsubscribe>
+ <post>commons-dev@jakarta.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/jakarta-commons-dev</archive>
+ </mailingList>
+ <mailingList>
+ <name>Commons User List</name>
+ <subscribe>commons-user-subscribe@jakarta.apache.org</subscribe>
+ <unsubscribe>commons-user-unsubscribe@jakarta.apache.org</unsubscribe>
+ <post>commons-user@jakarta.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/jakarta-commons-user</archive>
+ </mailingList>
+ </mailingLists>
+ <distributionManagement>
+ <!-- No releases until out of sandbox, besides - m2 repo not up yet
+ <repository>
+ <id>apache.releases</id>
+ <name>Apache Release Repository</name>
+ <url>scp://minotaur.apache.org/www/www.apache.org/dist/maven-repository</url>
+ </repository>
+ -->
+ <!-- TODO: setup m2 repo in new layout -->
+ <snapshotRepository>
+ <id>apache.snapshots</id>
+ <name>Apache Snapshot Repository</name>
+ <url>scp://minotaur.apache.org/www/cvs.apache.org/maven-snapshot-repository</url>
+ </snapshotRepository>
+ <site>
+ <id>website</id>
+ <name>Apache Website</name>
+ <url>scp://minotaur.apache.org/www/jakarta.apache.org/commons/sandbox/exec/</url>
+ </site>
+ </distributionManagement>
+ <issueManagement>
+ <system>bugzilla</system>
+ <url>http://issues.apache.org/bugzilla/</url>
+ </issueManagement>
+ <build>
+ <plugins>
+ <!-- TODO: later use toolchain support to do compilation on an external JDK 1.3+ compiler -->
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.3</source>
+ <target>1.3</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-idea-plugin</artifactId>
+ <configuration>
+ <jdkLevel>1.3</jdkLevel>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <!-- TODO: should be omitted when there are no tests to run -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clover-plugin</artifactId>
+ <!-- TODO: why are these needed? -->
+ <configuration>
+ <flushPolicy>threaded</flushPolicy>
+ <flushInterval>100</flushInterval>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
+
Propchange: jakarta/commons/sandbox/openpgp/trunk/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/commons/sandbox/openpgp/trunk/pom.xml
------------------------------------------------------------------------------
svn:executable = *
Propchange: jakarta/commons/sandbox/openpgp/trunk/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleKeyRing.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleKeyRing.java?rev=354611&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleKeyRing.java (added)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleKeyRing.java Tue Dec 6 15:00:39 2005
@@ -0,0 +1,123 @@
+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.openpgp.PGPException;
+import org.bouncycastle.openpgp.PGPPublicKey;
+import org.bouncycastle.openpgp.PGPPublicKeyRing;
+import org.bouncycastle.openpgp.PGPPublicKeyRingCollection;
+import org.bouncycastle.openpgp.PGPSecretKey;
+import org.bouncycastle.openpgp.PGPSecretKeyRing;
+import org.bouncycastle.openpgp.PGPSecretKeyRingCollection;
+import org.bouncycastle.openpgp.PGPUtil;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Iterator;
+
+/**
+ * Bouncy Castle implementation of the OpenPGP key ring.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @todo password is not secure
+ */
+public class BouncyCastleKeyRing
+ implements KeyRing
+{
+ private final PGPSecretKeyRingCollection pgpSec;
+
+ private final char[] password;
+
+ private final PGPPublicKeyRingCollection pgpPub;
+
+ private static final long MASK = 0xFFFFFFFFL;
+
+ public BouncyCastleKeyRing( InputStream secretKeyRingStream, InputStream publicKeyRingStream, char[] password )
+ throws IOException, PGPException
+ {
+ pgpSec = new PGPSecretKeyRingCollection( PGPUtil.getDecoderStream( secretKeyRingStream ) );
+
+ pgpPub = new PGPPublicKeyRingCollection( PGPUtil.getDecoderStream( publicKeyRingStream ) );
+
+ this.password = password;
+ }
+
+ public char[] getPassword()
+ {
+ return password;
+ }
+
+ public PGPSecretKey getSecretKey( String keyId )
+ {
+ Iterator rIt = pgpSec.getKeyRings();
+
+ while ( rIt.hasNext() )
+ {
+ PGPSecretKeyRing kRing = (PGPSecretKeyRing) rIt.next();
+ Iterator kIt = kRing.getSecretKeys();
+
+ while ( kIt.hasNext() )
+ {
+ PGPSecretKey k = (PGPSecretKey) kIt.next();
+
+ // TODO: do long conversion in other direction
+ if ( k.isSigningKey() && Long.toHexString( k.getKeyID() & MASK ).equals( keyId.toLowerCase() ) )
+ {
+ return k;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public PGPPublicKey getPublicKey( String keyId )
+ {
+ Iterator rIt = pgpPub.getKeyRings();
+
+ while ( rIt.hasNext() )
+ {
+ PGPPublicKeyRing kRing = (PGPPublicKeyRing) rIt.next();
+ Iterator kIt = kRing.getPublicKeys();
+
+ while ( kIt.hasNext() )
+ {
+ PGPPublicKey k = (PGPPublicKey) kIt.next();
+
+ // TODO: do long conversion in other direction
+ if ( Long.toHexString( k.getKeyID() & MASK ).equals( keyId.toLowerCase() ) )
+ {
+ return k;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public PGPSecretKey getSecretKey( long keyId )
+ {
+ // TODO: switch with above
+ return getSecretKey( Long.toHexString( keyId & MASK ) );
+ }
+
+ public PGPPublicKey getPublicKey( long keyId )
+ {
+ // TODO: switch with above
+ return getPublicKey( Long.toHexString( keyId & MASK ) );
+ }
+}
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleKeyRing.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleKeyRing.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: 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=354611&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignatureVerifier.java (added)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignatureVerifier.java Tue Dec 6 15:00:39 2005
@@ -0,0 +1,110 @@
+package org.apache.commons.openpgp;
+
+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.SignatureException;
+
+/*
+ * 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.
+ */
+
+/**
+ * Verify signatures using the Bouncy Castle OpenPGP provider.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ */
+public class BouncyCastleOpenPgpSignatureVerifier
+ implements OpenPgpSignatureVerifier
+{
+ public SignatureStatus verifySignature( InputStream data, KeyRing keyRing )
+ throws OpenPgpException, UnknownKeyException
+ {
+ // TODO: implement
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public SignatureStatus verifyDetachedSignature( InputStream data, InputStream signature, KeyRing keyRing )
+ throws OpenPgpException, UnknownKeyException, IOException
+ {
+ signature = PGPUtil.getDecoderStream( signature );
+
+ PGPObjectFactory pgpFact = new PGPObjectFactory( signature );
+ PGPSignatureList p3;
+
+ try
+ {
+ 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;
+ }
+
+ 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;
+ }
+ }
+ 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 );
+ }
+ }
+}
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignatureVerifier.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignatureVerifier.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: 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=354611&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSigner.java (added)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSigner.java Tue Dec 6 15:00:39 2005
@@ -0,0 +1,107 @@
+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.ArmoredOutputStream;
+import org.bouncycastle.bcpg.BCPGOutputStream;
+import org.bouncycastle.jce.provider.BouncyCastleProvider;
+import org.bouncycastle.openpgp.PGPException;
+import org.bouncycastle.openpgp.PGPPrivateKey;
+import org.bouncycastle.openpgp.PGPSecretKey;
+import org.bouncycastle.openpgp.PGPSignature;
+import org.bouncycastle.openpgp.PGPSignatureGenerator;
+import org.bouncycastle.openpgp.PGPUtil;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.security.NoSuchAlgorithmException;
+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 BouncyCastleOpenPgpSigner
+ implements OpenPgpSigner
+{
+ private static final String BOUNCY_CASTLE_PROVIDER = "BC";
+
+ public void sign( InputStream data, OutputStream signedOutput, String keyId, KeyRing keyRing, boolean asciiArmor )
+ throws OpenPgpException
+ {
+ // TODO
+ }
+
+ public void detachedSign( InputStream data, OutputStream signature, String keyId, KeyRing keyRing,
+ boolean asciiArmor )
+ throws OpenPgpException, IOException
+ {
+ // TODO: necessary?
+ Security.addProvider( new BouncyCastleProvider() );
+ if ( asciiArmor )
+ {
+ signature = new ArmoredOutputStream( signature );
+ }
+
+ PGPSecretKey pgpSec = keyRing.getSecretKey( keyId );
+ try
+ {
+ PGPPrivateKey pgpPrivKey = pgpSec.extractPrivateKey( keyRing.getPassword(), BOUNCY_CASTLE_PROVIDER );
+ PGPSignatureGenerator sGen =
+ new PGPSignatureGenerator( pgpSec.getPublicKey().getAlgorithm(), PGPUtil.SHA1, BOUNCY_CASTLE_PROVIDER );
+
+ sGen.initSign( PGPSignature.BINARY_DOCUMENT, pgpPrivKey );
+
+ BCPGOutputStream bOut = new BCPGOutputStream( signature );
+
+ int ch;
+
+ while ( ( ch = data.read() ) >= 0 )
+ {
+ sGen.update( (byte) ch );
+ }
+
+ sGen.generate().encode( bOut );
+ }
+ catch ( NoSuchAlgorithmException e )
+ {
+ throw new OpenPgpException(
+ "Unable to find the correct algorithm for PGP - check that the Bouncy Castle provider is correctly installed",
+ 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 ( 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 );
+ }
+ }
+}
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSigner.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSigner.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: 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=354611&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/KeyRing.java (added)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/KeyRing.java Tue Dec 6 15:00:39 2005
@@ -0,0 +1,62 @@
+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.openpgp.PGPPublicKey;
+import org.bouncycastle.openpgp.PGPSecretKey;
+
+/**
+ * Interface describing a key ring for use in signing or verifying data.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ */
+public interface KeyRing
+{
+ /**
+ * @return
+ * @todo seems like the wrong place
+ */
+ char[] getPassword();
+
+ /**
+ * @param keyId
+ * @return
+ * @todo remove BC specifics
+ */
+ PGPSecretKey getSecretKey( String keyId );
+
+ /**
+ * @param keyId
+ * @return
+ * @todo remove BC specifics
+ */
+ PGPPublicKey getPublicKey( String keyId );
+
+ /**
+ * @param keyId
+ * @return
+ * @todo remove BC specifics
+ */
+ PGPSecretKey getSecretKey( long keyId );
+
+ /**
+ * @param keyId
+ * @return
+ * @todo remove BC specifics
+ */
+ PGPPublicKey getPublicKey( long keyId );
+}
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/KeyRing.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/KeyRing.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpException.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpException.java?rev=354611&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpException.java (added)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpException.java Tue Dec 6 15:00:39 2005
@@ -0,0 +1,44 @@
+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.
+ */
+
+/**
+ * An exception occurring during the use of the OpenPGP library.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ */
+public class OpenPgpException
+ extends Exception
+{
+ private Throwable cause;
+
+ public OpenPgpException( String message )
+ {
+ super( message );
+ }
+
+ public OpenPgpException( String message, Throwable cause )
+ {
+ super( message );
+ this.cause = cause;
+ }
+
+ public Throwable getCause()
+ {
+ return cause;
+ }
+}
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpException.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpException.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: 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/OpenPgpSignatureUpdater.java?rev=354611&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureUpdater.java (added)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureUpdater.java Tue Dec 6 15:00:39 2005
@@ -0,0 +1,56 @@
+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.
+ */
+
+/**
+ * An interface for updating an OpenPGP signature on the fly with streaming data.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @todo not sure if this will be used or not
+ */
+public interface OpenPgpSignatureUpdater
+{
+ /**
+ * Update the signature with the next block from the data buffer.
+ *
+ * @param buf the buffer
+ * @throws 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 OpenPgpException if the buffer is not valid for updating the signature
+ */
+ void update( byte[] buf, int offset, int length )
+ throws OpenPgpException;
+
+ /**
+ * Finish creating the signature.
+ *
+ * @return the completed signature
+ * @throws OpenPgpException if the signature is not in a consistent or complete state
+ */
+ byte[] finish()
+ throws OpenPgpException;
+
+}
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureUpdater.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureUpdater.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: 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=354611&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureVerifier.java (added)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureVerifier.java Tue Dec 6 15:00:39 2005
@@ -0,0 +1,49 @@
+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;
+import java.io.InputStream;
+
+/**
+ * Interface for verifying data signed with OpenPGP.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @todo perhaps should have different interface methods for the default key
+ * @todo should the exception be a verification exception instead of a common one?
+ */
+public interface OpenPgpSignatureVerifier
+{
+ /**
+ * Verify a piece of data that was signed with OpenPGP.
+ *
+ * @param data the data that was signed
+ * @param keyRing the keyring containing the key used to sign the data
+ */
+ SignatureStatus verifySignature( InputStream data, KeyRing keyRing )
+ throws OpenPgpException, UnknownKeyException;
+
+ /**
+ * Verify a piece of data against a detached signature.
+ *
+ * @param data the data to that was signed
+ * @param signature the detached signature to verify against the data
+ * @param keyRing the keyring containing the key used to sign the data
+ */
+ SignatureStatus verifyDetachedSignature( InputStream data, InputStream signature, KeyRing keyRing )
+ throws OpenPgpException, UnknownKeyException, IOException;
+}
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureVerifier.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSignatureVerifier.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: 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=354611&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSigner.java (added)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSigner.java Tue Dec 6 15:00:39 2005
@@ -0,0 +1,55 @@
+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;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ * Interface for signing data with OpenPGP.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @todo perhaps should have different interface methods for the default key
+ * @todo should the exception be a signature exception instead of a common one?
+ */
+public interface OpenPgpSigner
+{
+ /**
+ * Sign a piece of data with the given key.
+ *
+ * @param data the data to sign
+ * @param signedOutput the signed output data
+ * @param keyId the key ID of the key used to sign it
+ * @param keyRing the keyring containing the key above
+ * @param asciiArmor whether to ascii armor the output
+ */
+ void sign( InputStream data, OutputStream signedOutput, String keyId, KeyRing keyRing, boolean asciiArmor )
+ throws OpenPgpException;
+
+ /**
+ * Sign a piece of data with the given key, storing the signature in a detached output.
+ *
+ * @param data the data to sign
+ * @param signature the detached signature
+ * @param keyId the key ID of the key used to sign it
+ * @param keyRing the keyring containing the key above
+ * @param asciiArmor whether to ascii armor the output
+ */
+ void detachedSign( InputStream data, OutputStream signature, String keyId, KeyRing keyRing, boolean asciiArmor )
+ throws OpenPgpException, IOException;
+}
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSigner.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/OpenPgpSigner.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/SignatureStatus.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/SignatureStatus.java?rev=354611&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/SignatureStatus.java (added)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/SignatureStatus.java Tue Dec 6 15:00:39 2005
@@ -0,0 +1,74 @@
+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.
+ */
+
+/**
+ * Enumerated type indicating the status of data that was signed.
+ * <p/>
+ * Values:
+ * <ul>
+ * <li><code>VALID_TRUSTED</code></li>
+ * <li><code>VALID_UNTRUSTED</code></li>
+ * <li><code>INVALID</code></li>
+ * </ul>
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @todo incorporate levels of trust
+ */
+public class SignatureStatus
+{
+ /**
+ * Status that indicates the signature is valid, and from a trusted source.
+ */
+ public static SignatureStatus VALID_TRUSTED = new SignatureStatus( true, true );
+
+ /**
+ * Status that indicates the signature is valid, but from an unknown or untrusted source.
+ */
+ public static SignatureStatus VALID_UNTRUSTED = new SignatureStatus( true, false );
+
+ /**
+ * Status that indicates the signature is invalid.
+ */
+ public static SignatureStatus INVALID = new SignatureStatus( false, false );
+
+ /**
+ * Whether the signature is valid.
+ */
+ private final boolean valid;
+
+ /**
+ * Whether the signature is trusted.
+ */
+ private final boolean trusted;
+
+ private SignatureStatus( boolean valid, boolean trusted )
+ {
+ this.valid = valid;
+ this.trusted = trusted;
+ }
+
+ public boolean isValid()
+ {
+ return valid;
+ }
+
+ public boolean isTrusted()
+ {
+ return trusted;
+ }
+}
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/SignatureStatus.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/SignatureStatus.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/UnknownKeyException.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/UnknownKeyException.java?rev=354611&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/UnknownKeyException.java (added)
+++ jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/UnknownKeyException.java Tue Dec 6 15:00:39 2005
@@ -0,0 +1,36 @@
+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.
+ */
+
+/**
+ * An exception occurring during the verification of a signature, when the key is not found in the keyring.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ */
+public class UnknownKeyException
+ extends OpenPgpException
+{
+ public UnknownKeyException( String message )
+ {
+ super( message );
+ }
+
+ public UnknownKeyException( String message, Throwable cause )
+ {
+ super( message, cause );
+ }
+}
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/UnknownKeyException.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/main/java/org/apache/commons/openpgp/UnknownKeyException.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: 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=354611&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/test/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignerTest.java (added)
+++ jakarta/commons/sandbox/openpgp/trunk/src/test/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignerTest.java Tue Dec 6 15:00:39 2005
@@ -0,0 +1,76 @@
+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 junit.framework.TestCase;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+/**
+ * Test the open pgp signer.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ */
+public class BouncyCastleOpenPgpSignerTest
+ extends TestCase
+{
+ private OpenPgpSigner signer = new BouncyCastleOpenPgpSigner();
+
+ private OpenPgpSignatureVerifier verifier = new BouncyCastleOpenPgpSignatureVerifier();
+
+ private String keyId = "A7D16BD4";
+
+ private KeyRing keyRing;
+
+ private static final String PASSWORD = "cop";
+
+ protected void setUp()
+ throws Exception
+ {
+ super.setUp();
+
+ keyRing = new BouncyCastleKeyRing( getClass().getResourceAsStream( "/secring.gpg" ),
+ getClass().getResourceAsStream( "/pubring.gpg" ), PASSWORD.toCharArray() );
+ }
+
+ public void testSignDataDetachedBinary()
+ throws OpenPgpException, IOException
+ {
+ ByteArrayOutputStream signature = new ByteArrayOutputStream();
+ signer.detachedSign( getClass().getResourceAsStream( "/test-input.txt" ), signature, keyId, keyRing, false );
+
+ // TODO: can we get it to verify an ascii armored one?
+ SignatureStatus status = verifier.verifyDetachedSignature( getClass().getResourceAsStream( "/test-input.txt" ),
+ new ByteArrayInputStream( signature.toByteArray() ),
+ keyRing );
+ assertNotNull( "check we got a status", status );
+ assertTrue( "check it was successful", status.isValid() );
+ }
+
+ public void testVerifySignatureDetachedAsciiArmor()
+ throws IOException, OpenPgpException
+ {
+ SignatureStatus status = verifier.verifyDetachedSignature( getClass().getResourceAsStream( "/test-input.txt" ),
+ getClass().getResourceAsStream(
+ "/test-signature.asc" ), keyRing );
+
+ assertNotNull( "check we got a status", status );
+ assertTrue( "check it was successful", status.isValid() );
+ }
+}
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/test/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignerTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/test/java/org/apache/commons/openpgp/BouncyCastleOpenPgpSignerTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: jakarta/commons/sandbox/openpgp/trunk/src/test/resources/pubring.gpg
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/test/resources/pubring.gpg?rev=354611&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/test/resources/pubring.gpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: jakarta/commons/sandbox/openpgp/trunk/src/test/resources/secring.gpg
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/test/resources/secring.gpg?rev=354611&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/test/resources/secring.gpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: jakarta/commons/sandbox/openpgp/trunk/src/test/resources/test-input.txt
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/test/resources/test-input.txt?rev=354611&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/test/resources/test-input.txt (added)
+++ jakarta/commons/sandbox/openpgp/trunk/src/test/resources/test-input.txt Tue Dec 6 15:00:39 2005
@@ -0,0 +1,10 @@
+The quick brown fox jumps over the lazy dog
+quick brown fox jumps over the lazy dog The
+brown fox jumps over the lazy dog The quick
+fox jumps over the lazy dog The quick brown
+jumps over the lazy dog The quick brown fox
+over the lazy dog The quick brown fox jumps
+the lazy dog The quick brown fox jumps over
+lazy dog The quick brown fox jumps over the
+dog The quick brown fox jumps over the lazy
+
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/test/resources/test-input.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/commons/sandbox/openpgp/trunk/src/test/resources/test-input.txt
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: jakarta/commons/sandbox/openpgp/trunk/src/test/resources/test-signature.asc
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/openpgp/trunk/src/test/resources/test-signature.asc?rev=354611&view=auto
==============================================================================
--- jakarta/commons/sandbox/openpgp/trunk/src/test/resources/test-signature.asc (added)
+++ jakarta/commons/sandbox/openpgp/trunk/src/test/resources/test-signature.asc Tue Dec 6 15:00:39 2005
@@ -0,0 +1,7 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.1 (Cygwin)
+
+iD8DBQBDlVJdTusOMqfRa9QRAuxXAJ9k0G+f2tbO6eTuBQS1uim44aADVwCgxS3i
+MH8RP0v17V5sM1WN8ih97n8=
+=gPJ5
+-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org