DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=44205>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=44205 Summary: XMLX509Certificate.getX509Certificate() results in certificate parsing error Product: Security Version: Java 1.4.1 Platform: Other OS/Version: other Status: NEW Severity: regression Priority: P1 Component: Signature AssignedTo: security-dev@xml.apache.org ReportedBy: [EMAIL PROTECTED] On debugging I found that the cause of the problem was the ElementProxy.getBytesFromTextChild() method. This method currently assumes that the base64 certificate data is contained in the first child node of the X509Certificate element, which may not be true always. Here's the suggested patch: -------------------------------------------------------------- --- ElementProxy.java.bak 2008-01-08 12:36:08.000000000 +0530 +++ ElementProxy.java 2008-01-11 12:03:22.121625000 +0530 @@ -406,10 +401,7 @@ */ public byte[] getBytesFromTextChild() throws XMLSecurityException { - Text t = (Text)this._constructionElement.getFirstChild(); - - - return Base64.decode(t.getData()); + return Base64.decode(XMLUtils.getFullTextChildrenFromElement(this._constructionElement)); } /** -------------------------------------------------------------- -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.