<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Splunk python SDK SSL error in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330129#M4818</link>
    <description>&lt;P&gt;Thank you. This resolved the issue I was having too.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jan 2019 03:29:35 GMT</pubDate>
    <dc:creator>kkrishnan_splun</dc:creator>
    <dc:date>2019-01-30T03:29:35Z</dc:date>
    <item>
      <title>Splunk python SDK SSL error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330116#M4805</link>
      <description>&lt;P&gt;When running a python script I keep getting the following error when trying to connect to splunk version 6.6.1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ssl.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The exact same script runs fine when connecting to a different splunk instance running 6.5.2 and https is turned on for both instances.&lt;/P&gt;

&lt;P&gt;I'm running the python script on OSX 10.12.6, the splunk sdk is v1.6.2, and python v2.7.10.&lt;/P&gt;

&lt;P&gt;Anyone know what I'm doing wrong here?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 19:03:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330116#M4805</guid>
      <dc:creator>patelaa</dc:creator>
      <dc:date>2017-07-25T19:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk python SDK SSL error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330117#M4806</link>
      <description>&lt;P&gt;This is saying tls version 1 is in use.  &lt;/P&gt;

&lt;P&gt;In /opt/splunk/etc/system/local/server.conf add or modify the following:&lt;/P&gt;

&lt;P&gt;[sslConfig]&lt;BR /&gt;
sslVersions=tls1.2&lt;/P&gt;

&lt;P&gt;The above will force tls1.2 after a restart.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 01:46:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330117#M4806</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-07-26T01:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk python SDK SSL error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330118#M4807</link>
      <description>&lt;P&gt;Doesn´t work.... any other idea?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 23:58:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330118#M4807</guid>
      <dc:creator>castille_cisco</dc:creator>
      <dc:date>2017-08-03T23:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk python SDK SSL error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330119#M4808</link>
      <description>&lt;P&gt;Can you post your code?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2017 00:56:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330119#M4808</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-08-04T00:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk python SDK SSL error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330120#M4809</link>
      <description>&lt;P&gt;trying with basic connection, to isolate... in v6.5.x worked fine.&lt;/P&gt;

&lt;P&gt;import splunklib.client as client&lt;/P&gt;

&lt;P&gt;HOST = "xxx.xxx.xxx.xxx"&lt;BR /&gt;
PORT = 8089&lt;BR /&gt;
USERNAME = "admin"&lt;BR /&gt;
PASSWORD = "changeme&lt;/P&gt;

&lt;H1&gt;Create a Service instance and log in&lt;/H1&gt;

&lt;P&gt;service = client.connect(&lt;BR /&gt;
    host=HOST,&lt;BR /&gt;
    port=PORT,&lt;BR /&gt;
    username=USERNAME,&lt;BR /&gt;
    password=PASSWORD)&lt;/P&gt;

&lt;H1&gt;Print installed apps to the console to verify login&lt;/H1&gt;

&lt;P&gt;for app in service.apps:&lt;BR /&gt;
    print app.name&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2017 01:28:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330120#M4809</guid>
      <dc:creator>castille_cisco</dc:creator>
      <dc:date>2017-08-04T01:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk python SDK SSL error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330121#M4810</link>
      <description>&lt;P&gt;Send me the output of this please&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ./splunk cmd openssl s_client -connect localhost:8089
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Aug 2017 01:57:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330121#M4810</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-08-04T01:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk python SDK SSL error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330122#M4811</link>
      <description>&lt;P&gt;CONNECTED(00000003)&lt;BR /&gt;
depth=1 C = US, ST = CA, L = San Francisco, O = Splunk, CN = SplunkCommonCA, emailAddress = &lt;A href="mailto:support@splunk.com" target="_blank"&gt;support@splunk.com&lt;/A&gt;&lt;/P&gt;

&lt;H2&gt;verify error:num=19:self signed certificate in certificate chain&lt;/H2&gt;

&lt;P&gt;Certificate chain&lt;BR /&gt;
 0 s:/CN=SplunkServerDefaultCert/O=SplunkUser&lt;BR /&gt;
   i:/C=US/ST=CA/L=San Francisco/O=Splunk/CN=SplunkCommonCA/emailAddress=&lt;A href="mailto:support@splunk.com" target="_blank"&gt;support@splunk.com&lt;/A&gt;&lt;BR /&gt;
 1 s:/C=US/ST=CA/L=San Francisco/O=Splunk/CN=SplunkCommonCA/emailAddress=&lt;A href="mailto:support@splunk.com" target="_blank"&gt;support@splunk.com&lt;/A&gt;&lt;/P&gt;

