title: How to verify CA using PHP's OpenSSL extension?
body: <p>In the command line, I can verify that certificate is issued by trusted CA by typing</p>
  
  <blockquote>
    <p>openssl verify mycert.pem</p>
  </blockquote>
  
  <p>How do I do same with PHP's OpenSSL library? PHP has an <a href="http://us3.php.net/openssl_verify" rel="nofollow noreferrer"><code>openssl_verify</code></a> function which takes many extra parameters:</p>
  
  <pre><code>data , string $signature , mixed $pub_key_id
  </code></pre>
  
  <p>How do I repeat that simple command line operation with corresponding PHP function?</p>