Maks3w/xmlseclibs — pull request #1 by EvgenyNikolaev (2013-04-18 12:58:40+00:00)
Title: I'm not sure, but I think this is a bug

first set key as a certificate string
openssl_x509_export($this->key, $str_cert);
...
$this->key = $str_cert;

and then try to get privatekey from cert string
$this->key = openssl_get_privatekey($this->key, $this->passphrase);

If I'm not right, then sorry for wasting your time.