Modified: 
webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-frame.html
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-frame.html?rev=1210847&r1=1210846&r2=1210847&view=diff
==============================================================================
--- 
webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-frame.html
 (original)
+++ 
webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-frame.html
 Tue Dec  6 10:23:54 2011
@@ -3,7 +3,7 @@
 <html xml:lang="en" lang="en">
        <head>
                <meta http-equiv="content-type" content="text/html; 
charset=ISO-8859-1" />
-               <title>WSS4J 1.6.3 Reference Package 
org.apache.ws.security.message.token</title>
+               <title>WSS4J 1.6.4 Reference Package 
org.apache.ws.security.message.token</title>
                <link rel="stylesheet" type="text/css" 
href="../../../../../../stylesheet.css" title="style" />
        </head>
        <body>

Modified: 
webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-summary.html
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-summary.html?rev=1210847&r1=1210846&r2=1210847&view=diff
==============================================================================
--- 
webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-summary.html
 (original)
+++ 
webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-summary.html
 Tue Dec  6 10:23:54 2011
@@ -3,7 +3,7 @@
 <html xml:lang="en" lang="en">
        <head>
                <meta http-equiv="content-type" content="text/html; 
charset=ISO-8859-1" />
-               <title>WSS4J 1.6.3 Reference Package 
org.apache.ws.security.message.token</title>
+               <title>WSS4J 1.6.4 Reference Package 
org.apache.ws.security.message.token</title>
                <link rel="stylesheet" type="text/css" 
href="../../../../../../stylesheet.css" title="style" />
        </head>
        <body>

Modified: webservices/wss4j/site/xref/org/apache/ws/security/package-frame.html
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/package-frame.html?rev=1210847&r1=1210846&r2=1210847&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/package-frame.html 
(original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/package-frame.html Tue 
Dec  6 10:23:54 2011
@@ -3,7 +3,7 @@
 <html xml:lang="en" lang="en">
        <head>
                <meta http-equiv="content-type" content="text/html; 
charset=ISO-8859-1" />
-               <title>WSS4J 1.6.3 Reference Package 
org.apache.ws.security</title>
+               <title>WSS4J 1.6.4 Reference Package 
org.apache.ws.security</title>
                <link rel="stylesheet" type="text/css" 
href="../../../../stylesheet.css" title="style" />
        </head>
        <body>

Modified: 
webservices/wss4j/site/xref/org/apache/ws/security/package-summary.html
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/package-summary.html?rev=1210847&r1=1210846&r2=1210847&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/package-summary.html 
(original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/package-summary.html Tue 
Dec  6 10:23:54 2011
@@ -3,7 +3,7 @@
 <html xml:lang="en" lang="en">
        <head>
                <meta http-equiv="content-type" content="text/html; 
charset=ISO-8859-1" />
-               <title>WSS4J 1.6.3 Reference Package 
org.apache.ws.security</title>
+               <title>WSS4J 1.6.4 Reference Package 
org.apache.ws.security</title>
                <link rel="stylesheet" type="text/css" 
href="../../../../stylesheet.css" title="style" />
        </head>
        <body>

Modified: 
webservices/wss4j/site/xref/org/apache/ws/security/processor/EncryptedKeyProcessor.html
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/processor/EncryptedKeyProcessor.html?rev=1210847&r1=1210846&r2=1210847&view=diff
==============================================================================
--- 
webservices/wss4j/site/xref/org/apache/ws/security/processor/EncryptedKeyProcessor.html
 (original)
+++ 
webservices/wss4j/site/xref/org/apache/ws/security/processor/EncryptedKeyProcessor.html
 Tue Dec  6 10:23:54 2011
@@ -168,10 +168,10 @@
 <a name="158" href="#158">158</a>                 Element ee = 
ReferenceListProcessor.findEncryptedDataElement(doc, wsDocInfo, uri);
 <a name="159" href="#159">159</a>                 String algorithmURI = 
X509Util.getEncAlgo(ee);
 <a name="160" href="#160">160</a>                 alg = 
JCEMapper.getJCEKeyAlgorithmFromURI(algorithmURI);
-<a name="161" href="#161">161</a>                 size = 
JCEMapper.getKeyLengthFromURI(algorithmURI);
+<a name="161" href="#161">161</a>                 size = 
WSSecurityUtil.getKeyLength(algorithmURI);
 <a name="162" href="#162">162</a>             }
 <a name="163" href="#163">163</a>             KeyGenerator kgen = 
KeyGenerator.getInstance(alg);
-<a name="164" href="#164">164</a>             kgen.init(size);
+<a name="164" href="#164">164</a>             kgen.init(size * 8);
 <a name="165" href="#165">165</a>             SecretKey k = kgen.generateKey();
 <a name="166" href="#166">166</a>             <strong 
class="jxr_keyword">return</strong> k.getEncoded();
 <a name="167" href="#167">167</a>         } <strong 
