Страница 1 из 1

Проблема с OpenSSL

Добавлено: 29 мар 2016, 14:01
emotion_tigran
Добрый день!

Пытаюсь загрузить привавтный ключ самым обычным способом и зашифровать файл.
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() возвращает ошибку :
error:2006D002:BIO routines:BIO_new_file:system lib
openssl в php.ini прокомментирован (extension=php_openssl.dll)

В чем может быть проблема? Спасибо.