Skip to main content

Certificates

ReferenceAudience: API consumerUse: look up the members, types and limits of a certificate object

These objects are sent with install_certificate and delete_certificate, and returned by get_installed_certificates. Default is the value the reader uses when you omit the member. The procedure is in Certificate Management.

Install​

installCertPayload​

The certDetails object of install_certificate.

FieldTypeRequiredDefaultLimitsMeaning
namestringNoA name for the certificate entry. What an install without a name does is not specified
typecertificateTypeYesWhere the certificate is used
authenticationTypeauthenticationTypeYesHow the reader authenticates to the download server; required even for DIRECT
certSourceenum: HTTP, DIRECTNoHTTP downloads each component from url; DIRECT takes it inline from certificateBundle. When omitted, the reader uses HTTP
urlarray of certificateUrlEntryNoDownload URL for each component. Required, and not empty, when certSource is HTTP
verificationTypeverificationTypeNoHow far the reader verifies the download server's TLS certificate
certificateBundleobject (certificateBundle)NoInline certificate content. Required, and not empty, when certSource is DIRECT
caCertificateFileContentstringNoInline CA content for authenticating the download server, with certSource HTTP and authenticationType CERTIFICATE. Empty means use an installed filestore certificate
certFormatenum: PEM, BASE64NoPEM, or BASE64 for PEM text encoded again in base64. The contract states no default
  • The device supports PEM certificates, or PEM encoded again in base64, and private keys must be PKCS1. Certificate content is limited to 4 KB.
  • certSource: "HTTP" requires url; without it the reply is code 29. certSource: "DIRECT" requires certificateBundle; without it the reply is code 30.
  • caCertificateFileContent applies only with certSource: "HTTP" and authenticationType: "CERTIFICATE".
  • A client certificate must be installed with its key; sending one without the other returns code 36.

certificateBundle​

Inline content, with certSource: "DIRECT".

FieldTypeRequiredDefaultLimitsMeaning
ca_certstringNoCA certificate content
client_keystringNoClient private key content, PKCS1
client_certstringNoClient certificate content
cert_key_passwordstringNoPassword for an encrypted client key

certificateUrlEntry​

One entry of url, with certSource: "HTTP".

FieldTypeRequiredDefaultLimitsMeaning
keycertificateComponentKeyNoThe certificate component: ca_cert, client_cert, client_key or cert_key_password
valuestringNoThe component's download URL; for cert_key_password, the key password itself

Delete​

delCertPayload​

The certificateInfo object of delete_certificate.

FieldTypeRequiredDefaultLimitsMeaning
namestringNoThe certificate to delete. When omitted, every certificate of the type is deleted. Whether it matches the install name or a component name is not settled
typecertificateTypeYesThe type of certificate to delete
  • Without name, the reader deletes every installed certificate of the given type.
  • A certificate installed without a type cannot be deleted. Code 21 means no certificate matched.

Read-Back​

installedCerts​

The installedCerts object of the get_installed_certificates reply.

FieldTypeRequiredDefaultLimitsMeaning
certInfoarray of certInfoEntryNoOne entry per installed certificate

certInfoEntry​

FieldTypeRequiredDefaultLimitsMeaning
namestringNoThe certificate's name. The contract's examples carry component names such as ca_cert
typecertificateTypeYesWhere the certificate is used
installTimestringNoWhen the certificate was installed. The contract's example omits it
issuerNamestringYesThe issuer's common name
publicKeyAlgenum: RSA, RSAMD5, RSA_SHA_1, RSA_SHA_256, RSA_SHA_384, RSA_SHA_512NoThe public-key algorithm
publicKeystringNoDeclared as the public key; every published example carries an algorithm name instead
serialstringNoThe certificate's serial number
subjectNamestringYesThe subject's name
validFromstringYesStart of the validity period
validTillstringYesEnd of the validity period

References​

certificateRef​

One entry of the certificate list of an Enterprise Wi-Fi profile, sent with set_wifi. An endpoint names its certificates in securityParams; see MQTT Endpoints.

FieldTypeRequiredDefaultLimitsMeaning
keycertificateComponentKeyNoThe certificate component: ca_cert, client_cert, client_key or cert_key_password
valuestringNoThe installed certificate's name; for cert_key_password, the key password

The contract does not settle how the names in certificateRef, securityParams and delCertPayload relate to the name sent at install.

Related: 📕 install_certificate · 📕 get_installed_certificates · 📕 delete_certificate · 📕 Enumerations · 📕 Certificate Management

Was this helpful?