对于SSL测试用例,它需要显示系统错误对话框,但在SbSystemRaisePlatformError中,没有详细的错误类型来指示发生了哪种错误。对于预加载情况,如果没有网络,则需要退出钴进程,那么有没有办法在此回调中获取详细信息类型?例如。自签名证书,过期证书......
https://self-signed.badssl.com/: Connection needs to be rejected and show system error dialog due to the self signed certificate.
https://expired.badssl.com/: Connection needs to be rejected and show system error dialog due to the expired certificate.
//src/starboard/shared/stub/system_raise_platform_error.cc
SbSystemPlatformError SbSystemRaisePlatformError(
SbSystemPlatformErrorType type,
SbSystemPlatformErrorCallback callback,
void* user_data) {
SB_UNREFERENCED_PARAMETER(callback);
SB_UNREFERENCED_PARAMETER(user_data);
std::string message;
switch (type) {
case kSbSystemPlatformErrorTypeConnectionError:
message = "Connection error.";
break;
#if SB_API_VERSION < 6
case kSbSystemPlatformErrorTypeUserSignedOut:
message = "User is not signed in.";
break;
case kSbSystemPlatformErrorTypeUserAgeRestricted:
message = "User is age restricted.";
break;
#endif
default:
message = "<unknown>";
break;
}
SB_DLOG(INFO) << "SbSystemRaisePlatformError: " << message;
return kSbSystemPlatformErrorInvalid;
}
答案 0 :(得分:0)
我们可以将它视为未来的Starboard版本,但由于它跨越了一个受控制的API,它被冻结到版本6,我们无法在短期内对其进行更改。