2

I have OpenSSL 1.0.2 installed.

$ openssl version
OpenSSL 1.0.2n  7 Dec 2017

Exported compiler flags as advised.

before_install:
- export PATH="/usr/local/opt/openssl/bin:$PATH"
- export LDFLAGS="$LDFLAGS -L/usr/local/opt/openssl/lib"
- export CPPFLAGS="$CPPFLAGS -I/usr/local/opt/openssl/include"

Still, Python sees OpenSSL 0.9.8 only.

$ python -c 'import ssl; print ssl.OPENSSL_VERSION;'
OpenSSL 0.9.8zh 14 Jan 2016

So later on, when I try to run this Python script, it says:

ERROR: Your Python's OpenSSL library is outdated (OpenSSL 0.9.8zh 14 Jan 2016).

How can I fix the OpenSSL reference in Python?


I tried a whole lot of things: https://github.com/eppz/Unity.Test.eppz/commits/master/.travis.yml

Geri Borbás
  • 15,810
  • 18
  • 109
  • 172
  • 1
    Is your python installation very old? [This answer](https://stackoverflow.com/a/27230057/7675174) might help if you want to try homebrew. – import random Dec 20 '17 at 05:23
  • It is 2.7.14. Thanks for the link. Unfortunately somewhy Travis CI don't let me use `--with-brewed-openssl`. It says `Warning: python: this formula has no --with-brewed-openssl option so it will be ignored!`. – Geri Borbás Dec 20 '17 at 06:03

1 Answers1

1

Use python2 instead python to run scripts.

You can try this simple ssl version check:

$ python2 -c 'import ssl; print ssl.OPENSSL_VERSION;'
OpenSSL 1.0.2m  2 Nov 2017
Geri Borbás
  • 15,810
  • 18
  • 109
  • 172