diff options
author | Rich Megginson <rmeggins@redhat.com> | 2006-02-10 23:22:00 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2006-02-10 23:22:00 +0000 |
commit | 3e9312ac1c76ac990ea44b5b837a795c04def632 (patch) | |
tree | 7059108d9a95202524a11969616e545926ee6aa5 /ldap/clients | |
parent | 1d536d11e33c64496f59faf0bebd5aa4c1c20a49 (diff) | |
download | ds-3e9312ac1c76ac990ea44b5b837a795c04def632.tar.gz ds-3e9312ac1c76ac990ea44b5b837a795c04def632.tar.xz ds-3e9312ac1c76ac990ea44b5b837a795c04def632.zip |
Bug(s) fixed: 178479
Bug Description: DSMLGW code uses non-standard sun.misc.Base64Encoder
Reviewed by: The team (Thanks!)
Fix Description: Added jakarta-commons-codec.jar to the DS build and
packaging. We will need to add this file to the bundle of dsmlgw jar
files on /share/builds/components.
Platforms tested: Fedora Core 4
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none
Diffstat (limited to 'ldap/clients')
-rw-r--r-- | ldap/clients/dsmlgw/build.xml | 5 | ||||
-rw-r--r-- | ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/ParseValue.java | 6 | ||||
-rw-r--r-- | ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/gatewayHandler.java | 5 |
3 files changed, 12 insertions, 4 deletions
diff --git a/ldap/clients/dsmlgw/build.xml b/ldap/clients/dsmlgw/build.xml index 8509821d..0a050e11 100644 --- a/ldap/clients/dsmlgw/build.xml +++ b/ldap/clients/dsmlgw/build.xml @@ -51,16 +51,20 @@ <property name="ldapjdk.jar" value="${ldapdist.dir}/ldapjdk.jar"/> <property name="activation.jar" value="${globaldist.dir}/activation.jar"/> +<property name="jaf.jar" value="${globaldist.dir}/jaf.jar"/> <property name="jaxrpc-api.jar" value="${globaldist.dir}/jaxrpc-api.jar"/> <property name="jaxrpc.jar" value="${globaldist.dir}/jaxrpc.jar"/> <property name="saaj.jar" value="${globaldist.dir}/saaj.jar"/> <property name="xercesImpl.jar" value="${globaldist.dir}/xercesImpl.jar"/> <property name="xmlParserAPIs.jar" value="${globaldist.dir}/xml-apis.jar"/> <property name="axis.jar" value="${globaldist.dir}/axis.jar"/> +<property name="codec.jar" value="${globaldist.dir}/jakarta-commons-codec.jar"/> +<property environment="env"/> <path id="class.path"> <pathelement location="${ldapjdk.jar}"/> <pathelement location="${activation.jar}"/> +<pathelement location="${jaf.jar}"/> <pathelement location="${jaxrpc-api.jar}"/> <pathelement location="${jaxrpc.jar}"/> <pathelement location="${saaj.jar}"/> @@ -68,6 +72,7 @@ <pathelement location="${xercesImpl.jar}"/> <pathelement location="${xmlParserAPIs.jar}"/> <pathelement location="${axis.jar}"/> +<pathelement location="${codec.jar}"/> </path> <property name="build.dir" value="${mcom.root}/built/dsmlgw"/> diff --git a/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/ParseValue.java b/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/ParseValue.java index d74724fc..c1697f17 100644 --- a/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/ParseValue.java +++ b/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/ParseValue.java @@ -36,6 +36,8 @@ * --- END COPYRIGHT BLOCK --- */ package com.netscape.dsml.gateway; +import org.apache.commons.codec.binary.Base64; + /** * * @author elliot @@ -53,9 +55,9 @@ public class ParseValue { org.w3c.dom.Node type = n.getAttributes().getNamedItem("xsi:type"); if (type != null && type.getNodeValue().equalsIgnoreCase("xsd:base64Binary") ) { // This value is encoded in base64. decode it. - sun.misc.BASE64Decoder bd = new sun.misc.BASE64Decoder(); + Base64 bd = new Base64(); try { - ret = bd.decodeBuffer( n.getFirstChild().getNodeValue() ) ; + ret = bd.decode( n.getFirstChild().getNodeValue().getBytes() ) ; } catch (org.w3c.dom.DOMException de) { ret = "".getBytes(); diff --git a/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/gatewayHandler.java b/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/gatewayHandler.java index faa3f5f7..b20438df 100644 --- a/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/gatewayHandler.java +++ b/ldap/clients/dsmlgw/src/com/netscape/dsml/gateway/gatewayHandler.java @@ -62,6 +62,7 @@ import org.apache.axis.AxisFault; import org.apache.axis.Message; import org.apache.axis.MessageContext; import org.apache.axis.handlers.BasicHandler; +import org.apache.commons.codec.binary.Base64; public class gatewayHandler extends BasicHandler { private HandlerInfo handlerInfo; @@ -110,9 +111,9 @@ public class gatewayHandler extends BasicHandler { if ( tmp != null && tmp.startsWith("Basic ") ) { int i ; - sun.misc.BASE64Decoder bd = new sun.misc.BASE64Decoder(); + Base64 bd = new Base64(); try { - tmp = new String( (bd.decodeBuffer(tmp.substring(6) ))); + tmp = new String( (bd.decode(tmp.substring(6).getBytes() ))); } catch (Exception e) { // couldn't decode auth info |