lib/fido_metadata/statement.rb in fido_metadata-0.1.0 vs lib/fido_metadata/statement.rb in fido_metadata-0.2.0

- old
+ new

@@ -51,7 +51,15 @@ # Lazy load certificates for compatibility ActiveSupport::Cache. Can be removed once we require a version of # OpenSSL which includes https://github.com/ruby/openssl/pull/281 def attestation_root_certificates Coercer::Certificates.coerce(@attestation_root_certificates) end + + def trust_store + trust_store = OpenSSL::X509::Store.new + attestation_root_certificates.each do |certificate| + trust_store.add_cert(certificate) + end + trust_store + end end end