<commit_before># Migration Guide

This document will help you migrate your code to the latest _acme4j_ version.

## Migration to Version 2.0

_acme4j_ 2.0 fully supports the ACMEv2 protocol. Sadly, the ACMEv2 protocol is a major change.

There is no easy recipe to migrate your code to _acme4j_ 2.0. I recommend to have a look at the example, and read this documentation. Altogether, it shouldn't be too much work to update your code, though.

## Migration from Version 2.0-SNAPSHOT (GitHub master branch)

* The `Session` object has been split into `Session` and `Login`. The `Session` now only tracks the communication, and does not need an account key pair any more.
* To get a `Login` to an existing `Account`, use `Session.login()` with the account key pair and account URL.
* If you create a new `Account` using the `AccountBuilder`, you must pass in the key pair via `AccountBuilder.useKeyPair()`.
* You can find all resource bind methods in `Login` now.<commit_msg>Add help for the 'Malformed account ID in KeyID header' error<commit_after># Migration Guide

This document will help you migrate your code to the latest _acme4j_ version.

## Migration to Version 2.0

_acme4j_ 2.0 fully supports the ACMEv2 protocol. Sadly, the ACMEv2 protocol is a major change.

There is no easy recipe to migrate your code to _acme4j_ 2.0. I recommend to have a look at the example, and read this documentation. Altogether, it shouldn't be too much work to update your code, though.

### "Malformed account ID in KeyID header"

If you try to use your old ACME v1 account location URL in ACME v2, you will get a "Malformed account ID in KeyID header" error. The easiest way to fix this is to register a new account **with your existing account key pair**. You will get your migrated account location URL in return.
{'fraction_non_alphanumeric': 0.05703211517165006, 'fraction_numerical': 0.014396456256921373, 'mean_word_length': 4.2682215743440235, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1857930', 'n_tokens_mistral': 512, 'n_tokens_neox': 489, 'n_words': 293}