Error on finalize csr submission

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: chibichu.com

I ran this command: https://acme-staging-v02.api.letsencrypt.org/acme/finalize/31074468/836252348

It produced this output:
{
u'detail': u'Error unmarshaling finalize order request',
u'status': 400,
u'type': u'urn:ietf:params:acme:error:malformed'
}

My web server is (include version): dont know, godaddy. i can find out

The operating system my web server runs on is (include version):linux i think

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know): dont know

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): yes cpanel

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):

i am writing code to access the staging server. everything seems to work until i get to finalize and submit the csr. i Base64UrlEncoder.Encode the below contents. i do not know if something is wrong with csr line - i don tknow if csr contents have to have something specific. i put up a dev public site to test against (the chibichu.com) but it is hosted by GoDaddy if that is a problem. i would appreciate any help. thank you in advance.

{"csr" : "MIIDfjCCAesCAQAwRDELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkRDMREwDwYDVQQKDAhDaGliaUNodTEVMBMGA1UEAwwMY2hpYmljaHUuY29tMIIBnDANBgkqhkiG9w0BAQEFAAOCAYkAMIIBhAKCAXsEvEIZUdPXFndr9Jj3IxXc0Lno6mYt7M0oOBlcrJxh362uBFIVQ1YMIpIW/C/7dz8nHQCfrZB1DO8QnyN/E5A8rWoLy5bcx1h6T0I2LfahRHWZTBlDghJU4o3hnQ0ERhei7F0DHeWLb8kC+/P+j6h6w+IAT82c3E1huJsNq3yzCrqiS0c/LaFvnELlOQhLuTdfuKEvUiyDRG0S77QDGOm3ojYwb4x2WnObOIaa2UnJEySOC383wO4+X1dWo+pl5s5img+obL8CuYfctrcwQQ6Ru13PHGw22OCqsi17SohZ1fHJGAM62sZz1VyOZxV2/xoU/wTc5+aZn4feC/5XE1D9Lld/6LXs0QEbRbdTZrG3av3FxFEoDiSPtk68xb7mdhMKHN+fj7CdFE1+c/SQl8mnmlhBRjcyCZSotJQKVZL/br10GxBUWhUXUaJdZR3PRvy1v90pY8vkjF0sSqKXHPzOd2dCNcLXbHb/TP4jhOZwoRUkt9YnJYvyxqZTAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAXwAAqWEIKUpkXmhVF5boQn+AhURqCSMT8/TeTIst0sDHdD43wrgRXj4kJEwZFIxRQt8CNACXmTvIs62wpqajuQ3KjPKo7sw5jsAKpDxxGAAShvUjcJoHt/ZIDdI6DoePNrvyNncw76ouwwBCYR3vo06tsegnxyVs8/DqGpxOWRMeDsl9I6uSViqrxlWO82tVeDcJE5Ykpdgjx09PseCMVvztUmO6UVGSV7DLvvmk1iDRamvYB2lBcz4MtmMaf3q+fkJ8ZZ3RhRb9Qq3GF2YTWEtrpZL2z8GE+uK9rGIUnokQjmCAJ/BQT867NPNXmeEX5q3b6+s5udv14EsWRnTo9URGFuvTl2BsQwTb11TSOEdAIRm5Iq3fwxwRkVsZgW9MAvyfK8ALx2wgKwnIbpGp8xDlsqhaX9IlFaHKGr2giDEKgBlHUl4LUpfuGU6EGNFfBUIFJ1m1iOwt362yyYrohQoCwkgsFxW+en5wamLkDbgfY1fjWVD/wZ7eT7MTw=="}

1 Like

correction - i typoed my domain name, needed more coffee...
my domain name is chibichu.com, not chicbichu.com

2 Likes

Hello :slightly_smiling_face:

Author of CertSage ACME client here.

In your CSR you need to:

  • Remove the newline characters "\n"
  • Replace the plus signs "+" with minus signs "-"
  • Replace the forward slashes "/" with underscores "_"
  • Strip the equals signs "=" from the end

before you Base64UrlEncoder.Encode the whole payload.

2 Likes

hi yes, i realize i didnt send the actual encoded value.
{"payload":"eyJjc3IiIDogIk1JSURmakNDQWVzQ0FRQXdSREVMTUFrR0ExVUVCaE1DVlZNeEN6QUpCZ05WQkFnTUFrUkRNUkV3RHdZRFZRUUtEQWhEYUdsaWFVTm9kVEVWTUJNR0ExVUVBd3dNWT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8xQ7QrF5ZMrZT8lhayX9fA1Txd6WUnCydXE1GzhoUSGgneCvZWrY5V5P87DDKk6Bd3AGrwarFA6kPwXwfEGwgfE_Pxuw6yYQ6p1mut8YLaBC6LZmolhFzNByZTNdoSKn1UL6k_dNaEW61Y0J7IK9oZv_kuc1upo1FBoNSo94Ng4OnSk0yzGzkD2fTlvR"}

i base64urlencode the strings...

1 Like

i can send more details if needed. nothing here will be used for 'real'.. keys and certs etc... and the site is just for this dev purpose and i am not uploading the cert once i get it to the site

1 Like

oh i read more carefully. going to try what i think you are saying :slight_smile: i am great at misinterpreting :stuck_out_tongue: thanks!

3 Likes

so alot of the problem (is me :P) is i dont know much about csrs, keys, signing, etc... to create the csr i just went into openssl and tried to create one with the cn of the website (identifier). i submitted the request as i did all the previous requests (new-order, get authorizations, challenges, etc) using the account keypair. was i supposed to do something different with the csr request? i saw this in the how it works page.. "To obtain a certificate for the domain, the agent constructs a PKCS#10 Certificate Signing Request that asks the Let’s Encrypt CA to issue a certificate for example.com with a specified public key.
As usual, the CSR includes a signature by the private key corresponding to the public key in the CSR.
The agent also signs the whole CSR with the authorized key for example.com so that the Let’s Encrypt CA knows it’s authorized." didnt know what was meant by the signature by the private key corresponding to the public key n the csr... is that done automatically? or is that a step i am missing :frowning: i didnt have a specific public key , i just assumed anything required was rolled up inside the csr. sorry i am being so dumb on this. i tried your suggestion and it complained about the public key length being wrong. so i am still futzing with it.

1 Like

When you generate a CSR, you either need to pass in a private key or have one generated for you. It cannot be the same private key as your ACME account. That private key will be the private key for the resulting certificate (meaning that the CSR and certificate use the same private key). The error is almost certainly that the private key was of an unacceptable length/strength (number of bits). For RSA, this is the length of the modulus, which is part of both the public and private keys. A typical modulus length is 2048 bits. A stronger, but less common and slower, modulus length is 4096 bits. Check your settings for OpenSSL regarding the private key generation.

3 Likes

THANK YOU ! :smiley: that did it. i did not realize i needed to 'cleanse' the csr itself prior to the encoding of the whole payload ... and then i didnt realize i had fat fingered my csr creation command in openssl and had said 3027 instead of 3072.... derrrrrrrrrrr... (the other kind of der) . everyone on this site has been so helpful :slight_smile: you made my weekend ! thanks again :smiley:

3 Likes

I blame @griffin for all the cheer - LOL

3 Likes

its a nice thing to be blamed for LOL :smiley:
the world could use more blaming like that :slight_smile:

2 Likes

Yes indeed, we could all use a lot more @griffin s in this world!
:beers:

5 Likes

That might make the world crazy. :crazy_face:

Wait... too late. :upside_down_face:

5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.