code: def _get_and_verify_certificate_chain(
              server_info: ServerConnectivityInfo,
              trust_store: TrustStore
      ) -> Tuple[List[Certificate], str, Optional[OcspResponse]]:
          
          ssl_connection = server_info.get_preconfigured_ssl_connection(ssl_verify_locations=trust_store.path)
  
          # Enable OCSP stapling
          ssl_connection.ssl_client.set_tlsext_status_ocsp()
  
          try:  # Perform the SSL handshake
              ssl_connection.connect()
  
              ocsp_response = ssl_connection.ssl_client.get_tlsext_status_ocsp_resp()
              x509_cert_chain = ssl_connection.ssl_client.get_peer_cert_chain()
              (_, verify_str) = ssl_connection.ssl_client.get_certificate_chain_verify_result()
  
          except ClientCertificateRequested:  # The server asked for a client cert
              # We can get the server cert anyway
              ocsp_response = ssl_connection.ssl_client.get_tlsext_status_ocsp_resp()
              x509_cert_chain = ssl_connection.ssl_client.get_peer_cert_chain()
              (_, verify_str) = ssl_connection.ssl_client.get_certificate_chain_verify_result()
  
          finally:
              ssl_connection.close()
  
          # Parse the certificates using the cryptography module
          parsed_x509_chain = [load_pem_x509_certificate(x509_cert.as_pem().encode('ascii'), backend=default_backend())
                               for x509_cert in x509_cert_chain]
          return parsed_x509_chain, verify_str, ocsp_response
docs: Connects to the target server and uses the supplied trust store to validate the server's certificate.
          Returns the server's certificate and OCSP response.