1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055
|
/*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.Formatter;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import static org.testng.Assert.*;
/**
* @test
* @bug 8280409
* @summary Validate that Zip/JarFile::getInputStream will throw a NullPointerException
* @run testng/othervm GetInputStreamNPETest
*/
public class GetInputStreamNPETest {
// Name used to create a JAR with an invalid entry name
public static final Path INVALID_ENTRY_NAME_JAR =
Path.of("Invalid-EntryName.jar");
// Name used to create a JAR with a valid entry name
public static final Path VALID_ENTRY_NAME_JAR =
Path.of("Valid-EntryName.jar");
// Name used to create a JAR with an invalid entry name
public static final Path SIGNED_INVALID_ENTRY_NAME_JAR =
Path.of("Signed-Invalid-EntryName.jar");
// Name used to create a JAR with a valid entry name
public static final Path SIGNED_VALID_ENTRY_NAME_JAR =
Path.of("Signed-Valid-EntryName.jar");
// Value to change the "S" in "Singleton.class" to
public static final byte INVALID_UTF8_BYTE = (byte) 0x13;
// CEN offset to where "Singleton.class" filename starts
public static final int SINGLETON_CEN_FILENAME_OFFSET = 37;
// CEN filename which will be modified to validate a ZipException is thrown
public static final String CEN_FILENAME_TO_MODIFY = "javax/inject/Singleton.class";
// Zip Entry name that does not exist within the JarFile
public static final String ZIP_ENTRY_THAT_DOES_NOT_EXIST = "org/gotham/Batcave.class";
/**
* Byte array representing a valid jar file prior modifying a filename in the
* CEN.
* The "Valid-EntryName.jar" jar file was created via:
* <pre>
* {@code
* jar cvf Valid-EntryName.jar javax/inject/Singleton.class
* added manifest
* adding: javax/inject/Singleton.class(in = 359) (out= 221)(deflated 38%)
* }
* </pre>
* Its contents are:
* <pre>
* {@code
* jar tvf Valid-EntryName.jar
* 0 Wed Jan 26 14:27:26 EST 2022 META-INF/
* 66 Wed Jan 26 14:27:26 EST 2022 META-INF/MANIFEST.MF
* 359 Mon Jan 24 22:11:24 EST 2011 javax/inject/Singleton.class
* }
* </pre>
* The ByteArray was created by:
* <pre>
* {@code
* var jar = Files.readAllBytes("Valid-EntryName.jar");
* var validEntryName = createByteArray(fooJar, "VALID_ENTRY_NAME");
* }
* </pre>
*/
public static byte[] VALID_ENTRY_NAME = {
(byte) 0x50, (byte) 0x4b, (byte) 0x3, (byte) 0x4, (byte) 0x14,
(byte) 0x0, (byte) 0x8, (byte) 0x8, (byte) 0x8, (byte) 0x0,
(byte) 0x6d, (byte) 0x73, (byte) 0x3a, (byte) 0x54, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x9, (byte) 0x0, (byte) 0x4, (byte) 0x0,
(byte) 0x4d, (byte) 0x45, (byte) 0x54, (byte) 0x41, (byte) 0x2d,
(byte) 0x49, (byte) 0x4e, (byte) 0x46, (byte) 0x2f, (byte) 0xfe,
(byte) 0xca, (byte) 0x0, (byte) 0x0, (byte) 0x3, (byte) 0x0,
(byte) 0x50, (byte) 0x4b, (byte) 0x7, (byte) 0x8, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x50, (byte) 0x4b, (byte) 0x3, (byte) 0x4,
(byte) 0x14, (byte) 0x0, (byte) 0x8, (byte) 0x8, (byte) 0x8,
(byte) 0x0, (byte) 0x6d, (byte) 0x73, (byte) 0x3a, (byte) 0x54,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x14, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x4d, (byte) 0x45, (byte) 0x54, (byte) 0x41,
(byte) 0x2d, (byte) 0x49, (byte) 0x4e, (byte) 0x46, (byte) 0x2f,
(byte) 0x4d, (byte) 0x41, (byte) 0x4e, (byte) 0x49, (byte) 0x46,
(byte) 0x45, (byte) 0x53, (byte) 0x54, (byte) 0x2e, (byte) 0x4d,
(byte) 0x46, (byte) 0xf3, (byte) 0x4d, (byte) 0xcc, (byte) 0xcb,
(byte) 0x4c, (byte) 0x4b, (byte) 0x2d, (byte) 0x2e, (byte) 0xd1,
(byte) 0xd, (byte) 0x4b, (byte) 0x2d, (byte) 0x2a, (byte) 0xce,
(byte) 0xcc, (byte) 0xcf, (byte) 0xb3, (byte) 0x52, (byte) 0x30,
(byte) 0xd4, (byte) 0x33, (byte) 0xe0, (byte) 0xe5, (byte) 0x72,
(byte) 0x2e, (byte) 0x4a, (byte) 0x4d, (byte) 0x2c, (byte) 0x49,
(byte) 0x4d, (byte) 0xd1, (byte) 0x75, (byte) 0xaa, (byte) 0x4,
(byte) 0xa, (byte) 0x98, (byte) 0xe8, (byte) 0x19, (byte) 0xe8,
(byte) 0x19, (byte) 0x2a, (byte) 0x68, (byte) 0xf8, (byte) 0x17,
(byte) 0x25, (byte) 0x26, (byte) 0xe7, (byte) 0xa4, (byte) 0x2a,
(byte) 0x38, (byte) 0xe7, (byte) 0x17, (byte) 0x15, (byte) 0xe4,
(byte) 0x17, (byte) 0x25, (byte) 0x96, (byte) 0x0, (byte) 0x15,
(byte) 0x6b, (byte) 0xf2, (byte) 0x72, (byte) 0xf1, (byte) 0x72,
(byte) 0x1, (byte) 0x0, (byte) 0x50, (byte) 0x4b, (byte) 0x7,
(byte) 0x8, (byte) 0xf4, (byte) 0x59, (byte) 0xdc, (byte) 0xa6,
(byte) 0x42, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x42,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x50, (byte) 0x4b,
(byte) 0x3, (byte) 0x4, (byte) 0x14, (byte) 0x0, (byte) 0x8,
(byte) 0x8, (byte) 0x8, (byte) 0x0, (byte) 0x6c, (byte) 0xb1,
(byte) 0x38, (byte) 0x3e, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x1c,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x6a, (byte) 0x61,
(byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2f, (byte) 0x69,
(byte) 0x6e, (byte) 0x6a, (byte) 0x65, (byte) 0x63, (byte) 0x74,
(byte) 0x2f, (byte) 0x53, (byte) 0x69, (byte) 0x6e, (byte) 0x67,
(byte) 0x6c, (byte) 0x65, (byte) 0x74, (byte) 0x6f, (byte) 0x6e,
(byte) 0x2e, (byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x73,
(byte) 0x73, (byte) 0x85, (byte) 0x90, (byte) 0x4d, (byte) 0x4b,
(byte) 0x82, (byte) 0x41, (byte) 0x10, (byte) 0xc7, (byte) 0xff,
(byte) 0xa3, (byte) 0xd9, (byte) 0x63, (byte) 0x56, (byte) 0xe6,
(byte) 0x21, (byte) 0x5, (byte) 0x4f, (byte) 0xda, (byte) 0xc5,
(byte) 0x63, (byte) 0x4b, (byte) 0xe7, (byte) 0x4e, (byte) 0x41,
(byte) 0x6, (byte) 0x81, (byte) 0xa5, (byte) 0x3c, (byte) 0x5a,
(byte) 0xf7, (byte) 0x75, (byte) 0x1b, (byte) 0x64, (byte) 0x65,
(byte) 0xdd, (byte) 0x8d, (byte) 0xdc, (byte) 0x47, (byte) 0xea,
(byte) 0xab, (byte) 0x79, (byte) 0xe8, (byte) 0x3, (byte) 0xf4,
(byte) 0xa1, (byte) 0xc4, (byte) 0xd9, (byte) 0xe, (byte) 0x4a,
(byte) 0x20, (byte) 0x34, (byte) 0x30, (byte) 0x2f, (byte) 0xcc,
(byte) 0xfc, (byte) 0x66, (byte) 0x98, (byte) 0x99, (byte) 0x9f,
(byte) 0xcd, (byte) 0xfa, (byte) 0x1b, (byte) 0xc0, (byte) 0xd,
(byte) 0x1a, (byte) 0x84, (byte) 0x2c, (byte) 0x7f, (byte) 0x79,
(byte) 0x9e, (byte) 0x3c, (byte) 0x3e, (byte) 0xf5, (byte) 0x9,
(byte) 0x8d, (byte) 0xb9, (byte) 0x5e, (byte) 0x69, (byte) 0xe5,
(byte) 0xb4, (byte) 0x9f, (byte) 0xa9, (byte) 0xe1, (byte) 0x74,
(byte) 0xce, (byte) 0x26, (byte) 0x12, (byte) 0x3a, (byte) 0xfb,
(byte) 0x94, (byte) 0xf6, (byte) 0x3e, (byte) 0x44, (byte) 0x1d,
(byte) 0x6d, (byte) 0xf0, (byte) 0xea, (byte) 0x6e, (byte) 0x17,
(byte) 0x12, (byte) 0x5a, (byte) 0x89, (byte) 0xf8, (byte) 0x54,
(byte) 0xd6, (byte) 0xa7, (byte) 0x6, (byte) 0x35, (byte) 0xb6,
(byte) 0x7e, (byte) 0xe6, (byte) 0x38, (byte) 0xa6, (byte) 0x42,
(byte) 0x65, (byte) 0xa5, (byte) 0x5d, (byte) 0xc1, (byte) 0x19,
(byte) 0x4a, (byte) 0x19, (byte) 0xca, (byte) 0x19, (byte) 0x8e,
(byte) 0x8, (byte) 0x57, (byte) 0x83, (byte) 0x83, (byte) 0xc3,
(byte) 0xee, (byte) 0x83, (byte) 0x29, (byte) 0x16, (byte) 0xec,
(byte) 0x23, (byte) 0xbf, (byte) 0xdd, (byte) 0x12, (byte) 0xba,
(byte) 0x87, (byte) 0x99, (byte) 0x9c, (byte) 0xa3, (byte) 0x10,
(byte) 0x12, (byte) 0x9, (byte) 0xd2, (byte) 0xfb, (byte) 0x7,
(byte) 0x19, (byte) 0x5, (byte) 0x67, (byte) 0xcd, (byte) 0x97,
(byte) 0x80, (byte) 0x97, (byte) 0x83, (byte) 0xbf, (byte) 0xab,
(byte) 0x99, (byte) 0xf0, (byte) 0xce, (byte) 0x92, (byte) 0x6e,
(byte) 0xe7, (byte) 0x85, (byte) 0x70, (byte) 0xb, (byte) 0x7e,
(byte) 0xb5, (byte) 0x4b, (byte) 0x3b, (byte) 0x75, (byte) 0xbc,
(byte) 0xbf, (byte) 0x65, (byte) 0x49, (byte) 0xa8, (byte) 0xef,
(byte) 0xf6, (byte) 0xbf, (byte) 0x4e, (byte) 0xbd, (byte) 0x84,
(byte) 0xda, (byte) 0x38, (byte) 0x14, (byte) 0x1f, (byte) 0x86,
(byte) 0x1f, (byte) 0xac, (byte) 0xe3, (byte) 0x1e, (byte) 0xa1,
(byte) 0x8a, (byte) 0x63, (byte) 0xc8, (byte) 0xc3, (byte) 0x90,
(byte) 0xa4, (byte) 0x84, (byte) 0x8b, (byte) 0x5f, (byte) 0x5b,
(byte) 0xc7, (byte) 0xb9, (byte) 0xf8, (byte) 0x26, (byte) 0xca,
(byte) 0x38, (byte) 0x13, (byte) 0x7f, (byte) 0x22, (byte) 0x5a,
(byte) 0x13, (byte) 0xa6, (byte) 0xc2, (byte) 0x38, (byte) 0x5,
(byte) 0x6d, (byte) 0x1, (byte) 0x50, (byte) 0x4b, (byte) 0x7,
(byte) 0x8, (byte) 0x5a, (byte) 0xf1, (byte) 0x0, (byte) 0x98,
(byte) 0xdd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x67,
(byte) 0x1, (byte) 0x0, (byte) 0x0, (byte) 0x50, (byte) 0x4b,
(byte) 0x1, (byte) 0x2, (byte) 0x14, (byte) 0x0, (byte) 0x14,
(byte) 0x0, (byte) 0x8, (byte) 0x8, (byte) 0x8, (byte) 0x0,
(byte) 0x6d, (byte) 0x73, (byte) 0x3a, (byte) 0x54, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x9, (byte) 0x0, (byte) 0x4, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x4d,
(byte) 0x45, (byte) 0x54, (byte) 0x41, (byte) 0x2d, (byte) 0x49,
(byte) 0x4e, (byte) 0x46, (byte) 0x2f, (byte) 0xfe, (byte) 0xca,
(byte) 0x0, (byte) 0x0, (byte) 0x50, (byte) 0x4b, (byte) 0x1,
(byte) 0x2, (byte) 0x14, (byte) 0x0, (byte) 0x14, (byte) 0x0,
(byte) 0x8, (byte) 0x8, (byte) 0x8, (byte) 0x0, (byte) 0x6d,
(byte) 0x73, (byte) 0x3a, (byte) 0x54, (byte) 0xf4, (byte) 0x59,
(byte) 0xdc, (byte) 0xa6, (byte) 0x42, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x42, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x14, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x3d,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x4d, (byte) 0x45,
(byte) 0x54, (byte) 0x41, (byte) 0x2d, (byte) 0x49, (byte) 0x4e,
(byte) 0x46, (byte) 0x2f, (byte) 0x4d, (byte) 0x41, (byte) 0x4e,
(byte) 0x49, (byte) 0x46, (byte) 0x45, (byte) 0x53, (byte) 0x54,
(byte) 0x2e, (byte) 0x4d, (byte) 0x46, (byte) 0x50, (byte) 0x4b,
(byte) 0x1, (byte) 0x2, (byte) 0x14, (byte) 0x0, (byte) 0x14,
(byte) 0x0, (byte) 0x8, (byte) 0x8, (byte) 0x8, (byte) 0x0,
(byte) 0x6c, (byte) 0xb1, (byte) 0x38, (byte) 0x3e, (byte) 0x5a,
(byte) 0xf1, (byte) 0x0, (byte) 0x98, (byte) 0xdd, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x67, (byte) 0x1, (byte) 0x0,
(byte) 0x0, (byte) 0x1c, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0xc1, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x6a,
(byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x78, (byte) 0x2f,
(byte) 0x69, (byte) 0x6e, (byte) 0x6a, (byte) 0x65, (byte) 0x63,
// We will modify 0x53, "S" within the CEN filename entry
(byte) 0x74, (byte) 0x2f, (byte) 0x53, (byte) 0x69, (byte) 0x6e,
(byte) 0x67, (byte) 0x6c, (byte) 0x65, (byte) 0x74, (byte) 0x6f,
(byte) 0x6e, (byte) 0x2e, (byte) 0x63, (byte) 0x6c, (byte) 0x61,
(byte) 0x73, (byte) 0x73, (byte) 0x50, (byte) 0x4b, (byte) 0x5,
(byte) 0x6, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x3, (byte) 0x0, (byte) 0x3, (byte) 0x0, (byte) 0xc7,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0xe8, (byte) 0x1,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
};
/**
* Byte array representing a valid signed jar file prior modifying a filename
* in the CEN.
* The "Valid-EntryName.jar" jar file was signed via:
* <pre>
* {@code
* keytool -genkey -keyalg RSA -alias myFirstKey -keystore myKeystore -storepass changeit -keypass changeit
* jarsigner -keystore myKeystore -verbose Valid-EntryName.jar -signedjar Signed-Valid-EntryName.jar myFirstKey
* }
* </pre>
* The ByteArray was created by:
* <pre>
* {@code
* var signedJar = Files.readAllBytes("Signed-Valid-EntryName.jar");
* var signedValidEntryName = createByteArray(fooJar, "SIGNED_VALID_ENTRY_NAME");
* }
* </pre>
*/
public static byte[] SIGNED_VALID_ENTRY_NAME = {
(byte) 0x50, (byte) 0x4b, (byte) 0x3, (byte) 0x4, (byte) 0x14,
(byte) 0x0, (byte) 0x8, (byte) 0x8, (byte) 0x8, (byte) 0x0,
(byte) 0x17, (byte) 0x71, (byte) 0x3b, (byte) 0x54, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x14, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x4d, (byte) 0x45, (byte) 0x54, (byte) 0x41, (byte) 0x2d,
(byte) 0x49, (byte) 0x4e, (byte) 0x46, (byte) 0x2f, (byte) 0x4d,
(byte) 0x41, (byte) 0x4e, (byte) 0x49, (byte) 0x46, (byte) 0x45,
(byte) 0x53, (byte) 0x54, (byte) 0x2e, (byte) 0x4d, (byte) 0x46,
(byte) 0x15, (byte) 0xcd, (byte) 0xbb, (byte) 0xe, (byte) 0x82,
(byte) 0x30, (byte) 0x18, (byte) 0x40, (byte) 0xe1, (byte) 0x9d,
(byte) 0x84, (byte) 0x77, (byte) 0xe8, (byte) 0xa8, (byte) 0x43,
(byte) 0xb, (byte) 0x28, (byte) 0x10, (byte) 0x42, (byte) 0xe2,
(byte) 0xc0, (byte) 0x45, (byte) 0xc1, (byte) 0x41, (byte) 0x31,
(byte) 0x21, (byte) 0x3a, (byte) 0xb8, (byte) 0x95, (byte) 0xfa,
(byte) 0xb, (byte) 0xad, (byte) 0xd8, (byte) 0x6a, (byte) 0xa9,
(byte) 0x17, (byte) 0xde, (byte) 0x5e, (byte) 0x5c, (byte) 0x4f,
(byte) 0x4e, (byte) 0xf2, (byte) 0xed, (byte) 0xa8, (byte) 0xe4,
(byte) 0x57, (byte) 0x18, (byte) 0xc, (byte) 0x3e, (byte) 0x81,
(byte) 0x1e, (byte) 0xb8, (byte) 0x92, (byte) 0x31, (byte) 0xf2,
(byte) 0x88, (byte) 0x6b, (byte) 0x5b, (byte) 0x99, (byte) 0x6,
(byte) 0x6a, (byte) 0xe0, (byte) 0x82, (byte) 0xd3, (byte) 0x71,
(byte) 0xa, (byte) 0x3e, (byte) 0x71, (byte) 0x89, (byte) 0x87,
(byte) 0x66, (byte) 0x95, (byte) 0xa6, (byte) 0xac, (byte) 0x7,
(byte) 0x94, (byte) 0x29, (byte) 0xfd, (byte) 0x50, (byte) 0x9a,
(byte) 0x9a, (byte) 0x69, (byte) 0x9e, (byte) 0xdb, (byte) 0x96,
(byte) 0x6d, (byte) 0xed, (byte) 0xe9, (byte) 0x1d, (byte) 0x62,
(byte) 0x24, (byte) 0xe8, (byte) 0x9b, (byte) 0x7e, (byte) 0x1d,
(byte) 0x2e, (byte) 0x5, (byte) 0x30, (byte) 0xe3, (byte) 0xd4,
(byte) 0x5c, (byte) 0xb6, (byte) 0x3d, (byte) 0x18, (byte) 0x25,
(byte) 0x9, (byte) 0xeb, (byte) 0xe9, (byte) 0x30, (byte) 0xd8,
(byte) 0x56, (byte) 0x5d, (byte) 0x26, (byte) 0x78, (byte) 0x11,
(byte) 0x84, (byte) 0x38, (byte) 0xe7, (byte) 0xed, (byte) 0x64,
(byte) 0xc5, (byte) 0x48, (byte) 0xb9, (byte) 0x7, (byte) 0xf0,
(byte) 0x97, (byte) 0x51, (byte) 0x1d, (byte) 0xe8, (byte) 0xcd,
(byte) 0xb3, (byte) 0x39, (byte) 0x46, (byte) 0x1f, (byte) 0x91,
(byte) 0xa4, (byte) 0x41, (byte) 0xb3, (byte) 0xbe, (byte) 0xf1,
(byte) 0x17, (byte) 0x1b, (byte) 0x4b, (byte) 0xd1, (byte) 0x55,
(byte) 0x45, (byte) 0x27, (byte) 0xf3, (byte) 0x73, (byte) 0xd1,
(byte) 0x9, (byte) 0x8, (byte) 0xc3, (byte) 0xed, (byte) 0xea,
(byte) 0x6f, (byte) 0xfc, (byte) 0x0, (byte) 0x50, (byte) 0x4b,
(byte) 0x7, (byte) 0x8, (byte) 0xc1, (byte) 0xfa, (byte) 0x9d,
(byte) 0xe2, (byte) 0x9e, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0xa6, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x50,
(byte) 0x4b, (byte) 0x3, (byte) 0x4, (byte) 0x14, (byte) 0x0,
(byte) 0x8, (byte) 0x8, (byte) 0x8, (byte) 0x0, (byte) 0x17,
(byte) 0x71, (byte) 0x3b, (byte) 0x54, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x14, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x4d,
(byte) 0x45, (byte) 0x54, (byte) 0x41, (byte) 0x2d, (byte) 0x49,
(byte) 0x4e, (byte) 0x46, (byte) 0x2f, (byte) 0x4d, (byte) 0x59,
(byte) 0x46, (byte) 0x49, (byte) 0x52, (byte) 0x53, (byte) 0x54,
(byte) 0x4b, (byte) 0x2e, (byte) 0x53, (byte) 0x46, (byte) 0x75,
(byte) 0x8d, (byte) 0xcb, (byte) 0x6e, (byte) 0x82, (byte) 0x40,
(byte) 0x18, (byte) 0x46, (byte) 0xf7, (byte) 0x24, (byte) 0xbc,
(byte) 0xc3, (byte) 0x2c, (byte) 0xdb, (byte) 0x10, (byte) 0xee,
(byte) 0xa8, (byte) 0x29, (byte) 0x49, (byte) 0x17, (byte) 0x23,
(byte) 0x2a, (byte) 0x4a, (byte) 0x41, (byte) 0xdb, (byte) 0x62,
(byte) 0x6d, (byte) 0xc2, (byte) 0x6e, (byte) 0x3a, (byte) 0x8c,
(byte) 0x64, (byte) 0x44, (byte) 0x67, (byte) 0xe8, (byte) 0xcc,
(byte) 0x2f, (byte) 0x5e, (byte) 0x9e, (byte) 0xbe, (byte) 0xa4,
(byte) 0xcb, (byte) 0x26, (byte) 0xdd, (byte) 0x9d, (byte) 0x7c,
(byte) 0xf9, (byte) 0x72, (byte) 0x4e, (byte) 0xc9, (byte) 0x1b,
(byte) 0x41, (byte) 0xe0, (byte) 0xac, (byte) 0x98, (byte) 0xbd,
(byte) 0x63, (byte) 0x4a, (byte) 0x73, (byte) 0x29, (byte) 0x62,
(byte) 0xe4, (byte) 0x3b, (byte) 0x9e, (byte) 0x69, (byte) 0x24,
(byte) 0x8a, (byte) 0x11, (byte) 0x60, (byte) 0xb5, (byte) 0x3d,
(byte) 0xbd, (byte) 0xd, (byte) 0x43, (byte) 0xe4, (byte) 0x78,
(byte) 0x8e, (byte) 0x8f, (byte) 0x1e, (byte) 0x36, (byte) 0x8a,
(byte) 0xd0, (byte) 0x23, (byte) 0x43, (byte) 0x89, (byte) 0x54,
(byte) 0x9d, (byte) 0x54, (byte) 0x4, (byte) 0x86, (byte) 0xf3,
(byte) 0xa3, (byte) 0x69, (byte) 0x94, (byte) 0x4b, (byte) 0x6c,
(byte) 0x7, (byte) 0xa3, (byte) 0xb1, (byte) 0x3d, (byte) 0xe3,
(byte) 0xd, (byte) 0xd3, (byte) 0x60, (byte) 0x17, (byte) 0x44,
(byte) 0xf0, (byte) 0xfd, (byte) 0x0, (byte) 0x31, (byte) 0xda,
(byte) 0xeb, (byte) 0xd9, (byte) 0xc6, (byte) 0xad, (byte) 0x2c,
(byte) 0xab, (byte) 0x29, (byte) 0xb2, (byte) 0x57, (byte) 0xbc,
(byte) 0xfb, (byte) 0x8, (byte) 0x57, (byte) 0xa3, (byte) 0x2e,
(byte) 0x97, (byte) 0x3d, (byte) 0xe0, (byte) 0x4d, (byte) 0x48,
(byte) 0xb3, (byte) 0xa0, (byte) 0x4d, (byte) 0x73, (byte) 0xd7,
(byte) 0xf3, (byte) 0x83, (byte) 0xa0, (byte) 0xbf, (byte) 0x15,
(byte) 0x8b, (byte) 0xba, (byte) 0x78, (byte) 0xfe, (byte) 0x57,
(byte) 0x33, (byte) 0x0, (byte) 0x17, (byte) 0x36, (byte) 0x6,
(byte) 0x50, (byte) 0xfc, (byte) 0xeb, (byte) 0xc, (byte) 0x4c,
(byte) 0xc7, (byte) 0x28, (byte) 0xa4, (byte) 0x55, (byte) 0xb6,
(byte) 0x8e, (byte) 0x40, (byte) 0x94, (byte) 0xf7, (byte) 0x76,
(byte) 0x4b, (byte) 0xd2, (byte) 0xc8, (byte) 0x67, (byte) 0xb,
(byte) 0xa8, (byte) 0x93, (byte) 0xc9, (byte) 0x64, (byte) 0x3a,
(byte) 0x29, (byte) 0x96, (byte) 0xe3, (byte) 0xd6, (byte) 0x6a,
(byte) 0x4d, (byte) 0x3, (byte) 0x9d, (byte) 0xe7, (byte) 0xdd,
(byte) 0xf5, (byte) 0x6e, (byte) 0x61, (byte) 0x39, (byte) 0xbf,
(byte) 0xd6, (byte) 0x74, (byte) 0x30, (byte) 0x9b, (byte) 0xc6,
(byte) 0x9a, (byte) 0x9c, (byte) 0x58, (byte) 0x8c, (byte) 0xe,
(byte) 0xa4, (byte) 0x27, (byte) 0x57, (byte) 0x97, (byte) 0x8b,
(byte) 0x3, (byte) 0xa3, (byte) 0xe0, (byte) 0x96, (byte) 0x5c,
(byte) 0x34, (byte) 0x47, (byte) 0x6, (byte) 0x52, (byte) 0x38,
(byte) 0xf4, (byte) 0x48, (byte) 0xb4, (byte) 0xfe, (byte) 0xdb,
(byte) 0x8f, (byte) 0xd1, (byte) 0x28, (byte) 0xf4, (byte) 0xab,
(byte) 0xd5, (byte) 0xc9, (byte) 0xc5, (byte) 0x51, (byte) 0xe2,
(byte) 0xdf, (byte) 0x29, (byte) 0x93, (byte) 0x5b, (byte) 0xac,
(byte) 0x32, (byte) 0xef, (byte) 0xe9, (byte) 0x70, (byte) 0xc9,
(byte) 0xd3, (byte) 0xf7, (byte) 0x6f, (byte) 0xae, (byte) 0x39,
(byte) 0x81, (byte) 0xf4, (byte) 0xd, (byte) 0x7f, (byte) 0x36,
(byte) 0x51, (byte) 0xc7, (byte) 0x9b, (byte) 0x17, (byte) 0xef,
(byte) 0xb7, (byte) 0xf1, (byte) 0x3, (byte) 0x50, (byte) 0x4b,
(byte) 0x7, (byte) 0x8, (byte) 0x8b, (byte) 0xcb, (byte) 0xd5,
(byte) 0xea, (byte) 0x3, (byte) 0x1, (byte) 0x0, (byte) 0x0,
(byte) 0x48, (byte) 0x1, (byte) 0x0, (byte) 0x0, (byte) 0x50,
(byte) 0x4b, (byte) 0x3, (byte) 0x4, (byte) 0x14, (byte) 0x0,
(byte) 0x8, (byte) 0x8, (byte) 0x8, (byte) 0x0, (byte) 0x17,
(byte) 0x71, (byte) 0x3b, (byte) 0x54, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x15, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x4d,
(byte) 0x45, (byte) 0x54, (byte) 0x41, (byte) 0x2d, (byte) 0x49,
(byte) 0x4e, (byte) 0x46, (byte) 0x2f, (byte) 0x4d, (byte) 0x59,
(byte) 0x46, (byte) 0x49, (byte) 0x52, (byte) 0x53, (byte) 0x54,
(byte) 0x4b, (byte) 0x2e, (byte) 0x52, (byte) 0x53, (byte) 0x41,
(byte) 0x33, (byte) 0x68, (byte) 0x62, (byte) 0xd, (byte) 0x61,
(byte) 0xe3, (byte) 0xd4, (byte) 0x6a, (byte) 0xf3, (byte) 0x68,
(byte) 0xfb, (byte) 0xce, (byte) 0xcb, (byte) 0xc8, (byte) 0xce,
(byte) 0xb4, (byte) 0xa0, (byte) 0x89, (byte) 0xd5, (byte) 0xd5,
(byte) 0xa0, (byte) 0x89, (byte) 0xd5, (byte) 0x91, (byte) 0x89,
(byte) 0x91, (byte) 0xd1, (byte) 0x90, (byte) 0xdf, (byte) 0x80,
(byte) 0x97, (byte) 0x8d, (byte) 0x33, (byte) 0xa1, (byte) 0xcd,
(byte) 0x83, (byte) 0x31, (byte) 0x95, (byte) 0x99, (byte) 0x85,
(byte) 0x89, (byte) 0x91, (byte) 0x95, (byte) 0xc1, (byte) 0x80,
(byte) 0x1b, (byte) 0xa1, (byte) 0x90, (byte) 0x71, (byte) 0x41,
(byte) 0x13, (byte) 0x73, (byte) 0x85, (byte) 0x41, (byte) 0x13,
(byte) 0x73, (byte) 0x89, (byte) 0x41, (byte) 0x13, (byte) 0x53,
(byte) 0xcc, (byte) 0x2, (byte) 0x66, (byte) 0x26, (byte) 0x46,
(byte) 0x26, (byte) 0x26, (byte) 0x4e, (byte) 0x86, (byte) 0xcd,
(byte) 0xbc, (byte) 0x81, (byte) 0x6c, (byte) 0xf9, (byte) 0x5b,
(byte) 0xf6, (byte) 0xaa, (byte) 0x82, (byte) 0xf4, (byte) 0x41,
(byte) 0x15, (byte) 0x32, (byte) 0x72, (byte) 0x3, (byte) 0xf5,
(byte) 0x65, (byte) 0x18, (byte) 0x72, (byte) 0x1b, (byte) 0x70,
(byte) 0xb2, (byte) 0x31, (byte) 0x87, (byte) 0xb2, (byte) 0xb0,
(byte) 0x9, (byte) 0x33, (byte) 0x85, (byte) 0x6, (byte) 0xc3,
(byte) 0x38, (byte) 0x1c, (byte) 0xc2, (byte) 0x4c, (byte) 0xbe,
(byte) 0x8e, (byte) 0x86, (byte) 0xc2, (byte) 0x6, (byte) 0x82,
(byte) 0x20, (byte) 0xe, (byte) 0xbb, (byte) 0x30, (byte) 0x97,
(byte) 0x53, (byte) 0x7e, (byte) 0x45, (byte) 0x52, (byte) 0x7e,
(byte) 0x51, (byte) 0x7e, (byte) 0x69, (byte) 0x7a, (byte) 0x6,
(byte) 0xd8, (byte) 0x66, (byte) 0xa0, (byte) 0x20, (byte) 0x97,
(byte) 0x30, (byte) 0x9b, (byte) 0x7f, (byte) 0x51, (byte) 0x62,
(byte) 0x72, (byte) 0x4e, (byte) 0xaa, (byte) 0x21, (byte) 0x2f,
(byte) 0xd0, (byte) 0x6e, (byte) 0xa0, (byte) 0x0, (byte) 0xb7,
(byte) 0x30, (byte) 0x8b, (byte) 0x57, (byte) 0x62, (byte) 0x59,
(byte) 0xa2, (byte) 0xa1, (byte) 0xb8, (byte) 0x81, (byte) 0x28,
(byte) 0x88, (byte) 0xcb, (byte) 0x2c, (byte) 0xcc, (byte) 0xe7,
(byte) 0x93, (byte) 0x98, (byte) 0x97, (byte) 0x9c, (byte) 0xaa,
(byte) 0xe0, (byte) 0x98, (byte) 0x97, (byte) 0x92, (byte) 0x5a,
(byte) 0x54, (byte) 0x9c, (byte) 0x9a, (byte) 0x67, (byte) 0x20,
(byte) 0x27, (byte) 0xce, (byte) 0x6b, (byte) 0x64, (byte) 0x64,
(byte) 0x60, (byte) 0x68, (byte) 0x64, (byte) 0x6e, (byte) 0x68,
(byte) 0x69, (byte) 0x60, (byte) 0x6a, (byte) 0x60, (byte) 0x19,
(byte) 0x5, (byte) 0xe6, (byte) 0x9a, (byte) 0xc0, (byte) 0xb9,
(byte) 0x74, (byte) 0x74, (byte) 0x49, (byte) 0x13, (byte) 0xa3,
(byte) 0x12, (byte) 0x72, (byte) 0x30, (byte) 0x0, (byte) 0x83,
(byte) 0x8f, (byte) 0xb9, (byte) 0x89, (byte) 0x91, (byte) 0x9f,
(byte) 0x1, (byte) 0x28, (byte) 0xce, (byte) 0xc5, (byte) 0xd4,
(byte) 0xc4, (byte) 0xc8, (byte) 0xc8, (byte) 0x30, (byte) 0xd7,
(byte) 0xef, (byte) 0xf5, (byte) 0x1c, (byte) 0x99, (byte) 0x95,
(byte) 0xf7, (byte) 0xca, (byte) 0x4e, (byte) 0xff, (byte) 0x75,
(byte) 0x49, (byte) 0xe4, (byte) 0xa9, (byte) 0x8e, (byte) 0xb8,
(byte) 0x91, (byte) 0xe1, (byte) 0xb5, (byte) 0xf3, (byte) 0xca,
(byte) 0xc1, (byte) 0xe9, (byte) 0x6e, (byte) 0xcd, (byte) 0x97,
(byte) 0xef, (byte) 0x28, (byte) 0x25, (byte) 0xc7, (byte) 0x89,
(byte) 0x6d, (byte) 0xf2, (byte) 0xb, (byte) 0x10, (byte) 0xf0,
(byte) 0x7f, (byte) 0x63, (byte) 0xb8, (byte) 0x91, (byte) 0xfb,
(byte) 0xff, (byte) 0x6b, (byte) 0xfd, (byte) 0x85, (byte) 0x17,
(byte) 0x96, (byte) 0x67, (byte) 0x79, (byte) 0xfd, (byte) 0xa8,
(byte) 0x7b, (byte) 0xbf, (byte) 0x75, (byte) 0xad, (byte) 0x77,
(byte) 0xc0, (byte) 0x4e, (byte) 0x9f, (byte) 0xb6, (byte) 0x9e,
(byte) 0xee, (byte) 0xd, (byte) 0xcb, (byte) 0xf8, (byte) 0xd7,
(byte) 0xc9, (byte) 0xdc, (byte) 0x2c, (byte) 0xee, (byte) 0x4d,
(byte) 0x91, (byte) 0x2e, (byte) 0xb0, (byte) 0x48, (byte) 0xd8,
(byte) 0xb2, (byte) 0x63, (byte) 0xcb, (byte) 0x91, (byte) 0x8f,
(byte) 0x89, (byte) 0x69, (byte) 0x7a, (byte) 0x53, (byte) 0x6f,
(byte) 0x6d, (byte) 0x59, (byte) 0xa3, (byte) 0xd3, (byte) 0xfb,
(byte) 0xab, (byte) 0xa0, (byte) 0xe6, (byte) 0xab, (byte) 0x24,
(byte) 0x73, (byte) 0xd0, (byte) 0x32, (byte) 0xc6, (byte) 0x2c,
(byte) 0x1, (byte) 0x29, (byte) 0xf5, (byte) 0xa3, (byte) 0x1a,
(byte) 0x62, (byte) 0xc5, (byte) 0x4f, (byte) 0xce, (byte) 0xda,
(byte) 0xed, (byte) 0x54, (byte) 0x8b, (byte) 0xfb, (byte) 0x26,
(byte) 0x1b, (byte) 0xba, (byte) 0xe0, (byte) 0xb1, (byte) 0x76,
(byte) 0xb9, (byte) 0x75, (byte) 0xcb, (byte) 0x67, (byte) 0x27,
(byte) 0xa6, (byte) 0xd2, (byte) 0xdb, (byte) 0xb9, (byte) 0x7,
(byte) 0x5, (byte) 0x3e, (byte) 0xee, (byte) 0x9c, (byte) 0x64,
(byte) 0x74, (byte) 0xdc, (byte) 0xad, (byte) 0x80, (byte) 0x8d,
(byte) 0xeb, (byte) 0xe5, (byte) 0xb3, (byte) 0x15, (byte) 0x9b,
(byte) 0x33, (byte) 0xf, (byte) 0x1f, (byte) 0xf7, (byte) 0x34,
(byte) 0x9a, (byte) 0xf5, (byte) 0xf2, (byte) 0xc3, (byte) 0x14,
(byte) 0xd3, (byte) 0x48, (byte) 0x11, (byte) 0xa1, (byte) 0xea,
(byte) 0xe7, (byte) 0xea, (byte) 0x95, (byte) 0x95, (byte) 0x32,
(byte) 0x37, (byte) 0x15, (byte) 0xfa, (byte) 0x2, (byte) 0xfe,
(byte) 0xbd, (byte) 0x61, (byte) 0x17, (byte) 0xb2, (byte) 0xcc,
(byte) 0x9c, (byte) 0xf3, (byte) 0x6e, (byte) 0x9a, (byte) 0x57,
(byte) 0xce, (byte) 0x54, (byte) 0x55, (byte) 0x33, (byte) 0x96,
(byte) 0x64, (byte) 0xde, (byte) 0x2b, (byte) 0x6b, (byte) 0x39,
(byte) 0xfe, (byte) 0x76, (byte) 0xe7, (byte) 0xdc, (byte) 0xb2,
(byte) 0xb3, (byte) 0xbe, (byte) 0xed, (byte) 0x52, (byte) 0x7b,
(byte) 0xb9, (byte) 0x90, (byte) 0xd9, (byte) 0x85, (byte) 0xd9,
(byte) 0xed, (byte) 0xbb, (byte) 0x57, (byte) 0x35, (byte) 0xcf,
(byte) 0xe6, (byte) 0x87, (byte) 0xf3, (byte) 0x4f, (byte) 0x4,
(byte) 0x54, (byte) 0x7b, (byte) 0x95, (byte) 0x5c, (byte) 0xd0,
(byte) 0x9d, (byte) 0x7a, (byte) 0xbd, (byte) 0xb7, (byte) 0x6f,
(byte) 0xe9, (byte) 0x6f, (byte) 0x8f, (byte) 0x86, (byte) 0x93,
(byte) 0x5b, (byte) 0x97, (byte) 0xec, (byte) 0xfe, (byte) 0xd5,
(byte) 0x78, (byte) 0xc2, (byte) 0xd6, (byte) 0xa7, (byte) 0x46,
(byte) 0x8d, (byte) 0x89, (byte) 0xb9, (byte) 0x57, (byte) 0xab,
(byte) 0xb5, (byte) 0x75, (byte) 0xab, (byte) 0xcd, (byte) 0x9d,
(byte) 0x43, (byte) 0x9c, (byte) 0xde, (byte) 0x17, (byte) 0x2b,
(byte) 0x3e, (byte) 0xfa, (byte) 0xbb, (byte) 0x4c, (byte) 0x96,
(byte) 0x9c, (byte) 0x73, (byte) 0xe3, (byte) 0x64, (byte) 0xb4,
(byte) 0xcc, (byte) 0xcb, (byte) 0xfd, (byte) 0x4c, (byte) 0xcc,
(byte) 0x8c, (byte) 0xc, (byte) 0x8c, (byte) 0x8b, (byte) 0x15,
(byte) 0xd, (byte) 0xe4, (byte) 0xd, (byte) 0x64, (byte) 0x81,
(byte) 0x1, (byte) 0x28, (byte) 0xcb, (byte) 0xc7, (byte) 0x22,
(byte) 0xc6, (byte) 0x22, (byte) 0xf2, (byte) 0xb0, (byte) 0xe4,
(byte) 0x67, (byte) 0x69, (byte) 0xfa, (byte) 0xd5, (byte) 0x12,
(byte) 0xdf, (byte) 0x8c, (byte) 0xdf, (byte) 0x21, (byte) 0xd5,
(byte) 0x9f, (byte) 0x17, (byte) 0x8b, (byte) 0xfa, (byte) 0x68,
(byte) 0x9, (byte) 0xf1, (byte) 0xcb, (byte) 0xa0, (byte) 0xa5,
(byte) 0x25, (byte) 0x66, (byte) 0x50, (byte) 0xd8, (byte) 0xf5,
(byte) 0x73, (byte) 0xfc, (byte) 0xf9, (byte) 0xaf, (byte) 0x12,
(byte) 0xbf, (byte) 0x42, (byte) 0xbb, (byte) 0x41, (byte) 0xe0,
(byte) 0xb6, (byte) 0x91, (byte) 0xfc, (byte) 0xbc, (byte) 0xe3,
(byte) 0xf3, (byte) 0x39, (byte) 0x1c, (byte) 0x1b, (byte) 0xf3,
(byte) 0xd8, (byte) 0x2f, (byte) 0x7c, (byte) 0xe9, (byte) 0x7b,
(byte) 0xd2, (byte) 0x1a, (byte) 0xf0, (byte) 0xb3, (byte) 0x52,
(byte) 0x61, (byte) 0xb5, (byte) 0xbf, (byte) 0xde, (byte) 0x31,
(byte) 0xf6, (byte) 0x17, (byte) 0xe7, (byte) 0x5a, (byte) 0x9b,
(byte) 0x9f, (byte) 0x6f, (byte) 0xf5, (byte) 0x94, (byte) 0x4b,
(byte) 0x6d, (byte) 0x31, (byte) 0x2e, (byte) 0x56, (byte) 0x37,
(byte) 0x5c, (byte) 0x64, (byte) 0x32, (byte) 0xc1, (byte) 0xef,
(byte) 0x75, (byte) 0xcf, (byte) 0xe9, (byte) 0x8c, (byte) 0xcc,
(byte) 0xcf, (byte) 0x9d, (byte) 0xdf, (byte) 0x34, (byte) 0x1b,
(byte) 0xf4, (byte) 0xe4, (byte) 0x75, (byte) 0xac, (byte) 0xff,
(byte) 0xbf, (byte) 0x5b, (byte) 0xaf, (byte) 0xfa, (byte) 0x98,
(byte) 0x5f, (byte) 0x22, (byte) 0x75, (byte) 0xf5, (byte) 0xd5,
(byte) 0x8c, (byte) 0xd3, (byte) 0xae, (byte) 0x17, (byte) 0xab,
(byte) 0xad, (byte) 0xb9, (byte) 0x6a, (byte) 0x17, (byte) 0x84,
(byte) 0xf8, (byte) 0xf9, (byte) 0x72, (byte) 0xf5, (byte) 0x7b,
(byte) 0xad, (byte) 0x5b, (byte) 0xd3, (byte) 0xd0, (byte) 0x5f,
(byte) 0x71, (byte) 0x29, (byte) 0xa0, (byte) 0xa3, (byte) 0x2c,
(byte) 0xfc, (byte) 0x73, (byte) 0xc2, (byte) 0x3f, (byte) 0xd6,
(byte) 0xf4, (byte) 0x9c, (byte) 0xbe, (byte) 0xa9, (byte) 0x2c,
(byte) 0xf5, (byte) 0x7e, (byte) 0x17, (byte) 0xdf, (byte) 0x95,
(byte) 0xb2, (byte) 0xdd, (byte) 0x29, (byte) 0x33, (byte) 0xb8,
(byte) 0x66, (byte) 0x56, (byte) 0x55, (byte) 0xcc, (byte) 0xba,
(byte) 0x6a, (byte) 0x5d, (byte) 0x92, (byte) 0xeb, (byte) 0xe7,
(byte) 0x7e, (byte) 0x2f, (byte) 0x67, (byte) 0x99, (byte) 0xa2,
(byte) 0xb, (byte) 0xda, (byte) 0x7d, (byte) 0xa7, (byte) 0x73,
(byte) 0x2b, (byte) 0xb6, (byte) 0x5f, (byte) 0x7e, (byte) 0x3b,
(byte) 0x45, (byte) 0xce, (byte) 0xdc, (byte) 0x28, (byte) 0xed,
(byte) 0xed, (byte) 0xf2, (byte) 0x84, (byte) 0xf0, (byte) 0xc2,
(byte) 0x8d, (byte) 0x62, (byte) 0xbc, (byte) 0xe, (byte) 0xac,
(byte) 0x29, (byte) 0x33, (byte) 0xe3, (byte) 0xdd, (byte) 0xb6,
(byte) 0x33, (byte) 0x98, (byte) 0x15, (byte) 0x54, (byte) 0x4f,
(byte) 0x6f, (byte) 0x8d, (byte) 0xba, (byte) 0x11, (byte) 0xf9,
(byte) 0xeb, (byte) 0xd1, (byte) 0x7e, (byte) 0x3, (byte) 0x13,
(byte) 0xd6, (byte) 0xf6, (byte) 0xea, (byte) 0xee, (byte) 0xc8,
(byte) 0xa5, (byte) 0x7c, (byte) 0xf, (byte) 0x14, (byte) 0x1d,
(byte) 0xae, (byte) 0xfc, (byte) 0xb4, (byte) 0xfb, (byte) 0x2a,
(byte) 0xa4, (byte) 0xf7, (byte) 0xd0, (byte) 0x7b, (byte) 0x53,
(byte) 0x73, (byte) 0xc6, (byte) 0x8b, (byte) 0x6d, (byte) 0xc7,
(byte) 0xac, (byte) 0x8f, (byte) 0x68, (byte) 0x5e, (byte) 0x95,
(byte) 0x7a, (byte) 0x34, (byte) 0xd7, (byte) 0x4e, (byte) 0x5b,
(byte) 0x35, (byte) 0xd3, (byte) 0xe1, (byte) 0xe3, (byte) 0xd7,
(byte) 0x94, (byte) 0x60, (byte) 0xd3, (byte) 0xa4, (byte) 0x93,
(byte) 0x7a, (byte) 0x86, (byte) 0x3f, (byte) 0x35, (byte) 0x58,
(byte) 0x1e, (byte) 0x88, (byte) 0x5d, (byte) 0x7e, (byte) 0xd0,
(byte) 0xf6, (byte) 0x63, (byte) 0xf3, (byte) 0xe3, (byte) 0xd4,
(byte) 0xf, (byte) 0x3b, (byte) 0xd5, (byte) 0xaf, (byte) 0x98,
(byte) 0xfc, (byte) 0x6c, (byte) 0x3e, (byte) 0x66, (byte) 0x1e,
(byte) 0xe5, (byte) 0xe6, (byte) 0x60, (byte) 0x55, (byte) 0x7e,
(byte) 0x78, (byte) 0x45, (byte) 0x89, (byte) 0x86, (byte) 0xde,
(byte) 0xc6, (byte) 0x4f, (byte) 0x86, (byte) 0x4d, (byte) 0x8c,
(byte) 0xb, (byte) 0x80, (byte) 0x9, (byte) 0x69, (byte) 0xe,
(byte) 0x30, (byte) 0x93, (byte) 0x1a, (byte) 0x94, (byte) 0xd2,
(byte) 0x2f, (byte) 0x4d, (byte) 0xa3, (byte) 0xe5, (byte) 0x70,
(byte) 0xe4, (byte) 0x92, (byte) 0x1, (byte) 0x35, (byte) 0xa5,
(byte) 0xb3, (byte) 0x34, (byte) 0x31, (byte) 0x32, (byte) 0xf4,
(byte) 0xa, (byte) 0x9c, (byte) 0xb0, (byte) 0x9d, (byte) 0x61,
(byte) 0x3e, (byte) 0x53, (byte) 0x78, (byte) 0xce, (byte) 0x42,
(byte) 0xb7, (byte) 0x7, (byte) 0x9b, (byte) 0xcb, (byte) 0x95,
(byte) 0xb6, (byte) 0x74, (byte) 0xe8, (byte) 0x16, (byte) 0x8,
(byte) 0xfe, (byte) 0x3c, (byte) 0x74, (byte) 0xe1, (byte) 0xe,
(byte) 0x87, (byte) 0xf6, (byte) 0x3a, (byte) 0xeb, (byte) 0x45,
(byte) 0xfb, (byte) 0x97, (byte) 0x71, (byte) 0xbf, (byte) 0xaa,
(byte) 0x13, (byte) 0x89, (byte) 0x78, (byte) 0x1e, (byte) 0x74,
(byte) 0xe4, (byte) 0x97, (byte) 0x69, (byte) 0xf2, (byte) 0xe5,
(byte) 0xd, (byte) 0x22, (byte) 0xa, (byte) 0x73, (byte) 0xf7,
(byte) 0x5e, (byte) 0xd1, (byte) 0x92, (byte) 0xdb, (byte) 0x25,
(byte) 0x72, (byte) 0xf0, (byte) 0xdb, (byte) 0x34, (byte) 0xc3,
(byte) 0x79, (byte) 0xcb, (byte) 0xaa, (byte) 0xcb, (byte) 0xc,
(byte) 0xd4, (byte) 0xd3, (byte) 0xd6, (byte) 0x9e, (byte) 0xb8,
(byte) 0xa9, (byte) 0xf3, (byte) 0x71, (byte) 0xa5, (byte) 0x48,
(byte) 0x4a, (byte) 0xe2, (byte) 0x57, (byte) 0xbb, (byte) 0xb6,
(byte) 0xe5, (byte) 0xaf, (byte) 0x5e, (byte) 0x4, (byte) 0x48,
(byte) 0xd6, (byte) 0xd5, (byte) 0x71, (byte) 0xc8, (byte) 0xaf,
(byte) 0x34, (byte) 0xe0, (byte) 0xae, (byte) 0x5e, (byte) 0x1a,
(byte) 0xbe, (byte) 0xb5, (byte) 0xc3, (byte) 0xbc, (byte) 0xa9,
(byte) 0xfc, (byte) 0x51, (byte) 0xc, (byte) 0x73, (byte) 0xef,
(byte) 0x83, (byte) 0x47, (byte) 0x3e, (byte) 0x72, (byte) 0x3b,
(byte) 0xce, (byte) 0xbe, (byte) 0xfd, (byte) 0xb4, (byte) 0x41,
(byte) 0x20, (byte) 0x54, (byte) 0xf2, (byte) 0x47, (byte) 0x45,
(byte) 0x69, (byte) 0xb8, (byte) 0xcd, (byte) 0x59, (byte) 0xbb,
(byte) 0x8e, (byte) 0xf2, (byte) 0xc3, (byte) 0x86, (byte) 0xea,
(byte) 0x32, (byte) 0x1f, (byte) 0xbf, (byte) 0x4, (byte) 0x6b,
(byte) 0xda, (byte) 0xaa, (byte) 0x2b, (byte) 0x33, (byte) 0x7d,
(byte) 0x54, (byte) 0xf2, (byte) 0x9, (byte) 0x16, (byte) 0x16,
(byte) 0xfa, (byte) 0x5b, (byte) 0xb6, (byte) 0x6d, (byte) 0x42,
(byte) 0xaa, (byte) 0x9e, (byte) 0x9e, (byte) 0x16, (byte) 0x73,
(byte) 0xc0, (byte) 0x6a, (byte) 0xf7, (byte) 0xbf, (byte) 0x13,
(byte) 0xf9, (byte) 0xbc, (byte) 0xfc, (byte) 0x79, (byte) 0xcc,
(byte) 0x84, (byte) 0x6a, (byte) 0x9f, (byte) 0x9c, (byte) 0x88,
(byte) 0xcd, (byte) 0xb3, (byte) 0xb3, (byte) 0x98, (byte) 0xc0,
(byte) 0xf3, (byte) 0xf0, (byte) 0xc4, (byte) 0x86, (byte) 0x6f,
(byte) 0x86, (byte) 0xd1, (byte) 0x97, (byte) 0x53, (byte) 0x4b,
(byte) 0x6b, (byte) 0xb9, (byte) 0xbe, (byte) 0xca, (byte) 0xde,
(byte) 0xd8, (byte) 0x23, (byte) 0x58, (byte) 0xee, (byte) 0x92,
(byte) 0xcc, (byte) 0x7f, (byte) 0xa7, (byte) 0xe7, (byte) 0xbc,
(byte) 0xff, (byte) 0x84, (byte) 0x93, (byte) 0x13, (byte) 0xcc,
(byte) 0x94, (byte) 0xe, (byte) 0x73, (byte) 0x9b, (byte) 0x2c,
(byte) 0x9d, (byte) 0xfa, (byte) 0x62, (byte) 0x75, (byte) 0x98,
(byte) 0x6f, (byte) 0x70, (byte) 0xf1, (byte) 0x97, (byte) 0xaa,
(byte) 0xe5, (byte) 0x9b, (byte) 0xa6, (byte) 0xac, (byte) 0x4e,
(byte) 0x7f, (byte) 0xbb, (byte) 0xc2, (byte) 0x34, (byte) 0xec,
(byte) 0xe2, (byte) 0xbe, (byte) 0xc0, (byte) 0x99, (byte) 0x1d,
(byte) 0x9f, (byte) 0xb8, (byte) 0xa5, (byte) 0x6b, (byte) 0xb8,
(byte) 0x4, (byte) 0xf7, (byte) 0x2d, (byte) 0x11, (byte) 0x9a,
(byte) 0x56, (byte) 0xb1, (byte) 0xa9, (byte) 0xbd, (byte) 0xb4,
(byte) 0x8f, (byte) 0x57, (byte) 0x60, (byte) 0xcf, (byte) 0xb3,
(byte) 0xab, (byte) 0xad, (byte) 0x86, (byte) 0xea, (byte) 0x46,
(byte) 0xbb, (byte) 0x7b, (byte) 0xf7, (byte) 0xfe, (byte) 0xe8,
(byte) 0xd6, (byte) 0xd2, (byte) 0x9d, (byte) 0x3, (byte) 0x0,
(byte) 0x50, (byte) 0x4b, (byte) 0x7, (byte) 0x8, (byte) 0xba,
(byte) 0x40, (byte) 0x24, (byte) 0x13, (byte) 0x4c, (byte) 0x4,
(byte) 0x0, (byte) 0x0, (byte) 0x58, (byte) 0x5, (byte) 0x0,
(byte) 0x0, (byte) 0x50, (byte) 0x4b, (byte) 0x3, (byte) 0x4,
(byte) 0x14, (byte) 0x0, (byte) 0x8, (byte) 0x8, (byte) 0x8,
(byte) 0x0, (byte) 0x6d, (byte) 0x73, (byte) 0x3a, (byte) 0x54,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x9, (byte) 0x0, (byte) 0x4,
(byte) 0x0, (byte) 0x4d, (byte) 0x45, (byte) 0x54, (byte) 0x41,
(byte) 0x2d, (byte) 0x49, (byte) 0x4e, (byte) 0x46, (byte) 0x2f,
(byte) 0xfe, (byte) 0xca, (byte) 0x0, (byte) 0x0, (byte) 0x3,
(byte) 0x0, (byte) 0x50, (byte) 0x4b, (byte) 0x7, (byte) 0x8,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x50, (byte) 0x4b, (byte) 0x3,
(byte) 0x4, (byte) 0x14, (byte) 0x0, (byte) 0x8, (byte) 0x8,
(byte) 0x8, (byte) 0x0, (byte) 0x6c, (byte) 0xb1, (byte) 0x38,
(byte) 0x3e, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x1c, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x6a, (byte) 0x61, (byte) 0x76,
(byte) 0x61, (byte) 0x78, (byte) 0x2f, (byte) 0x69, (byte) 0x6e,
(byte) 0x6a, (byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x2f,
(byte) 0x53, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x6c,
(byte) 0x65, (byte) 0x74, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e,
(byte) 0x63, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73,
(byte) 0x85, (byte) 0x90, (byte) 0x4d, (byte) 0x4b, (byte) 0x82,
(byte) 0x41, (byte) 0x10, (byte) 0xc7, (byte) 0xff, (byte) 0xa3,
(byte) 0xd9, (byte) 0x63, (byte) 0x56, (byte) 0xe6, (byte) 0x21,
(byte) 0x5, (byte) 0x4f, (byte) 0xda, (byte) 0xc5, (byte) 0x63,
(byte) 0x4b, (byte) 0xe7, (byte) 0x4e, (byte) 0x41, (byte) 0x6,
(byte) 0x81, (byte) 0xa5, (byte) 0x3c, (byte) 0x5a, (byte) 0xf7,
(byte) 0x75, (byte) 0x1b, (byte) 0x64, (byte) 0x65, (byte) 0xdd,
(byte) 0x8d, (byte) 0xdc, (byte) 0x47, (byte) 0xea, (byte) 0xab,
(byte) 0x79, (byte) 0xe8, (byte) 0x3, (byte) 0xf4, (byte) 0xa1,
(byte) 0xc4, (byte) 0xd9, (byte) 0xe, (byte) 0x4a, (byte) 0x20,
(byte) 0x34, (byte) 0x30, (byte) 0x2f, (byte) 0xcc, (byte) 0xfc,
(byte) 0x66, (byte) 0x98, (byte) 0x99, (byte) 0x9f, (byte) 0xcd,
(byte) 0xfa, (byte) 0x1b, (byte) 0xc0, (byte) 0xd, (byte) 0x1a,
(byte) 0x84, (byte) 0x2c, (byte) 0x7f, (byte) 0x79, (byte) 0x9e,
(byte) 0x3c, (byte) 0x3e, (byte) 0xf5, (byte) 0x9, (byte) 0x8d,
(byte) 0xb9, (byte) 0x5e, (byte) 0x69, (byte) 0xe5, (byte) 0xb4,
(byte) 0x9f, (byte) 0xa9, (byte) 0xe1, (byte) 0x74, (byte) 0xce,
(byte) 0x26, (byte) 0x12, (byte) 0x3a, (byte) 0xfb, (byte) 0x94,
(byte) 0xf6, (byte) 0x3e, (byte) 0x44, (byte) 0x1d, (byte) 0x6d,
(byte) 0xf0, (byte) 0xea, (byte) 0x6e, (byte) 0x17, (byte) 0x12,
(byte) 0x5a, (byte) 0x89, (byte) 0xf8, (byte) 0x54, (byte) 0xd6,
(byte) 0xa7, (byte) 0x6, (byte) 0x35, (byte) 0xb6, (byte) 0x7e,
(byte) 0xe6, (byte) 0x38, (byte) 0xa6, (byte) 0x42, (byte) 0x65,
(byte) 0xa5, (byte) 0x5d, (byte) 0xc1, (byte) 0x19, (byte) 0x4a,
(byte) 0x19, (byte) 0xca, (byte) 0x19, (byte) 0x8e, (byte) 0x8,
(byte) 0x57, (byte) 0x83, (byte) 0x83, (byte) 0xc3, (byte) 0xee,
(byte) 0x83, (byte) 0x29, (byte) 0x16, (byte) 0xec, (byte) 0x23,
(byte) 0xbf, (byte) 0xdd, (byte) 0x12, (byte) 0xba, (byte) 0x87,
(byte) 0x99, (byte) 0x9c, (byte) 0xa3, (byte) 0x10, (byte) 0x12,
(byte) 0x9, (byte) 0xd2, (byte) 0xfb, (byte) 0x7, (byte) 0x19,
(byte) 0x5, (byte) 0x67, (byte) 0xcd, (byte) 0x97, (byte) 0x80,
(byte) 0x97, (byte) 0x83, (byte) 0xbf, (byte) 0xab, (byte) 0x99,
(byte) 0xf0, (byte) 0xce, (byte) 0x92, (byte) 0x6e, (byte) 0xe7,
(byte) 0x85, (byte) 0x70, (byte) 0xb, (byte) 0x7e, (byte) 0xb5,
(byte) 0x4b, (byte) 0x3b, (byte) 0x75, (byte) 0xbc, (byte) 0xbf,
(byte) 0x65, (byte) 0x49, (byte) 0xa8, (byte) 0xef, (byte) 0xf6,
(byte) 0xbf, (byte) 0x4e, (byte) 0xbd, (byte) 0x84, (byte) 0xda,
(byte) 0x38, (byte) 0x14, (byte) 0x1f, (byte) 0x86, (byte) 0x1f,
(byte) 0xac, (byte) 0xe3, (byte) 0x1e, (byte) 0xa1, (byte) 0x8a,
(byte) 0x63, (byte) 0xc8, (byte) 0xc3, (byte) 0x90, (byte) 0xa4,
(byte) 0x84, (byte) 0x8b, (byte) 0x5f, (byte) 0x5b, (byte) 0xc7,
(byte) 0xb9, (byte) 0xf8, (byte) 0x26, (byte) 0xca, (byte) 0x38,
(byte) 0x13, (byte) 0x7f, (byte) 0x22, (byte) 0x5a, (byte) 0x13,
(byte) 0xa6, (byte) 0xc2, (byte) 0x38, (byte) 0x5, (byte) 0x6d,
(byte) 0x1, (byte) 0x50, (byte) 0x4b, (byte) 0x7, (byte) 0x8,
(byte) 0x5a, (byte) 0xf1, (byte) 0x0, (byte) 0x98, (byte) 0xdd,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x67, (byte) 0x1,
(byte) 0x0, (byte) 0x0, (byte) 0x50, (byte) 0x4b, (byte) 0x1,
(byte) 0x2, (byte) 0x14, (byte) 0x0, (byte) 0x14, (byte) 0x0,
(byte) 0x8, (byte) 0x8, (byte) 0x8, (byte) 0x0, (byte) 0x17,
(byte) 0x71, (byte) 0x3b, (byte) 0x54, (byte) 0xc1, (byte) 0xfa,
(byte) 0x9d, (byte) 0xe2, (byte) 0x9e, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0xa6, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x14, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x4d, (byte) 0x45,
(byte) 0x54, (byte) 0x41, (byte) 0x2d, (byte) 0x49, (byte) 0x4e,
(byte) 0x46, (byte) 0x2f, (byte) 0x4d, (byte) 0x41, (byte) 0x4e,
(byte) 0x49, (byte) 0x46, (byte) 0x45, (byte) 0x53, (byte) 0x54,
(byte) 0x2e, (byte) 0x4d, (byte) 0x46, (byte) 0x50, (byte) 0x4b,
(byte) 0x1, (byte) 0x2, (byte) 0x14, (byte) 0x0, (byte) 0x14,
(byte) 0x0, (byte) 0x8, (byte) 0x8, (byte) 0x8, (byte) 0x0,
(byte) 0x17, (byte) 0x71, (byte) 0x3b, (byte) 0x54, (byte) 0x8b,
(byte) 0xcb, (byte) 0xd5, (byte) 0xea, (byte) 0x3, (byte) 0x1,
(byte) 0x0, (byte) 0x0, (byte) 0x48, (byte) 0x1, (byte) 0x0,
(byte) 0x0, (byte) 0x14, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0xe0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x4d,
(byte) 0x45, (byte) 0x54, (byte) 0x41, (byte) 0x2d, (byte) 0x49,
(byte) 0x4e, (byte) 0x46, (byte) 0x2f, (byte) 0x4d, (byte) 0x59,
(byte) 0x46, (byte) 0x49, (byte) 0x52, (byte) 0x53, (byte) 0x54,
(byte) 0x4b, (byte) 0x2e, (byte) 0x53, (byte) 0x46, (byte) 0x50,
(byte) 0x4b, (byte) 0x1, (byte) 0x2, (byte) 0x14, (byte) 0x0,
(byte) 0x14, (byte) 0x0, (byte) 0x8, (byte) 0x8, (byte) 0x8,
(byte) 0x0, (byte) 0x17, (byte) 0x71, (byte) 0x3b, (byte) 0x54,
(byte) 0xba, (byte) 0x40, (byte) 0x24, (byte) 0x13, (byte) 0x4c,
(byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x58, (byte) 0x5,
(byte) 0x0, (byte) 0x0, (byte) 0x15, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x25, (byte) 0x2, (byte) 0x0, (byte) 0x0,
(byte) 0x4d, (byte) 0x45, (byte) 0x54, (byte) 0x41, (byte) 0x2d,
(byte) 0x49, (byte) 0x4e, (byte) 0x46, (byte) 0x2f, (byte) 0x4d,
(byte) 0x59, (byte) 0x46, (byte) 0x49, (byte) 0x52, (byte) 0x53,
(byte) 0x54, (byte) 0x4b, (byte) 0x2e, (byte) 0x52, (byte) 0x53,
(byte) 0x41, (byte) 0x50, (byte) 0x4b, (byte) 0x1, (byte) 0x2,
(byte) 0x14, (byte) 0x0, (byte) 0x14, (byte) 0x0, (byte) 0x8,
(byte) 0x8, (byte) 0x8, (byte) 0x0, (byte) 0x6d, (byte) 0x73,
(byte) 0x3a, (byte) 0x54, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x2, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x9,
(byte) 0x0, (byte) 0x4, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0xb4, (byte) 0x6,
(byte) 0x0, (byte) 0x0, (byte) 0x4d, (byte) 0x45, (byte) 0x54,
(byte) 0x41, (byte) 0x2d, (byte) 0x49, (byte) 0x4e, (byte) 0x46,
(byte) 0x2f, (byte) 0xfe, (byte) 0xca, (byte) 0x0, (byte) 0x0,
(byte) 0x50, (byte) 0x4b, (byte) 0x1, (byte) 0x2, (byte) 0x14,
(byte) 0x0, (byte) 0x14, (byte) 0x0, (byte) 0x8, (byte) 0x8,
(byte) 0x8, (byte) 0x0, (byte) 0x6c, (byte) 0xb1, (byte) 0x38,
(byte) 0x3e, (byte) 0x5a, (byte) 0xf1, (byte) 0x0, (byte) 0x98,
(byte) 0xdd, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x67,
(byte) 0x1, (byte) 0x0, (byte) 0x0, (byte) 0x1c, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0xf1, (byte) 0x6, (byte) 0x0,
(byte) 0x0, (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61,
(byte) 0x78, (byte) 0x2f, (byte) 0x69, (byte) 0x6e, (byte) 0x6a,
// We will modify 0x53, "S", within the CEN filename entry
(byte) 0x65, (byte) 0x63, (byte) 0x74, (byte) 0x2f, (byte) 0x53,
(byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x6c, (byte) 0x65,
(byte) 0x74, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x63,
(byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73, (byte) 0x50,
(byte) 0x4b, (byte) 0x5, (byte) 0x6, (byte) 0x0, (byte) 0x0,
(byte) 0x0, (byte) 0x0, (byte) 0x5, (byte) 0x0, (byte) 0x5,
(byte) 0x0, (byte) 0x4c, (byte) 0x1, (byte) 0x0, (byte) 0x0,
(byte) 0x18, (byte) 0x8, (byte) 0x0, (byte) 0x0, (byte) 0x0,
(byte) 0x0,
};
/**
* DataProvider used to specify valid jars and whether to verify them
*
* @return Entry object indicating the jar file and whether it will be verified
*/
@DataProvider
public Object[][] validJars() {
return new Object[][]{
{SIGNED_VALID_ENTRY_NAME_JAR, true},
{SIGNED_VALID_ENTRY_NAME_JAR, false},
{VALID_ENTRY_NAME_JAR, true},
{VALID_ENTRY_NAME_JAR, false},
};
}
/**
* DataProvider used to specify invalid jars and whether to verify them
*
* @return Entry object indicating the jar file and whether it will be verified
*/
@DataProvider
public Object[][] inValidJars() {
return new Object[][]{
{SIGNED_INVALID_ENTRY_NAME_JAR, true},
{SIGNED_INVALID_ENTRY_NAME_JAR, false},
{INVALID_ENTRY_NAME_JAR, true},
{INVALID_ENTRY_NAME_JAR, false},
};
}
/**
* Create Jar files used by the tests.
*
* The {@code byte} arrays {@code VALID_ENTRY_NAME_JAR} and
* {@code SIGNED-VALID_ENTRY_NAME_JAR} are written to disk to create the jar
* files: {@code Valid-EntryName.jar} and {@code Signed-Valid-EntryName.jar}.
*
* The jar files {@code Invalid-EntryName.jar} and
* {@code Signed-Invalid-EntryName.jar} are created by copying the
* {@code byte} arrays {@code VALID_ENTRY_NAME} and
* {@code SIGNED-VALID_ENTRY_NAME} and modifying
* the CEN filename entry, "javax/inject/Singleton.class", changing the
* first character from {@code 0x53}, "S", to the {@code 0x13}.
*
* @throws IOException If an error occurs
*
*/
@BeforeTest
public static void setup() throws IOException {
// Create valid jar
Files.deleteIfExists(VALID_ENTRY_NAME_JAR);
Files.write(VALID_ENTRY_NAME_JAR, VALID_ENTRY_NAME);
// Create valid signed jar
Files.deleteIfExists(SIGNED_VALID_ENTRY_NAME_JAR);
Files.write(SIGNED_VALID_ENTRY_NAME_JAR, SIGNED_VALID_ENTRY_NAME);
// Create a JAR file with the invalid entry name
Files.deleteIfExists(INVALID_ENTRY_NAME_JAR);
// Make a copy of the byte array containing the valid entry name
byte[] invalid_bytes = Arrays.copyOf(VALID_ENTRY_NAME, VALID_ENTRY_NAME.length);
// Change from 0x53, "S", to an invalid UTF8 character, 0x13
invalid_bytes[VALID_ENTRY_NAME.length - SINGLETON_CEN_FILENAME_OFFSET] =
INVALID_UTF8_BYTE;
Files.write(INVALID_ENTRY_NAME_JAR, invalid_bytes);
// Create a signed JAR file with the invalid entry name
Files.deleteIfExists(SIGNED_INVALID_ENTRY_NAME_JAR);
// Make a copy of the byte array containing the valid entry name
invalid_bytes = Arrays.copyOf(SIGNED_VALID_ENTRY_NAME,
SIGNED_VALID_ENTRY_NAME.length);
// Change from 0x53, "S", to an invalid UTF8 character, 0x13
invalid_bytes[SIGNED_VALID_ENTRY_NAME.length - SINGLETON_CEN_FILENAME_OFFSET] =
INVALID_UTF8_BYTE;
Files.write(SIGNED_INVALID_ENTRY_NAME_JAR, invalid_bytes);
}
/**
* Clean up after the test run
*
* @throws IOException If an error occurs
*/
@AfterTest
public static void cleanup() throws IOException {
Files.deleteIfExists(VALID_ENTRY_NAME_JAR);
Files.deleteIfExists(SIGNED_VALID_ENTRY_NAME_JAR);
Files.deleteIfExists(INVALID_ENTRY_NAME_JAR);
Files.deleteIfExists(SIGNED_INVALID_ENTRY_NAME_JAR);
}
/**
* Validate that the CEN filename to be modified can be accessed in
* the original jar when the file is opened using JarFile and accessed via
* a ZipEntry
*
* @param jar the jar file to be used
* @param verify indicates whether the jar should be verified
* @throws Exception if an error occurs
*/
@Test(dataProvider = "validJars")
public static void validJarFileZipEntryTest(Path jar, boolean verify) throws Exception {
try (JarFile jf = new JarFile(jar.toFile(), verify)) {
ZipEntry ze = jf.getEntry(CEN_FILENAME_TO_MODIFY);
var is = jf.getInputStream(ze);
byte[] cnt = is.readAllBytes();
assertNotNull(cnt);
}
}
/**
* Validate that the CEN filename to be modified can be accessed in
* the original jar when the file is opened using JarFile and accessed via
* a JarEntry
*
* @param jar the jar file to be used
* @param verify indicates whether the jar should be verified
* @throws Exception if an error occurs
*/
@Test(dataProvider = "validJars")
public static void validJarFileJarEntryTest(Path jar, boolean verify) throws Exception {
try (JarFile jf = new JarFile(jar.toFile(), verify)) {
ZipEntry ze = jf.getEntry(CEN_FILENAME_TO_MODIFY);
var is = jf.getInputStream(ze);
byte[] cnt = is.readAllBytes();
assertNotNull(cnt);
}
}
/**
* Validate that the CEN filename to be modified can be accessed in
* the original jar when the file is opened using ZipFile
*
* @param jar the jar file to be used
* @param verify indicates whether the jar should be verified(not used)
* @throws Exception if an error occurs
*/
@Test(dataProvider = "validJars")
public static void validZipFileZipEntryTest(Path jar, boolean verify) throws Exception {
try (ZipFile jf = new ZipFile(jar.toFile())) {
ZipEntry ze = jf.getEntry(CEN_FILENAME_TO_MODIFY);
var is = jf.getInputStream(ze);
byte[] cnt = is.readAllBytes();
assertNotNull(cnt);
}
}
/**
* Validate that a NullPointerException is thrown by JarFile::getInputStream
* when the specified ZipEntry is null.
*
* @param jar the jar file to be used
* @param verify indicates whether the jar should be verified(not used)
* @throws Exception if an error occurs
*/
@Test(dataProvider = "inValidJars")
public static void invalidJarFileZipEntry(Path jar, boolean verify) throws Exception {
try (JarFile jf = new JarFile(jar.toFile(), verify)) {
// The entry will not be found resulting in the ZipEntry being null
ZipEntry ze = jf.getEntry(CEN_FILENAME_TO_MODIFY);
var ex= expectThrows(NullPointerException.class,
() -> jf.getInputStream(ze) );
// Validate that we receive the expected message from Objects.requireNonNull
assertTrue( ex != null && ex.getMessage().equals("ze"));
}
}
/**
* Validate that a NullPointerException is thrown by ZipFile::getInputStream
* when the specified ZipEntry is null.
* @param jar the jar file to be used
* @param verify indicates whether the jar should be verified(not used)
* @throws IOException if an error occurs
*/
@Test(dataProvider = "inValidJars")
public static void invalidZipFileZipEntry(Path jar, boolean verify) throws Exception {
try (ZipFile jf = new ZipFile(jar.toFile())) {
// The entry will not be found resulting in the ZipEntry being null
ZipEntry ze = jf.getEntry(CEN_FILENAME_TO_MODIFY);
var ex= expectThrows(NullPointerException.class,
() -> jf.getInputStream(ze) );
// Validate that we receive the expected message from Objects.requireNonNull
assertTrue( ex != null && ex.getMessage().equals("entry"));
}
}
/**
* Validate that JarFile::getInputStream will return null when the specified
* ZipEntry does not exist in the Jar file
*
* @param jar the jar file to be used
* @param verify indicates whether the jar should be verified
* @throws Exception if an error occurs
*/
@Test(dataProvider = "validJars")
public static void JarFileZipEntryDoesNotExistGetInputStreamTest(
Path jar, boolean verify) throws Exception {
try (JarFile jf = new JarFile(jar.toFile(), verify)) {
var ze = new ZipEntry(ZIP_ENTRY_THAT_DOES_NOT_EXIST);
var is = jf.getInputStream(ze);
// As the ZipEntry cannot be found, the returned InputStream is null
assertNull(is);
}
}
/**
* Validate that ZipFile::getInputStream will return null when the specified
* ZipEntry does not exist in the Jar file
* @param jar the jar file to be used
* @param verify indicates whether the jar should be verified(not used)
* @throws Exception if an error occurs
*/
@Test(dataProvider = "validJars")
public static void ZipFileZipEntryDoesNotExistGetInputStreamTest(
Path jar, boolean verify) throws Exception {
try (ZipFile jf = new ZipFile(jar.toFile())) {
var ze = new ZipEntry(ZIP_ENTRY_THAT_DOES_NOT_EXIST);
var is = jf.getInputStream(ze);
// As the ZipEntry cannot be found, the returned InputStream is null
assertNull(is);
}
}
/**
* Validate that JarFile::getInputStream will return null when the specified
* JarEntry does not exist in the Jar file
* @param jar the jar file to be used
* @param verify indicates whether the jar should be verified
* @throws Exception if an error occurs
*/
@Test(dataProvider = "validJars")
public static void JarFileJarEntryEntryDoesNotExistGetInputStreamTest (
Path jar, boolean verify) throws Exception {
try (JarFile jf = new JarFile(jar.toFile(), verify)) {
var je = new JarEntry(ZIP_ENTRY_THAT_DOES_NOT_EXIST);
var is = jf.getInputStream(je);
// As the JarEntry cannot be found, the returned InputStream is null
assertNull(is);
}
}
/**
* Validate that JarFile::getInputStream will return null when validating
* a signed jar and the ZipEntry passed as a parameter returns null
* when ZipEntry::getName is invoked.
* @param jar the jar file to be used
* @param verify indicates whether the jar should be verified
* @throws Exception if an error occurs
*/
@Test(dataProvider = "validJars")
public static void JarFileZipEntryGetNameNullTest(Path jar, boolean verify) throws Exception {
// Signed Jar is used for the next checks
try (JarFile jf = new JarFile(jar.toFile(), verify)) {
var ze = new InvalidZipEntry(CEN_FILENAME_TO_MODIFY);
var is = jf.getInputStream(ze);
// As the ZipEntry cannot be found, the returned InputStream is null
assertNull(is);
}
}
/**
* Utility method which takes a byte array and converts to byte array
* declaration. For example:
* <pre>
* {@code
* var fooJar = Files.readAllBytes(Path.of("foo.jar"));
* var result = createByteArray(fooJar, "FOO_BYTES");
* }
* </pre>
*
* @param bytes A byte array used to create a byte array declaration
* @param name Name to be used in the byte array declaration
* @return The formatted byte array declaration
*/
public static String createByteArray(byte[] bytes, String name) {
StringBuilder sb = new StringBuilder(bytes.length * 5);
Formatter fmt = new Formatter(sb);
fmt.format(" public static byte[] %s = {", name);
final int length = 5;
for (int i = 0; i < bytes.length; i++) {
if (i % length == 0) {
fmt.format("%n ");
}
fmt.format(" (byte) 0x%x,", bytes[i] & 0xff);
}
fmt.format("%n };%n");
return sb.toString();
}
/**
* Overridden ZipEntry class which specifies an invalid name for the
* ZipEntry and will always return null for the Zip entry name
*/
public static class InvalidZipEntry extends ZipEntry {
public InvalidZipEntry(String name) {
super(ZIP_ENTRY_THAT_DOES_NOT_EXIST);
}
public String getName() {
return null;
}
}
}
|