X509CertSelector.SetSubjectKeyIdentifier(Byte[]) Method
Definition
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.
Sets the subjectKeyIdentifier criterion.
[Android.Runtime.Register("setSubjectKeyIdentifier", "([B)V", "GetSetSubjectKeyIdentifier_arrayBHandler")]
public virtual void SetSubjectKeyIdentifier (byte[]? subjectKeyID);
[<Android.Runtime.Register("setSubjectKeyIdentifier", "([B)V", "GetSetSubjectKeyIdentifier_arrayBHandler")>]
abstract member SetSubjectKeyIdentifier : byte[] -> unit
override this.SetSubjectKeyIdentifier : byte[] -> unit
Parameters
- subjectKeyID
- Byte[]
the subject key identifier (or null
)
- Attributes
Remarks
Sets the subjectKeyIdentifier criterion. The X509Certificate
must contain a SubjectKeyIdentifier extension for which the contents of the extension matches the specified criterion value. If the criterion value is null
, no subjectKeyIdentifier check will be done.
If subjectKeyID
is not null
, it should contain a single DER encoded value corresponding to the contents of the extension value (not including the object identifier, criticality setting, and encapsulating OCTET STRING) for a SubjectKeyIdentifier extension. The ASN.1 notation for this structure follows.
{@code
SubjectKeyIdentifier ::= KeyIdentifier
KeyIdentifier ::= OCTET STRING
}
Since the format of subject key identifiers is not mandated by any standard, subject key identifiers are not parsed by the X509CertSelector
. Instead, the values are compared using a byte-by-byte comparison.
Note that the byte array supplied here is cloned to protect against subsequent modifications.
Java documentation for java.security.cert.X509CertSelector.setSubjectKeyIdentifier(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.