class="jxr_keyword">catch</strong> (Exception ex) {
@@ -342,54 +342,60 @@
 <a name="332" href="#332">332</a>         <em class="jxr_comment">// Prepare 
the SecretKey object to decrypt EncryptedData</em>
 <a name="333" href="#333">333</a>         <em class="jxr_comment">//</em>
 <a name="334" href="#334">334</a>         String symEncAlgo = 
X509Util.getEncAlgo(encryptedDataElement);
-<a name="335" href="#335">335</a>         SecretKey symmetricKey = 
-<a name="336" href="#336">336</a>             
WSSecurityUtil.prepareSecretKey(symEncAlgo, decryptedData);
-<a name="337" href="#337">337</a> 
-<a name="338" href="#338">338</a>         <strong 
class="jxr_keyword">return</strong> ReferenceListProcessor.decryptEncryptedData(
-<a name="339" href="#339">339</a>             doc, dataRefURI, 
encryptedDataElement, symmetricKey, symEncAlgo
-<a name="340" href="#340">340</a>         );
-<a name="341" href="#341">341</a>     }
-<a name="342" href="#342">342</a>     
-<a name="343" href="#343">343</a>     <em class="jxr_javadoccomment">/**</em>
-<a name="344" href="#344">344</a> <em class="jxr_javadoccomment">     * A 
method to check that the EncryptedKey is compliant with the BSP spec.</em>
-<a name="345" href="#345">345</a> <em class="jxr_javadoccomment">     * 
@throws WSSecurityException</em>
-<a name="346" href="#346">346</a> <em class="jxr_javadoccomment">     */</em>
-<a name="347" href="#347">347</a>     <strong 
class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> 
checkBSPCompliance(Element elem, String encAlgo) <strong 
class="jxr_keyword">throws</strong> WSSecurityException {
-<a name="348" href="#348">348</a>         String attribute = 
elem.getAttribute(<span class="jxr_string">"Type"</span>);
-<a name="349" href="#349">349</a>         <strong 
class="jxr_keyword">if</strong> (attribute != <strong 
class="jxr_keyword">null</strong> &amp;&amp; !<span 
class="jxr_string">""</span>.equals(attribute)) {
-<a name="350" href="#350">350</a>             <strong 
class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
-<a name="351" href="#351">351</a>                 
WSSecurityException.FAILED_CHECK, <span 
class="jxr_string">"badAttribute"</span>, <strong 
class="jxr_keyword">new</strong> Object[]{attribute}
-<a name="352" href="#352">352</a>             );
-<a name="353" href="#353">353</a>         }
-<a name="354" href="#354">354</a>         attribute = elem.getAttribute(<span 
class="jxr_string">"MimeType"</span>);
+<a name="335" href="#335">335</a>         SecretKey symmetricKey = <strong 
class="jxr_keyword">null</strong>;
+<a name="336" href="#336">336</a>         <strong 
class="jxr_keyword">try</strong> {
+<a name="337" href="#337">337</a>             symmetricKey = 
WSSecurityUtil.prepareSecretKey(symEncAlgo, decryptedData);
+<a name="338" href="#338">338</a>         } <strong 
class="jxr_keyword">catch</strong> (IllegalArgumentException ex) {
+<a name="339" href="#339">339</a>             <strong 
class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
+<a name="340" href="#340">340</a>                 
WSSecurityException.UNSUPPORTED_ALGORITHM, <span 
class="jxr_string">"badEncAlgo"</span>, <strong 
class="jxr_keyword">new</strong> Object[]{symEncAlgo}
+<a name="341" href="#341">341</a>             );
+<a name="342" href="#342">342</a>         }
+<a name="343" href="#343">343</a> 
+<a name="344" href="#344">344</a>         <strong 
class="jxr_keyword">return</strong> ReferenceListProcessor.decryptEncryptedData(
+<a name="345" href="#345">345</a>             doc, dataRefURI, 
encryptedDataElement, symmetricKey, symEncAlgo
+<a name="346" href="#346">346</a>         );
+<a name="347" href="#347">347</a>     }
+<a name="348" href="#348">348</a>     
+<a name="349" href="#349">349</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="350" href="#350">350</a> <em class="jxr_javadoccomment">     * A 
method to check that the EncryptedKey is compliant with the BSP spec.</em>
+<a name="351" href="#351">351</a> <em class="jxr_javadoccomment">     * 
@throws WSSecurityException</em>
+<a name="352" href="#352">352</a> <em class="jxr_javadoccomment">     */</em>
+<a name="353" href="#353">353</a>     <strong 
class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> 
checkBSPCompliance(Element elem, String encAlgo) <strong 
class="jxr_keyword">throws</strong> WSSecurityException {
+<a name="354" href="#354">354</a>         String attribute = 
elem.getAttribute(<span class="jxr_string">"Type"</span>);
 <a name="355" href="#355">355</a>         <strong 
class="jxr_keyword">if</strong> (attribute != <strong 
class="jxr_keyword">null</strong> &amp;&amp; !<span 
class="jxr_string">""</span>.equals(attribute)) {
 <a name="356" href="#356">356</a>             <strong 
class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
 <a name="357" href="#357">357</a>                 
WSSecurityException.FAILED_CHECK, <span 
class="jxr_string">"badAttribute"</span>, <strong 
class="jxr_keyword">new</strong> Object[]{attribute}
 <a name="358" href="#358">358</a>             );
 <a name="359" href="#359">359</a>         }
