File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ def parse(idp_metadata, options = {})
4949 settings . idp_slo_target_binding ||= single_logout_service_binding ( settings . idp_slo_target_parse_binding_priority )
5050 settings . idp_slo_target_url = single_logout_service_url ( settings . idp_slo_target_binding )
5151 settings . idp_cert = certificate_base64
52- settings . idp_cert_fingerprint = fingerprint
52+ settings . idp_cert_fingerprint = fingerprint ( settings . idp_cert_fingerprint_algorithm )
5353 end
5454 end
5555
@@ -198,11 +198,13 @@ def certificate
198198
199199 # @return [String|nil] the SHA-1 fingerpint of the X509Certificate if it exists
200200 #
201- def fingerprint
201+ def fingerprint ( fingerprint_algorithm )
202202 @fingerprint ||= begin
203203 if certificate
204204 cert = OpenSSL ::X509 ::Certificate . new ( certificate )
205- Digest ::SHA1 . hexdigest ( cert . to_der ) . upcase . scan ( /../ ) . join ( ":" )
205+
206+ fingerprint_alg = XMLSecurity ::BaseDocument . new . algorithm ( fingerprint_algorithm ) . new
207+ fingerprint_alg . hexdigest ( cert . to_der ) . upcase . scan ( /../ ) . join ( ":" )
206208 end
207209 end
208210 end
You can’t perform that action at this time.
0 commit comments