[java-opensaml] 01/01: Fix bug in profile action related to direct data encryption.
Brent Putman
putmanb at georgetown.edu
Tue Mar 2 00:19:06 UTC 2021
This is an automated email from the git hooks/post-receive script.
putmanb pushed a commit to branch main
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=069b7e70d1c9c882739bf7879fd1beb0182f57a6
commit 069b7e70d1c9c882739bf7879fd1beb0182f57a6
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Mon Mar 1 18:35:10 2021 -0500
Fix bug in profile action related to direct data encryption.
Profile action should only supply a KeyEncryptionParameters instance to
the Encrypter if there is actually a key transport credential.
If there isn't, the relevant slots on the KEK params instance are null
and this is fatal to the encryption op.
---
.../org/opensaml/saml/saml2/profile/impl/AbstractEncryptAction.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/profile/impl/AbstractEncryptAction.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/profile/impl/AbstractEncryptAction.java
index 15ba53dc7..6cd6cf22f 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/profile/impl/AbstractEncryptAction.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/profile/impl/AbstractEncryptAction.java
@@ -188,7 +188,9 @@ public abstract class AbstractEncryptAction extends AbstractConditionalProfileAc
? recipientLookupStrategy.apply(profileRequestContext) : null;
final DataEncryptionParameters dataParams = new DataEncryptionParameters(params);
final List<KeyEncryptionParameters> keyParams = new ArrayList<>();
- keyParams.add(new KeyEncryptionParameters(params, recipient));
+ if (params.getKeyTransportEncryptionCredential() != null) {
+ keyParams.add(new KeyEncryptionParameters(params, recipient));
+ }
if (encryptToSelf.test(profileRequestContext)) {
log.debug("{} Encryption to self was indicated", getLogPrefix());
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list