File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -195,17 +195,13 @@ def get_idp_cert_multi
195195
196196 certs = { :signing => [ ] , :encryption => [ ] }
197197
198- if idp_cert_multi . key? ( :signing ) and not idp_cert_multi [ :signing ] . empty?
199- idp_cert_multi [ :signing ] . each do |idp_cert |
200- formatted_cert = OneLogin ::RubySaml ::Utils . format_cert ( idp_cert )
201- certs [ :signing ] . push ( OpenSSL ::X509 ::Certificate . new ( formatted_cert ) )
202- end
203- end
198+ [ :signing , :encryption ] . each do |type |
199+ certs_for_type = idp_cert_multi [ type ] || idp_cert_multi [ type . to_s ]
200+ next if !certs_for_type || certs_for_type . empty?
204201
205- if idp_cert_multi . key? ( :encryption ) and not idp_cert_multi [ :encryption ] . empty?
206- idp_cert_multi [ :encryption ] . each do |idp_cert |
202+ certs_for_type . each do |idp_cert |
207203 formatted_cert = OneLogin ::RubySaml ::Utils . format_cert ( idp_cert )
208- certs [ :encryption ] . push ( OpenSSL ::X509 ::Certificate . new ( formatted_cert ) )
204+ certs [ type ] . push ( OpenSSL ::X509 ::Certificate . new ( formatted_cert ) )
209205 end
210206 end
211207
You can’t perform that action at this time.
0 commit comments