Package org.apache.ws.security.message

Examples of org.apache.ws.security.message.WSSecEncrypt.encryptForExternalRef()


                                e);
                    }
                } else {
                    try {
                        // Encrypt, get hold of the ref list and add it
                        secondRefList = encr.encryptForExternalRef(null,
                                secondEncrParts);

                        // Insert the ref list after the encrypted key elem
                        this.setInsertionLocation(RampartUtil
                                .insertSiblingAfter(rmd, encrTokenElement,
View Full Code Here


         * Encrypt the parts (Body), create EncrypedData elements that reference
         * the EncryptedKey, and get a ReferenceList that can be put into the
         * Security header. Be sure that the ReferenceList is after the
         * EncryptedKey element in the Security header (strict layout)
         */
        Element refs = builder.encryptForExternalRef(null, parts);
        builder.addExternalRefElement(refs, secHeader);

        /*
         * now add (prepend) the EncryptedKey element, then a
         * BinarySecurityToken if one was setup during prepare
View Full Code Here

                    encr.prepare(
                            doc,
                            RampartUtil.getEncryptionCrypto(rpd.getRampartConfig(),
                                    rmd.getCustomClassLoader()));
                    // Encrypt, get hold of the ref list and add it
                    refList = encr.encryptForExternalRef(null, encrParts);
                } catch (WSSecurityException e) {
                    throw new RampartException("errorInEncryption", e);
                }
            }
View Full Code Here

                        throw new RampartException("errorInDKEncr");
                    }
                } else {
                    try {
                        // Encrypt, get hold of the ref list and add it
                        secondRefList = encr.encryptForExternalRef(null, encrParts);
                        RampartUtil.insertSiblingAfter(rmd, encrTokenElement, secondRefList);
                    } catch (WSSecurityException e) {
                        throw new RampartException("errorInEncryption", e);
                    }
                }
View Full Code Here

                            doc,
                            RampartUtil.getEncryptionCrypto(rpd.getRampartConfig(),
                                    rmd.getCustomClassLoader()));

                    // Encrypt, get hold of the ref list and add it
                    refList = encr.encryptForExternalRef(null, encrParts);

                    if (encrTokElem != null) {
                        RampartUtil.insertSiblingAfter(rmd, encrTokElem, refList);
                    } else {
                        RampartUtil.insertSiblingBeforeOrPrepend(rmd, this.getInsertionLocation(),
View Full Code Here

                    this.encrTokenElement = encr.getEncryptedKeyElement();
                    this.encrTokenElement = RampartUtil.appendChildToSecHeader(rmd,
                            encrTokenElement);

                    refList = encr.encryptForExternalRef(null, encrParts);

                } catch (WSSecurityException e) {
                    throw new RampartException("errorInEncryption", e);
                }
            }
View Full Code Here

                                e);
                    }
                } else {
                    try {
                        // Encrypt, get hold of the ref list and add it
                        secondRefList = encr.encryptForExternalRef(null,
                                encrParts);

                        // Insert the ref list after the encrypted key elem
                        this.setInsertionLocation(RampartUtil
                                .insertSiblingAfter(rmd, encrTokenElement,
View Full Code Here

                encr.setEphemeralKey(tok.getSecret());
                encr.setDocument(doc);
               
                try {
                    //Encrypt, get hold of the ref list and add it
                    refList = encr.encryptForExternalRef(null, encrParts);
                } catch (WSSecurityException e) {
                    throw new RampartException("errorInEncryption", e);
                }
            }
           
View Full Code Here

                        throw new RampartException("errorInDKEncr");
                    }
                } else {
                    try {
                        //Encrypt, get hold of the ref list and add it
                        secondRefList = encr.encryptForExternalRef(null,
                                encrParts);
                        RampartUtil.insertSiblingAfter(
                                rmd,
                                encrTokenElement,
                                secondRefList);
View Full Code Here

                encr.setDocument(doc);
                encr.prepare(doc, RampartUtil.getEncryptionCrypto(rpd
                        .getRampartConfig(), rmd.getCustomClassLoader()));
               
                //Encrypt, get hold of the ref list and add it
                refList = encr.encryptForExternalRef(null, encrParts);

                RampartUtil.insertSiblingAfter(rmd,
                                                encrTokElem,
                                                refList);
            } catch (WSSecurityException e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.