-<a name="360" href="#360">360</a>         attribute = elem.getAttribute(<span 
class="jxr_string">"Encoding"</span>);
+<a name="360" href="#360">360</a>         attribute = elem.getAttribute(<span 
class="jxr_string">"MimeType"</span>);
 <a name="361" href="#361">361</a>         <strong 
class="jxr_keyword">if</strong> (attribute != <strong 
class="jxr_keyword">null</strong> &amp;&amp; !<span 
class="jxr_string">""</span>.equals(attribute)) {
 <a name="362" href="#362">362</a>             <strong 
class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
 <a name="363" href="#363">363</a>                 
WSSecurityException.FAILED_CHECK, <span 
class="jxr_string">"badAttribute"</span>, <strong 
class="jxr_keyword">new</strong> Object[]{attribute}
 <a name="364" href="#364">364</a>             );
 <a name="365" href="#365">365</a>         }
-<a name="366" href="#366">366</a>         attribute = elem.getAttribute(<span 
class="jxr_string">"Recipient"</span>);
+<a name="366" href="#366">366</a>         attribute = elem.getAttribute(<span 
class="jxr_string">"Encoding"</span>);
 <a name="367" href="#367">367</a>         <strong 
class="jxr_keyword">if</strong> (attribute != <strong 
class="jxr_keyword">null</strong> &amp;&amp; !<span 
class="jxr_string">""</span>.equals(attribute)) {
 <a name="368" href="#368">368</a>             <strong 
class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
 <a name="369" href="#369">369</a>                 
WSSecurityException.FAILED_CHECK, <span 
class="jxr_string">"badAttribute"</span>, <strong 
class="jxr_keyword">new</strong> Object[]{attribute}
 <a name="370" href="#370">370</a>             );
 <a name="371" href="#371">371</a>         }
