Splunk Dev

How to get Splunk Python on CentOS to use SSL/Crypto?

user4455
Explorer

It seems Splunk's Python on CentOS 7.2 does not have SSL support.

[root@splunk-test bin]# ./python
Python 2.7.11 (default, Jan  5 2017, 01:46:57) 
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import _ssl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libssl.so.1.0.0: cannot open shared object file: No such file or directory

I also get crypto errors from _hashlib

[root@splunk-test bin]# ldd /opt/splunk/lib/python2.7/lib-dynload/_hashlib.so
    linux-vdso.so.1 =>  (0x00007fffaf3f2000)
    libssl.so.1.0.0 => not found
    libcrypto.so.1.0.0 => not found
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f7e85bb5000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f7e857f4000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f7e85de0000)

This does not seem to be an issue on Ubuntu.

Any tips on how to get Splunk's python using ssl/crypto?

Thanks

Labels (1)
0 Karma
1 Solution

starcher
Influencer

I don't think you were running under the Splunk python context.

If you are in a full Splunk install under linux with default location try something like
/opt/splunk/bin/splunk cmd python

Then import ssl.

View solution in original post

starcher
Influencer

I don't think you were running under the Splunk python context.

If you are in a full Splunk install under linux with default location try something like
/opt/splunk/bin/splunk cmd python

Then import ssl.

mhergh
Explorer

This did it for me too, but I still needed to do an: "export LD_LIBRARY_PATH=/opt/splunk/lib" to make it finally work!!!!.

However, great answer; I am not able to award points otherwise I would have done it!

0 Karma

user4455
Explorer

That did it, thanks!

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Data Management Digest – May 2026

Welcome to the May 2026 edition of Data Management Digest!   As your trusted partner in data innovation, the ...

Index This | What is feather-light but cannot be held long?

May 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

.conf26 Registration is Live: Secure Your Early Bird Pass Now

  Lock in Your Spot: Registration Open for .conf26 in Denver Hello Splunkers, I have exciting news! Your ...