title: Trying to create a certificate through openssl using shell_exec in PHP
body: <p>I'm actually working in a small project for myself, is a Web Application that creates Certificate Signing Request also the certificate <code>.pem/.crt</code> and its <code>.key</code>.</p>
  
  <p>The actual problem is that I'm trying to run:</p>
  
  <pre><code>shell_exec(openssl ca -config ../openssl.cnf -in $CSR_FILE -out $CRT_FILE)
  </code></pre>
  
  <p>And I find the problem that after running this command is asking for my CA passphrase, and later on answering Yes twice to accept the creation of the certificate. I can't figure it out how to make it work. I've been stuck with that for almost three days, neither Google or Stack Overflow has an anwser.</p>
  
  <p>I've tried to run the command and add another <code>shell_exec(passphrase)</code> also, passing passphrase and "y" twice this way.</p>
  
  <pre><code>shell_exec("openssl....","passphrase","y","y")
  </code></pre>
  
  <p>Thank you very much, i appreciate all help.</p>