flash.security

# X509Certificate - AS3

Package | flash.security
Class | public class X509Certificate
Inheritance | X509Certificate Object

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11, AIR 3

The X509Certificate class represents an X.509 certificate. This class defines X.509 properties specified in RFC2459. After you make a successful call to `SecureSocket.connect()`, the server's certificate data is stored as an X509Certificate instance in the `SecureSocket.serverCertificate` property.

Use this class to examine a server certificate after establishing a secure socket connection. The properties in this class provide access to the most used attributes of an X.509 certificate. If you must access other parts of a server certificate (for example, its extensions), the complete certificate is available in the `encoded` property. The certificate stored in the `encoded` property is DER-encoded.

Related API Elements

SecureSocket class

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | encoded : ByteArray [read-only] Provides the whole certificate in encoded form. | X509Certificate
|  | issuer : X500DistinguishedName [read-only] Provides the issuer's Distinguished Name (DN). | X509Certificate
|  | issuerUniqueID : String [read-only] Provides the issuer's unique identifier. | X509Certificate
|  | serialNumber : String [read-only] Provides the serial number of the certificate as a hexadecimal string. | X509Certificate
|  | signatureAlgorithmOID : String [read-only] Provides the signature algorithm Object Identifier (OID). | X509Certificate
|  | signatureAlgorithmParams : ByteArray [read-only] Provides the signature algorithm's parameters. | X509Certificate
|  | subject : X500DistinguishedName [read-only] Provides the subject's Distinguished Name (DN). | X509Certificate
|  | subjectPublicKey : String [read-only] Provides the subject's public key. | X509Certificate
|  | subjectPublicKeyAlgorithmOID : String [read-only] Provides the algorithm OID for the subject's public key. | X509Certificate
|  | subjectUniqueID : String [read-only] Provides the subject's unique identifier. | X509Certificate
|  | validNotAfter : Date [read-only] Indicates the date on which the certificate's validity period ends. | X509Certificate
|  | validNotBefore : Date [read-only] Indicates the date on which the certificate's validity period begins. | X509Certificate
|  | version : uint [read-only] Provides the version number of the certificate format. | X509Certificate

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Property Detail

### encoded

property

`encoded:ByteArray` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11, AIR 3

Provides the whole certificate in encoded form. Client code can decode this value to process certificate extensions. X.509 certificate extensions are not represented in the other properties in this class. Decoding the `encoded` property is the only way to access a certificate's extensions.

Implementation
`public function get encoded():ByteArray`

### issuer

property

`issuer:X500DistinguishedName` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11, AIR 3

Provides the issuer's Distinguished Name (DN).

Implementation
`public function get issuer():X500DistinguishedName`

Related API Elements

X500DistinguishedName class

### issuerUniqueID

property

`issuerUniqueID:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11, AIR 3

Provides the issuer's unique identifier.

Implementation
`public function get issuerUniqueID():String`

### serialNumber

property

`serialNumber:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11, AIR 3

Provides the serial number of the certificate as a hexadecimal string. The issuer assigns this number, and the number is unique within the issuer's list of issued certificates.

Implementation
`public function get serialNumber():String`

### signatureAlgorithmOID

property

`signatureAlgorithmOID:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11, AIR 3

Provides the signature algorithm Object Identifier (OID).

Implementation
`public function get signatureAlgorithmOID():String`

### signatureAlgorithmParams

property

`signatureAlgorithmParams:ByteArray` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11, AIR 3

Provides the signature algorithm's parameters. If there are no signature algorithm parameters, this value is set to null.

Implementation
`public function get signatureAlgorithmParams():ByteArray`

### subject

property

`subject:X500DistinguishedName` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11, AIR 3

Provides the subject's Distinguished Name (DN).

Implementation
`public function get subject():X500DistinguishedName`

Related API Elements

X500DistinguishedName class

### subjectPublicKey

property

`subjectPublicKey:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11, AIR 3

Provides the subject's public key.

Implementation
`public function get subjectPublicKey():String`

### subjectPublicKeyAlgorithmOID

property

`subjectPublicKeyAlgorithmOID:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11, AIR 3

Provides the algorithm OID for the subject's public key.

Implementation
`public function get subjectPublicKeyAlgorithmOID():String`

### subjectUniqueID

property

`subjectUniqueID:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11, AIR 3

Provides the subject's unique identifier.

Implementation
`public function get subjectUniqueID():String`

### validNotAfter

property

`validNotAfter:Date` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11, AIR 3

Indicates the date on which the certificate's validity period ends.

Implementation
`public function get validNotAfter():Date`

### validNotBefore

property

`validNotBefore:Date` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11, AIR 3

Indicates the date on which the certificate's validity period begins.

Implementation
`public function get validNotBefore():Date`

### version

property

`version:uint` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11, AIR 3

Provides the version number of the certificate format. This property indicates whether the certificate has extensions, a unique identifier, or only the basic fields.

- `version` = 2: Indicates X.509 Version 3 - Extensions are present
- `version` = 1: Indicates X.509 Version 2 - Extensions are not present, but a unique identifier is present.
- `version` = null: Indicates X.509 Version 1 - Only the basic certificate fields are present

Implementation
`public function get version():uint`

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00