-<a name="372" href="#372">372</a>         
-<a name="373" href="#373">373</a>         <em class="jxr_comment">// 
EncryptionAlgorithm must be RSA15, or RSAOEP.</em>
-<a name="374" href="#374">374</a>         <strong 
class="jxr_keyword">if</strong> (!WSConstants.KEYTRANSPORT_RSA15.equals(encAlgo)
-<a name="375" href="#375">375</a>             &amp;&amp; 
!WSConstants.KEYTRANSPORT_RSAOEP.equals(encAlgo)) {
-<a name="376" href="#376">376</a>             <strong 
class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
-<a name="377" href="#377">377</a>                 
WSSecurityException.INVALID_SECURITY, <span 
class="jxr_string">"badEncAlgo"</span>, <strong 
class="jxr_keyword">new</strong> Object[]{encAlgo}
-<a name="378" href="#378">378</a>             );
-<a name="379" href="#379">379</a>         }
-<a name="380" href="#380">380</a>     }
-<a name="381" href="#381">381</a>   
-<a name="382" href="#382">382</a> }
+<a name="372" href="#372">372</a>         attribute = elem.getAttribute(<span 
class="jxr_string">"Recipient"</span>);
+<a name="373" href="#373">373</a>         <strong 
class="jxr_keyword">if</strong> (attribute != <strong 
class="jxr_keyword">null</strong> &amp;&amp; !<span 
class="jxr_string">""</span>.equals(attribute)) {
+<a name="374" href="#374">374</a>             <strong 
class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
+<a name="375" href="#375">375</a>                 
WSSecurityException.FAILED_CHECK, <span 
class="jxr_string">"badAttribute"</span>, <strong 
class="jxr_keyword">new</strong> Object[]{attribute}
+<a name="376" href="#376">376</a>             );
+<a name="377" href="#377">377</a>         }
+<a name="378" href="#378">378</a>         
+<a name="379" href="#379">379</a>         <em class="jxr_comment">// 
EncryptionAlgorithm must be RSA15, or RSAOEP.</em>
+<a name="380" href="#380">380</a>         <strong 
class="jxr_keyword">if</strong> (!WSConstants.KEYTRANSPORT_RSA15.equals(encAlgo)
+<a name="381" href="#381">381</a>             &amp;&amp; 
!WSConstants.KEYTRANSPORT_RSAOEP.equals(encAlgo)) {
+<a name="382" href="#382">382</a>             <strong 
class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
+<a name="383" href="#383">383</a>                 
WSSecurityException.INVALID_SECURITY, <span 
class="jxr_string">"badEncAlgo"</span>, <strong 
class="jxr_keyword">new</strong> Object[]{encAlgo}
+<a name="384" href="#384">384</a>             );
+<a name="385" href="#385">385</a>         }
+<a name="386" href="#386">386</a>     }
+<a name="387" href="#387">387</a>   
+<a name="388" href="#388">388</a> }
 </pre>
 <hr/><div id="footer">This page was automatically generated by <a 
href="http://maven.apache.org/";>Maven</a></div></body>
 </html>

Modified: 
webservices/wss4j/site/xref/org/apache/ws/security/processor/SecurityContextTokenProcessor.html
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/processor/SecurityContextTokenProcessor.html?rev=1210847&r1=1210846&r2=1210847&view=diff
==============================================================================
--- 
webservices/wss4j/site/xref/org/apache/ws/security/processor/SecurityContextTokenProcessor.html
 (original)
+++ 
webservices/wss4j/site/xref/org/apache/ws/security/processor/SecurityContextTokenProcessor.html
 Tue Dec  6 10:23:54 2011
@@ -77,57 +77,67 @@
 <a name="67" href="#67">67</a>              
result.put(WSSecurityEngineResult.TAG_ID, sct.getID());
 <a name="68" href="#68">68</a>              
result.put(WSSecurityEngineResult.TAG_SECRET, 
returnedCredential.getSecretKey());
 <a name="69" href="#69">69</a>          } <strong 
class="jxr_keyword">else</strong> {
-<a name="70" href="#70">70</a>              byte[] secret = 
getSecret(data.getCallbackHandler(), sct);
-<a name="71" href="#71">71</a>              
result.put(WSSecurityEngineResult.TAG_ID, sct.getID());
-<a name="72" href="#72">72</a>              
result.put(WSSecurityEngineResult.TAG_SECRET, secret);
-<a name="73" href="#73">73</a>          }
-<a name="74" href="#74">74</a>          
-<a name="75" href="#75">75</a>          wsDocInfo.addTokenElement(elem);
-<a name="76" href="#76">76</a>          wsDocInfo.addResult(result);
-<a name="77" href="#77">77</a>          <strong 
class="jxr_keyword">return</strong> java.util.Collections.singletonList(result);
-<a name="78" href="#78">78</a>      }
-<a name="79" href="#79">79</a>  
-<a name="80" href="#80">80</a>      <em class="jxr_javadoccomment">/**</em>
-<a name="81" href="#81">81</a>  <em class="jxr_javadoccomment">     * Get the 
secret from the provided callback handler and return it.</em>
-<a name="82" href="#82">82</a>  <em class="jxr_javadoccomment">     * </em>
-<a name="83" href="#83">83</a>  <em class="jxr_javadoccomment">     * @param 
cb</em>
-<a name="84" href="#84">84</a>  <em class="jxr_javadoccomment">     * @param 
sct</em>
-<a name="85" href="#85">85</a>  <em class="jxr_javadoccomment">     * @return 
The key collected using the callback handler</em>
-<a name="86" href="#86">86</a>  <em class="jxr_javadoccomment">     */</em>
-<a name="87" href="#87">87</a>      <strong 
class="jxr_keyword">private</strong> byte[] getSecret(CallbackHandler cb, <a 
href="../../../../../org/apache/ws/security/message/token/SecurityContextToken.html">SecurityContextToken</a>
 sct)
