public function getRsaPrivateKey()
    {
        if ($this->rsaPrivateKey) {
            return $this->rsaPrivateKey;
        }

        if (!file_exists($this->rsaPrivateKeyFile)) {
            throw new CredentialsException('Could not read the private key file.');
        }

        $this->rsaPrivateKey = openssl_pkey_get_private(file_get_contents($this->rsaPrivateKeyFile));

        if (!$this->rsaPrivateKey) {
            throw new CredentialsException('Cannot access private key for signing');
        }

        return $this->rsaPrivateKey;
    }
public function getRsaPrivateKey()
    {
        if ($this->rsaPrivateKey) {
            return $this->rsaPrivateKey;
        }

        if (!file_exists($this->rsaPrivateKeyFile)) {
            throw new CredentialsException('Could not read the private key file.');
        }

        $this->rsaPrivateKey = openssl_pkey_get_private(file_get_contents($this->rsaPrivateKeyFile));

        if (!$this->rsaPrivateKey) {
            throw new CredentialsException('Cannot access private key for signing');
        }

        return $this->rsaPrivateKey;
    }
public function getRsaPrivateKey ( ) { if ( $ this -> rsaPrivateKey ) { return $ this -> rsaPrivateKey ; } if ( ! file_exists ( $ this -> rsaPrivateKeyFile ) ) { throw new CredentialsException ( 'Could not read the private key file.' ) ; } $ this -> rsaPrivateKey = openssl_pkey_get_private ( file_get_contents ( $ this -> rsaPrivateKeyFile ) ) ; if ( ! $ this -> rsaPrivateKey ) { throw new CredentialsException ( 'Cannot access private key for signing' ) ; } return $ this -> rsaPrivateKey ; }
Gets the RSA private key.

@throws CredentialsException when the key could not be loaded.

@return resource
Gets the RSA private key .