Udostępnij za pośrednictwem


X509CertSelector.SetSubject Method

Definition

Overloads

SetSubject(String)

<strong>Denigrated</strong>, use #setSubject(X500Principal) or #setSubject(byte[]) instead.

SetSubject(Byte[])

Sets the subject criterion.

SetSubject(String)

<strong>Denigrated</strong>, use #setSubject(X500Principal) or #setSubject(byte[]) instead.

[Android.Runtime.Register("setSubject", "(Ljava/lang/String;)V", "GetSetSubject_Ljava_lang_String_Handler")]
public virtual void SetSubject (string? subjectDN);
[<Android.Runtime.Register("setSubject", "(Ljava/lang/String;)V", "GetSetSubject_Ljava_lang_String_Handler")>]
abstract member SetSubject : string -> unit
override this.SetSubject : string -> unit

Parameters

subjectDN
String

a distinguished name in RFC 2253 format (or null)

Attributes

Exceptions

if decoding the subject fails.

Remarks

<strong>Denigrated</strong>, use #setSubject(X500Principal) or #setSubject(byte[]) instead. This method should not be relied on as it can fail to match some certificates because of a loss of encoding information in the RFC 2253 String form of some distinguished names.

Sets the subject criterion. The specified distinguished name must match the subject distinguished name in the X509Certificate. If null, any subject distinguished name will do.

If subjectDN is not null, it should contain a distinguished name, in RFC 2253 format.

Java documentation for java.security.cert.X509CertSelector.setSubject(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.

Applies to

SetSubject(Byte[])

Sets the subject criterion.

[Android.Runtime.Register("setSubject", "([B)V", "GetSetSubject_arrayBHandler")]
public virtual void SetSubject (byte[]? subjectDN);
[<Android.Runtime.Register("setSubject", "([B)V", "GetSetSubject_arrayBHandler")>]
abstract member SetSubject : byte[] -> unit
override this.SetSubject : byte[] -> unit

Parameters

subjectDN
Byte[]

a byte array containing the distinguished name in ASN.1 DER format (or null)

Attributes

Exceptions

if decoding the subject fails.

Remarks

Sets the subject criterion. The specified distinguished name must match the subject distinguished name in the X509Certificate. If null, any subject distinguished name will do.

If subjectDN is not null, it should contain a single DER encoded distinguished name, as defined in X.501. For the ASN.1 notation for this structure, see #setIssuer(byte [] issuerDN) setIssuer(byte [] issuerDN).

Java documentation for java.security.cert.X509CertSelector.setSubject(byte[]).

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