Config2_SSLCertificate

Represents the current server SSL certificate of the current site.

Instances of this class are obtained from:

Properties

PropertyTypeDescription
commonName String

The fully qualified name of the server.

country String

keySize

Number

The number of bits in the key.

locality String

The name of the city/town/locality.

organization String

The name of the company or organization.

organizationalUnit String

The name of the department or organizational unit.

serialNumber String

The serial number of this certificate.

state String

The name of the state or province.

subjectAltName String

The subject alternative name that's an extension to the X.

thumbprint String

The thumbprint of this certificate.

validFrom Date

The certificate is valid from this date.

validTo Date

The certificate is valid until this date.

Methods

MethodReturnsDescription
export() String

Export the certificate.

generate() String

Generate a new self-signed certificate for this site.

import() void

Import a certificate from file content.

remove() void

Deletes this server certificate.

Property Details

(readonly) commonName :String

Description:
  • The fully qualified name of the server.

The fully qualified name of the server.

Type:
  • String

(readonly) country :String

Description:
Type:
  • String

(readonly) keySize :Number

Description:
  • The number of bits in the key.

The number of bits in the key.

Type:
  • Number

(readonly) locality :String

Description:
  • The name of the city/town/locality.

The name of the city/town/locality.

Type:
  • String

(readonly) organization :String

Description:
  • The name of the company or organization.

The name of the company or organization.

Type:
  • String

(readonly) organizationalUnit :String

Description:
  • The name of the department or organizational unit.

The name of the department or organizational unit.

Type:
  • String

(readonly) serialNumber :String

Description:
  • The serial number of this certificate.

The serial number of this certificate.

Type:
  • String

(readonly) state :String

Description:
  • The name of the state or province.

The name of the state or province.

Type:
  • String

(readonly) subjectAltName :String

Description:
  • The subject alternative name that's an extension to the X.509 specification that allows to specify additional host names for a single SSL certificate.

The subject alternative name that's an extension to the X.509 specification that allows to specify additional host names for a single SSL certificate.

Type:
  • String

(readonly) thumbprint :String

Description:
  • The thumbprint of this certificate.

The thumbprint of this certificate.

Type:
  • String

(readonly) validFrom :Date

Description:
  • The certificate is valid from this date.

The certificate is valid from this date.

Type:
  • Date

(readonly) validTo :Date

Description:
  • The certificate is valid until this date.

The certificate is valid until this date.

Type:
  • Date

Method Details

export(exportPrivateKey) → {String}

Description:
  • Export the certificate.

Parameters:
Name Type Description
exportPrivateKey Boolean

Whether to include the private key in the export.

Returns:

PEM encoded certificate (and optionally private key).

Type
String

generate(cn, o, ou, l, st, c, from, to, keySize) → {String}

Description:
  • Generate a new self-signed certificate for this site.

Parameters:
Name Type Description
cn String

The fully qualified name of the server (common name).

o String

The name of the company or organization.

ou String

The name of the department or organizational unit.

l String

The name of the city/town/locality.

st String

The name of the state or province.

c String

Two-letter country code.

from Date

The certificate is valid from this date.

to Date

The certificate is valid until this date.

keySize Number

The number of bits in the key.

Returns:

Result message

Type
String

import(certContent, certType, certPassword, privateKeyContent, privateKeyPassword)

Description:
  • Import a certificate from file content.

Parameters:
Name Type Description
certContent String

Certificate content (PEM or PFX/PKCS12 encoded).

certType String

Certificate type ('PEM' or 'PFX').

certPassword String

Password for PFX certificates.

privateKeyContent String

Private key content (for PEM certificates).

privateKeyPassword String

Password for encrypted private keys.

remove()

Description:
  • Deletes this server certificate.