-<a name="88" href="#88">88</a>          <strong 
class="jxr_keyword">throws</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>
 {
-<a name="89" href="#89">89</a>  
-<a name="90" href="#90">90</a>          <strong 
class="jxr_keyword">if</strong> (cb == <strong 
class="jxr_keyword">null</strong>) {
-<a name="91" href="#91">91</a>              <strong 
class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(WSSecurityException.FAILURE,
 <span class="jxr_string">"noCallback"</span>);
-<a name="92" href="#92">92</a>          }
-<a name="93" href="#93">93</a>  
-<a name="94" href="#94">94</a>          <a 
href="../../../../../org/apache/ws/security/WSPasswordCallback.html">WSPasswordCallback</a>
 callback = 
-<a name="95" href="#95">95</a>              <strong 
class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSPasswordCallback.html">WSPasswordCallback</a>(
-<a name="96" href="#96">96</a>                  sct.getIdentifier(), 
WSPasswordCallback.SECURITY_CONTEXT_TOKEN
-<a name="97" href="#97">97</a>              );
-<a name="98" href="#98">98</a>          <strong 
class="jxr_keyword">try</strong> {
-<a name="99" href="#99">99</a>              Callback[] callbacks = <strong 
class="jxr_keyword">new</strong> Callback[]{callback};
-<a name="100" href="#100">100</a>             cb.handle(callbacks);
-<a name="101" href="#101">101</a>         } <strong 
class="jxr_keyword">catch</strong> (IOException e) {
-<a name="102" href="#102">102</a>             <strong 
class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
-<a name="103" href="#103">103</a>                 WSSecurityException.FAILURE, 
-<a name="104" href="#104">104</a>                 <span 
class="jxr_string">"noKey"</span>,
-<a name="105" href="#105">105</a>                 <strong 
class="jxr_keyword">new</strong> Object[] {sct.getIdentifier()}, 
-<a name="106" href="#106">106</a>                 e
-<a name="107" href="#107">107</a>             );
-<a name="108" href="#108">108</a>         } <strong 
class="jxr_keyword">catch</strong> (UnsupportedCallbackException e) {
-<a name="109" href="#109">109</a>             <strong 
class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
-<a name="110" href="#110">110</a>                 WSSecurityException.FAILURE, 
-<a name="111" href="#111">111</a>                 <span 
class="jxr_string">"noKey"</span>,
-<a name="112" href="#112">112</a>                 <strong 
class="jxr_keyword">new</strong> Object[] {sct.getIdentifier()}, 
-<a name="113" href="#113">113</a>                 e
-<a name="114" href="#114">114</a>             );
-<a name="115" href="#115">115</a>         }
-<a name="116" href="#116">116</a> 
-<a name="117" href="#117">117</a>         <strong 
class="jxr_keyword">return</strong> callback.getKey();
-<a name="118" href="#118">118</a>     }
-<a name="119" href="#119">119</a> 
-<a name="120" href="#120">120</a> }
+<a name="70" href="#70">70</a>              String id = sct.getID();
+<a name="71" href="#71">71</a>              <strong 
class="jxr_keyword">if</strong> (id.charAt(0) == '#') {
+<a name="72" href="#72">72</a>                  id = id.substring(1);
+<a name="73" href="#73">73</a>              }
+<a name="74" href="#74">74</a>              byte[] secret = <strong 
class="jxr_keyword">null</strong>;
+<a name="75" href="#75">75</a>              <strong 
class="jxr_keyword">try</strong> {
+<a name="76" href="#76">76</a>                  secret = 
getSecret(data.getCallbackHandler(), sct.getIdentifier());
+<a name="77" href="#77">77</a>              } <strong 
class="jxr_keyword">catch</strong> (WSSecurityException ex) {
+<a name="78" href="#78">78</a>                  secret = 
getSecret(data.getCallbackHandler(), id);
+<a name="79" href="#79">79</a>              }
+<a name="80" href="#80">80</a>              <strong 
class="jxr_keyword">if</strong> (secret == <strong 
class="jxr_keyword">null</strong> || secret.length == 0) {
+<a name="81" href="#81">81</a>                  secret = 
getSecret(data.getCallbackHandler(), id);
+<a name="82" href="#82">82</a>              }
+<a name="83" href="#83">83</a>              
result.put(WSSecurityEngineResult.TAG_ID, sct.getID());
+<a name="84" href="#84">84</a>              
result.put(WSSecurityEngineResult.TAG_SECRET, secret);
+<a name="85" href="#85">85</a>          }
+<a name="86" href="#86">86</a>          
+<a name="87" href="#87">87</a>          wsDocInfo.addTokenElement(elem);
+<a name="88" href="#88">88</a>          wsDocInfo.addResult(result);
+<a name="89" href="#89">89</a>          <strong 
class="jxr_keyword">return</strong> java.util.Collections.singletonList(result);
+<a name="90" href="#90">90</a>      }
+<a name="91" href="#91">91</a>  
+<a name="92" href="#92">92</a>      <em class="jxr_javadoccomment">/**</em>
+<a name="93" href="#93">93</a>  <em class="jxr_javadoccomment">     * Get the 
secret from the provided callback handler and return it.</em>
+<a name="94" href="#94">94</a>  <em class="jxr_javadoccomment">     * </em>
+<a name="95" href="#95">95</a>  <em class="jxr_javadoccomment">     * @param 
cb</em>
+<a name="96" href="#96">96</a>  <em class="jxr_javadoccomment">     * @param 
sct</em>
+<a name="97" href="#97">97</a>  <em class="jxr_javadoccomment">     * @return 
The key collected using the callback handler</em>
+<a name="98" href="#98">98</a>  <em class="jxr_javadoccomment">     */</em>
+<a name="99" href="#99">99</a>      <strong 
class="jxr_keyword">private</strong> byte[] getSecret(CallbackHandler cb, 
String identifier)
+<a name="100" href="#100">100</a>         <strong 
class="jxr_keyword">throws</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>
 {
+<a name="101" href="#101">101</a> 
+<a name="102" href="#102">102</a>         <strong 
class="jxr_keyword">if</strong> (cb == <strong 
class="jxr_keyword">null</strong>) {
+<a name="103" href="#103">103</a>             <strong 
class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(WSSecurityException.FAILURE,
 <span class="jxr_string">"noCallback"</span>);
+<a name="104" href="#104">104</a>         }
+<a name="105" href="#105">105</a> 
+<a name="106" href="#106">106</a>         <a 
href="../../../../../org/apache/ws/security/WSPasswordCallback.html">WSPasswordCallback</a>
 callback = 
+<a name="107" href="#107">107</a>             <strong 
class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSPasswordCallback.html">WSPasswordCallback</a>(identifier,
 WSPasswordCallback.SECURITY_CONTEXT_TOKEN);
