Share via


X509CertSelector.SetIssuer Method

Definition

Overloads

SetIssuer(Byte[])

Sets the issuer criterion.

SetIssuer(String)

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

SetIssuer(Byte[])

Sets the issuer criterion.

[Android.Runtime.Register("setIssuer", "([B)V", "GetSetIssuer_arrayBHandler")]
public virtual void SetIssuer (byte[]? issuerDN);
[<Android.Runtime.Register("setIssuer", "([B)V", "GetSetIssuer_arrayBHandler")>]
abstract member SetIssuer : byte[] -> unit
override this.SetIssuer : byte[] -> unit

Parameters

issuerDN
Byte[]

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

Attributes

Exceptions

if decoding the issuer fail.

Remarks

Sets the issuer criterion. The specified distinguished name must match the issuer distinguished name in the X509Certificate. If null is specified, the issuer criterion is disabled and any issuer distinguished name will do.

If issuerDN is not null, it should contain a single DER encoded distinguished name, as defined in X.501. The ASN.1 notation for this structure is as follows.

{@code
            Name ::= CHOICE {
              RDNSequence }

            RDNSequence ::= SEQUENCE OF RelativeDistinguishedName

            RelativeDistinguishedName ::=
              SET SIZE (1 .. MAX) OF AttributeTypeAndValue

            AttributeTypeAndValue ::= SEQUENCE {
              type     AttributeType,
              value    AttributeValue }

            AttributeType ::= OBJECT IDENTIFIER

            AttributeValue ::= ANY DEFINED BY AttributeType
            ....
            DirectoryString ::= CHOICE {
                  teletexString           TeletexString (SIZE (1..MAX)),
                  printableString         PrintableString (SIZE (1..MAX)),
                  universalString         UniversalString (SIZE (1..MAX)),
                  utf8String              UTF8String (SIZE (1.. MAX)),
                  bmpString               BMPString (SIZE (1..MAX)) }
            }

Note that the byte array specified here is cloned to protect against subsequent modifications.

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

SetIssuer(String)

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

[Android.Runtime.Register("setIssuer", "(Ljava/lang/String;)V", "GetSetIssuer_Ljava_lang_String_Handler")]
public virtual void SetIssuer (string? issuerDN);
[<Android.Runtime.Register("setIssuer", "(Ljava/lang/String;)V", "GetSetIssuer_Ljava_lang_String_Handler")>]
abstract member SetIssuer : string -> unit
override this.SetIssuer : string -> unit

Parameters

issuerDN
String

a distinguished name in RFC 2253 format (or null)

Attributes

Exceptions

if parsing the issuer fails.

Remarks

<strong>Denigrated</strong>, use #setIssuer(X500Principal) or #setIssuer(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 issuer criterion. The specified distinguished name must match the issuer distinguished name in the X509Certificate. If null, any issuer distinguished name will do.

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

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