I want to use SOAP call service using .p12 certificate file. I tried below code. But it throws path error.
Is there any solution for this, in suds python3?
*TypeError: stat: path should be string, bytes, os.PathLike or integer, not X509*
from requests import Session
from zeep.transports import Transport
from zeep import Client
from OpenSSL import crypto
pkcs12 = crypto.load_pkcs12(open(CertPath, 'rb').read(), Password)
session = Session()
session.cert = (pkcs12.get_certificate(),pkcs12.get_privatekey())
transport = Transport(session=session)
client = Client(
'http://my.own.sslhost.local/service?WSDL',
transport=transport)
question from:
https://stackoverflow.com/questions/65856758/soap-call-using-pfx-or-p12-authentication-in-zeep-or-suds-library-python 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…