From bcfbd2dee56eef910b4ede3e9672a3ca7fdab8d0 Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Fri, 25 Sep 2020 16:28:11 -0600 Subject: [PATCH] Remove Unused Code Issue gh-8877 --- ...gistrationBuilderHttpMessageConverter.java | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/registration/OpenSamlRelyingPartyRegistrationBuilderHttpMessageConverter.java b/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/registration/OpenSamlRelyingPartyRegistrationBuilderHttpMessageConverter.java index 167a19b8cf..1e43aec582 100644 --- a/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/registration/OpenSamlRelyingPartyRegistrationBuilderHttpMessageConverter.java +++ b/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/registration/OpenSamlRelyingPartyRegistrationBuilderHttpMessageConverter.java @@ -171,32 +171,6 @@ public class OpenSamlRelyingPartyRegistrationBuilderHttpMessageConverter "Metadata response is missing a SingleSignOnService, necessary for sending AuthnRequests"); } - private List getVerification(IDPSSODescriptor idpssoDescriptor) { - List verification = new ArrayList<>(); - for (KeyDescriptor keyDescriptor : idpssoDescriptor.getKeyDescriptors()) { - if (keyDescriptor.getUse().equals(UsageType.SIGNING)) { - List certificates = certificates(keyDescriptor); - for (X509Certificate certificate : certificates) { - verification.add(Saml2X509Credential.verification(certificate)); - } - } - } - return verification; - } - - private List getEncryption(IDPSSODescriptor idpssoDescriptor) { - List encryption = new ArrayList<>(); - for (KeyDescriptor keyDescriptor : idpssoDescriptor.getKeyDescriptors()) { - if (keyDescriptor.getUse().equals(UsageType.ENCRYPTION)) { - List certificates = certificates(keyDescriptor); - for (X509Certificate certificate : certificates) { - encryption.add(Saml2X509Credential.encryption(certificate)); - } - } - } - return encryption; - } - private List certificates(KeyDescriptor keyDescriptor) { try { return KeyInfoSupport.getCertificates(keyDescriptor.getKeyInfo());