Check an example at
http://dev.eclipse.org/svnroot/technology/org.eclipse.higgins/trunk/app/org.eclipse.higgins.rp.simple/src/org/eclipse/higgins/rp/simple/RPUtil.javapublic static DigitalIdentity processToken(String token, ServletContext context) {
DigitalIdentity di = null;
if(token != null && token.length() > 0) {
try {
IElement elemToken = new Element();
elemToken.set(token);
if(token.indexOf("EncryptedData") > -1) {
IXMLSecurityExtension secext = new
XMLSecurityApacheExtension();
secext.configure(null, null, null);
System.out.println(">>>" +
context.getAttribute(Constants.KEYSTORE));
System.out.println(">>>" +
context.getAttribute(Constants.KEYSTOREKEYALIAS));
System.out.println(">>>" +
context.getAttribute(Constants.KEYSTOREKEYPW));
IElement ie = secext.DecryptElement(elemToken, (PrivateKey)
((KeyStore) context.getAttribute(Constants.KEYSTORE)).getKey((String)
context.getAttribute(Constants.KEYSTOREKEYALIAS), ((String)
context.getAttribute(Constants.KEYSTOREKEYPW)).toCharArray()));
secext.VerifyEnveloped(ie, new
org.eclipse.higgins.sts.common.Constants());
di = DigitalIdentity.fromXml(ie);
}
else {
di = DigitalIdentity.fromXml(elemToken);
}
System.out.println(di);
}
catch(Exception e) {
e.printStackTrace();
}
}
return di;
}
On Jun 4, 2009, at 9:16 AM, Torgeir Veimo wrote:
2009/6/4 Jeesmon Jacob <[email protected]>:Higgins STS does encryption of SAML tokens by adding TokenEncryptHandler tothe ExtensionList of SAMLIssue[...]The above call is using another projectorg.eclipse.higgins.sts.xmlsecurity.apache to do the actual encryption.Is that you are looking for?Oops, I realize I've described my need a bit vaguely. I actually need to decrypt an encrypted assertion. -- -Tor _______________________________________________ higgins-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/higgins-dev
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ higgins-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/higgins-dev
