# Error on finalize csr submission

**URL:** <https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829>\
**Category:** Client dev\
**Created:** [October 23, 2021, 2:57pm UTC](https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829 "2021-10-23T14:57:10Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![daigu](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@daigu](https://community.letsencrypt.org/u/daigu)\
**Post date:** [October 23, 2021, 2:57pm UTC](https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829/1 "2021-10-23T14:57:10Z")

</div>

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](https://crt.sh/?q=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](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](http://chibichu.com)) but it is hosted by GoDaddy if that is a problem. i would appreciate any help. thank you in advance.

{"csr" : "MIIDfjCCAesCAQAwRDELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkRDMREwDwYDVQQKDAhDaGliaUNodTEVMBMGA1UEAwwMY2hpYmlj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amLkDbgfY1fjWVD/wZ7eT7MTw=="}

---

<div class="post-metadata">

**Author:** ![daigu](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@daigu](https://community.letsencrypt.org/u/daigu)\
**Post date:** [October 23, 2021, 3:19pm UTC](https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829/2 "2021-10-23T15:19:17Z")

</div>

correction - i typoed my domain name, needed more coffee...  
my domain name is [chibichu.com](http://chibichu.com), not [chicbichu.com](http://chicbichu.com)

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [October 23, 2021, 4:11pm UTC](https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829/3 "2021-10-23T16:11:34Z")

</div>

Hello 🙂

Author of [CertSage](https://community.letsencrypt.org/t/certsage-acme-client-version-1-1-0-easy-webpage-interface-no-commands-to-type-root-not-required/159103) 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.

---

<div class="post-metadata">

**Author:** ![daigu](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@daigu](https://community.letsencrypt.org/u/daigu)\
**Post date:** [October 23, 2021, 4:44pm UTC](https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829/4 "2021-10-23T16:44:08Z")

</div>

hi yes, i realize i didnt send the actual encoded value.  
{"payload":"eyJjc3IiIDogIk1JSURmakNDQWVzQ0FRQXdSREVMTUFrR0ExVUVCaE1DVlZNeEN6QUpCZ05WQkFnTUFrUkRNUkV3RHdZRFZRUUtEQWhEYUdsaWFVTm9kVEVWTUJNR0ExVUVBd3dNWTJocFltbGphSFV1WTI5dE1JSUJuREFOQmdrcWhraUc5dzBCQVFFRkFBT0NBWWtBTUlJQm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DDKk6Bd3AGrwarFA6kPwXwfEGwgfE\_Pxuw6yYQ6p1mut8YLaBC6LZmolhFzNByZTNdoSKn1UL6k\_dNaEW61Y0J7IK9oZv\_kuc1upo1FBoNSo94Ng4OnSk0yzGzkD2fTlvR"}

i base64urlencode the strings...

---

<div class="post-metadata">

**Author:** ![daigu](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@daigu](https://community.letsencrypt.org/u/daigu)\
**Post date:** [October 23, 2021, 4:45pm UTC](https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829/5 "2021-10-23T16:45:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![daigu](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@daigu](https://community.letsencrypt.org/u/daigu)\
**Post date:** [October 23, 2021, 4:46pm UTC](https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829/6 "2021-10-23T16:46:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![daigu](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@daigu](https://community.letsencrypt.org/u/daigu)\
**Post date:** [October 23, 2021, 7:13pm UTC](https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829/7 "2021-10-23T19:13:47Z")

</div>

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](http://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](http://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 ☹ 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.

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [October 23, 2021, 8:17pm UTC](https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829/8 "2021-10-23T20:17:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![daigu](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@daigu](https://community.letsencrypt.org/u/daigu)\
**Post date:** [October 23, 2021, 9:04pm UTC](https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829/9 "2021-10-23T21:04:17Z")

</div>

THANK YOU ! 😃 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 🙂 you made my weekend ! thanks again 😃

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [October 23, 2021, 9:08pm UTC](https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829/10 "2021-10-23T21:08:06Z")

</div>

> [@daigu](#):
>
> everyone on this site has been so helpful

I blame @griffin for all the cheer - LOL

---

<div class="post-metadata">

**Author:** ![daigu](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@daigu](https://community.letsencrypt.org/u/daigu)\
**Post date:** [October 23, 2021, 9:11pm UTC](https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829/11 "2021-10-23T21:11:06Z")

</div>

its a nice thing to be blamed for LOL 😃  
the world could use more blaming like that 🙂

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [October 23, 2021, 9:16pm UTC](https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829/12 "2021-10-23T21:16:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)\
**Post date:** [October 23, 2021, 9:25pm UTC](https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829/13 "2021-10-23T21:25:06Z")

</div>

That might make the world crazy. 🤪

Wait... too late. 🙃

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [November 22, 2021, 9:25pm UTC](https://community.letsencrypt.org/t/error-on-finalize-csr-submission/163829/14 "2021-11-22T21:25:35Z")

</div>

Closed on November 22, 2021, 9:25pm UTC

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