File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -198,17 +198,13 @@ def get_idp_cert_multi
198198
199199 certs = { :signing => [ ] , :encryption => [ ] }
200200
201- if idp_cert_multi . key? ( :signing ) and not idp_cert_multi [ :signing ] . empty?
202- idp_cert_multi [ :signing ] . each do |idp_cert |
203- formatted_cert = OneLogin ::RubySaml ::Utils . format_cert ( idp_cert )
204- certs [ :signing ] . push ( OpenSSL ::X509 ::Certificate . new ( formatted_cert ) )
205- end
206- end
201+ [ :signing , :encryption ] . each do |type |
202+ certs_for_type = idp_cert_multi [ type ] || idp_cert_multi [ type . to_s ]
203+ next if !certs_for_type || certs_for_type . empty?
207204
208- if idp_cert_multi . key? ( :encryption ) and not idp_cert_multi [ :encryption ] . empty?
209- idp_cert_multi [ :encryption ] . each do |idp_cert |
205+ certs_for_type . each do |idp_cert |
210206 formatted_cert = OneLogin ::RubySaml ::Utils . format_cert ( idp_cert )
211- certs [ :encryption ] . push ( OpenSSL ::X509 ::Certificate . new ( formatted_cert ) )
207+ certs [ type ] . push ( OpenSSL ::X509 ::Certificate . new ( formatted_cert ) )
212208 end
213209 end
214210
You can’t perform that action at this time.
0 commit comments