Пытаюсь загрузить привавтный ключ самым обычным способом и зашифровать файл.
public function loadPrivateKey($fileName, $password = null){
if(!is_file($fileName))
throw new SignException('Private key not found', SignException::KEY_NOT_FOUND);
$fileContent = file_get_contents($fileName);
if(!is_null($password))
$this->prvKey = openssl_get_privatekey($fileContent, $password);
else
$this->prvKey = openssl_get_privatekey($fileContent);
if(!empty(openssl_error_string()))
throw new SignException('OpenSSL Error: '.openssl_error_string());
if(!is_resource($this->prvKey))
throw new SignException('Private key is not resourse', SignException::EXTERNAL_ERROR);
}
openssl_error_string() возвращает ошибку :openssl в php.ini прокомментирован (extension=php_openssl.dll)error:2006D002:BIO routines:BIO_new_file:system lib
В чем может быть проблема? Спасибо.
