IPWorks EDI 2020 Python Edition

Questions / Feedback?

on_ssl_server_authentication Event

For asynchronous HTTPS MDNs, fired after the server presents its certificate.

Syntax

class AS2ReceiverSSLServerAuthenticationEventParams(object):
  @property
  def cert_encoded() -> bytes: ...
  @property
  def cert_subject() -> str: ...
  @property
  def cert_issuer() -> str: ...
  @property
  def status() -> str: ...
  @property
  def accept() -> bool: ...
  @accept.setter
  def accept(value) -> None: ...

# In class AS2Receiver:
@property
def on_ssl_server_authentication() -> Callable[[AS2ReceiverSSLServerAuthenticationEventParams], None]: ...
@on_ssl_server_authentication.setter
def on_ssl_server_authentication(event_hook: Callable[[AS2ReceiverSSLServerAuthenticationEventParams], None]) -> None: ...

Remarks

This event is fired when returning asynchronous MDNs over HTTPS to the client, and allows the client can decide whether to continue with the connection process or not. In general, the class will allow self-signed certs only if explicitly specified.

To accept a self-signed certificate, either trap the on_ssl_server_authentication event and set Accept to true based on the values of CertSubject, CertEncoded, etc., or set the ssl_accept_server_cert property to the value of the expected certificate (if the server certificate is known in advance the latter method is simpler).

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