SigningInfo.GetSigningCertificateHistory Method

Definition

Returns the signing certificates this package has proven it is authorized to use.

[Android.Runtime.Register("getSigningCertificateHistory", "()[Landroid/content/pm/Signature;", "", ApiSince=28)]
public Android.Content.PM.Signature[]? GetSigningCertificateHistory ();
[<Android.Runtime.Register("getSigningCertificateHistory", "()[Landroid/content/pm/Signature;", "", ApiSince=28)>]
member this.GetSigningCertificateHistory : unit -> Android.Content.PM.Signature[]

Returns

Attributes

Remarks

Returns the signing certificates this package has proven it is authorized to use. This includes both the signing certificate associated with the signer of the package and the past signing certificates it included as its proof of signing certificate rotation. Signing certificates are returned in the order of rotation with the original signing certificate at index 0, and the current signing certificate at the last index. This method is the preferred replacement for the GET_SIGNATURES flag used with PackageManager#getPackageInfo(String, int). When determining if a package is signed by a desired certificate, the returned array should be checked to determine if it is one of the entries.

<note> This method returns null if the package is signed by multiple signing certificates, as opposed to being signed by one current signer and also providing the history of past signing certificates. #hasMultipleSigners() may be used to determine if this package is signed by multiple signers. Packages which are signed by multiple signers cannot change their signing certificates and their Signature array should be checked to make sure that every entry matches the looked-for signing certificates. </note>

Java documentation for android.content.pm.SigningInfo.getSigningCertificateHistory().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to