diff options
author | florian <florian@openbsd.org> | 2019-07-12 15:01:33 +0000 |
---|---|---|
committer | florian <florian@openbsd.org> | 2019-07-12 15:01:33 +0000 |
commit | 8d6bdbae50f89dc9c0d2ae47a1ae571b9a1f9b3f (patch) | |
tree | 39c78675a62a27453ba33ccc8fc4279870bbdf08 /usr.sbin/acme-client | |
parent | Revert anton@ changes about read/write unlocking (diff) | |
download | wireguard-openbsd-8d6bdbae50f89dc9c0d2ae47a1ae571b9a1f9b3f.tar.xz wireguard-openbsd-8d6bdbae50f89dc9c0d2ae47a1ae571b9a1f9b3f.zip |
According to RFC 8555 we MUST send an User-Agent.
Pointed out and diff by Wolf, thanks!
Tweaked by me.
OK benno
Diffstat (limited to 'usr.sbin/acme-client')
-rw-r--r-- | usr.sbin/acme-client/http.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/acme-client/http.c b/usr.sbin/acme-client/http.c index 329773907ad..08731297d8f 100644 --- a/usr.sbin/acme-client/http.c +++ b/usr.sbin/acme-client/http.c @@ -1,4 +1,4 @@ -/* $Id: http.c,v 1.27 2019/06/28 13:32:46 deraadt Exp $ */ +/* $Id: http.c,v 1.28 2019/07/12 15:01:33 florian Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -344,12 +344,14 @@ http_open(const struct http *http, int headreq, const void *p, size_t psz) c = asprintf(&req, "HEAD %s HTTP/1.0\r\n" "Host: %s\r\n" + "User-Agent: OpenBSD-acme-client\r\n" "\r\n", http->path, http->host); else c = asprintf(&req, "GET %s HTTP/1.0\r\n" "Host: %s\r\n" + "User-Agent: OpenBSD-acme-client\r\n" "\r\n", http->path, http->host); } else { @@ -358,6 +360,7 @@ http_open(const struct http *http, int headreq, const void *p, size_t psz) "Host: %s\r\n" "Content-Length: %zu\r\n" "Content-Type: application/jose+json\r\n" + "User-Agent: OpenBSD-acme-client\r\n" "\r\n", http->path, http->host, psz); } |