How to refer certificate element from KeyInfo in Apache Santuario

Viewed 24

I want to create a xml signature with Apache Santuario and KeyInfo should refer the certificate element(BinarySecurityToken) like below

<ds:KeyInfo Id="KI-FBB16D2886CB8FE58213384666945692"> <wsse:SecurityTokenReference wsu:Id="STR-FBB16D2886CB8FE58213384666945693"> <wsse:Reference URI="#X509-FBB16D2886CB8FE58213384666945491"
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token- profile1.0#X509v3" /> (</wsse:SecurityTokenReference> </ds:KeyInfo>

But I can't find any support in KeyInfo of Santuario other than adding the certificate and public key . It will add the certificate as embedded and not a reference.

1 Answers

I was able to fix this using WSS4J directly . With Santuario this is not possible as I noticed.

Related