summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandr Reshetnikov <hemnstill@users.noreply.github.com>2022-06-17 20:21:33 +0400
committerGitHub <noreply@github.com>2022-06-17 20:21:33 +0400
commit294481949d4aa801a5082ed819c53d5c5331c58a (patch)
tree4dd2f4286a1091959c61068576a839c00192ae2c
parentf59c9b909b1a6e18d79e066e96358a14f316d115 (diff)
parent464f9d9f1a5b3f51845e5f8662a37f48a7dfd996 (diff)
downloadlibarchive-294481949d4aa801a5082ed819c53d5c5331c58a.tar.gz
Merge branch 'libarchive:master' into zstd_windows
-rw-r--r--libarchive/archive_digest.c16
-rw-r--r--libarchive/archive_write_open.31
-rw-r--r--tar/bsdtar.12
3 files changed, 10 insertions, 9 deletions
diff --git a/libarchive/archive_digest.c b/libarchive/archive_digest.c
index a7bd5f02..3361b19a 100644
--- a/libarchive/archive_digest.c
+++ b/libarchive/archive_digest.c
@@ -49,16 +49,16 @@
* Initialize a Message digest.
*/
static int
-win_crypto_init(Digest_CTX *ctx, ALG_ID algId)
+win_crypto_init(Digest_CTX *ctx, DWORD prov, ALG_ID algId)
{
ctx->valid = 0;
if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL,
- PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
+ prov, CRYPT_VERIFYCONTEXT)) {
if (GetLastError() != (DWORD)NTE_BAD_KEYSET)
return (ARCHIVE_FAILED);
if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL,
- PROV_RSA_FULL, CRYPT_NEWKEYSET))
+ prov, CRYPT_NEWKEYSET))
return (ARCHIVE_FAILED);
}
@@ -276,7 +276,7 @@ __archive_md5final(archive_md5_ctx *ctx, void *md)
static int
__archive_md5init(archive_md5_ctx *ctx)
{
- return (win_crypto_init(ctx, CALG_MD5));
+ return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5));
}
static int
@@ -659,7 +659,7 @@ __archive_sha1final(archive_sha1_ctx *ctx, void *md)
static int
__archive_sha1init(archive_sha1_ctx *ctx)
{
- return (win_crypto_init(ctx, CALG_SHA1));
+ return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1));
}
static int
@@ -919,7 +919,7 @@ __archive_sha256final(archive_sha256_ctx *ctx, void *md)
static int
__archive_sha256init(archive_sha256_ctx *ctx)
{
- return (win_crypto_init(ctx, CALG_SHA_256));
+ return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256));
}
static int
@@ -1155,7 +1155,7 @@ __archive_sha384final(archive_sha384_ctx *ctx, void *md)
static int
__archive_sha384init(archive_sha384_ctx *ctx)
{
- return (win_crypto_init(ctx, CALG_SHA_384));
+ return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384));
}
static int
@@ -1415,7 +1415,7 @@ __archive_sha512final(archive_sha512_ctx *ctx, void *md)
static int
__archive_sha512init(archive_sha512_ctx *ctx)
{
- return (win_crypto_init(ctx, CALG_SHA_512));
+ return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512));
}
static int
diff --git a/libarchive/archive_write_open.3 b/libarchive/archive_write_open.3
index 29bffe49..6bceb964 100644
--- a/libarchive/archive_write_open.3
+++ b/libarchive/archive_write_open.3
@@ -218,6 +218,7 @@ On failure, the callback should invoke
.Fn archive_set_error
to register an error code and message and
return
+.Cm ARCHIVE_FATAL .
.Bl -item -offset indent
.It
.Ft typedef int
diff --git a/tar/bsdtar.1 b/tar/bsdtar.1
index 63774216..b57835ad 100644
--- a/tar/bsdtar.1
+++ b/tar/bsdtar.1
@@ -953,7 +953,7 @@ archives.
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm :
-.Bl -tag -width ".Ev BLOCKSIZE"
+.Bl -tag -width indent
.It Ev TAR_READER_OPTIONS
The default options for format readers and compression readers.
The