Bug 40076 - Denigrated (org.apache.xml.security.keys.content.x509.XMLX509IssuerSerial)
Summary: Denigrated (org.apache.xml.security.keys.content.x509.XMLX509IssuerSerial)
Status: CLOSED LATER
Alias: None
Product: Security - Now in JIRA
Classification: Unclassified
Component: Encryption (show other bugs)
Version: Java 1.3
Hardware: All other
: P3 normal
Target Milestone: ---
Assignee: XML Security Developers Mailing List
URL:
Keywords: RFC
Depends on:
Blocks:
 
Reported: 2006-07-20 04:50 UTC by Aye
Modified: 2006-08-06 10:36 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aye 2006-07-20 04:50:13 UTC
org.apache.xml.security.keys.content.x509.XMLX509IssuerSerial
...
public XMLX509IssuerSerial(Document doc, X509Certificate x509certificate) {
      this(doc,
           RFC2253Parser.normalize(x509certificate.getIssuerDN().getName()),
           x509certificate.getSerialNumber());
}

In this piece of code, x509certificate.getIssuerDN().getName() should be 
replaced by x509certificate.getIssuerX500Principal().getName(), as suggested by 
the JDK 1.5 API  
(http://java.sun.com/j2se/1.5.0/docs/api/java/security/cert/X509Certificate.html
#getIssuerDN())


The problem I have now, is that the IssuerDN with the current implementation 
will report:

EMAILADDRESS=abcde@somewhere.com,CN=blah,...

RFC2253 format will report:  

1.2.840.113549.1.9.1=#<hex string>,CN=blah,...

This cause issuer distinguished name not to be identified.
Comment 1 Aye 2006-07-20 04:53:08 UTC
Suspected, but un-verified problem : WS Security makes use of this as X509 
issuer name, serial number token.  Using the class 
org.apache.xml.security.keys.content.x509.XMLX509IssuerSerial.  However, the 
issuer DN is not RFC 2253 format.  Therefore, the issuer DN cannot be 
identified after transportation because the represantation is not unique.
Comment 2 sean.mullan 2006-07-21 14:27:41 UTC
(In reply to comment #1)
> Suspected, but un-verified problem : WS Security makes use of this as X509 
> issuer name, serial number token.  Using the class 
> org.apache.xml.security.keys.content.x509.XMLX509IssuerSerial.  However, the 
> issuer DN is not RFC 2253 format.  Therefore, the issuer DN cannot be 
> identified after transportation because the represantation is not unique.

The WS Security implementation can workaround this by reparsing the DN into
a strict RFC 2253 format, ex:

String dn = new X500Principal(issuerSerial.getIssuerName()).getName();

Can you report this issue to them?

Your previous suggestion would also work, but unfortunately this would create
a dependency on JDK 1.5 for Apache XML Security and I'm not sure everyone is
ready to make that leap yet. Hopefully soon though, maybe the next release.
Comment 3 Raul Benito 2006-08-06 17:36:40 UTC
Closing old bugs.