Problem login : certificate expired
Posted: Tue Sep 12, 2023 5:27 am
hi,
have Problem to login as my Browser say : "certificate expired"
have Problem to login as my Browser say : "certificate expired"
Exclusive forum for HMG, a Free / Open Source xBase WIN32/64 Bits / GUI Development System
http://mail.hmgforum.com/
21:21:08 StartDownLoad https://www.hmgforum.com/viewtopic.php?&t=7415
21:21:09 eDas Datum des Zertifikats ist ungültig oder das Zertifikat ist abgelaufen.\r\n (0x80072F05) SEND -2147352567 Error download https://www.hmgforum.com/viewtopic.php?&t=7415
Code: Select all
FUNCTION DownloadFromWWW( cURL, cFile, nThreadNo )
LOCAL oError, nTry, nStatus, nReadystate, cText, nPosi
LOCAL bOldError := ERRORBLOCK( { | e | BREAK( e ) } )
LOCAL oHttp := Win_OleCreateObject( "MSXML2.ServerXMLHTTP" )
LOCAL aStatus := HttpStatusArray()
LOCAL aArray, x1
IF FILE( cFile )
hb_FileDelete( cFile )
ENDIF
IF .NOT. "http" $ cUrl
oHttp := NIL
RETURN .F.
ENDIF
BEGIN SEQUENCE // WITH { | oError | BREAK( oError ) }
oHttp:Open( "GET", cUrl, .F. )
// oHttp:setRequestHeader( "User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0" )
oHttp:setRequestHeader( "Content-Type", "text/xml; charset=utf-8" )
nTry := 0
DO WHILE EMPTY( oHTTP:readyState ) // = 0
nTry ++
millisec( 500 )
DO Events
IF nTry > 5
BREAK
ENDIF
ENDDO
// oHttp:setRequestHeader( "Content-Type", "text/xml; charset=utf-8")
oHttp:Send()
nReadystate := oHttp:readyState
IF nReadystate <> 4
BREAK
ENDIF
nStatus := oHttp:Status
IF nStatus = 200
StrFile( oHttp:ResponseBody(), cFile )
// x1 := hb_jsonDecode( oHttp:responseText, @aArray )
x1 := hb_jsonDecode( oHttp:ResponseBody(), @aArray )
ALTD()
ELSEIF nStatus = 500
lBreak := .T.
cText := "Error Thread No. : " + VAR2CHAR( nThreadNo ) + CRLF + cText
MessageBoxTimeout( cText, "nStatus = " + VAR2CHAR( nStatus ), MB_ICONERROR, 3000 )
lShowOnce := .F.
BREAK
ELSE
Ondummy( oHttp:Status )
nPosi := ASCAN( aStatus, { | x | x[ 1 ] = nStatus } )
IF nPosi > 0
cText := aStatus[ nPosi ] [ 2 ]
Ondummy( TIME(), cText )
// lBreak := .T.
// lShowOnce := .T.
// BREAK
ENDIF
ENDIF
RECOVER USING oError
ERRORBLOCK( bOldError )
IF EMPTY( nReadystate )
ELSE
lBreak := .T.
lShowOnce := .T.
ENDIF
Ondummy( TIME(), oError:description, oError:operation, HB_VALTOSTR( oError:osCode ), "Error download " + cUrl )
cText := hb_Translate( oError:Description, cTranslateCP + "WIN" )
SayBarText( cText, "ICOERROR" )
IF lBreak = .F.
cText := "Error Thread No. : " + VAR2CHAR( nThreadNo ) + CRLF + cText
MessageBoxTimeout( cText, "readyState " + VAR2CHAR( nReadystate ), MB_ICONERROR, 3000 )
lShowOnce := .F.
ENDIF
IF lShowOnce = .T.
lShowOnce := .F.
MsgStop( "Error : " + cText, "readyState " + VAR2CHAR( nReadystate ) )
ENDIF
AADD( aError, { "Error Thread No. : " + VAR2CHAR( nThreadNo ), RECNO() } )
END SEQUENCE
ERRORBLOCK( bOldError )
oHttp:Abort()
oHttp := NIL
RETURN FILE( cFile )please use my PhpBB Forum Reader