aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGábor Boskovits <boskovits@gmail.com>2019-12-25 14:22:14 +0100
committerGábor Boskovits <boskovits@gmail.com>2019-12-25 14:22:14 +0100
commit32dfde905229e593f9fe60795d2490f99c27aad5 (patch)
tree740366cf83d0622fdff3cd938fd893991cf26626
parente661d5c25705c07350ba9ad4ab70bf40b51fe18a (diff)
downloadguix-32dfde905229e593f9fe60795d2490f99c27aad5.tar.gz
guix-32dfde905229e593f9fe60795d2490f99c27aad5.zip
gnu: nginx: Update to 1.17.7.
* gnu/packages/web.scm (nginx): Update to 1.17.7.
-rw-r--r--gnu/packages/web.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index e6158dadca..12ca76d53a 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -214,14 +214,14 @@ Interface} specification.")
;; ’stable’ and recommends that “in general you deploy the NGINX mainline
;; branch at all times” (https://www.nginx.com/blog/nginx-1-6-1-7-released/)
;; Consider updating the nginx-documentation package together with this one.
- (version "1.17.6")
+ (version "1.17.7")
(source (origin
(method url-fetch)
(uri (string-append "https://nginx.org/download/nginx-"
version ".tar.gz"))
(sha256
(base32
- "1dipq90h3n1xdslwbijwlhbk84r7q0bswlbvi970may09lqsbd1w"))))
+ "1zwiqljhzf0ym6r3hrg6k2qfb2mxi7i0lpafg4xnkr875225c9xn"))))
(build-system gnu-build-system)
(inputs `(("openssl" ,openssl)
("pcre" ,pcre)
y has the
+ form "CODE LEN:STR". CODE is an integer, where zero indicates success.
+ LEN specifies the length in bytes of the string that immediately
+ follows. */
+static std::string readAuthenticateReply(int fd)
+{
+ int code = readInteger(fd);
+ int len = readInteger(fd);
+
+ string str;
+ str.resize(len);
+ readFull(fd, (unsigned char *) &str[0], len);
+
+ if (code == 0)
+ return str;
+ else
+ throw Error(str);
}
/* Sign HASH with the key stored in file SECRETKEY. Return the signature as a
string, or raise an exception upon error. */
static std::string signHash(const string &secretKey, const Hash &hash)
{
- Strings args;
- args.push_back("sign");
- args.push_back(secretKey);
- args.push_back(printHash(hash));
+ auto agent = authenticationAgent();
+ auto hexHash = printHash(hash);
- return runAuthenticationProgram(args);
+ writeLine(agent->toAgent.writeSide,
+ (format("sign %1%:%2% %3%:%4%")
+ % secretKey.size() % secretKey
+ % hexHash.size() % hexHash).str());
+
+ return readAuthenticateReply(agent->fromAgent.readSide);
}
/* Verify SIGNATURE and return the base16-encoded hash over which it was
computed. */
static std::string verifySignature(const string &signature)
{
- Path tmpDir = createTempDir("", "guix", true, true, 0700);
- AutoDelete delTmp(tmpDir);
+ auto agent = authenticationAgent();
- Path sigFile = tmpDir + "/sig";
- writeFile(sigFile, signature);
+ writeLine(agent->toAgent.writeSide,
+ (format("verify %1%:%2%")
+ % signature.size() % signature).str());
- Strings args;
- args.push_back("verify");
- args.push_back(sigFile);
- return runAuthenticationProgram(args);
+ return readAuthenticateReply(agent->fromAgent.readSide);
}
void LocalStore::exportPath(const Path & path, bool sign,