Call to a ISAPI dll from a ISAPI dll with a invalid certicate

Hi,

I have a Remobjects sdk service for IIS.
It calls another Remobjects sdk service in a different dll.
Its certificate is no longer valid.
It seems that webservice call hangs, no response.

Should I implement the InvalidCertificate and set aAllow to False to get a exception?

I am using ROWinInetHTTPChannel

Hi,

Error dialog should be shown when SuppressErrorDialogs property set to False, TrustInvalidCA set to False and OnInvalidCertificate isn’t assigned:

  function _ProcessInvalidCertificate: Boolean;
..
    Result := Assigned(fOnInvalidCertificate);
    if not Result then Exit;
    if l_certRevocation or not fTrustInvalidCA then begin
      if not _ProcessInvalidCertificate then begin
        if SuppressErrorDialogs then begin
          l_res := False;
        end
        else begin
          l_dwError := InternetErrorDlg(GetDesktopWindow, InetConnect, dwInetStatus,
            FLAGS_ERROR_UI_FILTER_FOR_ERRORS or FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS or
            FLAGS_ERROR_UI_FLAGS_GENERATE_DATA, l_lppvData);
          l_res := (l_dwError = ERROR_INTERNET_FORCE_RETRY) or (l_dwError = ERROR_SUCCESS);
        end;
      end

Thanks,

But it’s not possible to show a Error dialog because the call is coming from in side the service.
So, how should I handle a invalid certificate in that case.

Should I throw a exception?

Hi,

you are right - raising an exception should solve this case.