Udostępnij za pośrednictwem


Identity.AddCertificate(ICertificate) Method

Definition

Caution

deprecated

Adds a certificate for this identity.

[Android.Runtime.Register("addCertificate", "(Ljava/security/Certificate;)V", "GetAddCertificate_Ljava_security_Certificate_Handler")]
[System.Obsolete("deprecated")]
public virtual void AddCertificate (Java.Security.ICertificate? certificate);
[<Android.Runtime.Register("addCertificate", "(Ljava/security/Certificate;)V", "GetAddCertificate_Ljava_security_Certificate_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member AddCertificate : Java.Security.ICertificate -> unit
override this.AddCertificate : Java.Security.ICertificate -> unit

Parameters

certificate
ICertificate

the certificate to be added.

Attributes

Exceptions

if the certificate is not valid.

Remarks

Adds a certificate for this identity. If the identity has a public key, the public key in the certificate must be the same, and if the identity does not have a public key, the identity's public key is set to be that specified in the certificate.

First, if there is a security manager, its checkSecurityAccess method is called with "addIdentityCertificate" as its argument to see if it's ok to add a certificate.

Java documentation for java.security.Identity.addCertificate(java.security.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.

Applies to