title: verify signature from google pay?
body: <p>I use openssl_verify in php to verify signature from my app </p>
  
  <pre><code>&lt;?php
  // $data and $signature are assumed to contain the data and the signature
  
  // fetch public key from certificate and ready it
  $pubkeyid = openssl_pkey_get_public("file://src/openssl-0.9.6/demos/sign/cert.pem");
  
  // state whether signature is okay or not
  $ok = openssl_verify($data, $signature, $pubkeyid);
  if ($ok == 1) {
      echo "good";
  } elseif ($ok == 0) {
      echo "bad";
  } else {
      echo "ugly, error checking signature";
  }
  // free the key from memory
  openssl_free_key($pubkeyid);
  ?&gt;
  </code></pre>
  
  <p>my php build-in function require $pubkeyid as file pem but google send me a public key as String. They said <code>Note:To find the public key portion of this key pair, open your application's details in the Developer Console, then click on Services &amp; APIs, and look at the field titled Your License Key for This Application.</code></p>
  
  <p>My question is how to create file cert.pem from publickey String (public key which google sent me)
  Thank you so much !</p>