Documentation

Mistake on this page? Email us

Certificate

Hierarchy

Index

Constructors

constructor

Properties

accountId

accountId: string

The UUID of the account.

certificateData

certificateData: string

X509.v3 CA certificate in PEM or base64 encoded DER format

createdAt

createdAt: Date

The timestamp when this certfcate was created.

description

description: string

Certificate description

developerCertificate

developerCertificate: string

PEM format X.509 developer certificate.

developerPrivateKey

developerPrivateKey: string

PEM format developer private key associated to the certificate.

enrollmentMode

enrollmentMode: boolean = false

If true, signature parameter is not required. Default value is false.

headerFile

headerFile: string

Content of the security.c file that will be flashed into the device to provide the security credentials.

id

id: string

Entity ID.

issuer

issuer: string

Issuer of the certificate.

name

name: string

Certificate name

ownerId

ownerId: string

The UUID of the certificate owner (user or ApiKey).

serverCertificate

serverCertificate: string

PEM format X.509 server certificate that will be used to validate the server certificate and will be received during the TLS/DTLS handshake.

serverUri

serverUri: string

Bootstrap server URI to which the client needs to connect to.

status

Status of the certificate

subject

subject: string

Subject of the certificate.

type

Certificate type

validity

validity: Date

Expiration Date.

Methods

delete

  • delete(): Promise<void>
  • Delete the certificate

    Returns Promise<void>

    Promise containing any error

  • Delete the certificate

    Parameters

    • Optional callback: CallbackFn<void>

      A function that is passed any error

    Returns void

update

  • Updates the certificate

    Parameters

    • signature: string

      Base64 encoded signature of the account ID signed by the certificate to be uploaded. Signature must be hashed with SHA256

    Returns Promise<Certificate>

    Promise containing certificate

  • Updates the certificate

    Parameters

    • signature: string

      Base64 encoded signature of the account ID signed by the certificate to be uploaded. Signature must be hashed with SHA256

    • callback: CallbackFn<Certificate>

      A function that is passed the return arguments (error, certificate)

    Returns void