Share via


IX509Extension.GetExtensionValue(String) Method

Definition

Gets the DER-encoded OCTET string for the extension value (<em>extnValue</em>) identified by the passed-in oid String.

[Android.Runtime.Register("getExtensionValue", "(Ljava/lang/String;)[B", "GetGetExtensionValue_Ljava_lang_String_Handler:Java.Security.Cert.IX509ExtensionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public byte[]? GetExtensionValue (string? oid);
[<Android.Runtime.Register("getExtensionValue", "(Ljava/lang/String;)[B", "GetGetExtensionValue_Ljava_lang_String_Handler:Java.Security.Cert.IX509ExtensionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetExtensionValue : string -> byte[]

Parameters

oid
String

the Object Identifier value for the extension.

Returns

Byte[]

the DER-encoded octet string of the extension value or null if it is not present.

Attributes

Remarks

Gets the DER-encoded OCTET string for the extension value (<em>extnValue</em>) identified by the passed-in oid String. The oid string is represented by a set of nonnegative whole numbers separated by periods.

For example:<br> <table class="striped"> <caption style="display:none">Examples of OIDs and extension names</caption> <thead> <tr> <th scope="col">OID <em>(Object Identifier)</em></th> <th scope="col">Extension Name</th></tr> </thead> <tbody style="text-align:left"> <tr><th scope="row">2.5.29.14</th> <td>SubjectKeyIdentifier</td></tr> <tr><th scope="row">2.5.29.15</th> <td>KeyUsage</td></tr> <tr><th scope="row">2.5.29.16</th> <td>PrivateKeyUsage</td></tr> <tr><th scope="row">2.5.29.17</th> <td>SubjectAlternativeName</td></tr> <tr><th scope="row">2.5.29.18</th> <td>IssuerAlternativeName</td></tr> <tr><th scope="row">2.5.29.19</th> <td>BasicConstraints</td></tr> <tr><th scope="row">2.5.29.30</th> <td>NameConstraints</td></tr> <tr><th scope="row">2.5.29.33</th> <td>PolicyMappings</td></tr> <tr><th scope="row">2.5.29.35</th> <td>AuthorityKeyIdentifier</td></tr> <tr><th scope="row">2.5.29.36</th> <td>PolicyConstraints</td></tr> </tbody> </table>

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