mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
CLEANUP: acme: fix wrong spelling of "resources"
"ressources" was used as a variable name, let's use English variant to make spell check happier
This commit is contained in:
parent
02db0e6b9f
commit
a2267fafcf
@ -31,7 +31,7 @@ struct acme_cfg {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum acme_st {
|
enum acme_st {
|
||||||
ACME_RESSOURCES = 0,
|
ACME_RESOURCES = 0,
|
||||||
ACME_NEWNONCE,
|
ACME_NEWNONCE,
|
||||||
ACME_CHKACCOUNT,
|
ACME_CHKACCOUNT,
|
||||||
ACME_NEWACCOUNT,
|
ACME_NEWACCOUNT,
|
||||||
@ -70,7 +70,7 @@ struct acme_ctx {
|
|||||||
struct ist newNonce;
|
struct ist newNonce;
|
||||||
struct ist newAccount;
|
struct ist newAccount;
|
||||||
struct ist newOrder;
|
struct ist newOrder;
|
||||||
} ressources;
|
} resources;
|
||||||
struct ist nonce;
|
struct ist nonce;
|
||||||
struct ist kid;
|
struct ist kid;
|
||||||
struct ist order;
|
struct ist order;
|
||||||
|
38
src/acme.c
38
src/acme.c
@ -639,9 +639,9 @@ static void acme_ctx_destroy(struct acme_ctx *ctx)
|
|||||||
if (!ctx)
|
if (!ctx)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
istfree(&ctx->ressources.newNonce);
|
istfree(&ctx->resources.newNonce);
|
||||||
istfree(&ctx->ressources.newAccount);
|
istfree(&ctx->resources.newAccount);
|
||||||
istfree(&ctx->ressources.newOrder);
|
istfree(&ctx->resources.newOrder);
|
||||||
istfree(&ctx->nonce);
|
istfree(&ctx->nonce);
|
||||||
istfree(&ctx->kid);
|
istfree(&ctx->kid);
|
||||||
istfree(&ctx->order);
|
istfree(&ctx->order);
|
||||||
@ -1456,10 +1456,10 @@ int acme_req_neworder(struct task *task, struct acme_ctx *ctx, char **errmsg)
|
|||||||
chunk_appendf(req_in, " ] }");
|
chunk_appendf(req_in, " ] }");
|
||||||
|
|
||||||
|
|
||||||
if (acme_jws_payload(req_in, ctx->nonce, ctx->ressources.newOrder, ctx->cfg->account.pkey, ctx->kid, req_out, errmsg) != 0)
|
if (acme_jws_payload(req_in, ctx->nonce, ctx->resources.newOrder, ctx->cfg->account.pkey, ctx->kid, req_out, errmsg) != 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (acme_http_req(task, ctx, ctx->ressources.newOrder, HTTP_METH_POST, hdrs, ist2(req_out->area, req_out->data)))
|
if (acme_http_req(task, ctx, ctx->resources.newOrder, HTTP_METH_POST, hdrs, ist2(req_out->area, req_out->data)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
@ -1610,10 +1610,10 @@ int acme_req_account(struct task *task, struct acme_ctx *ctx, int newaccount, ch
|
|||||||
else
|
else
|
||||||
chunk_printf(req_in, "%s", accountreq);
|
chunk_printf(req_in, "%s", accountreq);
|
||||||
|
|
||||||
if (acme_jws_payload(req_in, ctx->nonce, ctx->ressources.newAccount, ctx->cfg->account.pkey, ctx->kid, req_out, errmsg) != 0)
|
if (acme_jws_payload(req_in, ctx->nonce, ctx->resources.newAccount, ctx->cfg->account.pkey, ctx->kid, req_out, errmsg) != 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (acme_http_req(task, ctx, ctx->ressources.newAccount, HTTP_METH_POST, hdrs, ist2(req_out->area, req_out->data)))
|
if (acme_http_req(task, ctx, ctx->resources.newAccount, HTTP_METH_POST, hdrs, ist2(req_out->area, req_out->data)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
@ -1747,8 +1747,8 @@ int acme_directory(struct task *task, struct acme_ctx *ctx, char **errmsg)
|
|||||||
memprintf(errmsg, "couldn't get newNonce URL from the directory URL");
|
memprintf(errmsg, "couldn't get newNonce URL from the directory URL");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
ctx->ressources.newNonce = istdup(ist2(trash.area, ret));
|
ctx->resources.newNonce = istdup(ist2(trash.area, ret));
|
||||||
if (!isttest(ctx->ressources.newNonce)) {
|
if (!isttest(ctx->resources.newNonce)) {
|
||||||
memprintf(errmsg, "couldn't get newNonce URL from the directory URL");
|
memprintf(errmsg, "couldn't get newNonce URL from the directory URL");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@ -1757,8 +1757,8 @@ int acme_directory(struct task *task, struct acme_ctx *ctx, char **errmsg)
|
|||||||
memprintf(errmsg, "couldn't get newAccount URL from the directory URL");
|
memprintf(errmsg, "couldn't get newAccount URL from the directory URL");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
ctx->ressources.newAccount = istdup(ist2(trash.area, ret));
|
ctx->resources.newAccount = istdup(ist2(trash.area, ret));
|
||||||
if (!isttest(ctx->ressources.newAccount)) {
|
if (!isttest(ctx->resources.newAccount)) {
|
||||||
memprintf(errmsg, "couldn't get newAccount URL from the directory URL");
|
memprintf(errmsg, "couldn't get newAccount URL from the directory URL");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@ -1766,8 +1766,8 @@ int acme_directory(struct task *task, struct acme_ctx *ctx, char **errmsg)
|
|||||||
memprintf(errmsg, "couldn't get newOrder URL from the directory URL");
|
memprintf(errmsg, "couldn't get newOrder URL from the directory URL");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
ctx->ressources.newOrder = istdup(ist2(trash.area, ret));
|
ctx->resources.newOrder = istdup(ist2(trash.area, ret));
|
||||||
if (!isttest(ctx->ressources.newOrder)) {
|
if (!isttest(ctx->resources.newOrder)) {
|
||||||
memprintf(errmsg, "couldn't get newOrder URL from the directory URL");
|
memprintf(errmsg, "couldn't get newOrder URL from the directory URL");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@ -1776,7 +1776,7 @@ int acme_directory(struct task *task, struct acme_ctx *ctx, char **errmsg)
|
|||||||
ctx->hc = NULL;
|
ctx->hc = NULL;
|
||||||
|
|
||||||
// fprintf(stderr, "newNonce: %s\nnewAccount: %s\nnewOrder: %s\n",
|
// fprintf(stderr, "newNonce: %s\nnewAccount: %s\nnewOrder: %s\n",
|
||||||
// ctx->ressources.newNonce.ptr, ctx->ressources.newAccount.ptr, ctx->ressources.newOrder.ptr);
|
// ctx->resources.newNonce.ptr, ctx->resources.newAccount.ptr, ctx->resources.newOrder.ptr);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -1784,9 +1784,9 @@ int acme_directory(struct task *task, struct acme_ctx *ctx, char **errmsg)
|
|||||||
httpclient_destroy(hc);
|
httpclient_destroy(hc);
|
||||||
ctx->hc = NULL;
|
ctx->hc = NULL;
|
||||||
|
|
||||||
istfree(&ctx->ressources.newNonce);
|
istfree(&ctx->resources.newNonce);
|
||||||
istfree(&ctx->ressources.newAccount);
|
istfree(&ctx->resources.newAccount);
|
||||||
istfree(&ctx->ressources.newOrder);
|
istfree(&ctx->resources.newOrder);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -1808,7 +1808,7 @@ struct task *acme_process(struct task *task, void *context, unsigned int state)
|
|||||||
re:
|
re:
|
||||||
|
|
||||||
switch (st) {
|
switch (st) {
|
||||||
case ACME_RESSOURCES:
|
case ACME_RESOURCES:
|
||||||
if (http_st == ACME_HTTP_REQ) {
|
if (http_st == ACME_HTTP_REQ) {
|
||||||
if (acme_http_req(task, ctx, ist(ctx->cfg->directory), HTTP_METH_GET, NULL, IST_NULL) != 0)
|
if (acme_http_req(task, ctx, ist(ctx->cfg->directory), HTTP_METH_GET, NULL, IST_NULL) != 0)
|
||||||
goto retry;
|
goto retry;
|
||||||
@ -1824,7 +1824,7 @@ struct task *acme_process(struct task *task, void *context, unsigned int state)
|
|||||||
break;
|
break;
|
||||||
case ACME_NEWNONCE:
|
case ACME_NEWNONCE:
|
||||||
if (http_st == ACME_HTTP_REQ) {
|
if (http_st == ACME_HTTP_REQ) {
|
||||||
if (acme_http_req(task, ctx, ctx->ressources.newNonce, HTTP_METH_HEAD, NULL, IST_NULL) != 0)
|
if (acme_http_req(task, ctx, ctx->resources.newNonce, HTTP_METH_HEAD, NULL, IST_NULL) != 0)
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
if (http_st == ACME_HTTP_RES) {
|
if (http_st == ACME_HTTP_RES) {
|
||||||
|
Loading…
Reference in New Issue
Block a user