May be you need only org.eclipse.higgins.sts.xmlsecurity.apache.XMLSecurityApacheExtension for this

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.java

public 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 to
the ExtensionList of SAMLIssue
[...]
The above call is using another project
org.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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
higgins-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/higgins-dev

Reply via email to