InsecurePlatformWarning on Ubuntu 14.04 w/ Python 2.7.6

The link has this recommendation:

If you encounter this warning, it is strongly recommended you upgrade to a
newer Python version, or that you use pyOpenSSL as described in the
OpenSSL / PyOpenSSL section.

On Debian/Ubuntu, the python version can be determined like this:

PYTHONVERSION=$(dpkg-query --show --showformat '${Version}\n' python)

This yields "2.7.5-5ubuntu3" at the moment.
Then, compare it to the minimum version 2.7.9 to stop this error from occuring:

dpkg --compare-versions $PYTHONVERSION ge 2.7.9

If it fails (error code $? = 1), it means that python is too old and
you need to install the OpenSSL stuff:

In the file letsencrypt-auto, insert
the line

$VENV_BIN/pip install -U pyopenssl ndg-httpsclient pyasn1
after the line
$VENV_BIN/pip install -U letsencrypt letsencrypt-apache

and the lines

printf .
$VENV_BIN/pip install -U pyopenssl ndg-httpsclient pyasn1
after the line
$VENV_BIN/pip install -U letsencrypt > /dev/null

That seems to do the trick.

1 Like