KeyStore.GetCertificateAlias(Certificate) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.
[Android.Runtime.Register("getCertificateAlias", "(Ljava/security/cert/Certificate;)Ljava/lang/String;", "")]
public string? GetCertificateAlias (Java.Security.Cert.Certificate? cert);
[<Android.Runtime.Register("getCertificateAlias", "(Ljava/security/cert/Certificate;)Ljava/lang/String;", "")>]
member this.GetCertificateAlias : Java.Security.Cert.Certificate -> string
- cert
- Certificate
the certificate to match with.
the alias name of the first entry with a matching certificate, or null if no such entry exists in this keystore.
- Attributes
if this KeyStore
is not initialized.
Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.
This method attempts to match the given certificate with each keystore entry. If the entry being considered was created by a call to setCertificateEntry
, or created by a call to setEntry
with a TrustedCertificateEntry
, then the given certificate is compared to that entry's certificate.
If the entry being considered was created by a call to setKeyEntry
, or created by a call to setEntry
with a PrivateKeyEntry
, then the given certificate is compared to the first element of that entry's certificate chain.
Java documentation for java.security.KeyStore.getCertificateAlias(java.security.cert.Certificate)
.
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.