Skip to content
Browse files
Adding alias of the certificate used for the signature[in asymmetric …
…binding scenarios] as a msg.ctx property. This also a fix for RAMPART-201
  • Loading branch information
Thilina Mahesh Buddhika committed Feb 25, 2011
1 parent 6bdaae6 commit 9b6bdf7c3a2f033ffc4cd26abb091626e0396801
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
@@ -729,11 +729,13 @@ protected boolean verifyTrust(X509Certificate cert, RampartMessageData rmd) thro

// If certificates have been found, the certificates must be compared
// to ensure againgst phony DNs (compare encoded form including signature)
// to ensure against phony DNs (compare encoded form including signature)
if (certs != null && certs.length > 0 && cert.equals(certs[0])) {
if (doDebug) {
log.debug("Direct trust for certificate with " + subjectString);
// Set the alias of the cert used for the msg. sig. as a msg. cxt. property
rmd.getMsgContext().setProperty(RampartMessageData.SIGNATURE_CERT_ALIAS, alias);
return true;
} else {
@@ -19,22 +19,19 @@
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axis2.AxisFault;
import org.apache.axis2.util.PolicyUtil;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.OperationContext;
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.util.PolicyUtil;
import org.apache.axis2.wsdl.WSDLConstants;
import org.apache.neethi.Assertion;
import org.apache.neethi.Policy;
import org.apache.neethi.PolicyEngine;
import org.apache.neethi.PolicyComponent;
import org.apache.neethi.PolicyEngine;
import org.apache.rahas.RahasConstants;
import org.apache.rahas.SimpleTokenStore;
import org.apache.rahas.TokenStorage;
import org.apache.rahas.TrustException;
import org.apache.rahas.TrustUtil;
import org.apache.rampart.handler.WSSHandlerConstants;
import org.apache.rampart.policy.RampartPolicyBuilder;
import org.apache.rampart.policy.RampartPolicyData;
@@ -59,7 +56,9 @@
import org.opensaml.SAMLAssertion;
import org.w3c.dom.Document;

import java.util.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;

public class RampartMessageData {

@@ -88,7 +87,12 @@ public class RampartMessageData {
* Key to hold username which was used to authenticate
public final static String USERNAME = "username";

public final static String SIGNATURE_CERT_ALIAS = "signatureCertAlias";

* Key to hold the WS-Trust version

0 comments on commit 9b6bdf7

Please sign in to comment.