&lt;H2&gt;   i:/C=US/ST=CA/L=San Francisco/O=Splunk/CN=SplunkCommonCA/emailAddress=&lt;A href="mailto:support@splunk.com" target="_blank"&gt;support@splunk.com&lt;/A&gt;&lt;/H2&gt;

&lt;P&gt;Server certificate&lt;BR /&gt;
-----BEGIN CERTIFICATE-----&lt;BR /&gt;
MIICLTCCAZYCCQDR5ridhjM7qzANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJV&lt;BR /&gt;
UzELMAkGA1UECAwCQ0ExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDzANBgNVBAoM&lt;BR /&gt;
MbvfdIQ7Q309v2zuclnJ8rZrFUmlmMlBuYFxE85HWX1EfZN4O1xhAmp6t385KZ8l&lt;BR /&gt;
5hMSuUeUNEVqAIY4K3CDaVAKSDROLbtfMQIDAQABMA0GCSqGSIb3DQEBBQUAA4GB&lt;BR /&gt;
AFrm/LzR52qBKau5gpu570lVkYu4NaOZqbtpnkC1cYYLFS7gkYpEoFfrFCYqCpAB&lt;BR /&gt;
ic6lLIBCeRXWW95Yhi195v2lVp4PwG5lQ2Nc0EtsHQhJ68/ZXRjRbjeagrt01VxQ&lt;BR /&gt;
GU1QbDgVVKD8NdFAxlGUtY+jLRVTt/ThiqK1ua2fD94A&lt;BR /&gt;
-----END CERTIFICATE-----&lt;BR /&gt;
subject=/CN=SplunkServerDefaultCert/O=SplunkUser&lt;/P&gt;

&lt;H2&gt;issuer=/C=US/ST=CA/L=San Francisco/O=Splunk/CN=SplunkCommonCA/emailAddress=&lt;A href="mailto:support@splunk.com" target="_blank"&gt;support@splunk.com&lt;/A&gt;&lt;/H2&gt;

&lt;P&gt;No client certificate CA names sent&lt;BR /&gt;
Peer signing digest: SHA512&lt;/P&gt;

&lt;H2&gt;Server Temp Key: ECDH, P-256, 256 bits&lt;/H2&gt;

&lt;H2&gt;SSL handshake has read 1736 bytes and written 441 bytes&lt;/H2&gt;

&lt;P&gt;New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384&lt;BR /&gt;
Server public key is 1024 bit&lt;BR /&gt;
Secure Renegotiation IS supported&lt;BR /&gt;
Compression: zlib compression&lt;BR /&gt;
Expansion: zlib compression&lt;BR /&gt;
No ALPN negotiated&lt;BR /&gt;
SSL-Session:&lt;BR /&gt;
    Protocol  : TLSv1.2&lt;BR /&gt;
    Cipher    : ECDHE-RSA-AES256-GCM-SHA384&lt;BR /&gt;
    Session-ID: 391D266371C5A7C685F5376946A1115DAFF7101DDB56181C5A31A58AC3A38E13&lt;BR /&gt;
    Session-ID-ctx: &lt;BR /&gt;
    Master-Key: D7496B27187A45FF6&lt;BR /&gt;
    Key-Arg   : None&lt;BR /&gt;
    PSK identity: None&lt;BR /&gt;
    PSK identity hint: None&lt;BR /&gt;
    SRP username: None&lt;BR /&gt;
    TLS session ticket lifetime hint: 300 (seconds)&lt;BR /&gt;
    TLS session ticket:&lt;BR /&gt;
    0000 - 6c a7 b4 c0 33 a0 f9 81-57 cb 94 f7 e2 81 f3 be   l...3...W.......&lt;BR /&gt;
    0010 - 0a 38 ab 43 cb 44 d0 9a-5e f0 6e 94 8e 44 08 88   .8.C.D..^.n..D..&lt;BR /&gt;
    0020 - 64 23 c0 3e 0b 48 54 2a-8c 0e 98 24 cc 4b 90 aa   d#.&amp;gt;.HT*...$.K..&lt;BR /&gt;
    0030 - 10 10 f1 42 3f 30 71 1e-cf 80 fc 1f 44 f0 dc 86   ...B?0q.....D...&lt;BR /&gt;
    0040 - dd 09 db a8 dc c2 88 07-b9 a5 fd 91 2a 01 af 9c   ............*...&lt;BR /&gt;
    0050 - c7 2e 0c 8b ad 49 d0 49-f5 f7 ed d1 1a ce 8c a5   .....I.I........&lt;BR /&gt;
    0060 - bc 06 6a 55 af ee ca 48-c7 16 a5 9d 37 e8 fe 1f   ..jU...H....7...&lt;BR /&gt;
    0070 - 0b 19 9f 8c 07 d6 a1 cc-5f 15 3a fc b2 dc e2 6a   ........_.:....j&lt;BR /&gt;
    0080 - 00 05 61 0a 95 12 be 21-83 b8 48 81 14 f8 af da   ..a....!..H.....&lt;BR /&gt;
    0090 - 04 9d 02 6d 3d 8d d2 fa-8a 53 a7 d0 91 88 63 52   ...m=....S....cR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Compression: 1 (zlib compression)
