Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

OpenSSL::PKey::DSA#sysverify

dsa.sysverify(digest, sig) → true | false

Verifies whether the signature is valid given the message digest input. It does so by validating sig using the public key of this DSA instance.

Parameters

  • digest is a message digest of the original input data to be signed

  • sig is a DSA signature value

Example

Example
dsa = OpenSSL::PKey::DSA.new(2048)
doc = "Sign me"
digest = OpenSSL::Digest.digest('SHA1', doc)
sig = dsa.syssign(digest)
puts dsa.sysverify(digest, sig) # => true
See also #syssign #to_der #set_pqg #to_pem also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1