A line feed gets added in the "Let's Encrypt Challenge" I am using the Let's Encrypt module for Drupal 7, trying to follow the instructions outlined here by Redfin Solutions, to install free SSL on Acquia's servers, but I've run into a curious problem:

Each time I generate the challenge using the certbot manual mode (using sudo certbot certonly --manual -d example.com), It tells me the key authorization file from the server does not match the challenge.


  Failed authorization procedure. example.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: The key authorization file from the server did not match this challenge
  [TBgi6LPQfn7SJOTMcA67Crjrb_wGI9WKL4XAE-a17io.x6url1PIuenF6WDlPejYYJM2E4fg3wOFn8t4ghXDAGI] != [
  TBgi6LPQfn7SJOTMcA67Crjrb_wGI9WKL4XAE-a17io.x6url1PIuenF6WDlPejYYJM2E4fg3wOFn8t4ghXDAGI]  
  
  IMPORTANT NOTES:
  
  
  The following errors were reported by the server:
  Domain: example.com
  Type: unauthorized
  Detail: The key authorization file from the server did not match    this challenge [TBgi6LPQfn7SJOTMcA67Crjrb_wGI9WKL4XAE-a17io.x6url1PIuenF6WDlPejYYJM2E4fg3wOFn8t4ghXDAGI] != [TBgi6LPQfn7SJOTMcA67Crjrb_wGI9WKL4XAE-a17io.x6url1PIuenF6WDlPejYYJM2E4fg3wOFn8t4ghXDAGI]
  
  
  To fix these errors, please make sure that your domain name was entered correctly and the DNS A record(s) for that domain contain(s) the right IP address.


As you can see, the second one (which is the one in the server), shows with a linefeed at the start. I am baffled by this, I went into the module and it just displays the value saved in a system variable, which I verified in the database. Other than that they seem to be identical, I have not been able to go further. Has anybody experienced anything similar? Any suggestions on how to fix this?
Turns out the module works like a charm, the problem was theme related, sending out a blank line at the top of the page: this was enough to confuse Let's Encrypt when running the validation of the site.