KeyStore.GetCertificate(String) 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 certificate associated with the given alias.
[Android.Runtime.Register("getCertificate", "(Ljava/lang/String;)Ljava/security/cert/Certificate;", "")]
public Java.Security.Cert.Certificate? GetCertificate (string? alias);
[<Android.Runtime.Register("getCertificate", "(Ljava/lang/String;)Ljava/security/cert/Certificate;", "")>]
member this.GetCertificate : string -> Java.Security.Cert.Certificate
- alias
- String
the alias name
the certificate, or null if the given alias does not exist or does not contain a certificate.
- Attributes
if this KeyStore
is not initialized.
Returns the certificate associated with the given alias.
If the given alias name identifies an entry created by a call to setCertificateEntry
, or created by a call to setEntry
with a TrustedCertificateEntry
, then the trusted certificate contained in that entry is returned.
If the given alias name identifies an entry created by a call to setKeyEntry
, or created by a call to setEntry
with a PrivateKeyEntry
, then the first element of the certificate chain in that entry is returned.
Java documentation for java.security.KeyStore.getCertificate(java.lang.String)
.
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.