I am trying to configure my signature for a SOAP message. The only part I left is to populate KeyInfo as such:
> <KeyInfo>
> <wsse:SecurityTokenReference>
> <wsse:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</wsse:KeyIdentifier>
> </wsse:SecurityTokenReference>
> </KeyInfo>
I tried several methods, but I could not achieve this with KeyInfo and KeyInfoFactory.
If this is the wrong way to do this, how can I make sure KeyInfo is populated as part of my signature?
XMLSignature signature = sigFactory.newXMLSignature(signedinfo,keyinfo)
I can add information to the X509, but I see no way to add a SecurityTokenReference
source
share