Hello everyone,
I am facing an issue with the primary hardware ID when registering a device using certificate-based authentication. I am using OpenSSL to generate device certificates and have specified the primary hardware ID in the certificate. However, when the device connects to the Golioth cloud, the primary hardware ID is not what I specified. Instead, it seems to be appended with a timestamp.
Steps to Generate the Certificate:
I am using the following OpenSSL commands to generate the device certificate:
Generate an elliptic curve private key
openssl ecparam -name prime256v1 -genkey -noout -out “erad003.key.pem”
Create a certificate signing request (CSR)
openssl req -new -key “erad003.key.pem” -subj “/C=BR/O=ethermostat/CN=rad003” -out “erad003.csr.pem”
Sign the certificate (CSR) using a self-signed root certificate
openssl x509 -req -in “erad003.csr.pem” -CA “golioth.crt.pem” -CAkey “golioth.key.pem” -CAcreateserial -out “erad003.crt.pem” -days 500 -sha256
Expected Behavior:
I expect the primary hardware ID to be `erad003` as specified in the certificate.
Actual Behavior:
The primary hardware ID that gets registered in the Golioth cloud is in the format `20230917171529-rad003`.

Questions:
1. Is there a way to control the primary hardware ID during automatic registration?
2. Can I read this generated ID back into my device code?
3. Is this behavior documented, and if so, where can I find more information?
I would appreciate any help or guidance on this issue. Thank you!