Creating a EncryptedKey for SubjectConfirmation
Brent Putman
putmanb at georgetown.edu
Sat Jun 22 16:19:13 EDT 2019
On 6/20/19 8:00 PM, Stefan Rasmusson wrote:
> Im trying to encrypt a key to be used in a holder of key subject
> confirmation. This EncryptedKey will be contained in a key info
> element inside the subject confirmation data. All my research only
> turns up how to create a keyinfo with encrypted key when encrypting
> another element.
>
> Any ideas on how this could be done?
>
org.opensaml.xmlsec.encryption.support.Encrypter contains a couple of
public encryptKey(java.security.Key, ...) methods, which support
encrypting any Java Key to an OpenSAML EncryptedKey. Then you would
just build a KeyInfo as usual with its builder and add the EncryptedKey
via the KeyInfo#getEncrypedKeys().
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20190622/7371606b/attachment.html>
More information about the dev
mailing list