]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Document zip:encryption option.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 10 Sep 2014 12:52:33 +0000 (21:52 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 10 Sep 2014 12:52:33 +0000 (21:52 +0900)
Use 'zipcrypt' insted of 'traditional' for zip:encryption option.

libarchive/archive_write_set_format_zip.c
libarchive/test/test_write_format_zip.c
tar/bsdtar.1

index 607438329c1692a54b1a9ab2a77f2e77b7322a8a..88688cb7e7d3af0194062ee3f1c89a181f6afb9c 100644 (file)
@@ -278,7 +278,9 @@ archive_write_zip_options(struct archive_write *a, const char *key,
                if (val == NULL) {
                        zip->encryption_type = ENCRYPTION_NONE;
                        ret = ARCHIVE_OK;
-               } else if (val[0] == '1' || strcmp(val, "traditional") == 0) {
+               } else if (val[0] == '1' || strcmp(val, "traditional") == 0
+                   || strcmp(val, "zipcrypt") == 0
+                   || strcmp(val, "ZipCrypt") == 0) {
                        if (is_traditional_pkware_encryption_supported()) {
                                zip->encryption_type = ENCRYPTION_TRADITIONAL;
                                ret = ARCHIVE_OK;
index c080f6bc857c05161986b1d0240c066538a41e8b..002d18eec493fa7b6a39d7bd2c7d0f1b120b17fc 100644 (file)
@@ -682,7 +682,7 @@ DEFINE_TEST(test_write_format_zip_traditional_pkware_encryption)
        assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_zip(a));
        assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a));
        if (ARCHIVE_OK != archive_write_set_options(a,
-                   "zip:encryption=traditional")) {
+                   "zip:encryption=zipcrypt")) {
                skipping("This system does not have cryptographic liberary");
                archive_write_free(a);
                return;
index 47162e6418d1079009e63c64af6dc7ccea19020e..4926245e92b8d2fb36df7f6817ac7c159a58f6d6 100644 (file)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 14, 2014
+.Dd September 10, 2014
 .Dt TAR 1
 .Os
 .Sh NAME
@@ -547,6 +547,14 @@ Use
 .Ar type
 as compression method.
 Supported values are store (uncompressed) and deflate (gzip algorithm).
+.It Cm zip:encryption
+Enable encryption using traditional zip encryption.
+.It Cm zip:encryption Ns = Ns Ar type
+Use
+.Ar type
+as encryption type.
+Supported values are zipcrypt (traditional zip encryption),
+aes128 (WinZip AES-128 encryption) and aes256 (WinZip AES-256 encryption).
 .It Cm read_concatenated_archives
 Ignore zeroed blocks in the archive, which occurs when multiple tar archives
 have been concatenated together.  Without this option, only the contents of