+<a name="108" href="#108">108</a>         <strong 
class="jxr_keyword">try</strong> {
+<a name="109" href="#109">109</a>             Callback[] callbacks = <strong 
class="jxr_keyword">new</strong> Callback[]{callback};
+<a name="110" href="#110">110</a>             cb.handle(callbacks);
+<a name="111" href="#111">111</a>         } <strong 
class="jxr_keyword">catch</strong> (IOException e) {
+<a name="112" href="#112">112</a>             <strong 
class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
+<a name="113" href="#113">113</a>                 WSSecurityException.FAILURE, 
+<a name="114" href="#114">114</a>                 <span 
class="jxr_string">"noKey"</span>,
+<a name="115" href="#115">115</a>                 <strong 
class="jxr_keyword">new</strong> Object[] {identifier}, 
+<a name="116" href="#116">116</a>                 e
+<a name="117" href="#117">117</a>             );
+<a name="118" href="#118">118</a>         } <strong 
class="jxr_keyword">catch</strong> (UnsupportedCallbackException e) {
+<a name="119" href="#119">119</a>             <strong 
class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a 
href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
+<a name="120" href="#120">120</a>                 WSSecurityException.FAILURE, 
+<a name="121" href="#121">121</a>                 <span 
class="jxr_string">"noKey"</span>,
+<a name="122" href="#122">122</a>                 <strong 
class="jxr_keyword">new</strong> Object[] {identifier}, 
+<a name="123" href="#123">123</a>                 e
+<a name="124" href="#124">124</a>             );
+<a name="125" href="#125">125</a>         }
+<a name="126" href="#126">126</a> 
+<a name="127" href="#127">127</a>         <strong 
class="jxr_keyword">return</strong> callback.getKey();
+<a name="128" href="#128">128</a>     }
+<a name="129" href="#129">129</a> 
+<a name="130" href="#130">130</a> }
 </pre>
 <hr/><div id="footer">This page was automatically generated by <a 
href="http://maven.apache.org/";>Maven</a></div></body>
 </html>


Reply via email to