diff -Nru tomcatjss-6.0.1/build.xml tomcatjss-7.1.0/build.xml --- tomcatjss-6.0.1/build.xml 2011-09-13 02:18:09.000000000 +0000 +++ tomcatjss-7.1.0/build.xml 2013-06-14 16:57:46.000000000 +0000 @@ -37,8 +37,8 @@ - - + + - + diff -Nru tomcatjss-6.0.1/debian/changelog tomcatjss-7.1.0/debian/changelog --- tomcatjss-6.0.1/debian/changelog 2012-06-29 17:42:26.000000000 +0000 +++ tomcatjss-7.1.0/debian/changelog 2014-04-09 14:00:51.000000000 +0000 @@ -1,3 +1,20 @@ +tomcatjss (7.1.0-0ubuntu1) trusty; urgency=medium + + * Sync from unreleased debian git. + + -- Timo Aaltonen Wed, 09 Apr 2014 17:00:32 +0300 + +tomcatjss (7.1.0-1) UNRELEASED; urgency=low + + [ Ade Lee ] + * New upstream release. (Closes: #686879) + * control: Depend on libtomcat7-java + + [ Timo Aaltonen ] + * rules: Use bytecode format 1.5. (LP: #1049812) + + -- Timo Aaltonen Sat, 14 Dec 2013 16:55:30 +0200 + tomcatjss (6.0.1-1) unstable; urgency=low * Initial release (Closes: #644371) diff -Nru tomcatjss-6.0.1/debian/control tomcatjss-7.1.0/debian/control --- tomcatjss-6.0.1/debian/control 2012-06-29 17:42:26.000000000 +0000 +++ tomcatjss-7.1.0/debian/control 2014-04-09 14:00:03.000000000 +0000 @@ -1,12 +1,13 @@ Source: tomcatjss Priority: extra -Maintainer: Debian FreeIPA Team +Maintainer: Ubuntu FreeIPA +XSBC-Original-Maintainer: Debian FreeIPA Team Uploaders: Timo Aaltonen Build-Depends: debhelper (>= 8.0.0), ant, default-jdk, javahelper, - libtomcat6-java, + libtomcat7-java, libjss-java, libcommons-logging-java, Standards-Version: 3.9.3 @@ -18,7 +19,7 @@ Package: libtomcatjss-java Section: java Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libtomcat6-java +Depends: ${shlibs:Depends}, ${misc:Depends}, libtomcat7-java Conflicts: libtcnative-1 Description: JSSE implementation using JSS for Tomcat A Java Secure Socket Extension (JSSE) implementation diff -Nru tomcatjss-6.0.1/debian/rules tomcatjss-7.1.0/debian/rules --- tomcatjss-6.0.1/debian/rules 2012-06-29 17:42:26.000000000 +0000 +++ tomcatjss-7.1.0/debian/rules 2014-04-09 14:00:07.000000000 +0000 @@ -15,6 +15,10 @@ MOD_MINOR_VERSION := $(word 2, $(subst ., ,$(UPSTREAM_VERSION))) MOD_PATCH_VERSION := $(word 3, $(subst ., ,$(UPSTREAM_VERSION))) +override_dh_auto_build: + ant -Dant.build.javac.source=1.5 \ + -Dant.build.javac.target=1.5 + override_dh_install:: mkdir -p $(CURDIR)/debian/tmp/usr/share/java install -m 644 build/jars/tomcatjss.jar \ diff -Nru tomcatjss-6.0.1/README tomcatjss-7.1.0/README --- tomcatjss-6.0.1/README 2010-11-19 22:27:48.000000000 +0000 +++ tomcatjss-7.1.0/README 2013-06-14 16:57:46.000000000 +0000 @@ -3,7 +3,7 @@ tomcatjss defines a number of attributes for a Connector including: -clientAuth: specify if client authentication is required in the connector (or +clientauth: specify if client authentication is required in the connector (or port), it can be true or false. If true then client authentication is required. sslOptions: specify a comma-delimited list of ssl options to pass into the ssl @@ -16,6 +16,9 @@ ssl3Ciphers: specifies a list of SSL3 ciphers that tomcatjss should accept or reject from the client. You can use + to denote "accept", - means "reject". +tlsCiphers: specifies a list of TLS ciphers that tomcatjss should accept +or reject from the client. You can use + to denote "accept", - means "reject". + serverCertNickFile: a file in which specify the nickname of the server certificate. The file should contain a single line that contains the nickname. @@ -30,29 +33,41 @@ sslProtocol: needs to be SSL -SSLImplementation: Needs to be org.apache.tomcat.util.net.jss.JSSImplementation +sslImplementationName: MUST be org.apache.tomcat.util.net.jss.JSSImplementation in order to use the plugin Here is an example of a secure connector: - diff -Nru tomcatjss-6.0.1/src/org/apache/tomcat/util/net/jss/IJSSFactory.java tomcatjss-7.1.0/src/org/apache/tomcat/util/net/jss/IJSSFactory.java --- tomcatjss-6.0.1/src/org/apache/tomcat/util/net/jss/IJSSFactory.java 2010-11-19 22:27:48.000000000 +0000 +++ tomcatjss-7.1.0/src/org/apache/tomcat/util/net/jss/IJSSFactory.java 2013-06-14 16:57:46.000000000 +0000 @@ -24,6 +24,6 @@ import java.net.*; interface IJSSFactory { - public ServerSocketFactory getSocketFactory(); + public ServerSocketFactory getSocketFactory(AbstractEndpoint endpoint); public SSLSupport getSSLSupport(Socket socket); } diff -Nru tomcatjss-6.0.1/src/org/apache/tomcat/util/net/jss/JSSFactory.java tomcatjss-7.1.0/src/org/apache/tomcat/util/net/jss/JSSFactory.java --- tomcatjss-6.0.1/src/org/apache/tomcat/util/net/jss/JSSFactory.java 2010-11-19 22:27:48.000000000 +0000 +++ tomcatjss-7.1.0/src/org/apache/tomcat/util/net/jss/JSSFactory.java 2013-06-14 16:57:46.000000000 +0000 @@ -27,8 +27,8 @@ JSSFactory() { } - public ServerSocketFactory getSocketFactory() { - return new JSSSocketFactory(); + public ServerSocketFactory getSocketFactory(AbstractEndpoint endpoint) { + return new JSSSocketFactory(endpoint); } public SSLSupport getSSLSupport(Socket socket) { diff -Nru tomcatjss-6.0.1/src/org/apache/tomcat/util/net/jss/JSSImplementation.java tomcatjss-7.1.0/src/org/apache/tomcat/util/net/jss/JSSImplementation.java --- tomcatjss-6.0.1/src/org/apache/tomcat/util/net/jss/JSSImplementation.java 2010-12-18 00:20:13.000000000 +0000 +++ tomcatjss-7.1.0/src/org/apache/tomcat/util/net/jss/JSSImplementation.java 2013-06-14 16:57:46.000000000 +0000 @@ -12,7 +12,7 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * Copyright (C) 2007 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK */ @@ -21,8 +21,10 @@ import java.net.Socket; import java.io.*; +import org.apache.tomcat.util.net.AbstractEndpoint; import org.apache.tomcat.util.net.SSLImplementation; import org.apache.tomcat.util.net.SSLSupport; +import org.apache.tomcat.util.net.SSLUtil; import org.apache.tomcat.util.net.ServerSocketFactory; public class JSSImplementation extends SSLImplementation @@ -38,7 +40,7 @@ public JSSImplementation() throws ClassNotFoundException { Class.forName(SSLSocketClass); - + try { Class factcl = Class.forName(JSSFactory); factory = (JSSFactory)factcl.newInstance(); @@ -52,8 +54,9 @@ return "JSS"; } - public ServerSocketFactory getServerSocketFactory() { - ServerSocketFactory ssf = factory.getSocketFactory(); + public ServerSocketFactory getServerSocketFactory(AbstractEndpoint endpoint) + { + ServerSocketFactory ssf = factory.getSocketFactory(endpoint); return ssf; } @@ -85,7 +88,13 @@ * * Once this abstract method is removed from SSLImplementation in a * future release we can remove this stub. + * + * NOTE: This method has NOT yet been deprecated in Tomcat 7! */ return null; } + + public SSLUtil getSSLUtil(AbstractEndpoint endpoint) { + return null; + } } diff -Nru tomcatjss-6.0.1/src/org/apache/tomcat/util/net/jss/JSSSocketFactory.java tomcatjss-7.1.0/src/org/apache/tomcat/util/net/jss/JSSSocketFactory.java --- tomcatjss-6.0.1/src/org/apache/tomcat/util/net/jss/JSSSocketFactory.java 2011-09-13 02:18:09.000000000 +0000 +++ tomcatjss-7.1.0/src/org/apache/tomcat/util/net/jss/JSSSocketFactory.java 2013-06-14 16:57:46.000000000 +0000 @@ -31,8 +31,15 @@ import java.net.*; import java.io.*; +// Imports required to "implement" Tomcat 7 Interface +import org.apache.tomcat.util.net.AbstractEndpoint; +import javax.net.ssl.KeyManager; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; + public class JSSSocketFactory - extends org.apache.tomcat.util.net.ServerSocketFactory { + implements org.apache.tomcat.util.net.ServerSocketFactory, + org.apache.tomcat.util.net.SSLUtil { private static HashMap cipherMap = new HashMap(); static { @@ -157,6 +164,8 @@ eccCipherMap.put(SSLSocket.TLS_ECDH_ECDSA_WITH_NULL_SHA, "TLS_ECDH_ECDSA_WITH_NULL_SHA"); } + private AbstractEndpoint endpoint; + static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(JSSSocketFactory.class); @@ -176,8 +185,8 @@ private IPasswordStore mPasswordStore = null; private boolean mStrictCiphers = false; - public JSSSocketFactory() { - super(); + public JSSSocketFactory (AbstractEndpoint endpoint) { + this.endpoint = endpoint; } private void debugWrite(String m) throws IOException { @@ -190,7 +199,7 @@ public void setSSLCiphers(String attr) throws SocketException { - String ciphers = (String)attributes.get(attr); + String ciphers = (String)endpoint.getAttribute(attr); StringTokenizer st = new StringTokenizer(ciphers, ","); while (st.hasMoreTokens()) { String cipherstr = st.nextToken(); @@ -250,7 +259,7 @@ public void setSSLOptions() throws SocketException { - String options = (String)attributes.get("sslOptions"); + String options = (String)endpoint.getAttribute("sslOptions"); StringTokenizer st = new StringTokenizer(options, ","); while (st.hasMoreTokens()) { String option = st.nextToken(); @@ -301,7 +310,7 @@ void init() throws IOException { try { - String deb = (String)attributes.get("debug"); + String deb = (String)endpoint.getAttribute("debug"); if (deb.equals("true")) { debug = true; debugFile = new FileWriter("/tmp/tomcatjss.log", true); @@ -313,8 +322,8 @@ try { try { - mPwdPath = (String)attributes.get("passwordFile"); - mPwdClass = (String)attributes.get("passwordClass"); + mPwdPath = (String)endpoint.getAttribute("passwordFile"); + mPwdClass = (String)endpoint.getAttribute("passwordClass"); if (mPwdClass != null) { mPasswordStore = (IPasswordStore)Class.forName(mPwdClass).newInstance(); mPasswordStore.init(mPwdPath); @@ -328,7 +337,7 @@ throw new IOException("JSSSocketFactory: no passwordFilePath defined"); } - String certDir = (String)attributes.get("certdbDir"); + String certDir = (String)endpoint.getAttribute("certdbDir"); CryptoManager.InitializationValues vals = new CryptoManager.InitializationValues(certDir, @@ -355,7 +364,7 @@ String st = (String) en.nextElement(); debugWrite("JSSSocketFactory init - tag name="+st+"\n"); pwd = mPasswordStore.getPassword(st); - + if (pwd != null) { debugWrite("JSSSocketFactory init - got password\n"); pw = new Password(pwd.toCharArray()); @@ -393,10 +402,12 @@ debugWrite("JSSSocketFactory init - no login done\n"); } //mPasswordStore not null - String clientAuthStr = (String)attributes.get("clientauth"); + // MUST look for "clientauth" (ALL lowercase) since "clientAuth" + // (camel case) has already been processed by Tomcat 7 + String clientAuthStr = (String)endpoint.getAttribute("clientauth"); File file = null; try { - mServerCertNickPath = (String)attributes.get("serverCertNickFile"); + mServerCertNickPath = (String)endpoint.getAttribute("serverCertNickFile"); debugWrite("JSSSocketFactory init - got serverCertNickFile"+ mServerCertNickPath+"\n"); file = new File(mServerCertNickPath); @@ -430,7 +441,7 @@ throw new IOException("JSSSocketFactory: no serverCertNickFile defined"); } - //serverCertNick = (String)attributes.get("serverCert"); + //serverCertNick = (String)endpoint.getAttribute("serverCert"); if (clientAuthStr.equalsIgnoreCase("true") || clientAuthStr.equalsIgnoreCase("yes")) { requireClientAuth = true; @@ -444,7 +455,7 @@ && ocspConfigured == false ) { debugWrite("JSSSocketFactory init - checking for OCSP settings. \n" ); boolean enableOCSP = false; - String doOCSP = (String) attributes.get("enableOCSP"); + String doOCSP = (String) endpoint.getAttribute("enableOCSP"); debugWrite("JSSSocketFactory init - doOCSP flag:"+ doOCSP+ " \n"); @@ -457,10 +468,10 @@ enableOCSP+ "\n"); if( enableOCSP == true ) { - String ocspResponderURL = (String) attributes.get("ocspResponderURL"); + String ocspResponderURL = (String) endpoint.getAttribute("ocspResponderURL"); debugWrite("JSSSocketFactory init - ocspResponderURL "+ ocspResponderURL+ "\n"); - String ocspResponderCertNickname = (String) attributes.get("ocspResponderCertNickname"); + String ocspResponderCertNickname = (String) endpoint.getAttribute("ocspResponderCertNickname"); debugWrite("JSSSocketFactory init - ocspResponderCertNickname" + ocspResponderCertNickname + "\n"); if( (ocspResponderURL != null && ocspResponderURL.length() > 0) && (ocspResponderCertNickname != null && @@ -473,9 +484,9 @@ int ocspMinCacheEntryDuration_i = 3600; int ocspMaxCacheEntryDuration_i = 86400; - String ocspCacheSize = (String) attributes.get("ocspCacheSize"); - String ocspMinCacheEntryDuration = (String) attributes.get("ocspMinCacheEntryDuration"); - String ocspMaxCacheEntryDuration = (String) attributes.get("ocspMaxCacheEntryDuration"); + String ocspCacheSize = (String) endpoint.getAttribute("ocspCacheSize"); + String ocspMinCacheEntryDuration = (String) endpoint.getAttribute("ocspMinCacheEntryDuration"); + String ocspMaxCacheEntryDuration = (String) endpoint.getAttribute("ocspMaxCacheEntryDuration"); if (ocspCacheSize != null || ocspMinCacheEntryDuration != null || @@ -498,7 +509,7 @@ } // defualt to 60 seconds; - String ocspTimeout = (String) attributes.get("ocspTimeout"); + String ocspTimeout = (String) endpoint.getAttribute("ocspTimeout"); if (ocspTimeout != null) { debugWrite("JSSSocketFactory init - ocspTimeout= \n" + ocspTimeout); int ocspTimeout_i = Integer.parseInt(ocspTimeout); @@ -525,7 +536,7 @@ // 12 hours = 43200 seconds SSLServerSocket.configServerSessionIDCache(0, 43200, 43200, null); - String strictCiphersStr = (String)attributes.get("strictCiphers"); + String strictCiphersStr = (String)endpoint.getAttribute("strictCiphers"); if (strictCiphersStr.equalsIgnoreCase("true") || strictCiphersStr.equalsIgnoreCase("yes")) { mStrictCiphers = true; @@ -539,7 +550,6 @@ } setSSLOptions(); - setSSLOptions(); debugWrite("SSSocketFactory init - after setSSLOptions\n"); } catch (Exception ex) { debugWrite("JSSSocketFactory init - exception thrown:"+ @@ -627,4 +637,29 @@ } catch (Exception e) { } } + + // Methods required to "implement" Tomcat 7 Interface + public SSLContext createSSLContext() throws Exception { + return null; + } + + public KeyManager[] getKeyManagers() throws Exception { + return null; + } + + public TrustManager[] getTrustManagers() throws Exception { + return null; + } + + public void configureSessionContext(javax.net.ssl.SSLSessionContext sslSessionContext) { + return; + } + + public String[] getEnableableCiphers(SSLContext context) { + return null; + } + + public String[] getEnableableProtocols(SSLContext context) { + return null; + } } diff -Nru tomcatjss-6.0.1/tomcatjss.spec tomcatjss-7.1.0/tomcatjss.spec --- tomcatjss-6.0.1/tomcatjss.spec 2011-09-13 02:18:09.000000000 +0000 +++ tomcatjss-7.1.0/tomcatjss.spec 2013-06-14 17:14:11.000000000 +0000 @@ -1,6 +1,6 @@ Name: tomcatjss -Version: 6.0.1 -Release: 1%{?dist} +Version: 7.1.0 +Release: 3%{?dist} Summary: JSSE implementation using JSS for Tomcat URL: http://pki.fedoraproject.org/ License: LGPLv2+ @@ -11,32 +11,19 @@ Source0: http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}.tar.gz +# jpackage-utils requires versioning to meet both build and runtime requirements +# jss requires versioning to meet both build and runtime requirements +# tomcat requires versioning to meet both build and runtime requirements BuildRequires: ant -BuildRequires: java-devel >= 1:1.6.0 -%if 0%{?fedora} >= 16 -BuildRequires: jpackage-utils >= 0:1.7.5-10 -%else -BuildRequires: jpackage-utils -%endif -%if 0%{?fedora} >= 15 -BuildRequires: tomcat6 >= 6.0.30-6 -%else -BuildRequires: tomcat6 -%endif -BuildRequires: jss >= 4.2.6-17 - -Requires: java >= 1:1.6.0 -%if 0%{?fedora} >= 16 -Requires: jpackage-utils >= 0:1.7.5-10 -%else -Requires: jpackage-utils -%endif -%if 0%{?fedora} >= 15 -Requires: tomcat6 >= 6.0.30-6 -%else -Requires: tomcat6 -%endif -Requires: jss >= 4.2.6-17 +BuildRequires: java-devel +BuildRequires: jpackage-utils >= 0:1.7.5-15 +BuildRequires: jss >= 4.2.6-24 +BuildRequires: tomcat >= 7.0.40 + +Requires: java +Requires: jpackage-utils >= 0:1.7.5-15 +Requires: jss >= 4.2.6-24 +Requires: tomcat >= 7.0.40 # The 'tomcatjss' package conflicts with the 'tomcat-native' package # because it uses an underlying NSS security model rather than the @@ -51,7 +38,7 @@ %description A Java Secure Socket Extension (JSSE) implementation -using Java Security Services (JSS) for Tomcat 6. +using Java Security Services (JSS) for Tomcat 7. NOTE: The 'tomcatjss' package conflicts with the 'tomcat-native' package because it uses an underlying NSS security model rather than the @@ -89,6 +76,30 @@ %{_javadir}/* %changelog +* Thu Jun 13 2013 Matthew Harmsen 7.1.0-3 +- Updated tomcatjss to utilize tomcat-7.0.40. +- Updated JNIDIR to /usr/lib/java. + +* Fri Feb 15 2013 Fedora Release Engineering - 7.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Dec 19 2012 Christina Fu 7.1.0-1 +- Bugzila Bug #819554 tomcatjss: Please migrate from tomcat6 to tomcat7 + +* Thu Aug 2 2012 Matthew Harmsen 7.0.0-3 +- PKI TRAC Ticket #283 - Dogtag 10: Integrate Tomcat 6 'tomcatjss.jar' and + Tomcat 7 'tomcat7jss.jar' in Fedora 18 tomcatjss package + +* Wed Jul 26 2012 Matthew Harmsen 7.0.0-2 +- Fixed runtime 'Requires' cut/paste typos + +* Wed Jun 06 2012 Matthew Harmsen 7.0.0-1 +- Bugzilla Bug #819554 - tomcatjss: Please migrate from tomcat6 to tomcat7 + +* Thu Sep 22 2011 Matthew Harmsen 6.0.2-1 +- Bugzilla Bug #734590 - Refactor JNI libraries for Fedora 16+ . . . (mharmsen) +- Bugzilla Bug #699809 - Convert CS to use systemd (alee) + * Mon Sep 12 2011 Matthew Harmsen 6.0.1-1 - Bugzilla Bug #734590 - Refactor JNI libraries for Fedora 16+ . . .