PHP and SSL with InstantSSH plugin

  • Hi Laurent,
    before you kill me.. :)
    The Panel is on version 1.2.17 and the InstandSSH 3.3.1 (The customer don't want to update at the moment)


    If the User runs this command on the SSH Shell

    Code
    1. /opt/phpswitcher/php7.0/bin/php -r "echo file_get_contents('https://hermesapi.hlg.de/hermes-api-props-web/services/v15/ProPS?wsdl');"

    He got this error

    Code
    1. PHP Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
    2. error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in Command line code on line 1
    3. PHP Warning: file_get_contents(): Failed to enable crypto in Command line code on line 1
    4. PHP Warning: file_get_contents(https://hermesapi.hlg.de/hermes-api-props-web/services/v15/ProPS?wsdl): failed to open stream: operation failed in Command line code on line 1


    If i run the command as root everything works fine.
    Do i need to activate something in the InstandSSH or is this a bug in the version which is installed?


    Regards
    Sascha

    Edited once, last by TheCry ().

  • @TheCry



    If i run the command as root everything works fine.

    Surely because you have run the command outside the jail.



    The Panel is on version 1.2.17 and the InstandSSH 3.3.1 (The customer don't want to update at the moment)

    <X ...


    Do i need to activate something in the InstandSSH or is this a bug in the version which is installed?

    SSL support was partial in your version. Full support was added in InstantSSH version (5.0.0):

    Code
    1. ...
    2. Added: `bashshellbusybox', `dnsutils', `locales`, `openssl', `sslbasics' and `tzdata' application sections

    Well, provide me with your current InstantSSH configuration file and I'll modify it for adding SSL support.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @TheCry


    Sorry for the delay. See the diff attached below. Once you have done the changes in your config.php, don't forget to trigger a plugin list update through the plugin management interface to force rebuild of your jail.

    Files

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Better a delay and it works
    Thank you very much! It works.

    You're welcome ;)


    Thread closed.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206