You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jakarta.apache.org by se...@apache.org on 2010/07/01 16:31:30 UTC

svn commit: r959679 - /jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java

Author: sebb
Date: Thu Jul  1 14:31:29 2010
New Revision: 959679

URL: http://svn.apache.org/viewvc?rev=959679&view=rev
Log:
Add debug

Modified:
    jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java

Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java?rev=959679&r1=959678&r2=959679&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java (original)
+++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java Thu Jul  1 14:31:29 2010
@@ -147,8 +147,7 @@ class SMIMEAssertion {
             if (signerIt.hasNext()) {
 
                 SignerInformation signer = (SignerInformation) signerIt.next();
-                Iterator<?> certIt = certs.getCertificates(signer.getSID())
-                        .iterator();
+                Iterator<?> certIt = certs.getCertificates(signer.getSID()).iterator();
 
                 if (certIt.hasNext()) {
                     // the signer certificate
@@ -193,9 +192,11 @@ class SMIMEAssertion {
 
                         String subject = testElement.getSignerDn();
                         if (subject.length() > 0) {
+                            final X500Principal certPrincipal = cert.getSubjectX500Principal();
+                            log.debug(certPrincipal.getName(X500Principal.CANONICAL));
                             X500Principal principal = new X500Principal(subject);
-                            if (!principal.equals(cert
-                                    .getSubjectX500Principal())) {
+                            log.debug(principal.getName(X500Principal.CANONICAL));
+                            if (!principal.equals(certPrincipal)) {
                                 res.setFailure(true);
                                 failureMessage
                                         .append("Distinguished name of signer certificate does not match \"")
@@ -205,9 +206,11 @@ class SMIMEAssertion {
 
                         String issuer = testElement.getIssuerDn();
                         if (issuer.length() > 0) {
+                            final X500Principal issuerX500Principal = cert.getIssuerX500Principal();
+                            log.debug(issuerX500Principal.getName(X500Principal.CANONICAL));
                             X500Principal principal = new X500Principal(issuer);
-                            if (!principal
-                                    .equals(cert.getIssuerX500Principal())) {
+                            log.debug(principal.getName(X500Principal.CANONICAL));
+                            if (!principal.equals(issuerX500Principal)) {
                                 res.setFailure(true);
                                 failureMessage
                                         .append("Issuer distinguished name of signer certificate does not match \"")



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org