<commit_before>/*
 * author: <NAME> <<EMAIL>>
 */

#ifndef BENG_PROXY_ACME_CLIENT_HXX
#define BENG_PROXY_ACME_CLIENT_HXX

#include "event/Loop.hxx"
#include "RootPool.hxx"
#include "GlueHttpClient.hxx"
#include "ssl/Unique.hxx"
#include "util/ConstBuffer.hxx"

#include <string>

#include <string.h>

/**
 * Implementation of a ACME client, i.e. the protocol of the "Let's
 * Encrypt" project.
 *
 * @see https://ietf-wg-acme.github.io/acme/
 */
class AcmeClient {
    EventLoop event_loop;
    RootPool root_pool;
    GlueHttpClient glue_http_client;
    GlueHttpServerAddress server;

    /**
     * A replay nonce that was received in the previous request.  It
     * is remembered for the next NextNonce() call, to save a HTTP
     * request.
     */
    std::string next_nonce;

    const bool fake;

public:
    explicit AcmeClient(bool staging, bool fake);
    ~AcmeClient();

    struct pool &GetRootPool() {
        return root_pool;
    }

    struct Account {
        std::string location;
    };

    /**<commit_msg>certdb/AcmeClient: remove unused attribute root_pool<commit_after>/*
 * author: <NAME> <<EMAIL>>
 */

#ifndef BENG_PROXY_ACME_CLIENT_HXX
#define BENG_PROXY_ACME_CLIENT_HXX

#include "event/Loop.hxx"
#include "GlueHttpClient.hxx"
#include "ssl/Unique.hxx"
#include "util/ConstBuffer.hxx"

#include <string>

#include <string.h>

/**
 * Implementation of a ACME client, i.e. the protocol of the "Let's
 * Encrypt" project.
 *
 * @see https://ietf-wg-acme.github.io/acme/
 */
class AcmeClient {
    EventLoop event_loop;
    GlueHttpClient glue_http_client;
    GlueHttpServerAddress server;

    /**
     * A replay nonce that was received in the previous request.  It
     * is remembered for the next NextNonce() call, to save a HTTP
     * request.
     */
    std::string next_nonce;

    const bool fake;

public:
    explicit AcmeClient(bool staging, bool fake);
    ~AcmeClient();

    struct Account {
        std::string location;
    };

    /**
{'fraction_non_alphanumeric': 0.11559818273599193, 'fraction_numerical': 0.0, 'mean_word_length': 3.208067940552017, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '6406101', 'n_tokens_mistral': 700, 'n_tokens_neox': 684, 'n_words': 177}