2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 01:45:19 +01:00

android: update certificate check

This commit is contained in:
Velaron 2021-04-04 21:28:47 +03:00 committed by Alibek Omarov #SupportRMS
parent 9feaee3e28
commit 59ef64c821
2 changed files with 15 additions and 8 deletions

13
.gitignore vendored
View File

@ -1,5 +1,5 @@
# Build data
build/
libs/armeabi*
libs/x86
obj
@ -21,7 +21,12 @@ android/res/values/git-rev.xml
android/src/in/celest/xash3d/XashConfig.java
android/lib
# Waf
build_current
*waf-*/
*waf3-*/
.lock-waf*
*.lastbuildstate
*.unsuccessfulbuild
__pycache__
*.pyc
.lock-*
.waf*
build*/

View File

@ -492,6 +492,11 @@ public class XashActivity extends Activity {
mEngineReady = true;
}
private boolean checkCstrike( String gamelibdir, String packagename, String signature )
{
return ( !FWGSLib.checkGameLibDir( gamelibdir, packagename ) ||
CertCheck.dumbCertificateCheck( getContext(), packagename, signature, false ) );
}
private boolean setupEnvironment()
{
@ -512,10 +517,7 @@ public class XashActivity extends Activity {
mMinWidth = 640;
mMinHeight = 300;
final String allowed = "in.celest.xash3d.cs16client";
if( !FWGSLib.checkGameLibDir( gamelibdir, allowed ) ||
CertCheck.dumbCertificateCheck( getContext(), allowed, null, true ) )
if ( !checkCstrike( gamelibdir, "su.xash.cs16client", "AtsVnfclsm6zLW/qxxPk970zgfA=" ) && !checkCstrike( gamelibdir, "in.celest.xash3d.cs16client", null ) )
{
finish();
return false;