-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add details of Google Certificate lookup API
- Loading branch information
Showing
17 changed files
with
234 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...s-basement/src/main/aidl/com/google/android/gms/common/GoogleCertificatesLookupQuery.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package com.google.android.gms.common; | ||
|
||
parcelable GoogleCertificatesLookupQuery; |
3 changes: 3 additions & 0 deletions
3
...asement/src/main/aidl/com/google/android/gms/common/GoogleCertificatesLookupResponse.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package com.google.android.gms.common; | ||
|
||
parcelable GoogleCertificatesLookupResponse; |
3 changes: 3 additions & 0 deletions
3
...ervices-basement/src/main/aidl/com/google/android/gms/common/GoogleCertificatesQuery.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package com.google.android.gms.common; | ||
|
||
parcelable GoogleCertificatesQuery; |
3 changes: 0 additions & 3 deletions
3
...asement/src/main/aidl/com/google/android/gms/common/internal/GoogleCertificatesQuery.aidl
This file was deleted.
Oops, something went wrong.
18 changes: 12 additions & 6 deletions
18
...basement/src/main/aidl/com/google/android/gms/common/internal/IGoogleCertificatesApi.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
package com.google.android.gms.common.internal; | ||
|
||
import com.google.android.gms.common.internal.GoogleCertificatesQuery; | ||
import com.google.android.gms.common.GoogleCertificatesLookupQuery; | ||
import com.google.android.gms.common.GoogleCertificatesLookupResponse; | ||
import com.google.android.gms.common.GoogleCertificatesQuery; | ||
import com.google.android.gms.dynamic.IObjectWrapper; | ||
|
||
interface IGoogleCertificatesApi { | ||
IObjectWrapper getGoogleCertificates(); | ||
IObjectWrapper getGoogleReleaseCertificates(); | ||
boolean isGoogleReleaseSigned(String packageName, IObjectWrapper certData); | ||
boolean isGoogleSigned(String packageName, IObjectWrapper certData); | ||
boolean isGoogleOrPlatformSigned(in GoogleCertificatesQuery query, IObjectWrapper packageManager); | ||
IObjectWrapper getGoogleCertificates() = 0; | ||
IObjectWrapper getGoogleReleaseCertificates() = 1; | ||
boolean isGoogleReleaseSigned(String packageName, IObjectWrapper certData) = 2; | ||
boolean isGoogleSigned(String packageName, IObjectWrapper certData) = 3; | ||
boolean isGoogleOrPlatformSigned(in GoogleCertificatesQuery query, IObjectWrapper packageManager) = 4; | ||
GoogleCertificatesLookupResponse isPackageGoogleOrPlatformSigned(in GoogleCertificatesLookupQuery query) = 5; | ||
boolean isPackageGoogleOrPlatformSignedAvailable() = 6; | ||
GoogleCertificatesLookupResponse queryPackageSigned(in GoogleCertificatesLookupQuery query) = 7; | ||
boolean isFineGrainedPackageVerificationAvailable() = 8; | ||
} |
41 changes: 41 additions & 0 deletions
41
...s-basement/src/main/java/com/google/android/gms/common/GoogleCertificatesLookupQuery.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.common; | ||
|
||
import android.content.Context; | ||
import android.os.IBinder; | ||
import com.google.android.gms.dynamic.IObjectWrapper; | ||
import com.google.android.gms.dynamic.ObjectWrapper; | ||
import org.microg.safeparcel.AutoSafeParcelable; | ||
|
||
public class GoogleCertificatesLookupQuery extends AutoSafeParcelable { | ||
@Field(1) | ||
private String callingPackage; | ||
@Field(2) | ||
private boolean allowTestKeys; | ||
@Field(3) | ||
private boolean ignoreTestKeysOverride; | ||
@Field(4) | ||
private IObjectWrapper contextWrapper; | ||
private Context context; | ||
@Field(5) | ||
private boolean isChimeraPackage; | ||
@Field(6) | ||
private boolean includeHashesInErrorMessage; | ||
|
||
public String getCallingPackage() { | ||
return callingPackage; | ||
} | ||
|
||
public Context getContext() { | ||
if (context == null && contextWrapper != null) { | ||
context = ObjectWrapper.unwrapTyped(contextWrapper, Context.class); | ||
} | ||
return context; | ||
} | ||
|
||
public static final Creator<GoogleCertificatesLookupQuery> CREATOR = findCreator(GoogleCertificatesLookupQuery.class); | ||
} |
38 changes: 38 additions & 0 deletions
38
...asement/src/main/java/com/google/android/gms/common/GoogleCertificatesLookupResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.common; | ||
|
||
import android.os.Parcel; | ||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; | ||
|
||
@SafeParcelable.Class | ||
public class GoogleCertificatesLookupResponse extends AbstractSafeParcelable { | ||
@Field(1) | ||
public final boolean result; | ||
@Field(2) | ||
public final String errorMessage; | ||
@Field(3) | ||
public final int statusValue; | ||
@Field(4) | ||
public final int firstPartyStatusValue; | ||
|
||
@Constructor | ||
public GoogleCertificatesLookupResponse(@Param(1) boolean result, @Param(2) String errorMessage, @Param(3) int statusValue, @Param(4) int firstPartyStatusValue) { | ||
this.result = result; | ||
this.errorMessage = errorMessage; | ||
this.statusValue = statusValue; | ||
this.firstPartyStatusValue = firstPartyStatusValue; | ||
} | ||
|
||
@Override | ||
public void writeToParcel(Parcel out, int flags) { | ||
CREATOR.writeToParcel(this, out, flags); | ||
} | ||
|
||
public static final SafeParcelableCreatorAndWriter<GoogleCertificatesLookupResponse> CREATOR = findCreator(GoogleCertificatesLookupResponse.class); | ||
} |
32 changes: 12 additions & 20 deletions
32
...mon/internal/GoogleCertificatesQuery.java → ...d/gms/common/GoogleCertificatesQuery.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...services-core/src/main/java/com/google/android/gms/chimera/DynamiteModuleInitializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.chimera; | ||
|
||
import android.annotation.SuppressLint; | ||
import android.util.Log; | ||
import androidx.annotation.Keep; | ||
|
||
import android.content.Context; | ||
|
||
@Keep | ||
public class DynamiteModuleInitializer { | ||
private static final String TAG = "DynamiteModule"; | ||
|
||
public static void initializeModuleV1(Context context) { | ||
initializeModuleV2(context, "com.google.android.gms".equals(context.getPackageName())); | ||
} | ||
|
||
public static void initializeModuleV2(Context context, boolean withGmsPackage) { | ||
Log.d(TAG, "initializeModuleV2 context: " + context + ", withGmsPackage: " + withGmsPackage); | ||
} | ||
} |
76 changes: 0 additions & 76 deletions
76
play-services-core/src/main/java/com/google/android/gms/common/GoogleCertificatesImpl.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.