<div dir="ltr"><div><div><div>Hi,<br><br></div>I am using OpenSaml library and xmltooling library for implementing our SP. I have message decryption working fine when using Shibboleth IdP. When we tried a different IdP, the decryption failed. After digging in, I understood that it fails because it was not able to resolve a `Credential` for decrypting the &lt;EncryptedKey&gt; element. <br><br>In case of Shibboleth IdP&#39;s response, the &lt;EcryptedKey&gt; element contains the &lt;ds:KeyInfo&gt; element as a child that contains the &lt;X509Certificate&gt; that helps resolve a credential from `LocalKeyInfoCredentialResolver`. In short, this is the exact case from the complex example for Decryption listed in the OSTwoUser manual <a href="https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoUserManJavaXMLEncryption" target="_blank">here</a>.<br><br></div><div>In case of the third party IdP&#39;s response, the &lt;EncryptedKey&gt; element does not contain the &lt;ds:KeyInfo&gt; element as a child(but the &lt;X509Data&gt; element with &lt;X509Certificate&gt; is present as a peer element of &lt;EcryptedKey&gt;). Decryption fails in this case as it was not able to resolve a the credential from the supplied LocalKeyInfoCredentialResolver.<br><br></div><div>However, when I use a StaticKeyInfoCredentialResolver(SKICR) in case of LocalKeyInfoCredentialResolver(LKICR), the decryption succeeds. Is there a way for the Decrypter to try both, i.e. try to resolve using LKICR, and if it fails, try SKICR? <br><br></div><div>Sorry for the long post, but I thought that something along the lines of ChainingKeyInfoCredentialResolver should exist, but as it does not, either the above case is invalid and I&#39;m missing something or there is some other way to achieve this.<br><br></div><div>Thank you,<br></div><div>-Sundeep<br></div><div><br></div><div><br></div><div><br></div><br></div></div>