forked from pool/apache-ivy
This commit is contained in:
parent
071fc25867
commit
1ccf19a3ee
@ -1,11 +0,0 @@
|
|||||||
--- apache-ivy-2.3.0/build.xml 2012-04-09 08:58:36.000000000 +0200
|
|
||||||
+++ apache-ivy-2.3.0/build.xml 2017-09-07 14:46:13.128164218 +0200
|
|
||||||
@@ -517,7 +517,7 @@
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="javadoc" unless="skip.javadoc">
|
|
||||||
- <javadoc destdir="${javadoc.build.dir}" useexternalfile="true">
|
|
||||||
+ <javadoc destdir="${javadoc.build.dir}" useexternalfile="false" source="${ivy.minimum.javaversion}">
|
|
||||||
<fileset dir="${src.dir}" includes="**/*.java" />
|
|
||||||
</javadoc>
|
|
||||||
</target>
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:202f08ca41f4bdf1c081aa8b2e531565be6c73e9e5e0d68137f454f14eb16ef6
|
|
||||||
size 3616939
|
|
193
ivy-2.4.0.pom
193
ivy-2.4.0.pom
@ -1,193 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
or more contributor license agreements. See the NOTICE file
|
|
||||||
distributed with this work for additional information
|
|
||||||
regarding copyright ownership. The ASF licenses this file
|
|
||||||
to you 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.
|
|
||||||
-->
|
|
||||||
<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/xsd/maven-4.0.0.xsd">
|
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<groupId>org.apache</groupId>
|
|
||||||
<artifactId>apache</artifactId>
|
|
||||||
<version>7</version>
|
|
||||||
</parent>
|
|
||||||
<groupId>org.apache.ivy</groupId>
|
|
||||||
<artifactId>ivy</artifactId>
|
|
||||||
<version>2.4.0</version>
|
|
||||||
<name>Apache Ivy</name>
|
|
||||||
<url>http://ant.apache.org/ivy/</url>
|
|
||||||
<scm>
|
|
||||||
<connection>scm:svn:http://svn.apache.org/repos/asf/ant/ivy/core/trunk/</connection>
|
|
||||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/ant/ivy/core/trunk</developerConnection>
|
|
||||||
<url>http://svn.apache.org/repos/asf/ant/ivy/core/trunk</url>
|
|
||||||
</scm>
|
|
||||||
<mailingLists>
|
|
||||||
<mailingList>
|
|
||||||
<name>Ant/Ivy Developers List</name>
|
|
||||||
<subscribe>dev-subscribe@ant.apache.org</subscribe>
|
|
||||||
<unsubscribe>dev-unsubscribe@ant.apache.org</unsubscribe>
|
|
||||||
<post>dev@ant.apache.org</post>
|
|
||||||
<archive>http://mail-archives.apache.org/mod_mbox/ant-dev</archive>
|
|
||||||
</mailingList>
|
|
||||||
<mailingList>
|
|
||||||
<name>Ivy Users List</name>
|
|
||||||
<subscribe>ivy-user-subscribe@ant.apache.org</subscribe>
|
|
||||||
<unsubscribe>ivy-user-unsubscribe@ant.apache.org</unsubscribe>
|
|
||||||
<post>ivy-user@ant.apache.org</post>
|
|
||||||
<archive>http://mail-archives.apache.org/mod_mbox/ant-ivy-user</archive>
|
|
||||||
</mailingList>
|
|
||||||
</mailingLists>
|
|
||||||
<issueManagement>
|
|
||||||
<system>jira</system>
|
|
||||||
<url>http://issues.apache.org/jira/browse/IVY</url>
|
|
||||||
</issueManagement>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.ant</groupId>
|
|
||||||
<artifactId>ant</artifactId>
|
|
||||||
<version>1.7.1</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.ant</groupId>
|
|
||||||
<artifactId>ant-nodeps</artifactId>
|
|
||||||
<version>1.7.1</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.ant</groupId>
|
|
||||||
<artifactId>ant-trax</artifactId>
|
|
||||||
<version>1.7.1</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-httpclient</groupId>
|
|
||||||
<artifactId>commons-httpclient</artifactId>
|
|
||||||
<version>3.0</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>oro</groupId>
|
|
||||||
<artifactId>oro</artifactId>
|
|
||||||
<version>2.0.8</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-vfs</groupId>
|
|
||||||
<artifactId>commons-vfs</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.jcraft</groupId>
|
|
||||||
<artifactId>jsch</artifactId>
|
|
||||||
<version>0.1.50</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.jcraft</groupId>
|
|
||||||
<artifactId>jsch.agentproxy</artifactId>
|
|
||||||
<version>0.0.6</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.jcraft</groupId>
|
|
||||||
<artifactId>jsch.agentproxy.connector-factory</artifactId>
|
|
||||||
<version>0.0.6</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.jcraft</groupId>
|
|
||||||
<artifactId>jsch.agentproxy.jsch</artifactId>
|
|
||||||
<version>0.0.6</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.bouncycastle</groupId>
|
|
||||||
<artifactId>bcpg-jdk14</artifactId>
|
|
||||||
<version>1.45</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.bouncycastle</groupId>
|
|
||||||
<artifactId>bcprov-jdk14</artifactId>
|
|
||||||
<version>1.45</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>3.8.2</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-lang</groupId>
|
|
||||||
<artifactId>commons-lang</artifactId>
|
|
||||||
<version>2.6</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.ant</groupId>
|
|
||||||
<artifactId>ant-testutil</artifactId>
|
|
||||||
<version>1.7.0</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>*</groupId>
|
|
||||||
<artifactId>*</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>ant</groupId>
|
|
||||||
<artifactId>ant-launcher</artifactId>
|
|
||||||
<version>1.6.2</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>*</groupId>
|
|
||||||
<artifactId>*</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>ant-contrib</groupId>
|
|
||||||
<artifactId>ant-contrib</artifactId>
|
|
||||||
<version>1.0b3</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>*</groupId>
|
|
||||||
<artifactId>*</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>xerces</groupId>
|
|
||||||
<artifactId>xercesImpl</artifactId>
|
|
||||||
<version>2.6.2</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>xerces</groupId>
|
|
||||||
<artifactId>xmlParserAPIs</artifactId>
|
|
||||||
<version>2.6.2</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
@ -1,93 +0,0 @@
|
|||||||
diff --git a/ivy.xml b/ivy.xml
|
|
||||||
index d448897..7d8896a 100644
|
|
||||||
--- a/ivy.xml
|
|
||||||
+++ b/ivy.xml
|
|
||||||
@@ -50,8 +50,8 @@
|
|
||||||
<dependency org="com.jcraft" name="jsch.agentproxy" rev="0.0.6" conf="default,sftp->default"/>
|
|
||||||
<dependency org="com.jcraft" name="jsch.agentproxy.connector-factory" rev="0.0.6" conf="default,sftp->default"/>
|
|
||||||
<dependency org="com.jcraft" name="jsch.agentproxy.jsch" rev="0.0.6" conf="default,sftp->default"/>
|
|
||||||
- <dependency org="org.bouncycastle" name="bcpg-jdk14" rev="1.45" conf="default"/>
|
|
||||||
- <dependency org="org.bouncycastle" name="bcprov-jdk14" rev="1.45" conf="default"/>
|
|
||||||
+ <dependency org="org.bouncycastle" name="bcpg-jdk15on" rev="1.52" conf="default"/>
|
|
||||||
+ <dependency org="org.bouncycastle" name="bcprov-jdk15on" rev="1.52" conf="default"/>
|
|
||||||
|
|
||||||
<!-- Test dependencies -->
|
|
||||||
<dependency org="junit" name="junit" rev="3.8.2" conf="test->default"/>
|
|
||||||
diff --git a/src/java/org/apache/ivy/plugins/signer/bouncycastle/OpenPGPSignatureGenerator.java b/src/java/org/apache/ivy/plugins/signer/bouncycastle/OpenPGPSignatureGenerator.java
|
|
||||||
index af7beae..bec8ae4 100644
|
|
||||||
--- a/src/java/org/apache/ivy/plugins/signer/bouncycastle/OpenPGPSignatureGenerator.java
|
|
||||||
+++ b/src/java/org/apache/ivy/plugins/signer/bouncycastle/OpenPGPSignatureGenerator.java
|
|
||||||
@@ -23,16 +23,18 @@ import java.io.FileOutputStream;
|
|
||||||
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;
|
|
||||||
import java.util.Iterator;
|
|
||||||
|
|
||||||
import org.apache.ivy.plugins.signer.SignatureGenerator;
|
|
||||||
import org.bouncycastle.bcpg.ArmoredOutputStream;
|
|
||||||
import org.bouncycastle.bcpg.BCPGOutputStream;
|
|
||||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
|
||||||
+import org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor;
|
|
||||||
+import org.bouncycastle.openpgp.operator.bc.BcKeyFingerprintCalculator;
|
|
||||||
+import org.bouncycastle.openpgp.operator.bc.BcPBESecretKeyDecryptorBuilder;
|
|
||||||
+import org.bouncycastle.openpgp.operator.bc.BcPGPContentSignerBuilder;
|
|
||||||
+import org.bouncycastle.openpgp.operator.bc.BcPGPDigestCalculatorProvider;
|
|
||||||
import org.bouncycastle.openpgp.PGPException;
|
|
||||||
import org.bouncycastle.openpgp.PGPPrivateKey;
|
|
||||||
import org.bouncycastle.openpgp.PGPSecretKey;
|
|
||||||
@@ -101,11 +103,13 @@ public class OpenPGPSignatureGenerator implements SignatureGenerator {
|
|
||||||
pgpSec = readSecretKey(keyIn);
|
|
||||||
}
|
|
||||||
|
|
||||||
- PGPPrivateKey pgpPrivKey = pgpSec.extractPrivateKey(password.toCharArray(),
|
|
||||||
- BouncyCastleProvider.PROVIDER_NAME);
|
|
||||||
- PGPSignatureGenerator sGen = new PGPSignatureGenerator(pgpSec.getPublicKey()
|
|
||||||
- .getAlgorithm(), PGPUtil.SHA1, BouncyCastleProvider.PROVIDER_NAME);
|
|
||||||
- sGen.initSign(PGPSignature.BINARY_DOCUMENT, pgpPrivKey);
|
|
||||||
+ PBESecretKeyDecryptor decryptor = new BcPBESecretKeyDecryptorBuilder(
|
|
||||||
+ new BcPGPDigestCalculatorProvider()).build(password.toCharArray());
|
|
||||||
+ PGPPrivateKey pgpPrivKey = pgpSec.extractPrivateKey(decryptor);
|
|
||||||
+ PGPSignatureGenerator sGen = new PGPSignatureGenerator(
|
|
||||||
+ new BcPGPContentSignerBuilder(pgpSec.getPublicKey()
|
|
||||||
+ .getAlgorithm(), PGPUtil.SHA1));
|
|
||||||
+ sGen.init(PGPSignature.BINARY_DOCUMENT, pgpPrivKey);
|
|
||||||
|
|
||||||
in = new FileInputStream(src);
|
|
||||||
out = new BCPGOutputStream(new ArmoredOutputStream(new FileOutputStream(dest)));
|
|
||||||
@@ -116,22 +120,10 @@ public class OpenPGPSignatureGenerator implements SignatureGenerator {
|
|
||||||
}
|
|
||||||
|
|
||||||
sGen.generate().encode(out);
|
|
||||||
- } catch (SignatureException e) {
|
|
||||||
- IOException ioexc = new IOException();
|
|
||||||
- ioexc.initCause(e);
|
|
||||||
- throw ioexc;
|
|
||||||
} catch (PGPException e) {
|
|
||||||
IOException ioexc = new IOException();
|
|
||||||
ioexc.initCause(e);
|
|
||||||
throw ioexc;
|
|
||||||
- } catch (NoSuchAlgorithmException e) {
|
|
||||||
- IOException ioexc = new IOException();
|
|
||||||
- ioexc.initCause(e);
|
|
||||||
- throw ioexc;
|
|
||||||
- } catch (NoSuchProviderException e) {
|
|
||||||
- IOException ioexc = new IOException();
|
|
||||||
- ioexc.initCause(e);
|
|
||||||
- throw ioexc;
|
|
||||||
} finally {
|
|
||||||
if (out != null) {
|
|
||||||
try {
|
|
||||||
@@ -156,7 +148,8 @@ public class OpenPGPSignatureGenerator implements SignatureGenerator {
|
|
||||||
|
|
||||||
private PGPSecretKey readSecretKey(InputStream in) throws IOException, PGPException {
|
|
||||||
in = PGPUtil.getDecoderStream(in);
|
|
||||||
- PGPSecretKeyRingCollection pgpSec = new PGPSecretKeyRingCollection(in);
|
|
||||||
+ PGPSecretKeyRingCollection pgpSec = new PGPSecretKeyRingCollection(in,
|
|
||||||
+ new BcKeyFingerprintCalculator());
|
|
||||||
|
|
||||||
PGPSecretKey key = null;
|
|
||||||
for (Iterator it = pgpSec.getKeyRings(); key == null && it.hasNext();) {
|
|
Loading…
Reference in New Issue
Block a user