fleet-telemetry icon indicating copy to clipboard operation
fleet-telemetry copied to clipboard

Validation failed: Csr is not a valid CSR

Open henriksteen opened this issue 1 year ago • 7 comments

After following the installation instructions, including the check_csr, I get: {"response":null,"error":"Validation failed: Csr is not a valid CSR","error_description":"","txid":"8ebdc3bed961facfc62dba400a988185"}

tools/check_csr returns:

CSR: elmert.com.csr Host: www.elmert.com Public keys are matching

I've regenerated the csr, but no luck.

henriksteen avatar Apr 12 '24 12:04 henriksteen

The CSR validates correctly on CSR decoders and using OpenSSL.

I presume there is something wrong in the documentation asking to generate it using: openssl req -out elmert.com.csr -key private-key.pem -subj /CN=elmert.com/ -new

henriksteen avatar Apr 15 '24 11:04 henriksteen

I presume there is something wrong in the documentation asking to generate it using:

I would expect the check_csr script to be wrong rather than the openssl command. I checked what I could and everything does look correct. Just make sure the CSR is signed with the private key associated with https://www.elmert.com/.well-known/appspecific/com.tesla.3p.public-key.pem

Bre77 avatar Apr 16 '24 08:04 Bre77

@henriksteen When you're including the CSR in your register request, are you replacing every newline with \n? Can you share a more recent TXID? Sorry I'm just seeing this issue.

patrickdemers6 avatar Apr 18 '24 04:04 patrickdemers6

@Bre77 No diff between the key on https://www.elmert.com/.well-known/appspecific/com.tesla.3p.public-key.pem and the local public key. I verified it after downloading from the site to be sure.

What's odd is that it claims the CSR is not a valid CSR.

henriksteen avatar Apr 19 '24 09:04 henriksteen

@patrickdemers6 I did an xxd on it and can confirm that all newlines are 0A only (\n).

The most recent response I got is: {"response":null,"error":"Validation failed: Csr is not a valid CSR","error_description":"","txid":"30e010dd66f70b9e7b803a36ffb03472"}

Any idea what the txid means?

henriksteen avatar Apr 19 '24 09:04 henriksteen

@henriksteen email me your CSR and client ID at [email protected]

I will manually get it attached to your account 👍

patrickdemers6 avatar Apr 19 '24 13:04 patrickdemers6

If you can also include the exact json payload you're sending, I'll debug what went wrong so we can improve error message.

patrickdemers6 avatar Apr 19 '24 13:04 patrickdemers6