Support » Plugin: WP Encrypt » ERROR: Registration key is already in use

  • I have a Let’s encrypt certificate expiring tomorrow. Recently I changed hosting and they don’t support Let’s encrypt. so I had to install this plugin.
    Now while doing the set up, I have the error: Registration key is already in use.
    Probably because I have already a let’s encrypt certificate for the website (but it is expiring in one day).
    What do I have to do?

Viewing 15 replies - 1 through 15 (of 30 total)
  • theblockenterprises

    (@theblockenterprises)

    I am having this same issue. How do I reset the registration so that I can generate a new certificate?

    I face this problem by 2 new installed domains. No plugin is active except WP Encrypt. It is the first time I use it for these 2 domains and not a retry but I get the error message: Registration key is already in use. How to fix it?

    same issue here. Let’s Encrypt: Registration key is already in use

    I used the dangerzone to reset the plugin since I was havning trouble reissuing the certs. Now I’m getting the error “Let’s Encrypt: Registration key is already in use” when I try to register again. I tried to delete the account folder from the server but I’m still getting this.

    Hello,

    I’m using WP encrypt plugin into my wordpress website and certificate got expired i want it to renew …

    I’m unable to do this and what i did .

    I uninstalled the expired certificate.
    Tried to generate new certificate but got this error “Let’s Encrypt: Registration key is already in use”
    Now help me out with this as i m using This plugin on my 2 websites https://gulfday.com and https://healthsera.com

    waiting for your quick response …

    Thanks

    same problem.

    Alex

    I’ve managed to create a workaround. The issue is something to do with the account registration keys – on my host they are:

    /var/www/letsencrypt/live/account/private.pem
    /var/www/letsencrypt/live/account/public.pem

    It may be possible to just delete these files (and other letsencrypt certs) and start from scratch – your risk!

    My working method was to insert the [wp_encrypt_registration] record into the [wp_options] table for the problematic site from a working SSL site. You will need to change the URL information in your new copy to reflect the problematic site.

    Hope this helps

    …and, here’s an absolutely horrible hack that disables the registration validation:

    In WP-Encrypt -> CertificateManager.php

    /**
    		 * Retrieves information about a Let's Encrypt account.
    		 *
    		 * @since 1.0.0
    		 * @access public
    		 *
    		 * @param string $location Endpoint URL for the account.
    		 * @return array|WP_Error The response if successful, an error object otherwise.
    		 */
    		public function get_account( $location ) {
    			$response = Client::get()->signed_request( $location, array(
    				'resource' => 'reg',
    			) );
    
    			if ( is_wp_error( $response ) ) {
    				return $response;
    			}		
    			
    			
    			* Horrible Hack to allow account registration to proceed
    			*
    			if ( isset( $response['status'] ) && 200 !== absint( $response['status'] ) ) {
    				return $this->parse_wp_error( $response );
    			}
    			*
    			*/
    			
    			$response['location'] = $location;
    
    			return $response;
    		}

    I’m considering picking up the development on this once I’ve exchanged a few emails with the original dev

    elenaocone

    (@elenaocone)

    @robmason38 I tried your ‘horrible hack’ but it did not work for me – probably I did not used it properly.
    It would be great if this plugin could be up and running again, it was a true treasure, and it would be most popular.

    pratiksethia1

    (@pratiksethia1)

    @robmason38 ‘s working Horrible Hack

    Comment these lines

    if ( isset( $response['status'] ) && 200 !== absint( $response['status'] ) ) {
    				return $this->parse_wp_error( $response );
    			}
    /**
    		 * Retrieves information about a Let's Encrypt account.
    		 *
    		 * @since 1.0.0
    		 * @access public
    		 *
    		 * @param string $location Endpoint URL for the account.
    		 * @return array|WP_Error The response if successful, an error object otherwise.
    		 */
    		public function get_account( $location ) {
    			$response = Client::get()->signed_request( $location, array(
    				'resource' => 'reg',
    			) );
    
    			if ( is_wp_error( $response ) ) {
    				return $response;
    			}		
    			
    			
    			/* Horrible Hack to allow account registration to proceed
    			*
    			if ( isset( $response['status'] ) && 200 !== absint( $response['status'] ) ) {
    				return $this->parse_wp_error( $response );
    			}
    			*
    			*/
    			
    			$response['location'] = $location;
    
    			return $response;
    		}
    robmason38

    (@robmason38)

    Hi guys – I’ve retested on a fresh new site – the hack (and it is horrible) does work. See @pratiksethia1 clearer explanation. Just ensure other plugins or caching is no interfering.

    elenaocone

    (@elenaocone)

    I am sorry, but I cannot understand not only how does the hack work but even what it is
    In CertificateManager.php I read

    /**
    * Retrieves information about a Let’s Encrypt account.
    *
    * @since 1.0.0
    * @access public
    *
    * @param string $location Endpoint URL for the account.
    * @return array|WP_Error The response if successful, an error object otherwise.
    */
    public function get_account( $location ) {
    $response = Client::get()->signed_request( $location, array(
    ‘resource’ => ‘reg’,
    ) );
    if ( is_wp_error( $response ) ) {
    return $response;
    }

    if ( isset( $response[‘status’] ) && 200 !== absint( $response[‘status’] ) ) {
    return $this->parse_wp_error( $response );
    }

    $response[‘location’] = $location;

    return $response;
    }
    And it seems to me that the lines @robmason38 proposes are already there, exactly the same. Excuse my ignorance, I know pretty nothing about php, but is there any effect just repeating them?

    • This reply was modified 2 years ago by elenaocone.
    robmason38

    (@robmason38)

    Hi @elenaocone – the changes are very subtle. I have left much of the original code unchanged, but have commented out the validation section. Look carefully below:

    /*
    if ( isset( $response[‘status’] ) && 200 !== absint( $response[‘status’] ) ) {
    return $this->parse_wp_error( $response );
    }
    */

    The comment characters ( /* */ ) are really important – they ensure the validation code is ignored.

    Read http://www.tizag.com/phpT/comment.php for an explanation. See the section on php comment syntax: multiple line comment

    Hope this helps!

    • This reply was modified 2 years ago by robmason38.
    • This reply was modified 2 years ago by robmason38.
    • This reply was modified 2 years ago by robmason38.
    • This reply was modified 2 years ago by robmason38.
    • This reply was modified 2 years ago by robmason38.
    • This reply was modified 2 years ago by robmason38.
    elenaocone

    (@elenaocone)

    Ahhhhhh!! Comment the lines!

    [facepalm]

    Thanks!

    robmason38

    (@robmason38)

    Yes! 🙂

    We got there.

    elenaocone

    (@elenaocone)

    Thank you SO Much @robmason38, works like a charm!

    Please pick up the development of the plugin, it would be a great gift for the community

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘ERROR: Registration key is already in use’ is closed to new replies.