SSL:SSLV3 警告非法参数

问题描述 投票:0回答:1

我可以使用 Postman 成功将请求发送到我的 CUCM(Cisco Unified Communications Manager)服务器的 API 服务。并且如图所示,这些请求都通过 TLSV1.2 协议成功发送(我也尝试过:TLSV1.1 和 TLSV1 成功)。

Wireshark 中的 Postman 请求:

邮递员请求详情:

但是当我使用Python发送请求时,请求始终通过SSLV3协议进行处理。由于我使用旧版本的 CUCM 服务器 (v-10.0),我收到以下错误:

Request error in terminal:

requests.exceptions.SSLError: HTTPSConnectionPool(host='172.25.0.6', port=8443): Max retries exceeded with url: /axl/ (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_ILLEGAL_PARAMETER] sslv3 alert illegal parameter (_ssl.c:1007)'))) 

**无论我如何努力,我都无法使用 Python 使用 TLSv1.2 或更旧的协议发送请求。我怎样才能强迫Python这样做?**

我还应该提到,我还使用 CURL 尝试了这些实验,它与 Python 一样,仅使用 SSLV3 发送请求。

以下是我的一些 Python 实验:

import requests

url = "https://172.25.0.6:8443/axl/"
headers = {
  'Content-Type': 'text/plain',
  'Authorization': 'Basic token=',
  'Cookie': 'JSESSIONID=DCCokiee; JSESSIONIDSSO=SessionId'
}
payload = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"http://www.cisco.com/AXL/API/10.0\">\n   <soapenv:Header />\n   <soapenv:Body>\n      <ns:executeSQLQuery sequence=\"?\">\n         <sql>select  first 10 * from numplan  where dnorpattern='3335610'</sql>\n      </ns:executeSQLQuery>\n   </soapenv:Body>\n</soapenv:Envelope>"

response = requests.get(url, headers=headers)

if response.status_code == 200:
    print("Success!")
    print(response.text)
else:
    print("Unsuccess. HTTP Kodu:", response.status_code)

response = requests.request("POST", url, headers=headers,auth=("username","password"), data=payload)

print(response.text)



or

response = requests.request("POST", url, headers=headers,auth=("username","password"), data=payload)

response = requests.request("POST", url,verify=False, headers=headers,,auth=("username","password"), data=payload)


response = requests.request("POST", url, verify='./cucm01.giganet.lan', data=payload, auth=("username","password"))

其他详情: 我在网上尝试了很多解决方案。但错误却没有丝毫变化。

操作系统:Ubuntu 22.04
Python:3.10

提前非常感谢...

python openssl tls1.2 sslv3 cucm
1个回答
0
投票

您正在使用已停产的产品。我们鼓励思科客户迁移到本地呼叫或云呼叫

我怎样才能强迫...

您始终可以自由使用python3.7解释器。 我警告说,它的“停产日期”也已成为过去。

© www.soinside.com 2019 - 2024. All rights reserved.