IPWorks EDI 2020 Python Edition

Questions / Feedback?

exchange_certificate Method

Exchange a certificate with the remote host.

Syntax

def exchange_certificate(certificate_store: str, certificate_exchange_type: int) -> None: ...

Remarks

If the remote host supports the certificate exchange feature of OFTP 2.0 this method may be used to send and/or request certificates.

The CertificateStore parameter specifies the location of the certificate to be exchanged. In most cases this will be the path to a .cer file on disk. If the certificate is in another format or is installed to the Windows certificate store please see ExchangeCertStoreType and ExchangeCertSubject for more information.

The CertificateExchangeType parameter determines the type of request. Possible values are:

0Request: The class will send the certificate file specified. The remote host will respond with a certificate of it's own. The response may be in a separate session.
1Replace: The class will send the certificate file specified. No certificate is expected in response. The certificate sent here invalidates any previous certificates the remote host has stored.
2Deliver: The class will send the certificate file specified. This is used to respond to a certificate request. It may also be used to send new additional certificates to the remote host. This will not invalidate previous certificates the remote host has stored.

When the remote host sends a certificate to the class the received certificate will be provided through the on_certificate_received event.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks EDI 2020 Python Edition - Version 20.0 [Build 8203]