title: Digital signature verification with OpenSSL
body: <p>How can I verify CMS/PKCS #7 messages using OpenSSL in Ruby?<br>
  PKCS #7 message is used as a digital signature for user messages, so I need to sign a new user message and verify the incoming one.
  I haven't found anything helpfull in <a href="http://ruby-doc.org/ruby-1.9/classes/OpenSSL/PKCS7.html" rel="noreferrer">documentation</a> and google.
  I have found few code samples for signing, but nothing for verifying:</p>
  
  <pre><code>signed = OpenSSL::PKCS7::sign(crt, key, data, [], OpenSSL::PKCS7::DETACHED)
  </code></pre>