Start Time: 1501815599
Timeout   : 300 (sec)
Verify return code: 19 (self signed certificate in certificate chain)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:12:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330122#M4811</guid>
      <dc:creator>castille_cisco</dc:creator>
      <dc:date>2020-09-29T15:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk python SDK SSL error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330123#M4812</link>
      <description>&lt;P&gt;I guess it's a long shot, but try regenerating the server cert:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   # /opt/splunk/bin/splunk createssl server-cert 2048
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 Aug 2017 12:06:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330123#M4812</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-08-05T12:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk python SDK SSL error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330124#M4813</link>
      <description>&lt;P&gt;Not sure if you are still having this issue, but I just ran into the same problem and had to update my OpenSSL version in order to support the TLS 1.2 connection. After updating that, everything worked fine.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 18:25:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330124#M4813</guid>
      <dc:creator>abhutiani</dc:creator>
      <dc:date>2017-08-25T18:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk python SDK SSL error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330125#M4814</link>
      <description>&lt;P&gt;@castille_cisco Did you ever resolve your issue? I'm running into literally the exact same issue. Same script, same output, same versions of OSX, Python. &lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 16:56:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330125#M4814</guid>
      <dc:creator>allisonwalther</dc:creator>
      <dc:date>2017-09-13T16:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk python SDK SSL error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330126#M4815</link>
      <description>&lt;P&gt;So after shelving my project for a little while I came back to it and got it figured out. It definitely had to do with the SSL versions. I came across a Splunk docs page of known 6.6.1 issues and used the workaround from issue &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/ReleaseNotes/KnownIssues"&gt;SPL-139019&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;2017-03-20  SPL-139019  Possible compatibility issues between Python / SDK clients and new 6.6 default sslVersions, cipherSuites&lt;/P&gt;

&lt;P&gt;Workaround:&lt;BR /&gt;
Users can do either of the following:&lt;BR /&gt;
1. Overwrite the new Splunk 6.6 server.conf [sslConfig] sslVersions, cipherSuites with your own settings that are compatible with your version of OpenSSL, e.g. the previous defaults from 6.5.x are compatible with OpenSSL 0.9.8 on Mac OSX:&lt;/P&gt;

&lt;P&gt;[sslConfig] &lt;BR /&gt;
sslVersions = *,-ssl2 &lt;BR /&gt;
sslVersionsForClient = *,-ssl2 &lt;BR /&gt;
cipherSuite = TLSv1+HIGH:TLSv1.2+HIGH:@STRENGTH&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 18:00:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330126#M4815</guid>
      <dc:creator>patelaa</dc:creator>
      <dc:date>2017-09-13T18:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk python SDK SSL error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330127#M4816</link>
      <description>&lt;P&gt;Thanks for looking into this a little more!&lt;/P&gt;

&lt;P&gt;I found that Mac OSx's sys Python screws things up. Another solution to this problem would be &lt;STRONG&gt;'brew install python'&lt;/STRONG&gt;. It installs a 'python2' package with a newer version of openssl (&amp;gt;1). You can then use &lt;STRONG&gt;'python2'&lt;/STRONG&gt; to run programs and &lt;EM&gt;entirely avoid making any Splunk configuration changes&lt;/EM&gt;. &lt;BR /&gt;
Note: to install modules for 'python2' package, use &lt;STRONG&gt;'python2 -m pip install  '&lt;/STRONG&gt;. &lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 19:44:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330127#M4816</guid>
      <dc:creator>allisonwalther</dc:creator>
      <dc:date>2017-09-13T19:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk python SDK SSL error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330128#M4817</link>
      <description>&lt;P&gt;Thank you - this fixed my problem.  A good reminder to not base my program on the system python.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 16:07:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330128#M4817</guid>
      <dc:creator>ciorg</dc:creator>
      <dc:date>2017-10-16T16:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk python SDK SSL error</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330129#M4818</link>
      <description>&lt;P&gt;Thank you. This resolved the issue I was having too.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jan 2019 03:29:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-python-SDK-SSL-error/m-p/330129#M4818</guid>
      <dc:creator>kkrishnan_splun</dc:creator>
      <dc:date>2019-01-30T03:29:35Z</dc:date>
    </item>
  </channel>
</rss>

