lib/cose/algorithm/signature_algorithm.rb in cose-1.1.0 vs lib/cose/algorithm/signature_algorithm.rb in cose-1.2.0

- old
+ new

@@ -18,17 +18,21 @@ end private def valid_signature?(key, signature, verification_data) - signature_algorithm = signature_algorithm_class.new(hash_function: hash_function) + signature_algorithm = signature_algorithm_class.new(**signature_algorithm_parameters) signature_algorithm.verify_key = to_pkey(key) begin signature_algorithm.verify(signature, verification_data) rescue OpenSSL::SignatureAlgorithm::Error false end + end + + def signature_algorithm_parameters + { hash_function: hash_function } end def to_cose_key(key) case key when COSE::Key::Base