1

Upgraded OpenSSL, set profile path correctly, but when entering a virtualenv, Python goes back to old OpenSSL version. Thoughts?

➜  ~ python -c "import ssl; print ssl.OPENSSL_VERSION"

OpenSSL 1.0.2j  26 Sep 2016
➜  ~ openssl version -a

OpenSSL 1.0.2j  26 Sep 2016
built on: reproducible build, date unspecified
platform: darwin64-x86_64-cc
options:  bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) idea(int) blowfish(idx)
compiler: clang -I. -I.. -I../include  -fPIC -fno-common -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
OPENSSLDIR: "/usr/local/etc/openssl"
➜  ~ workon myenv
(myenv)➜  ~ openssl version -a

OpenSSL 1.0.2j  26 Sep 2016
built on: reproducible build, date unspecified
platform: darwin64-x86_64-cc
options:  bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) idea(int) blowfish(idx)
compiler: clang -I. -I.. -I../include  -fPIC -fno-common -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
OPENSSLDIR: "/usr/local/etc/openssl"
(myenv)➜  ~ python -c "import ssl; print ssl.OPENSSL_VERSION"

OpenSSL 0.9.8zh 14 Jan 2016
jww
  • 97,681
  • 90
  • 411
  • 885
James
  • 5,942
  • 15
  • 48
  • 72
  • 1
    [Building Python with SSL support in non-standard location](http://stackoverflow.com/q/5937337), [How do I compile Python 3.4 with custom OpenSSL?](http://stackoverflow.com/q/23548188), [Python and OpenSSL version reference issue on OS X](http://stackoverflow.com/q/37690054), [Building python with openssl support](http://unix.stackexchange.com/q/254974), etc. – jww Jan 02 '17 at 02:20

1 Answers1

0

I solved this problem by upgrading my virtualenv from 0.10.1 to the latest version (15.1.0) and created a new virtual environment again. The new environment is using openSSL 1.0.2k.

Terry Lam
  • 1,025
  • 1
  • 12
  • 13