[java-opensaml] branch main updated: Guard a null key extraction.

Scott Cantor cantor.2 at osu.edu
Fri Mar 31 15:53:23 UTC 2023


This is an automated email from the git hooks/post-receive script.

scantor 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=15bb79df9fe49329b800f0c0e6b2d49f84258ef7

The following commit(s) were added to refs/heads/main by this push:
     new 15bb79df9 Guard a null key extraction.
15bb79df9 is described below

commit 15bb79df9fe49329b800f0c0e6b2d49f84258ef7
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Mar 31 11:53:21 2023 -0400

    Guard a null key extraction.
---
 .../httpclient/impl/BasicHttpClientSecurityParametersResolver.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/opensaml-security-impl/src/main/java/org/opensaml/security/httpclient/impl/BasicHttpClientSecurityParametersResolver.java b/opensaml-security-impl/src/main/java/org/opensaml/security/httpclient/impl/BasicHttpClientSecurityParametersResolver.java
index 2942f26b9..239208a79 100644
--- a/opensaml-security-impl/src/main/java/org/opensaml/security/httpclient/impl/BasicHttpClientSecurityParametersResolver.java
+++ b/opensaml-security-impl/src/main/java/org/opensaml/security/httpclient/impl/BasicHttpClientSecurityParametersResolver.java
@@ -146,7 +146,8 @@ public class BasicHttpClientSecurityParametersResolver implements HttpClientSecu
         if (log.isDebugEnabled()) {
             log.debug("Resolved HttpClientSecurityParameters:");
             
-            final Key clientTLSKey = CredentialSupport.extractSigningKey(params.getClientTLSCredential());
+            final X509Credential clientTLSCred = params.getClientTLSCredential();
+            final Key clientTLSKey = clientTLSCred != null ? CredentialSupport.extractSigningKey(clientTLSCred) : null;
             if (clientTLSKey != null) {
                 log.debug("\tClient TLS credential with key algorithm: {}", clientTLSKey.getAlgorithm());
             } else {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list