[wss4j] 01/17: Migrate wss4j from pkg-escience

Emmanuel Bourg ebourg-guest at alioth.debian.org
Tue Sep 24 21:27:59 UTC 2013


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository wss4j.

commit 0a7005bb8c2c93e83d780eaec11571fdd554203a
Author: Chris Grzegorczyk <grze at eucalyptus.com>
Date:   Fri Feb 19 01:53:15 2010 +0000

    Migrate wss4j from pkg-escience
---
 debian/README.Debian             |    4 +
 debian/README.source             |   11 ++
 debian/build.xml                 |   18 +++
 debian/changelog                 |   27 ++++
 debian/compat                    |    1 +
 debian/control                   |   25 ++++
 debian/copyright                 |   35 +++++
 debian/docs                      |    1 +
 debian/exclude                   |    5 +
 debian/orig-tar.sh               |   35 +++++
 debian/patches/build.patch       |   52 ++++++++
 debian/patches/no-opensaml.patch |  261 ++++++++++++++++++++++++++++++++++++++
 debian/rules                     |   31 +++++
 debian/upstream-metadata.yaml    |    9 ++
 debian/watch                     |    4 +
 15 files changed, 519 insertions(+)

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..b7156ac
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,4 @@
+Please note that in order to reduce dependencies, the Debian WSS4J package
+currently doesn't provide SAML token support.
+
+-- Thierry Carrez <thierry.carrez at ubuntu.com>  Wed, 22 Jul 2009 15:29:08 +0200
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..d67064d
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,11 @@
+Directories specified in debian/exclude contained .doc, .pdf, .jar and other
+files that are either not relevant for the functionality of this package
+and/or that are not shipped with their sources. Those were omitted
+from a redistribution with Debian. We added ‘+svntag’ to the filename since
+it contains extra files compared to the released archive in ZIP format. One
+may argue that the subversion repository was not the best of all possible
+sources for this package, but for those interested to contribute back
+to upstream, this may well serve as a strong stimulus.
+
+ -- Steffen Moeller <moeller at debian.org>   Wed, 10 Feb 2010 17:07:52 +0100
+ -- Charles Plessy <plessy at debian.org>  Fri, 12 Feb 2010 12:51:16 +0900
diff --git a/debian/build.xml b/debian/build.xml
new file mode 100644
index 0000000..76d720b
--- /dev/null
+++ b/debian/build.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<project name="debian-wss4j" default="jar" basedir="..">
+  <import file="../build.xml"/>
+    <!-- This target is necessary so that "debuild clean" succeeds
+         on an unpatched build.xml -->
+    <target name="debian-clean">
+        <delete dir="./build"/>
+        <delete>
+            <fileset dir="." includes="before*.xml"/>
+            <fileset dir="." includes="after*.xml"/>
+            <fileset dir="." includes="signed*.xml"/>
+            <fileset dir="." includes="server*.wsdd"/>
+            <fileset dir="." includes="client*.wsdd"/>
+        </delete>
+        <delete dir="./dist"/>
+    </target>
+
+</project>
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..a3357ae
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,27 @@
+wss4j (1.5.8+svntag-1) unstable; urgency=low
+
+  * Exclude more directories from the repacked upstream sources.
+    (debian/exclude, debian/README.source).
+  * Pass --no-name to gzip so that ‘orig’ tarballs have a constant message
+    digest. (debian/rules, debian/orig-tar.sh)
+
+ -- Charles Plessy <plessy at debian.org>  Thu, 11 Feb 2010 19:30:49 +0900
+
+wss4j (1.5.8-1) unstable; urgency=low
+
+  * New upstream version.
+  * Expressed compliance with Debian policy 3.8.4.
+
+ -- Chris Grzegorczyk <grze at eucalyptus.com>  Fri, 29 Jan 2010 01:28:53 +0100
+
+wss4j (1.5.7-1) UNRELEASED; urgency=low
+
+  * Port existing ubuntu package to debian.
+
+ -- Chris Grzegorczyk <grze at eucalyptus.com>  Mon, 28 Dec 2009 18:12:53 -0800
+
+wss4j (1.5.7-0ubuntu1) karmic; urgency=low
+
+  * Initial release (LP: #403003)
+
+ -- Thierry Carrez <thierry.carrez at ubuntu.com>  Wed, 22 Jul 2009 15:29:35 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..56df9b5
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,25 @@
+Source: wss4j
+Section: java
+Priority: optional
+Maintainer: Chris Grzegorczyk <grze at eucalyptus.com>
+DM-Upload-Allowed: yes
+Uploaders: Graziano Obertelli <graziano at eucalyptus.com>, Kyo Lee <kyo.lee at eucalyptus.com>, Thierry Carrez <thierry.carrez at ubuntu.com>
+Build-Depends-Indep: default-jdk,
+ libaxis-java,
+ libbcprov-java,
+ libcommons-logging-java,
+ libxalan2-java,
+ libxml-security-java
+Build-Depends: ant, debhelper (>= 7), cdbs (>= 0.4.5.3)
+Homepage: http://ws.apache.org/wss4j/
+Vcs-svn: svn://svn.debian.org/svn/pkg-escience/eucalyptus/wss4j/trunk
+Vcs-browser: http://svn.debian.org/viewsvn/pkg-escience/eucalyptus/wss4j/trunk/
+Standards-Version: 3.8.4
+
+Package: libwss4j-java
+Architecture: all
+Depends: default-jre-headless | java2-runtime-headless, ${misc:Depends}
+Description: Apache WSS4J WS-Security implementation
+ Apache WSS4J is an implementation of the OASIS Web Services Security
+ framework (WS-Security). It can be used to sign and verify SOAP Messages
+ with WS-Security information.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..c6b5ec6
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,35 @@
+This package was debianized by Thierry Carrez <thierry.carrez at ubuntu.com> on
+Wed, 22 Jul 2009 14:17:32 +0200
+
+Source tarballs are built from the Subversion repository tags exported from
+‘http://svn.apache.org/repos/asf/webservices/wss4j/tags/’.
+
+Copyright:
+    Copyright (C) 2003-2006 The Apache Software Foundation
+
+Authors:
+    Davanum Srinivas
+    Werner Dittmann
+    Ias
+    Ruchith Fernando
+    Fred Dushin
+    Colm O hEigeartaigh
+    Nandana Mihindukulasooriya
+
+License:
+    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.
+
+On Debian GNU/Linux and Ubuntu systems, the complete text of the Apache 2.0
+License can be found in the /usr/share/common-licenses/Apache-2.0 file.
+
+The same license applies to the Debian packaging.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..6d5ee1d
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+NOTICE
diff --git a/debian/exclude b/debian/exclude
new file mode 100644
index 0000000..c2622f7
--- /dev/null
+++ b/debian/exclude
@@ -0,0 +1,5 @@
+lib
+specs
+legal
+endorsed
+interop
diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh
new file mode 100755
index 0000000..0336a7c
--- /dev/null
+++ b/debian/orig-tar.sh
@@ -0,0 +1,35 @@
+#!/bin/bash -e
+
+# The fake --upstream-version is there to be callable by uscan(1).
+if [ -z $2 ]; then
+	echo "usage: ./debian/orig-tar.sh --upstream-version <version>"
+	exit 1
+fi
+
+if [ -r .svn/deb-layout ]; then
+  . .svn/deb-layout
+fi
+
+if [ -z "$origDir" ]; then
+	origDir=".."
+fi
+
+echo "Creating orig.tar.gz in '$origDir'."
+
+# $2 = version
+SUFFIX="+svntag"
+TAR=$origDir/wss4j_$2${SUFFIX}.orig.tar.gz
+
+# See Developers Reference § 6.7.8.2.4
+DIR=wss4j-$2${SUFFIX}.orig
+
+if [ -d "$DIR" ]; then
+	echo "Cannot export upstream sources to '$DIR', directory is already existing."
+	exit 1
+fi
+
+# clean up the upstream tarball
+svn export  http://svn.apache.org/repos/asf/webservices/wss4j/tags/${2//\./\_}/ $DIR
+GZIP="--best --no-name" tar --exclude-vcs --exclude-from=debian/exclude -c -z -f $TAR $DIR
+rm -rf $DIR
+rm ../${2//\./_}
diff --git a/debian/patches/build.patch b/debian/patches/build.patch
new file mode 100644
index 0000000..3e8ffe7
--- /dev/null
+++ b/debian/patches/build.patch
@@ -0,0 +1,52 @@
+diff -Nur -x '*.orig' -x '*~' wss4j/build.xml wss4j.new/build.xml
+--- wss4j/build.xml	2009-04-16 10:23:04.000000000 +0200
++++ wss4j.new/build.xml	2009-07-22 14:47:56.000000000 +0200
+@@ -122,17 +122,8 @@
+ 
+         <path id="classpath.library">
+             <path refid="classpath.wss4j"/>
+-            <path refid="classpath.libraries"/>
+         </path>
+ 
+-        <taskdef resource="axis-tasks.properties" classpathref=
+-              "classpath.library"/>
+-        <taskdef name="runaxisfunctionaltests" classname=
+-              "org.apache.axis.tools.ant.axis.RunAxisFunctionalTestsTask"
+-            loaderref="axis">
+-            <classpath refid="classpath.library"/>
+-        </taskdef>
+-      
+         <!-- this shall include Axis jars because the tests use the
+          Axis implementation of javax.xml.soap, etc. Therefore the
+          CLASSPATH is included.
+@@ -328,8 +319,7 @@
+             description="Target for the gump run"/>
+ 
+     <target name="compile" 
+-       depends="compile.library,compile.samples, compile.tests, 
+-                compile.interops, fix.properties"
++       depends="compile.library, fix.properties"
+             description="compile everything"/>
+ 
+     <target name="test"
+@@ -411,11 +401,6 @@
+     <target name="systemTests" unless="skip.tests" depends="compile"
+         if="junit.present"
+         description="Runs all JUnit tests">
+-        <runaxisfunctionaltests
+-            url="http://localhost:8088"
+-            httpServerTarget="start-functional-test-http-server"
+-            testTarget="allTests"
+-            httpStopTarget="stop-functional-test-http-server"/>
+     </target>
+ 
+     <target name="start-functional-test-http-server" if="junit.present">
+@@ -707,7 +692,7 @@
+     </target>
+ 
+     <target name="jar"
+-        depends="compile, test"
++        depends="compile"
+         description="Creates the ${jar.library}">
+ 
+         <jar jarfile="${build.dir}/${jar.library}"
diff --git a/debian/patches/no-opensaml.patch b/debian/patches/no-opensaml.patch
new file mode 100644
index 0000000..23be6ef
--- /dev/null
+++ b/debian/patches/no-opensaml.patch
@@ -0,0 +1,261 @@
+diff -Nur -x '*.orig' -x '*~' wss4j/build.xml wss4j.new/build.xml
+--- wss4j/build.xml	2009-07-20 15:19:40.000000000 +0200
++++ wss4j.new/build.xml	2009-07-20 15:29:53.000000000 +0200
+@@ -351,6 +351,8 @@
+         <!-- Compile the java code from ${dir.src} into ${build.classes} -->
+         <javac srcdir="${dir.src}" destdir="${build.classes}" debug="on" source="1.3" target="1.3">
+             <classpath refid="classpath.library"/>
++            <exclude name="**/*SAMLToken*.java"/>
++            <exclude name="org/apache/ws/security/saml/**"/>
+             <exclude name="**/Merlin.java" unless="merlin.ok"/>
+             <exclude name="**/sandbox/**/*.java" if="jdk13.present" />
+         </javac>
+diff -Nur -x '*.orig' -x '*~' wss4j/src/org/apache/ws/security/message/WSSecDKSign.java wss4j.new/src/org/apache/ws/security/message/WSSecDKSign.java
+--- wss4j/src/org/apache/ws/security/message/WSSecDKSign.java	2009-04-15 09:48:44.000000000 +0200
++++ wss4j.new/src/org/apache/ws/security/message/WSSecDKSign.java	2009-07-20 15:30:17.000000000 +0200
+@@ -28,7 +28,7 @@
+ import org.apache.ws.security.conversation.ConversationException;
+ import org.apache.ws.security.message.token.Reference;
+ import org.apache.ws.security.message.token.SecurityTokenReference;
+-import org.apache.ws.security.saml.SAMLUtil;
++//import org.apache.ws.security.saml.SAMLUtil;
+ import org.apache.ws.security.transform.STRTransform;
+ import org.apache.ws.security.util.WSSecurityUtil;
+ import org.apache.xml.security.algorithms.SignatureAlgorithm;
+@@ -295,7 +295,7 @@
+                     Element ctx = createSTRParameter(document);
+                     transforms.addTransform(STRTransform.implementedTransformURI, ctx);
+                     sig.addDocument("#" + strUri, transforms);
+-                } else if (elemName.equals("Assertion")) { // Assertion
++                } /* else if (elemName.equals("Assertion")) { // Assertion
+                     String id = SAMLUtil.getAssertionId(envel, elemName, nmSpace);
+ 
+                     Element body = 
+@@ -319,7 +319,7 @@
+                     body.setAttributeNS(WSConstants.WSU_NS, prefix + ":Id", id);
+                     sig.addDocument("#" + id, transforms);
+ 
+-                } else {
++                } */ else {
+                     Element body = (Element) WSSecurityUtil.findElement(envel, elemName, nmSpace);
+                     if (body == null) {
+                         throw new WSSecurityException(
+diff -Nur -x '*.orig' -x '*~' wss4j/src/org/apache/ws/security/message/WSSecSignature.java wss4j.new/src/org/apache/ws/security/message/WSSecSignature.java
+--- wss4j/src/org/apache/ws/security/message/WSSecSignature.java	2009-04-15 09:48:44.000000000 +0200
++++ wss4j.new/src/org/apache/ws/security/message/WSSecSignature.java	2009-07-20 15:30:17.000000000 +0200
+@@ -1,4 +1,4 @@
+-/*
++/* /*
+  * Copyright  2003-2004 The Apache Software Foundation.
+  *
+  *  Licensed under the Apache License, Version 2.0 (the "License");
+@@ -31,7 +31,7 @@
+ import org.apache.ws.security.message.token.Reference;
+ import org.apache.ws.security.message.token.SecurityTokenReference;
+ import org.apache.ws.security.message.token.X509Security;
+-import org.apache.ws.security.saml.SAMLUtil;
++//import org.apache.ws.security.saml.SAMLUtil;
+ import org.apache.ws.security.transform.STRTransform;
+ import org.apache.ws.security.util.WSSecurityUtil;
+ import org.apache.xml.security.algorithms.SignatureAlgorithm;
+@@ -551,7 +551,7 @@
+                     Element ctx = createSTRParameter(document);
+                     transforms.addTransform(STRTransform.implementedTransformURI, ctx);
+                     sig.addDocument("#" + strUri, transforms, digestAlgo);
+-                } else if (elemName.equals("Assertion")) { // Assertion
++                }/* else if (elemName.equals("Assertion")) { // Assertion
+                     String id = null;
+                     id = SAMLUtil.getAssertionId(envelope, elemName, nmSpace);
+ 
+@@ -574,7 +574,7 @@
+                         WSSecurityUtil.setNamespace(body, WSConstants.WSU_NS, WSConstants.WSU_PREFIX);
+                     body.setAttributeNS(WSConstants.WSU_NS, prefix + ":Id", id);
+                     sig.addDocument("#" + id, transforms, digestAlgo);
+-                } else {
++                }*/ else {
+                     Element body = 
+                         (Element)WSSecurityUtil.findElement(envelope, elemName, nmSpace);
+                     if (body == null) {
+diff -Nur -x '*.orig' -x '*~' wss4j/src/org/apache/ws/security/message/WSSignEnvelope.java wss4j.new/src/org/apache/ws/security/message/WSSignEnvelope.java
+--- wss4j/src/org/apache/ws/security/message/WSSignEnvelope.java	2009-04-15 09:48:44.000000000 +0200
++++ wss4j.new/src/org/apache/ws/security/message/WSSignEnvelope.java	2009-07-20 15:30:17.000000000 +0200
+@@ -31,7 +31,7 @@
+ import org.apache.ws.security.message.token.Reference;
+ import org.apache.ws.security.message.token.SecurityTokenReference;
+ import org.apache.ws.security.message.token.X509Security;
+-import org.apache.ws.security.saml.SAMLUtil;
++//import org.apache.ws.security.saml.SAMLUtil;
+ import org.apache.ws.security.transform.STRTransform;
+ import org.apache.ws.security.util.WSSecurityUtil;
+ import org.apache.xml.security.algorithms.SignatureAlgorithm;
+@@ -416,7 +416,7 @@
+                     transforms.addTransform(
+                             STRTransform.implementedTransformURI, ctx);
+                     sig.addDocument("#" + secRefId, transforms);
+-                } else if (elemName.equals("Assertion")) { // Assertion
++                } /*else if (elemName.equals("Assertion")) { // Assertion
+ 
+                     String id = null;
+                     id = SAMLUtil.getAssertionId(envelope, elemName, nmSpace);
+@@ -443,7 +443,7 @@
+                             id);
+                     sig.addDocument("#" + id, transforms);
+ 
+-                } else {
++                } */ else {
+                     Element body = (Element) WSSecurityUtil.findElement(
+                             envelope, elemName, nmSpace);
+                     if (body == null) {
+diff -Nur -x '*.orig' -x '*~' wss4j/src/org/apache/ws/security/processor/DerivedKeyTokenProcessor.java wss4j.new/src/org/apache/ws/security/processor/DerivedKeyTokenProcessor.java
+--- wss4j/src/org/apache/ws/security/processor/DerivedKeyTokenProcessor.java	2009-04-15 09:48:44.000000000 +0200
++++ wss4j.new/src/org/apache/ws/security/processor/DerivedKeyTokenProcessor.java	2009-07-20 15:30:17.000000000 +0200
+@@ -30,8 +30,8 @@
+ import org.apache.ws.security.message.token.DerivedKeyToken;
+ import org.apache.ws.security.message.token.Reference;
+ import org.apache.ws.security.message.token.SecurityTokenReference;
+-import org.apache.ws.security.saml.SAMLKeyInfo;
+-import org.apache.ws.security.saml.SAMLUtil;
++//import org.apache.ws.security.saml.SAMLKeyInfo;
++//import org.apache.ws.security.saml.SAMLUtil;
+ import org.apache.ws.security.util.Base64;
+ import org.w3c.dom.Element;
+ 
+@@ -165,13 +165,14 @@
+                 this.secret = ((EncryptedKeyProcessor) processor).getDecryptedBytes();
+             } else if (processor instanceof SecurityContextTokenProcessor) {
+                 this.secret = ((SecurityContextTokenProcessor) processor).getSecret();
+-            } else if (processor instanceof SAMLTokenProcessor) {
++/*            } else if (processor instanceof SAMLTokenProcessor) {
+                 SAMLTokenProcessor samlp = (SAMLTokenProcessor) processor;
+                 SAMLKeyInfo keyInfo = 
+                     SAMLUtil.getSAMLKeyInfo(samlp.getSamlTokenElement(), crypto, cb);
+                 // TODO Handle malformed SAML tokens where they don't have the 
+                 // secret in them
+                 this.secret = keyInfo.getSecret();
++*/
+             } else {
+                 throw new WSSecurityException(
+                     WSSecurityException.FAILED_CHECK, "unsupportedKeyId"
+diff -Nur -x '*.orig' -x '*~' wss4j/src/org/apache/ws/security/processor/ReferenceListProcessor.java wss4j.new/src/org/apache/ws/security/processor/ReferenceListProcessor.java
+--- wss4j/src/org/apache/ws/security/processor/ReferenceListProcessor.java	2009-04-15 09:48:44.000000000 +0200
++++ wss4j.new/src/org/apache/ws/security/processor/ReferenceListProcessor.java	2009-07-20 15:30:17.000000000 +0200
+@@ -37,8 +37,8 @@
+ import org.apache.ws.security.components.crypto.Crypto;
+ import org.apache.ws.security.message.token.Reference;
+ import org.apache.ws.security.message.token.SecurityTokenReference;
+-import org.apache.ws.security.saml.SAMLKeyInfo;
+-import org.apache.ws.security.saml.SAMLUtil;
++//import org.apache.ws.security.saml.SAMLKeyInfo;
++//import org.apache.ws.security.saml.SAMLUtil;
+ import org.apache.ws.security.util.WSSecurityUtil;
+ import org.apache.xml.security.encryption.XMLCipher;
+ import org.apache.xml.security.encryption.XMLEncryptionException;
+@@ -290,8 +290,8 @@
+             }
+             Processor p = wsDocInfo.getProcessor(id);
+             if (!(p instanceof EncryptedKeyProcessor
+-                || p instanceof DerivedKeyTokenProcessor 
+-                || p instanceof SAMLTokenProcessor)
++                || p instanceof DerivedKeyTokenProcessor ) 
++/*                || p instanceof SAMLTokenProcessor) */
+             ) {
+                 // Try custom token
+                 WSPasswordCallback pwcb = new WSPasswordCallback(id, WSPasswordCallback.CUSTOM_TOKEN);
+@@ -320,14 +320,14 @@
+             } else if (p instanceof DerivedKeyTokenProcessor) {
+                 DerivedKeyTokenProcessor dkp = (DerivedKeyTokenProcessor) p;
+                 decryptedData = dkp.getKeyBytes(WSSecurityUtil.getKeyLength(algorithm));
+-            } else if (p instanceof SAMLTokenProcessor) {
++            } /*else if (p instanceof SAMLTokenProcessor) {
+                 SAMLTokenProcessor samlp = (SAMLTokenProcessor) p;
+                 SAMLKeyInfo keyInfo = 
+                     SAMLUtil.getSAMLKeyInfo(samlp.getSamlTokenElement(), crypto, cb);
+                 // TODO Handle malformed SAML tokens where they don't have the 
+                 // secret in them
+                 decryptedData = keyInfo.getSecret();
+-            }
++            }*/
+         } else if (secRef.containsKeyIdentifier()){
+             String sha = secRef.getKeyIdentifierValue();
+             WSPasswordCallback pwcb = 
+diff -Nur -x '*.orig' -x '*~' wss4j/src/org/apache/ws/security/processor/SignatureProcessor.java wss4j.new/src/org/apache/ws/security/processor/SignatureProcessor.java
+--- wss4j/src/org/apache/ws/security/processor/SignatureProcessor.java	2009-04-15 09:48:44.000000000 +0200
++++ wss4j.new/src/org/apache/ws/security/processor/SignatureProcessor.java	2009-07-20 15:30:17.000000000 +0200
+@@ -42,8 +42,8 @@
+ import org.apache.ws.security.message.token.SecurityTokenReference;
+ import org.apache.ws.security.message.token.UsernameToken;
+ import org.apache.ws.security.message.token.X509Security;
+-import org.apache.ws.security.saml.SAMLKeyInfo;
+-import org.apache.ws.security.saml.SAMLUtil;
++//import org.apache.ws.security.saml.SAMLKeyInfo;
++//import org.apache.ws.security.saml.SAMLUtil;
+ import org.apache.ws.security.util.WSSecurityUtil;
+ import org.apache.xml.security.exceptions.XMLSecurityException;
+ import org.apache.xml.security.keys.KeyInfo;
+@@ -51,7 +51,7 @@
+ import org.apache.xml.security.signature.SignedInfo;
+ import org.apache.xml.security.signature.XMLSignature;
+ import org.apache.xml.security.signature.XMLSignatureException;
+-import org.opensaml.SAMLAssertion;
++//import org.opensaml.SAMLAssertion;
+ import org.w3c.dom.Element;
+ import org.w3c.dom.Node;
+ 
+@@ -208,7 +208,7 @@
+         byte[] secretKey = null;
+         UsernameToken ut = null;
+         DerivedKeyToken dkt = null;
+-        SAMLKeyInfo samlKi = null;
++        //SAMLKeyInfo samlKi = null;
+         String customTokenId = null;
+         java.security.PublicKey publicKey = null;
+         
+@@ -268,7 +268,7 @@
+                     if (el.equals(WSSecurityEngine.binaryToken)) {
+                         // TODO: Use results from BinarySecurityTokenProcessor
+                         certs = getCertificatesTokenReference(token, crypto);
+-                    } else if (el.equals(WSSecurityEngine.SAML_TOKEN)) {
++/*                    } else if (el.equals(WSSecurityEngine.SAML_TOKEN)) {
+                         if (crypto == null) {
+                             throw new WSSecurityException(
+                                 WSSecurityException.FAILURE, "noSigCryptoFile"
+@@ -277,7 +277,7 @@
+                         samlKi = SAMLUtil.getSAMLKeyInfo(token, crypto, cb);
+                         certs = samlKi.getCerts();
+                         secretKey = samlKi.getSecret();
+-
++*/
+                     } else if (el.equals(WSSecurityEngine.ENCRYPTED_KEY)){
+                         String encryptedKeyID = token.getAttributeNS(null,"Id");                   
+                         EncryptedKeyProcessor encryptKeyProcessor = 
+@@ -349,7 +349,7 @@
+                         );
+                     }
+                     secretKey = pwcb.getKey();
+-                } else if (WSConstants.WSS_SAML_KI_VALUE_TYPE.equals(secRef.getKeyIdentifierValueType())) { 
++/*                } else if (WSConstants.WSS_SAML_KI_VALUE_TYPE.equals(secRef.getKeyIdentifierValueType())) { 
+                     Element token = 
+                         secRef.getKeyIdentifierTokenElement(elem.getOwnerDocument(), wsDocInfo, cb);
+                     
+@@ -361,6 +361,7 @@
+                     samlKi = SAMLUtil.getSAMLKeyInfo(token, crypto, cb);
+                     certs = samlKi.getCerts();
+                     secretKey = samlKi.getSecret();
++*/
+                 } else {
+                     certs = secRef.getKeyIdentifier(crypto);
+                 }
+@@ -512,11 +513,12 @@
+                     }
+                     principal.setBasetokenId(basetokenId);
+                     return principal;
+-                } else if (samlKi != null) {
++/*                } else if (samlKi != null) {
+                     final SAMLAssertion assertion = samlKi.getAssertion();
+                     CustomTokenPrincipal principal = new CustomTokenPrincipal(assertion.getId());
+                     principal.setTokenObject(assertion);
+                     return principal;
++*/
+                 } else if (secretKey != null) {
+                     // This is the custom key scenario
+                     return new CustomTokenPrincipal(customTokenId);
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..d4e3556
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,31 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/ant.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+
+SRCARCHIVE           := http://www.apache.org/dist/ws/wss4j
+SRCDIRECTORY         := $(shell echo $(DEB_UPSTREAM_VERSION) | sed 'y/\./_/')
+UPSTREAM_VERSION     := $(shell echo $(DEB_UPSTREAM_VERSION) | sed 's/\+svntag//')
+JAVA_HOME            := /usr/lib/jvm/default-java
+DEB_ANT_CLEAN_TARGET := debian-clean
+DEB_ANT_BUILDFILE    := debian/build.xml
+DEB_JARS             := axis commons-logging xalan2 bcprov jaxrpc xml-security
+
+DEB_INSTALL_CHANGELOGS_ALL = ChangeLog.txt
+
+binary-post-install/lib$(DEB_SOURCE_PACKAGE)-java::
+	dh_install -plib$(DEB_SOURCE_PACKAGE)-java build/$(DEB_SOURCE_PACKAGE)-$(UPSTREAM_VERSION).jar usr/share/java
+	dh_link -plib$(DEB_SOURCE_PACKAGE)-java usr/share/java/$(DEB_SOURCE_PACKAGE)-$(UPSTREAM_VERSION).jar usr/share/java/$(DEB_SOURCE_PACKAGE).jar
+
+get-orig-source:
+	./debian/orig-tar.sh --upstream-version $(UPSTREAM_VERSION)
+
+get-orig-source-from-zip:
+	mkdir -p orig_tmp
+	cd orig_tmp && \
+		wget $(SRCARCHIVE)/$(SRCDIRECTORY)/wss4j-src-$(UPSTREAM_VERSION).zip && \
+		unzip wss4j-src-$(UPSTREAM_VERSION).zip && \
+		GZIP="--best --no-name" tar czf ../../wss4j_$(UPSTREAM_VERSION).orig.tar.gz wss4j && \
+		cd ..
+	rm -rf orig_tmp
diff --git a/debian/upstream-metadata.yaml b/debian/upstream-metadata.yaml
new file mode 100644
index 0000000..699f750
--- /dev/null
+++ b/debian/upstream-metadata.yaml
@@ -0,0 +1,9 @@
+# Various informations about Upstream in YAML format,
+# See: http://wiki.debian.org/UpstreamMetadata
+
+Archive: Apache
+Homepage: http://ws.apache.org/wss4j/
+Name: WSS4J
+Repository: http://svn.apache.org/repos/asf/webservices/wss4j
+Repository-Browse: http://svn.apache.org/viewvc/webservices/wss4j
+Watch: http://www.apache.org/dist/ws/wss4j/ (\d+)_(\d+)_(\d+)/
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..11220c3
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=3
+opts=dversionmangle=s/\+svntag// \
+  http://svn.apache.org/repos/asf/webservices/wss4j/tags/ (\d+)_(\d+)_(\d+)/ debian debian/orig-tar.sh
+#http://www.apache.org/dist/ws/wss4j/ (\d+)_(\d+)_(\d+)/ 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/wss4j.git



More information about the pkg-java-commits mailing list