# How to make Soaplibrary ignore SSL errors

**URL:** <https://forum.robotframework.org/t/how-to-make-soaplibrary-ignore-ssl-errors/7712>\
**Category:** Libraries\
**Created:** [19 August 2024 10:43 UTC](https://forum.robotframework.org/t/how-to-make-soaplibrary-ignore-ssl-errors/7712 "2024-08-19T10:43:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FurrJ](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@FurrJ](https://forum.robotframework.org/u/FurrJ)\
**Post date:** [19 August 2024 10:43 UTC](https://forum.robotframework.org/t/how-to-make-soaplibrary-ignore-ssl-errors/7712/1 "2024-08-19T10:43:57Z")

</div>

I keep getting this error:  
KEYWORD ${soap\_client} = SoapLibrary . Create SOAP Client ${endpoint\_T} ssl\_verify=True client\_cert=C:${/}XXXX${/}XXXX${/}XXXX.XXX.XXXXX.XX.pem  
Documentation:   
Loads a WSDL from the given url and creates a Zeep client. List all Available operations/methods with INFO log level.

Start / End / Elapsed: 20240819 06:43:56.653 / 20240819 06:43:56.672 / 00:00:00.019  
06:43:56.654 TRACE Arguments: [‘[https://XXXX.XXXX.XXXXX.XX/home/XXXXX/XXX.XXXX.web.soap.Gateway.wcp](https://XXXX.XXXX.XXXXX.XX/home/XXXXX/XXX.XXXX.web.soap.Gateway.wcp)’ | ssl\_verify=True | client\_cert=‘C:\XXXX\XXXX\XXXX.XXX.XXXXX.XX.pem’ ]   
06:43:56.655 DEBUG Loading remote data from: [https://XXXX.XXXX.XXXXX.XX/home/XXXXX/XXX.XXXX.web.soap.Gateway.wcp](https://XXXX.XXXX.XXXXX.XX/home/XXXXX/XXX.XXXX.web.soap.Gateway.wcp)  
06:43:56.667 FAIL SSLError: HTTPSConnectionPool(host=‘XXXX.XXXX.XXXXX.XX’, port=443): Max retries exceeded with url: /XXXX/XXXXXX/XXX.XXX.web.soap.Gateway.wcp (Caused by SSLError(SSLError(9, ‘[SSL] PEM lib (\_ssl.c:3895)’)))   
06:43:56.672 DEBUG Traceback (most recent call last):  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py”, line 466, in \_make\_request  
self.\_validate\_conn(conn)  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py”, line 1095, in \_validate\_conn  
conn.connect()  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connection.py”, line 652, in connect  
sock\_and\_verified = \_ssl\_wrap\_socket\_and\_match\_hostname(  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connection.py”, line 805, in _ssl\_wrap\_socket\_and\_match\_hostname  
ssl\_sock = ssl\_wrap\_socket(  
File "C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\util\ssl_.py", line 456, in ssl\_wrap\_socket  
context.load\_cert\_chain(certfile, keyfile)  
ssl.SSLError: [SSL] PEM lib (\_ssl.c:3895)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py”, line 789, in urlopen  
response = self.\_make\_request(  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py”, line 490, in \_make\_request  
raise new\_e  
urllib3.exceptions.SSLError: [SSL] PEM lib (\_ssl.c:3895)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py”, line 667, in send  
resp = conn.urlopen(  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py”, line 843, in urlopen  
retries = retries.increment(  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\util\retry.py”, line 519, in increment  
raise MaxRetryError(\_pool, url, reason) from reason # type: ignore[arg-type]  
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘XXXX.XXXX.XXXXX.XX’, port=443): Max retries exceeded with url: /home/XXXXX/XXX.XXXX.web.soap.Gateway.wcp (Caused by SSLError(SSLError(9, ‘[SSL] PEM lib (\_ssl.c:3895)’)))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\SoapLibrary\SoapLibrary.py”, line 66, in create\_XXXX\_client  
self.client = Client(self.url, transport=Transport(session=session))  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\zeep\client.py”, line 76, in **init**  
self.wsdl = Document(wsdl, self.transport, settings=self.settings)  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\zeep\wsdl\wsdl.py”, line 92, in **init**  
self.load(location)  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\zeep\wsdl\wsdl.py”, line 95, in load  
document = self.\_get\_xml\_document(location)  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\zeep\wsdl\wsdl.py”, line 155, in \_get\_xml\_document  
return load\_external(  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\zeep\loader.py”, line 89, in load\_external  
content = transport.load(url)  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\zeep\transports.py”, line 123, in load  
content = self.\_load\_remote\_data(url)  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\zeep\transports.py”, line 135, in \_load\_remote\_data  
response = self.session.get(url, timeout=self.load\_timeout)  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py”, line 602, in get  
return self.request(“GET”, url, \*\*kwargs)  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py”, line 589, in request  
resp = self.send(prep, \*\*send\_kwargs)  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py”, line 703, in send  
r = adapter.send(request, \*\*kwargs)  
File “C:\Users\XXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py”, line 698, in send  
raise SSLError(e, request=request)  
requests.exceptions.SSLError: HTTPSConnectionPool(host=‘XXXX.XXXX.XXXXX.XX’, port=443): Max retries exceeded with url: /home/XXXXX/XXX.XXXX.web.soap.Gateway.wcp (Caused by SSLError(SSLError(9, ‘[SSL] PEM lib (\_ssl.c:3895)’)))

I checked the certificate. It has RSA Encryption, Modulus (2048 bits). It’s also valid and up to date.

How can I either use the client\_cert or bypass it?
