You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Christian Geuer-Pollmann <ge...@nue.et-inf.uni-siegen.de> on 2002/09/25 14:40:45 UTC

Re: How can I get KeyInfo?


--On Monday, September 16, 2002 2:58 PM +0900 
"=?ks_c_5601-1987?B?bHVrZSAtIMPWwaTB+A==?=" <lu...@innodigital.co.kr> wrote:

> I want to append KeyInfo to some Element as child .
>
> For example,
>
> <ServiceBinding>
>     <Certificate>
>         <KeyInfo>
>             ....
>         </KeyInfo>
>     </Certificate>
> </ServiceBinding>
>
> How can I use xml-security ?

Hi,

// (1) create a KeyInfo object.
KeyInfo ki = new KeyInfo(doc);

// (2) add to the KeyInfo whatever you have to
ki.addKeyName("SymmetricKey #352");

// (3) add the KeyInfo element to your own one:
certificateElem.appendChild(ki.getElement());



Christian