此代码在运行时引发“地址 00000000 的访问冲突。读取地址 00000000”错误。我试图让服务器接受 ssl 请求,但遇到了真正的麻烦。
我还在调试文件夹中保存了 ssleay32.dll 和 libeay32.dll。任何帮助表示赞赏:
ServerIOHandler := TIdServerIOHandlerSSLOpenSSL.Create;
ServerIOHandler.SSLOptions.Method := sslvSSLv23;
ServerIOHandler.SSLOptions.Mode := sslmClient;
ServerIOHandler.SSLOptions.VerifyMode := [];
ServerIOHandler.SSLOptions.VerifyDepth := 0;
server:=TIdHTTPServer.Create;
server.IOHandler := ServerIOHandler;
server.DefaultPort:=port;
server.Bindings.DefaultPort:=port;
server.OnQuerySSLPort(8092, newBool); //this is the line that throws the error
server.AutoStartSession:=true;
server.OnCommandGet:=idhttpserver1commandget;
server.SessionTimeOut:=360;
server.Active:=True;