Advertisement
Guest User

Untitled

a guest
Jul 28th, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. protected function sign($source, $certificate, $privkey) {
  2.         $descriptorspec = array(
  3.             0 => array("pipe", "r"), // stdin is a pipe that the child will read from
  4.             1 => array("pipe", "w"), // stdout is a pipe that the child will write to
  5.             2 => array("pipe", "w")); // stderr is a file to write to
  6.  
  7.         $process = proc_open(
  8.             'openssl smime -sign -signer ' . $certificate .
  9.                     ' -inkey ' . $privkey .
  10.                     ' -nochain -nocerts -outform PEM -nodetach',
  11.             $descriptorspec, $pipes);
  12. ...
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement