hane 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -0
- package/binding.gyp +87 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +1 -0
- package/package.json +33 -0
- package/src/native/addon.cc +231 -0
- package/src/native/zsign_driver.cc +87 -0
- package/src/native/zsign_driver.h +38 -0
- package/vendor/zlib/.cmake-format.yaml +245 -0
- package/vendor/zlib/.github/workflows/c-std.yml +230 -0
- package/vendor/zlib/.github/workflows/cmake.yml +112 -0
- package/vendor/zlib/.github/workflows/configure.yml +136 -0
- package/vendor/zlib/.github/workflows/fuzz.yml +25 -0
- package/vendor/zlib/.github/workflows/msys-cygwin.yml +77 -0
- package/vendor/zlib/BUILD.bazel +134 -0
- package/vendor/zlib/CMakeLists.txt +330 -0
- package/vendor/zlib/ChangeLog +1621 -0
- package/vendor/zlib/FAQ +367 -0
- package/vendor/zlib/INDEX +68 -0
- package/vendor/zlib/LICENSE +22 -0
- package/vendor/zlib/MODULE.bazel +9 -0
- package/vendor/zlib/Makefile.in +419 -0
- package/vendor/zlib/README +115 -0
- package/vendor/zlib/README-cmake.md +83 -0
- package/vendor/zlib/adler32.c +164 -0
- package/vendor/zlib/amiga/Makefile.pup +69 -0
- package/vendor/zlib/amiga/Makefile.sas +68 -0
- package/vendor/zlib/compress.c +75 -0
- package/vendor/zlib/configure +966 -0
- package/vendor/zlib/contrib/README.contrib +57 -0
- package/vendor/zlib/contrib/ada/buffer_demo.adb +106 -0
- package/vendor/zlib/contrib/ada/mtest.adb +156 -0
- package/vendor/zlib/contrib/ada/read.adb +156 -0
- package/vendor/zlib/contrib/ada/readme.txt +65 -0
- package/vendor/zlib/contrib/ada/test.adb +463 -0
- package/vendor/zlib/contrib/ada/zlib-streams.adb +225 -0
- package/vendor/zlib/contrib/ada/zlib-streams.ads +114 -0
- package/vendor/zlib/contrib/ada/zlib-thin.adb +142 -0
- package/vendor/zlib/contrib/ada/zlib-thin.ads +450 -0
- package/vendor/zlib/contrib/ada/zlib.adb +701 -0
- package/vendor/zlib/contrib/ada/zlib.ads +328 -0
- package/vendor/zlib/contrib/ada/zlib.gpr +20 -0
- package/vendor/zlib/contrib/blast/Makefile +8 -0
- package/vendor/zlib/contrib/blast/README +4 -0
- package/vendor/zlib/contrib/blast/blast.c +466 -0
- package/vendor/zlib/contrib/blast/blast.h +83 -0
- package/vendor/zlib/contrib/blast/test.pk +0 -0
- package/vendor/zlib/contrib/blast/test.txt +1 -0
- package/vendor/zlib/contrib/delphi/ZLib.pas +557 -0
- package/vendor/zlib/contrib/delphi/ZLibConst.pas +11 -0
- package/vendor/zlib/contrib/delphi/readme.txt +76 -0
- package/vendor/zlib/contrib/delphi/zlibd32.mak +99 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs +58 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +202 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs +83 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/CodecBase.cs +198 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/Deflater.cs +106 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/DotZLib.cs +288 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj +141 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/GZipStream.cs +301 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/Inflater.cs +105 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +274 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib.build +33 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib.chm +0 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib.sln +21 -0
- package/vendor/zlib/contrib/dotzlib/LICENSE_1_0.txt +23 -0
- package/vendor/zlib/contrib/dotzlib/readme.txt +58 -0
- package/vendor/zlib/contrib/gcc_gvmat64/gvmat64.S +574 -0
- package/vendor/zlib/contrib/infback9/README +1 -0
- package/vendor/zlib/contrib/infback9/infback9.c +603 -0
- package/vendor/zlib/contrib/infback9/infback9.h +37 -0
- package/vendor/zlib/contrib/infback9/inffix9.h +107 -0
- package/vendor/zlib/contrib/infback9/inflate9.h +47 -0
- package/vendor/zlib/contrib/infback9/inftree9.c +319 -0
- package/vendor/zlib/contrib/infback9/inftree9.h +61 -0
- package/vendor/zlib/contrib/iostream/test.cpp +24 -0
- package/vendor/zlib/contrib/iostream/zfstream.cpp +329 -0
- package/vendor/zlib/contrib/iostream/zfstream.h +128 -0
- package/vendor/zlib/contrib/iostream2/zstream.h +307 -0
- package/vendor/zlib/contrib/iostream2/zstream_test.cpp +25 -0
- package/vendor/zlib/contrib/iostream3/README +35 -0
- package/vendor/zlib/contrib/iostream3/TODO +17 -0
- package/vendor/zlib/contrib/iostream3/test.cc +50 -0
- package/vendor/zlib/contrib/iostream3/zfstream.cc +479 -0
- package/vendor/zlib/contrib/iostream3/zfstream.h +466 -0
- package/vendor/zlib/contrib/minizip/CMakeLists.txt +380 -0
- package/vendor/zlib/contrib/minizip/Makefile +37 -0
- package/vendor/zlib/contrib/minizip/Makefile.am +45 -0
- package/vendor/zlib/contrib/minizip/MiniZip64_Changes.txt +6 -0
- package/vendor/zlib/contrib/minizip/MiniZip64_info.txt +74 -0
- package/vendor/zlib/contrib/minizip/configure.ac +32 -0
- package/vendor/zlib/contrib/minizip/crypt.h +128 -0
- package/vendor/zlib/contrib/minizip/ints.h +57 -0
- package/vendor/zlib/contrib/minizip/ioapi.c +231 -0
- package/vendor/zlib/contrib/minizip/ioapi.h +183 -0
- package/vendor/zlib/contrib/minizip/iowin32.c +448 -0
- package/vendor/zlib/contrib/minizip/iowin32.h +28 -0
- package/vendor/zlib/contrib/minizip/make_vms.com +25 -0
- package/vendor/zlib/contrib/minizip/miniunz.c +647 -0
- package/vendor/zlib/contrib/minizip/miniunzip.1 +63 -0
- package/vendor/zlib/contrib/minizip/minizip.1 +46 -0
- package/vendor/zlib/contrib/minizip/minizip.c +512 -0
- package/vendor/zlib/contrib/minizip/minizip.pc.in +12 -0
- package/vendor/zlib/contrib/minizip/minizip.pc.txt +13 -0
- package/vendor/zlib/contrib/minizip/minizipConfig.cmake.in +35 -0
- package/vendor/zlib/contrib/minizip/mztools.c +288 -0
- package/vendor/zlib/contrib/minizip/mztools.h +37 -0
- package/vendor/zlib/contrib/minizip/skipset.h +361 -0
- package/vendor/zlib/contrib/minizip/test/CMakeLists.txt +121 -0
- package/vendor/zlib/contrib/minizip/test/add_subdirectory_exclude_test.cmake.in +29 -0
- package/vendor/zlib/contrib/minizip/test/add_subdirectory_test.cmake.in +28 -0
- package/vendor/zlib/contrib/minizip/test/find_package_test.cmake.in +25 -0
- package/vendor/zlib/contrib/minizip/test/test_helper.cm +32 -0
- package/vendor/zlib/contrib/minizip/unzip.c +1981 -0
- package/vendor/zlib/contrib/minizip/unzip.h +441 -0
- package/vendor/zlib/contrib/minizip/zip.c +2199 -0
- package/vendor/zlib/contrib/minizip/zip.h +370 -0
- package/vendor/zlib/contrib/nuget/nuget.csproj +43 -0
- package/vendor/zlib/contrib/nuget/nuget.sln +22 -0
- package/vendor/zlib/contrib/pascal/example.pas +599 -0
- package/vendor/zlib/contrib/pascal/readme.txt +76 -0
- package/vendor/zlib/contrib/pascal/zlibd32.mak +99 -0
- package/vendor/zlib/contrib/pascal/zlibpas.pas +276 -0
- package/vendor/zlib/contrib/puff/Makefile +42 -0
- package/vendor/zlib/contrib/puff/README +63 -0
- package/vendor/zlib/contrib/puff/puff.c +840 -0
- package/vendor/zlib/contrib/puff/puff.h +35 -0
- package/vendor/zlib/contrib/puff/pufftest.c +169 -0
- package/vendor/zlib/contrib/puff/zeros.raw +0 -0
- package/vendor/zlib/contrib/testzlib/testzlib.c +275 -0
- package/vendor/zlib/contrib/testzlib/testzlib.txt +10 -0
- package/vendor/zlib/contrib/untgz/Makefile +14 -0
- package/vendor/zlib/contrib/untgz/Makefile.msc +17 -0
- package/vendor/zlib/contrib/untgz/untgz.c +667 -0
- package/vendor/zlib/contrib/vstudio/readme.txt +81 -0
- package/vendor/zlib/contrib/vstudio/vc10/miniunz.vcxproj +310 -0
- package/vendor/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters +22 -0
- package/vendor/zlib/contrib/vstudio/vc10/minizip.vcxproj +307 -0
- package/vendor/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters +22 -0
- package/vendor/zlib/contrib/vstudio/vc10/testzlib.vcxproj +412 -0
- package/vendor/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters +55 -0
- package/vendor/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj +310 -0
- package/vendor/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters +22 -0
- package/vendor/zlib/contrib/vstudio/vc10/zlib.rc +32 -0
- package/vendor/zlib/contrib/vstudio/vc10/zlibstat.vcxproj +449 -0
- package/vendor/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters +74 -0
- package/vendor/zlib/contrib/vstudio/vc10/zlibvc.def +161 -0
- package/vendor/zlib/contrib/vstudio/vc10/zlibvc.sln +135 -0
- package/vendor/zlib/contrib/vstudio/vc10/zlibvc.vcxproj +633 -0
- package/vendor/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters +115 -0
- package/vendor/zlib/contrib/vstudio/vc11/miniunz.vcxproj +314 -0
- package/vendor/zlib/contrib/vstudio/vc11/minizip.vcxproj +311 -0
- package/vendor/zlib/contrib/vstudio/vc11/testzlib.vcxproj +418 -0
- package/vendor/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj +314 -0
- package/vendor/zlib/contrib/vstudio/vc11/zlib.rc +32 -0
- package/vendor/zlib/contrib/vstudio/vc11/zlibstat.vcxproj +456 -0
- package/vendor/zlib/contrib/vstudio/vc11/zlibvc.def +161 -0
- package/vendor/zlib/contrib/vstudio/vc11/zlibvc.sln +117 -0
- package/vendor/zlib/contrib/vstudio/vc11/zlibvc.vcxproj +664 -0
- package/vendor/zlib/contrib/vstudio/vc12/miniunz.vcxproj +316 -0
- package/vendor/zlib/contrib/vstudio/vc12/minizip.vcxproj +313 -0
- package/vendor/zlib/contrib/vstudio/vc12/testzlib.vcxproj +422 -0
- package/vendor/zlib/contrib/vstudio/vc12/testzlibdll.vcxproj +316 -0
- package/vendor/zlib/contrib/vstudio/vc12/zlib.rc +32 -0
- package/vendor/zlib/contrib/vstudio/vc12/zlibstat.vcxproj +459 -0
- package/vendor/zlib/contrib/vstudio/vc12/zlibvc.def +161 -0
- package/vendor/zlib/contrib/vstudio/vc12/zlibvc.sln +119 -0
- package/vendor/zlib/contrib/vstudio/vc12/zlibvc.vcxproj +668 -0
- package/vendor/zlib/contrib/vstudio/vc14/miniunz.vcxproj +316 -0
- package/vendor/zlib/contrib/vstudio/vc14/minizip.vcxproj +313 -0
- package/vendor/zlib/contrib/vstudio/vc14/testzlib.vcxproj +422 -0
- package/vendor/zlib/contrib/vstudio/vc14/testzlibdll.vcxproj +316 -0
- package/vendor/zlib/contrib/vstudio/vc14/zlib.rc +32 -0
- package/vendor/zlib/contrib/vstudio/vc14/zlibstat.vcxproj +459 -0
- package/vendor/zlib/contrib/vstudio/vc14/zlibvc.def +161 -0
- package/vendor/zlib/contrib/vstudio/vc14/zlibvc.sln +119 -0
- package/vendor/zlib/contrib/vstudio/vc14/zlibvc.vcxproj +668 -0
- package/vendor/zlib/contrib/vstudio/vc17/miniunz.vcxproj +409 -0
- package/vendor/zlib/contrib/vstudio/vc17/minizip.vcxproj +405 -0
- package/vendor/zlib/contrib/vstudio/vc17/testzlib.vcxproj +473 -0
- package/vendor/zlib/contrib/vstudio/vc17/testzlibdll.vcxproj +409 -0
- package/vendor/zlib/contrib/vstudio/vc17/zlib.rc +32 -0
- package/vendor/zlib/contrib/vstudio/vc17/zlibstat.vcxproj +602 -0
- package/vendor/zlib/contrib/vstudio/vc17/zlibvc.def +161 -0
- package/vendor/zlib/contrib/vstudio/vc17/zlibvc.sln +179 -0
- package/vendor/zlib/contrib/vstudio/vc17/zlibvc.vcxproj +875 -0
- package/vendor/zlib/contrib/vstudio/vc9/miniunz.vcproj +565 -0
- package/vendor/zlib/contrib/vstudio/vc9/minizip.vcproj +562 -0
- package/vendor/zlib/contrib/vstudio/vc9/testzlib.vcproj +796 -0
- package/vendor/zlib/contrib/vstudio/vc9/testzlibdll.vcproj +565 -0
- package/vendor/zlib/contrib/vstudio/vc9/zlib.rc +32 -0
- package/vendor/zlib/contrib/vstudio/vc9/zlibstat.vcproj +781 -0
- package/vendor/zlib/contrib/vstudio/vc9/zlibvc.def +161 -0
- package/vendor/zlib/contrib/vstudio/vc9/zlibvc.sln +144 -0
- package/vendor/zlib/contrib/vstudio/vc9/zlibvc.vcproj +1100 -0
- package/vendor/zlib/crc32.c +1049 -0
- package/vendor/zlib/crc32.h +9446 -0
- package/vendor/zlib/deflate.c +2152 -0
- package/vendor/zlib/deflate.h +380 -0
- package/vendor/zlib/doc/algorithm.txt +209 -0
- package/vendor/zlib/doc/crc-doc.1.0.pdf +0 -0
- package/vendor/zlib/doc/rfc1950.txt +619 -0
- package/vendor/zlib/doc/rfc1951.txt +955 -0
- package/vendor/zlib/doc/rfc1952.txt +675 -0
- package/vendor/zlib/doc/txtvsbin.txt +107 -0
- package/vendor/zlib/examples/README.examples +54 -0
- package/vendor/zlib/examples/enough.c +597 -0
- package/vendor/zlib/examples/fitblk.c +233 -0
- package/vendor/zlib/examples/gun.c +702 -0
- package/vendor/zlib/examples/gzappend.c +504 -0
- package/vendor/zlib/examples/gzjoin.c +449 -0
- package/vendor/zlib/examples/gzlog.c +1061 -0
- package/vendor/zlib/examples/gzlog.h +91 -0
- package/vendor/zlib/examples/gznorm.c +474 -0
- package/vendor/zlib/examples/zlib_how.html +549 -0
- package/vendor/zlib/examples/zpipe.c +209 -0
- package/vendor/zlib/examples/zran.c +550 -0
- package/vendor/zlib/examples/zran.h +53 -0
- package/vendor/zlib/gzclose.c +23 -0
- package/vendor/zlib/gzguts.h +215 -0
- package/vendor/zlib/gzlib.c +585 -0
- package/vendor/zlib/gzread.c +603 -0
- package/vendor/zlib/gzwrite.c +631 -0
- package/vendor/zlib/infback.c +628 -0
- package/vendor/zlib/inffast.c +320 -0
- package/vendor/zlib/inffast.h +11 -0
- package/vendor/zlib/inffixed.h +94 -0
- package/vendor/zlib/inflate.c +1526 -0
- package/vendor/zlib/inflate.h +126 -0
- package/vendor/zlib/inftrees.c +299 -0
- package/vendor/zlib/inftrees.h +62 -0
- package/vendor/zlib/make_vms.com +867 -0
- package/vendor/zlib/msdos/Makefile.bor +115 -0
- package/vendor/zlib/msdos/Makefile.dj2 +104 -0
- package/vendor/zlib/msdos/Makefile.emx +69 -0
- package/vendor/zlib/msdos/Makefile.msc +112 -0
- package/vendor/zlib/msdos/Makefile.tc +100 -0
- package/vendor/zlib/nintendods/Makefile +126 -0
- package/vendor/zlib/nintendods/README +5 -0
- package/vendor/zlib/old/Makefile.emx +69 -0
- package/vendor/zlib/old/Makefile.riscos +151 -0
- package/vendor/zlib/old/README +3 -0
- package/vendor/zlib/old/descrip.mms +48 -0
- package/vendor/zlib/old/os2/Makefile.os2 +136 -0
- package/vendor/zlib/old/os2/zlib.def +51 -0
- package/vendor/zlib/old/visual-basic.txt +160 -0
- package/vendor/zlib/os400/README400 +48 -0
- package/vendor/zlib/os400/bndsrc +133 -0
- package/vendor/zlib/os400/make.sh +366 -0
- package/vendor/zlib/os400/zlib.inc +531 -0
- package/vendor/zlib/qnx/package.qpg +141 -0
- package/vendor/zlib/test/CMakeLists.txt +265 -0
- package/vendor/zlib/test/add_subdirectory_exclude_test.cmake.in +29 -0
- package/vendor/zlib/test/add_subdirectory_test.cmake.in +28 -0
- package/vendor/zlib/test/example.c +552 -0
- package/vendor/zlib/test/find_package_test.cmake.in +26 -0
- package/vendor/zlib/test/infcover.c +672 -0
- package/vendor/zlib/test/minigzip.c +590 -0
- package/vendor/zlib/treebuild.xml +116 -0
- package/vendor/zlib/trees.c +1119 -0
- package/vendor/zlib/trees.h +128 -0
- package/vendor/zlib/uncompr.c +85 -0
- package/vendor/zlib/watcom/watcom_f.mak +43 -0
- package/vendor/zlib/watcom/watcom_l.mak +43 -0
- package/vendor/zlib/win32/DLL_FAQ.txt +381 -0
- package/vendor/zlib/win32/Makefile.bor +109 -0
- package/vendor/zlib/win32/Makefile.gcc +177 -0
- package/vendor/zlib/win32/Makefile.msc +159 -0
- package/vendor/zlib/win32/README-WIN32.txt +103 -0
- package/vendor/zlib/win32/VisualC.txt +3 -0
- package/vendor/zlib/win32/zlib.def +98 -0
- package/vendor/zlib/win32/zlib1.rc +37 -0
- package/vendor/zlib/zconf.h.in +544 -0
- package/vendor/zlib/zlib.3 +149 -0
- package/vendor/zlib/zlib.3.pdf +0 -0
- package/vendor/zlib/zlib.h +1957 -0
- package/vendor/zlib/zlib.map +104 -0
- package/vendor/zlib/zlib.pc.cmakein +13 -0
- package/vendor/zlib/zlib.pc.in +13 -0
- package/vendor/zlib/zlibConfig.cmake.in +26 -0
- package/vendor/zlib/zutil.c +299 -0
- package/vendor/zlib/zutil.h +257 -0
- package/vendor/zsign/.gitattributes +4 -0
- package/vendor/zsign/LICENSE +21 -0
- package/vendor/zsign/README.md +142 -0
- package/vendor/zsign/build/linux/Makefile +43 -0
- package/vendor/zsign/build/macos/Makefile +43 -0
- package/vendor/zsign/build/windows/vs2022/include/minizip/crypt.h +128 -0
- package/vendor/zsign/build/windows/vs2022/include/minizip/ioapi.h +216 -0
- package/vendor/zsign/build/windows/vs2022/include/minizip/iowin32.h +28 -0
- package/vendor/zsign/build/windows/vs2022/include/minizip/mztools.h +37 -0
- package/vendor/zsign/build/windows/vs2022/include/minizip/unzip.h +437 -0
- package/vendor/zsign/build/windows/vs2022/include/minizip/zip.h +364 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/__DECC_INCLUDE_EPILOGUE.H +22 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/__DECC_INCLUDE_PROLOGUE.H +26 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/aes.h +111 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/applink.c +153 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/asn1.h +1133 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/asn1_mac.h +10 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/asn1err.h +142 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/asn1t.h +946 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/async.h +104 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/asyncerr.h +29 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/bio.h +1015 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/bioerr.h +72 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/blowfish.h +78 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/bn.h +590 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/bnerr.h +47 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/buffer.h +62 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/buffererr.h +25 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/camellia.h +117 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cast.h +71 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cmac.h +52 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cmp.h +727 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cmp_util.h +56 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cmperr.h +131 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cms.h +508 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cmserr.h +125 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/comp.h +98 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/comperr.h +38 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/conf.h +214 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/conf_api.h +46 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/conferr.h +52 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/configuration.h +188 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/conftypes.h +44 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/core.h +236 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/core_dispatch.h +1022 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/core_names.h +545 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/core_object.h +41 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/crmf.h +260 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/crmferr.h +50 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/crypto.h +580 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cryptoerr.h +56 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cryptoerr_legacy.h +1466 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ct.h +573 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cterr.h +45 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/decoder.h +133 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/decodererr.h +28 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/des.h +211 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/dh.h +339 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/dherr.h +59 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/dsa.h +280 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/dsaerr.h +44 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/dtls1.h +57 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/e_os2.h +310 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/e_ostime.h +38 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ebcdic.h +39 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ec.h +1588 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ecdh.h +10 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ecdsa.h +10 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ecerr.h +104 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/encoder.h +124 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/encodererr.h +28 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/engine.h +833 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/engineerr.h +63 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/err.h +512 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ess.h +128 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/esserr.h +32 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/evp.h +2231 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/evperr.h +140 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/fips_names.h +50 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/fipskey.h +41 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/hmac.h +62 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/hpke.h +169 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/http.h +118 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/httperr.h +56 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/idea.h +82 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/indicator.h +31 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/kdf.h +138 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/kdferr.h +16 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/lhash.h +398 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/macros.h +338 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/md2.h +56 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/md4.h +63 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/md5.h +62 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/mdc2.h +55 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/modes.h +219 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/obj_mac.h +5820 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/objects.h +184 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/objectserr.h +28 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ocsp.h +483 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ocsperr.h +53 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/opensslconf.h +17 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/opensslv.h +114 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ossl_typ.h +16 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/param_build.h +63 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/params.h +160 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/pem.h +543 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/pem2.h +19 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/pemerr.h +58 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/pkcs12.h +366 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/pkcs12err.h +46 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/pkcs7.h +430 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/pkcs7err.h +63 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/prov_ssl.h +38 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/proverr.h +162 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/provider.h +66 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/quic.h +70 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/rand.h +125 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/randerr.h +69 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/rc2.h +68 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/rc4.h +47 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/rc5.h +79 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ripemd.h +59 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/rsa.h +615 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/rsaerr.h +107 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/safestack.h +297 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/seed.h +113 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/self_test.h +98 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/sha.h +139 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/srp.h +285 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/srtp.h +68 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ssl.h +2878 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ssl2.h +30 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ssl3.h +357 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/sslerr.h +379 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/sslerr_legacy.h +467 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/stack.h +90 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/store.h +377 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/storeerr.h +49 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/symhacks.h +39 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/thread.h +31 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/tls1.h +1220 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/trace.h +320 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ts.h +522 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/tserr.h +67 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/txt_db.h +63 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/types.h +245 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ui.h +407 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/uierr.h +38 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/whrlpool.h +62 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/x509.h +1304 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/x509_acert.h +263 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/x509_vfy.h +902 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/x509err.h +70 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/x509v3.h +1500 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/x509v3err.h +96 -0
- package/vendor/zsign/build/windows/vs2022/include/zlib/zconf.h +553 -0
- package/vendor/zsign/build/windows/vs2022/include/zlib/zlib.h +1938 -0
- package/vendor/zsign/build/windows/vs2022/lib/minizip/x64/mt/minizip.lib +0 -0
- package/vendor/zsign/build/windows/vs2022/lib/openssl/x64/mt/libcrypto.lib +0 -0
- package/vendor/zsign/build/windows/vs2022/lib/openssl/x64/mt/libssl.lib +0 -0
- package/vendor/zsign/build/windows/vs2022/lib/zlib/x64/mt/zlib.lib +0 -0
- package/vendor/zsign/build/windows/vs2022/zsign/src/common_win32.h +44 -0
- package/vendor/zsign/build/windows/vs2022/zsign/src/getopt.cpp +69 -0
- package/vendor/zsign/build/windows/vs2022/zsign/src/getopt.h +20 -0
- package/vendor/zsign/build/windows/vs2022/zsign/src/iconv.cpp +138 -0
- package/vendor/zsign/build/windows/vs2022/zsign/src/iconv.h +38 -0
- package/vendor/zsign/build/windows/vs2022/zsign/zsign.vcxproj +177 -0
- package/vendor/zsign/build/windows/vs2022/zsign/zsign.vcxproj.filters +120 -0
- package/vendor/zsign/build/windows/vs2022/zsign.sln +28 -0
- package/vendor/zsign/src/archo.cpp +742 -0
- package/vendor/zsign/src/archo.h +61 -0
- package/vendor/zsign/src/bundle.cpp +589 -0
- package/vendor/zsign/src/bundle.h +46 -0
- package/vendor/zsign/src/common/archive.cpp +246 -0
- package/vendor/zsign/src/common/archive.h +22 -0
- package/vendor/zsign/src/common/base64.cpp +166 -0
- package/vendor/zsign/src/common/base64.h +30 -0
- package/vendor/zsign/src/common/common.h +56 -0
- package/vendor/zsign/src/common/fs.cpp +573 -0
- package/vendor/zsign/src/common/fs.h +50 -0
- package/vendor/zsign/src/common/json.cpp +3380 -0
- package/vendor/zsign/src/common/json.h +530 -0
- package/vendor/zsign/src/common/log.cpp +145 -0
- package/vendor/zsign/src/common/log.h +37 -0
- package/vendor/zsign/src/common/mach-o.h +585 -0
- package/vendor/zsign/src/common/sha.cpp +133 -0
- package/vendor/zsign/src/common/sha.h +24 -0
- package/vendor/zsign/src/common/timer.cpp +28 -0
- package/vendor/zsign/src/common/timer.h +17 -0
- package/vendor/zsign/src/common/util.cpp +185 -0
- package/vendor/zsign/src/common/util.h +25 -0
- package/vendor/zsign/src/macho.cpp +273 -0
- package/vendor/zsign/src/macho.h +38 -0
- package/vendor/zsign/src/openssl.cpp +698 -0
- package/vendor/zsign/src/openssl.h +71 -0
- package/vendor/zsign/src/signing.cpp +745 -0
- package/vendor/zsign/src/signing.h +59 -0
- package/vendor/zsign/src/zsign.cpp +317 -0
- package/vendor/zsign/test/dylib/bin/demo1.dylib +0 -0
- package/vendor/zsign/test/dylib/bin/demo2.dylib +0 -0
- package/vendor/zsign/test/dylib/demo/Makefile +12 -0
- package/vendor/zsign/test/dylib/demo/control +9 -0
- package/vendor/zsign/test/dylib/demo/demo.m +21 -0
- package/vendor/zsign/test/linux/test.sh +19 -0
- package/vendor/zsign/test/macos/test.sh +19 -0
- package/vendor/zsign/test/windows/test.ps1 +17 -0
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
typedef int cpu_type_t;
|
|
4
|
+
typedef int cpu_subtype_t;
|
|
5
|
+
typedef int vm_prot_t;
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Capability bits used in the definition of cpu_type.
|
|
9
|
+
*/
|
|
10
|
+
#define CPU_ARCH_MASK 0xff000000 /* mask for architecture bits */
|
|
11
|
+
#define CPU_ARCH_ABI64 0x01000000 /* 64 bit ABI */
|
|
12
|
+
#define CPU_ARCH_ABI64_32 0x02000000
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* Machine types known by all.
|
|
16
|
+
*/
|
|
17
|
+
#define CPU_TYPE_ANY -1
|
|
18
|
+
#define CPU_TYPE_VAX 1
|
|
19
|
+
#define CPU_TYPE_MC680x0 6
|
|
20
|
+
#define CPU_TYPE_X86 7
|
|
21
|
+
#define CPU_TYPE_I386 CPU_TYPE_X86 /* compatibility */
|
|
22
|
+
#define CPU_TYPE_MIPS 8
|
|
23
|
+
#define CPU_TYPE_MC98000 10
|
|
24
|
+
#define CPU_TYPE_HPPA 11
|
|
25
|
+
#define CPU_TYPE_ARM 12
|
|
26
|
+
#define CPU_TYPE_MC88000 13
|
|
27
|
+
#define CPU_TYPE_SPARC 14
|
|
28
|
+
#define CPU_TYPE_I860 15
|
|
29
|
+
#define CPU_TYPE_ALPHA 16
|
|
30
|
+
#define CPU_TYPE_POWERPC 18
|
|
31
|
+
#define CPU_TYPE_X86_64 (CPU_TYPE_X86 | CPU_ARCH_ABI64)
|
|
32
|
+
#define CPU_TYPE_ARM64 (CPU_TYPE_ARM | CPU_ARCH_ABI64)
|
|
33
|
+
#define CPU_TYPE_ARM64_32 (CPU_TYPE_ARM | CPU_ARCH_ABI64_32)
|
|
34
|
+
#define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | CPU_ARCH_ABI64)
|
|
35
|
+
|
|
36
|
+
/*
|
|
37
|
+
* Machine subtypes (these are defined here, instead of in a machine
|
|
38
|
+
* dependent directory, so that any program can get all definitions
|
|
39
|
+
* regardless of where is it compiled).
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/*
|
|
43
|
+
* Capability bits used in the definition of cpu_subtype.
|
|
44
|
+
*/
|
|
45
|
+
#define CPU_SUBTYPE_MASK 0xff000000 /* mask for feature flags */
|
|
46
|
+
#define CPU_SUBTYPE_LIB64 0x80000000 /* 64 bit libraries */
|
|
47
|
+
|
|
48
|
+
/*
|
|
49
|
+
* Object files that are hand-crafted to run on any
|
|
50
|
+
* implementation of an architecture are tagged with
|
|
51
|
+
* CPU_SUBTYPE_MULTIPLE. This functions essentially the same as
|
|
52
|
+
* the "ALL" subtype of an architecture except that it allows us
|
|
53
|
+
* to easily find object files that may need to be modified
|
|
54
|
+
* whenever a new implementation of an architecture comes out.
|
|
55
|
+
*
|
|
56
|
+
* It is the responsibility of the implementor to make sure the
|
|
57
|
+
* software handles unsupported implementations elegantly.
|
|
58
|
+
*/
|
|
59
|
+
#define CPU_SUBTYPE_MULTIPLE -1
|
|
60
|
+
#define CPU_SUBTYPE_LITTLE_ENDIAN 0
|
|
61
|
+
#define CPU_SUBTYPE_BIG_ENDIAN 1
|
|
62
|
+
|
|
63
|
+
/*
|
|
64
|
+
* I386 subtypes
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
#define CPU_SUBTYPE_INTEL(f, m) ((f) + ((m) << 4))
|
|
68
|
+
|
|
69
|
+
#define CPU_SUBTYPE_I386_ALL CPU_SUBTYPE_INTEL(3, 0)
|
|
70
|
+
#define CPU_SUBTYPE_386 CPU_SUBTYPE_INTEL(3, 0)
|
|
71
|
+
#define CPU_SUBTYPE_486 CPU_SUBTYPE_INTEL(4, 0)
|
|
72
|
+
#define CPU_SUBTYPE_486SX CPU_SUBTYPE_INTEL(4, 8) // 8 << 4 = 128
|
|
73
|
+
#define CPU_SUBTYPE_586 CPU_SUBTYPE_INTEL(5, 0)
|
|
74
|
+
#define CPU_SUBTYPE_PENT CPU_SUBTYPE_INTEL(5, 0)
|
|
75
|
+
#define CPU_SUBTYPE_PENTPRO CPU_SUBTYPE_INTEL(6, 1)
|
|
76
|
+
#define CPU_SUBTYPE_PENTII_M3 CPU_SUBTYPE_INTEL(6, 3)
|
|
77
|
+
#define CPU_SUBTYPE_PENTII_M5 CPU_SUBTYPE_INTEL(6, 5)
|
|
78
|
+
#define CPU_SUBTYPE_CELERON CPU_SUBTYPE_INTEL(7, 6)
|
|
79
|
+
#define CPU_SUBTYPE_CELERON_MOBILE CPU_SUBTYPE_INTEL(7, 7)
|
|
80
|
+
#define CPU_SUBTYPE_PENTIUM_3 CPU_SUBTYPE_INTEL(8, 0)
|
|
81
|
+
#define CPU_SUBTYPE_PENTIUM_3_M CPU_SUBTYPE_INTEL(8, 1)
|
|
82
|
+
#define CPU_SUBTYPE_PENTIUM_3_XEON CPU_SUBTYPE_INTEL(8, 2)
|
|
83
|
+
#define CPU_SUBTYPE_PENTIUM_M CPU_SUBTYPE_INTEL(9, 0)
|
|
84
|
+
#define CPU_SUBTYPE_PENTIUM_4 CPU_SUBTYPE_INTEL(10, 0)
|
|
85
|
+
#define CPU_SUBTYPE_PENTIUM_4_M CPU_SUBTYPE_INTEL(10, 1)
|
|
86
|
+
#define CPU_SUBTYPE_ITANIUM CPU_SUBTYPE_INTEL(11, 0)
|
|
87
|
+
#define CPU_SUBTYPE_ITANIUM_2 CPU_SUBTYPE_INTEL(11, 1)
|
|
88
|
+
#define CPU_SUBTYPE_XEON CPU_SUBTYPE_INTEL(12, 0)
|
|
89
|
+
#define CPU_SUBTYPE_XEON_MP CPU_SUBTYPE_INTEL(12, 1)
|
|
90
|
+
|
|
91
|
+
#define CPU_SUBTYPE_INTEL_FAMILY(x) ((x) & 15)
|
|
92
|
+
#define CPU_SUBTYPE_INTEL_FAMILY_MAX 15
|
|
93
|
+
|
|
94
|
+
#define CPU_SUBTYPE_INTEL_MODEL(x) ((x) >> 4)
|
|
95
|
+
#define CPU_SUBTYPE_INTEL_MODEL_ALL 0
|
|
96
|
+
|
|
97
|
+
/*
|
|
98
|
+
* X86 subtypes.
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
#define CPU_SUBTYPE_X86_ALL 3
|
|
102
|
+
#define CPU_SUBTYPE_X86_64_ALL 3
|
|
103
|
+
#define CPU_SUBTYPE_X86_ARCH1 4
|
|
104
|
+
#define CPU_SUBTYPE_X86_64_H 8
|
|
105
|
+
|
|
106
|
+
#define CPU_SUBTYPE_ARM_ALL 0
|
|
107
|
+
#define CPU_SUBTYPE_ARM_A500_ARCH 1
|
|
108
|
+
#define CPU_SUBTYPE_ARM_A500 2
|
|
109
|
+
#define CPU_SUBTYPE_ARM_A440 3
|
|
110
|
+
#define CPU_SUBTYPE_ARM_M4 4
|
|
111
|
+
#define CPU_SUBTYPE_ARM_V4T 5
|
|
112
|
+
#define CPU_SUBTYPE_ARM_V6 6
|
|
113
|
+
#define CPU_SUBTYPE_ARM_V5 7
|
|
114
|
+
#define CPU_SUBTYPE_ARM_V5TEJ 7
|
|
115
|
+
#define CPU_SUBTYPE_ARM_XSCALE 8
|
|
116
|
+
#define CPU_SUBTYPE_ARM_V7 9
|
|
117
|
+
#define CPU_SUBTYPE_ARM_V7S 11
|
|
118
|
+
#define CPU_SUBTYPE_ARM_V7K 12
|
|
119
|
+
#define CPU_SUBTYPE_ARM_V8 13
|
|
120
|
+
#define CPU_SUBTYPE_ARM_V6M 14
|
|
121
|
+
#define CPU_SUBTYPE_ARM_V7M 15
|
|
122
|
+
#define CPU_SUBTYPE_ARM_V7EM 16
|
|
123
|
+
|
|
124
|
+
#define CPU_SUBTYPE_ARM64_ALL 0
|
|
125
|
+
#define CPU_SUBTYPE_ARM64_V8 1
|
|
126
|
+
#define CPU_SUBTYPE_ARM64E 2
|
|
127
|
+
#define CPU_SUBTYPE_ARM64_32_V8 1
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
#define FAT_MAGIC 0xcafebabe
|
|
131
|
+
#define FAT_CIGAM 0xbebafeca
|
|
132
|
+
|
|
133
|
+
#define MH_MAGIC 0xfeedface
|
|
134
|
+
#define MH_CIGAM 0xcefaedfe
|
|
135
|
+
#define MH_MAGIC_64 0xfeedfacf
|
|
136
|
+
#define MH_CIGAM_64 0xcffaedfe
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
/* Constants for the cmd field of new load commands, the type */
|
|
140
|
+
|
|
141
|
+
#define MH_OBJECT 0x1 /* relocatable object file */
|
|
142
|
+
#define MH_EXECUTE 0x2 /* demand paged executable file */
|
|
143
|
+
#define MH_FVMLIB 0x3 /* fixed VM shared library file */
|
|
144
|
+
#define MH_CORE 0x4 /* core file */
|
|
145
|
+
#define MH_PRELOAD 0x5 /* preloaded executable file */
|
|
146
|
+
#define MH_DYLIB 0x6 /* dynamicly bound shared library file*/
|
|
147
|
+
#define MH_DYLINKER 0x7 /* dynamic link editor */
|
|
148
|
+
#define MH_BUNDLE 0x8 /* dynamicly bound bundle file */
|
|
149
|
+
#define MH_DYLIB_STUB 0x9 // Dynamic shared library stub
|
|
150
|
+
#define MH_DSYM 0xa // Companion debug sections file
|
|
151
|
+
#define MH_KEXT_BUNDLE 0xb // Kernel extension
|
|
152
|
+
|
|
153
|
+
/* Constants for the flags field of the mach_header */
|
|
154
|
+
#define MH_NOUNDEFS 0x00000001 /* the object file has no undefined references, can be executed */
|
|
155
|
+
#define MH_INCRLINK 0x00000002 /* the object file is the output of an incremental link against a base file and can't be link edited again */
|
|
156
|
+
#define MH_DYLDLINK 0x00000004 /* the object file is input for the dynamic linker and can't be staticly link edited again */
|
|
157
|
+
#define MH_BINDATLOAD 0x00000008 /* the object file's undefined references are bound by the dynamic linker when loaded. */
|
|
158
|
+
#define MH_PREBOUND 0x00000010 /* the file has it's dynamic undefined references prebound. */
|
|
159
|
+
#define MH_SPLIT_SEGS 0x00000020
|
|
160
|
+
#define MH_LAZY_INIT 0x00000040
|
|
161
|
+
#define MH_TWOLEVEL 0x00000080
|
|
162
|
+
#define MH_FORCE_FLAT 0x00000100
|
|
163
|
+
#define MH_NOMULTIDEFS 0x00000200
|
|
164
|
+
#define MH_NOFIXPREBINDING 0x00000400
|
|
165
|
+
#define MH_PREBINDABLE 0x00000800
|
|
166
|
+
#define MH_ALLMODSBOUND 0x00001000
|
|
167
|
+
#define MH_SUBSECTIONS_VIA_SYMBOLS 0x00002000
|
|
168
|
+
#define MH_CANONICAL 0x00004000
|
|
169
|
+
#define MH_WEAK_DEFINES 0x00008000
|
|
170
|
+
#define MH_BINDS_TO_WEAK 0x00010000
|
|
171
|
+
#define MH_ALLOW_STACK_EXECUTION 0x00020000
|
|
172
|
+
#define MH_ROOT_SAFE 0x00040000
|
|
173
|
+
#define MH_SETUID_SAFE 0x00080000
|
|
174
|
+
#define MH_NO_REEXPORTED_DYLIBS 0x00100000
|
|
175
|
+
#define MH_PIE 0x00200000
|
|
176
|
+
#define MH_DEAD_STRIPPABLE_DYLIB 0x00400000
|
|
177
|
+
#define MH_HAS_TLV_DESCRIPTORS 0x00800000
|
|
178
|
+
#define MH_NO_HEAP_EXECUTION 0x01000000
|
|
179
|
+
#define MH_APP_EXTENSION_SAFE 0x02000000
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
/* Constants for the cmd field of all load commands, the type */
|
|
183
|
+
#define LC_SEGMENT 0x00000001 /* segment of this file to be mapped */
|
|
184
|
+
#define LC_SYMTAB 0x00000002 /* link-edit stab symbol table info */
|
|
185
|
+
#define LC_SYMSEG 0x00000003 /* link-edit gdb symbol table info (obsolete) */
|
|
186
|
+
#define LC_THREAD 0x00000004 /* thread */
|
|
187
|
+
#define LC_UNIXTHREAD 0x00000005 /* unix thread (includes a stack) */
|
|
188
|
+
#define LC_LOADFVMLIB 0x00000006 /* load a specified fixed VM shared library */
|
|
189
|
+
#define LC_IDFVMLIB 0x00000007 /* fixed VM shared library identification */
|
|
190
|
+
#define LC_IDENT 0x00000008 /* object identification info (obsolete) */
|
|
191
|
+
#define LC_FVMFILE 0x00000009 /* fixed VM file inclusion (internal use) */
|
|
192
|
+
#define LC_PREPAGE 0x0000000a /* prepage command (internal use) */
|
|
193
|
+
#define LC_DYSYMTAB 0x0000000b /* dynamic link-edit symbol table info */
|
|
194
|
+
#define LC_LOAD_DYLIB 0x0000000c /* load a dynamicly linked shared library */
|
|
195
|
+
#define LC_ID_DYLIB 0x0000000d /* dynamicly linked shared lib identification */
|
|
196
|
+
#define LC_LOAD_DYLINKER 0x0000000e /* load a dynamic linker */
|
|
197
|
+
#define LC_ID_DYLINKER 0x0000000f /* dynamic linker identification */
|
|
198
|
+
#define LC_PREBOUND_DYLIB 0x00000010 /* modules prebound for a dynamicly */
|
|
199
|
+
#define LC_ROUTINES 0x00000011
|
|
200
|
+
#define LC_SUB_FRAMEWORK 0x00000012
|
|
201
|
+
#define LC_SUB_UMBRELLA 0x00000013
|
|
202
|
+
#define LC_SUB_CLIENT 0x00000014
|
|
203
|
+
#define LC_SUB_LIBRARY 0x00000015
|
|
204
|
+
#define LC_TWOLEVEL_HINTS 0x00000016
|
|
205
|
+
#define LC_PREBIND_CKSUM 0x00000017
|
|
206
|
+
#define LC_LOAD_WEAK_DYLIB 0x80000018
|
|
207
|
+
#define LC_SEGMENT_64 0x00000019
|
|
208
|
+
#define LC_ROUTINES_64 0x0000001A
|
|
209
|
+
#define LC_UUID 0x0000001B
|
|
210
|
+
#define LC_RPATH 0x8000001C
|
|
211
|
+
#define LC_CODE_SIGNATURE 0x0000001D
|
|
212
|
+
#define LC_SEGMENT_SPLIT_INFO 0x0000001E
|
|
213
|
+
#define LC_REEXPORT_DYLIB 0x8000001F
|
|
214
|
+
#define LC_LAZY_LOAD_DYLIB 0x00000020
|
|
215
|
+
#define LC_ENCRYPTION_INFO 0x00000021
|
|
216
|
+
#define LC_DYLD_INFO 0x00000022
|
|
217
|
+
#define LC_DYLD_INFO_ONLY 0x80000022
|
|
218
|
+
#define LC_LOAD_UPWARD_DYLIB 0x80000023
|
|
219
|
+
#define LC_VERSION_MIN_MACOSX 0x00000024
|
|
220
|
+
#define LC_VERSION_MIN_IPHONEOS 0x00000025
|
|
221
|
+
#define LC_FUNCTION_STARTS 0x00000026
|
|
222
|
+
#define LC_DYLD_ENVIRONMENT 0x00000027
|
|
223
|
+
#define LC_MAIN 0x80000028
|
|
224
|
+
#define LC_DATA_IN_CODE 0x00000029
|
|
225
|
+
#define LC_SOURCE_VERSION 0x0000002A
|
|
226
|
+
#define LC_DYLIB_CODE_SIGN_DRS 0x0000002B
|
|
227
|
+
#define LC_ENCRYPTION_INFO_64 0x0000002C
|
|
228
|
+
#define LC_LINKER_OPTION 0x0000002D
|
|
229
|
+
#define LC_LINKER_OPTIMIZATION_HINT 0x0000002E
|
|
230
|
+
#define LC_VERSION_MIN_TVOS 0x0000002F
|
|
231
|
+
#define LC_VERSION_MIN_WATCHOS 0x00000030
|
|
232
|
+
|
|
233
|
+
/* Constants for the flags field of the segment_command */
|
|
234
|
+
#define SG_HIGHVM 0x00000001 /* the file contents for this segment is for
|
|
235
|
+
the high part of the VM space, the low part
|
|
236
|
+
is zero filled (for stacks in core files) */
|
|
237
|
+
#define SG_FVMLIB 0x00000002 /* this segment is the VM that is allocated by
|
|
238
|
+
a fixed VM library, for overlap checking in
|
|
239
|
+
the link editor */
|
|
240
|
+
#define SG_NORELOC 0x00000004 /* this segment has nothing that was relocated
|
|
241
|
+
in it and nothing relocated to it, that is
|
|
242
|
+
it maybe safely replaced without relocation*/
|
|
243
|
+
#define SG_PROTECTED_VERSION_1 0x00000008 // Segment is encryption protected
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
// Section flag masks
|
|
247
|
+
#define SECTION_TYPE 0x000000ff // Section type mask
|
|
248
|
+
#define SECTION_ATTRIBUTES 0xffffff00 // Section attributes mask
|
|
249
|
+
|
|
250
|
+
// Section type (use SECTION_TYPE mask)
|
|
251
|
+
|
|
252
|
+
#define S_REGULAR 0x00
|
|
253
|
+
#define S_ZEROFILL 0x01
|
|
254
|
+
#define S_CSTRING_LITERALS 0x02
|
|
255
|
+
#define S_4BYTE_LITERALS 0x03
|
|
256
|
+
#define S_8BYTE_LITERALS 0x04
|
|
257
|
+
#define S_LITERAL_POINTERS 0x05
|
|
258
|
+
#define S_NON_LAZY_SYMBOL_POINTERS 0x06
|
|
259
|
+
#define S_LAZY_SYMBOL_POINTERS 0x07
|
|
260
|
+
#define S_SYMBOL_STUBS 0x08
|
|
261
|
+
#define S_MOD_INIT_FUNC_POINTERS 0x09
|
|
262
|
+
#define S_MOD_TERM_FUNC_POINTERS 0x0a
|
|
263
|
+
#define S_COALESCED 0x0b
|
|
264
|
+
#define S_GB_ZEROFILL 0x0c
|
|
265
|
+
#define S_INTERPOSING 0x0d
|
|
266
|
+
#define S_16BYTE_LITERALS 0x0e
|
|
267
|
+
#define S_DTRACE_DOF 0x0f
|
|
268
|
+
#define S_LAZY_DYLIB_SYMBOL_POINTERS 0x10
|
|
269
|
+
#define S_THREAD_LOCAL_REGULAR 0x11
|
|
270
|
+
#define S_THREAD_LOCAL_ZEROFILL 0x12
|
|
271
|
+
#define S_THREAD_LOCAL_VARIABLES 0x13
|
|
272
|
+
#define S_THREAD_LOCAL_VARIABLE_POINTERS 0x14
|
|
273
|
+
#define S_THREAD_LOCAL_INIT_FUNCTION_POINTERS 0x15
|
|
274
|
+
|
|
275
|
+
// Section attributes (use SECTION_ATTRIBUTES mask)
|
|
276
|
+
|
|
277
|
+
#define S_ATTR_PURE_INSTRUCTIONS 0x80000000 // Only pure instructions
|
|
278
|
+
#define S_ATTR_NO_TOC 0x40000000 // Contains coalesced symbols
|
|
279
|
+
#define S_ATTR_STRIP_STATIC_SYMS 0x20000000 // Can strip static symbols
|
|
280
|
+
#define S_ATTR_NO_DEAD_STRIP 0x10000000 // No dead stripping
|
|
281
|
+
#define S_ATTR_LIVE_SUPPORT 0x08000000 // Live blocks support
|
|
282
|
+
#define S_ATTR_SELF_MODIFYING_CODE 0x04000000 // Self modifying code
|
|
283
|
+
#define S_ATTR_DEBUG 0x02000000 // Debug section
|
|
284
|
+
#define S_ATTR_SOME_INSTRUCTIONS 0x00000400 // Some machine instructions
|
|
285
|
+
#define S_ATTR_EXT_RELOC 0x00000200 // Has external relocations
|
|
286
|
+
#define S_ATTR_LOC_RELOC 0x00000100 // Has local relocations
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
//struct define
|
|
290
|
+
|
|
291
|
+
#pragma pack(push, 1)
|
|
292
|
+
|
|
293
|
+
struct fat_header
|
|
294
|
+
{
|
|
295
|
+
uint32_t magic; /* FAT_MAGIC */
|
|
296
|
+
uint32_t nfat_arch; /* number of structs that follow */
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
struct fat_arch
|
|
300
|
+
{
|
|
301
|
+
cpu_type_t cputype; /* cpu specifier (int) */
|
|
302
|
+
cpu_subtype_t cpusubtype; /* machine specifier (int) */
|
|
303
|
+
uint32_t offset; /* file offset to this object file */
|
|
304
|
+
uint32_t size; /* size of this object file */
|
|
305
|
+
uint32_t align; /* alignment as a power of 2 */
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
struct mach_header
|
|
309
|
+
{
|
|
310
|
+
uint32_t magic; /* mach magic number identifier */
|
|
311
|
+
cpu_type_t cputype; /* cpu specifier */
|
|
312
|
+
cpu_subtype_t cpusubtype; /* machine specifier */
|
|
313
|
+
uint32_t filetype; /* type of file */
|
|
314
|
+
uint32_t ncmds; /* number of load commands */
|
|
315
|
+
uint32_t sizeofcmds; /* the size of all the load commands */
|
|
316
|
+
uint32_t flags; /* flags */
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
struct mach_header_64
|
|
320
|
+
{
|
|
321
|
+
uint32_t magic; /* mach magic number identifier */
|
|
322
|
+
cpu_type_t cputype; /* cpu specifier */
|
|
323
|
+
cpu_subtype_t cpusubtype; /* machine specifier */
|
|
324
|
+
uint32_t filetype; /* type of file */
|
|
325
|
+
uint32_t ncmds; /* number of load commands */
|
|
326
|
+
uint32_t sizeofcmds; /* the size of all the load commands */
|
|
327
|
+
uint32_t flags; /* flags */
|
|
328
|
+
uint32_t reserved; /* reserved */
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
struct load_command
|
|
332
|
+
{
|
|
333
|
+
uint32_t cmd; /* type of load command */
|
|
334
|
+
uint32_t cmdsize; /* total size of command in bytes */
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
struct uuid_command {
|
|
338
|
+
uint32_t cmd;
|
|
339
|
+
uint32_t cmdsize;
|
|
340
|
+
uint8_t uuid[16];
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
struct entry_point_command {
|
|
344
|
+
uint32_t cmd;
|
|
345
|
+
uint32_t cmdsize;
|
|
346
|
+
uint64_t entryoff;
|
|
347
|
+
uint64_t stacksize;
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
struct codesignature_command {
|
|
351
|
+
uint32_t cmd;
|
|
352
|
+
uint32_t cmdsize;
|
|
353
|
+
uint32_t dataoff;
|
|
354
|
+
uint32_t datasize;
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
struct encryption_info_command {
|
|
358
|
+
uint32_t cmd;
|
|
359
|
+
uint32_t cmdsize;
|
|
360
|
+
uint32_t cryptoff;
|
|
361
|
+
uint32_t cryptsize;
|
|
362
|
+
uint32_t cryptid;
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
struct encryption_info_command_64
|
|
366
|
+
{
|
|
367
|
+
uint32_t cmd;
|
|
368
|
+
uint32_t cmdsize;
|
|
369
|
+
uint32_t cryptoff;
|
|
370
|
+
uint32_t cryptsize;
|
|
371
|
+
uint32_t cryptid;
|
|
372
|
+
uint32_t pad;
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
struct segment_command { /* for 32-bit architectures */
|
|
376
|
+
uint32_t cmd; /* LC_SEGMENT */
|
|
377
|
+
uint32_t cmdsize; /* includes sizeof section structs */
|
|
378
|
+
char segname[16]; /* segment name */
|
|
379
|
+
uint32_t vmaddr; /* memory address of this segment */
|
|
380
|
+
uint32_t vmsize; /* memory size of this segment */
|
|
381
|
+
uint32_t fileoff; /* file offset of this segment */
|
|
382
|
+
uint32_t filesize; /* amount to map from the file */
|
|
383
|
+
vm_prot_t maxprot; /* maximum VM protection */
|
|
384
|
+
vm_prot_t initprot; /* initial VM protection */
|
|
385
|
+
uint32_t nsects; /* number of sections in segment */
|
|
386
|
+
uint32_t flags; /* flags */
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
struct segment_command_64 { /* for 64-bit architectures */
|
|
390
|
+
uint32_t cmd; /* LC_SEGMENT_64 */
|
|
391
|
+
uint32_t cmdsize; /* includes sizeof section_64 structs */
|
|
392
|
+
char segname[16]; /* segment name */
|
|
393
|
+
uint64_t vmaddr; /* memory address of this segment */
|
|
394
|
+
uint64_t vmsize; /* memory size of this segment */
|
|
395
|
+
uint64_t fileoff; /* file offset of this segment */
|
|
396
|
+
uint64_t filesize; /* amount to map from the file */
|
|
397
|
+
vm_prot_t maxprot; /* maximum VM protection */
|
|
398
|
+
vm_prot_t initprot; /* initial VM protection */
|
|
399
|
+
uint32_t nsects; /* number of sections in segment */
|
|
400
|
+
uint32_t flags; /* flags */
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
struct section { /* for 32-bit architectures */
|
|
404
|
+
char sectname[16]; /* name of this section */
|
|
405
|
+
char segname[16]; /* segment this section goes in */
|
|
406
|
+
uint32_t addr; /* memory address of this section */
|
|
407
|
+
uint32_t size; /* size in bytes of this section */
|
|
408
|
+
uint32_t offset; /* file offset of this section */
|
|
409
|
+
uint32_t align; /* section alignment (power of 2) */
|
|
410
|
+
uint32_t reloff; /* file offset of relocation entries */
|
|
411
|
+
uint32_t nreloc; /* number of relocation entries */
|
|
412
|
+
uint32_t flags; /* flags (section type and attributes)*/
|
|
413
|
+
uint32_t reserved1; /* reserved */
|
|
414
|
+
uint32_t reserved2; /* reserved */
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
struct section_64 { /* for 64-bit architectures */
|
|
418
|
+
char sectname[16]; /* name of this section */
|
|
419
|
+
char segname[16]; /* segment this section goes in */
|
|
420
|
+
uint64_t addr; /* memory address of this section */
|
|
421
|
+
uint64_t size; /* size in bytes of this section */
|
|
422
|
+
uint32_t offset; /* file offset of this section */
|
|
423
|
+
uint32_t align; /* section alignment (power of 2) */
|
|
424
|
+
uint32_t reloff; /* file offset of relocation entries */
|
|
425
|
+
uint32_t nreloc; /* number of relocation entries */
|
|
426
|
+
uint32_t flags; /* flags (section type and attributes)*/
|
|
427
|
+
uint32_t reserved1; /* reserved (for offset or index) */
|
|
428
|
+
uint32_t reserved2; /* reserved (for count or sizeof) */
|
|
429
|
+
uint32_t reserved3; /* reserved */
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
union lc_str {
|
|
433
|
+
uint32_t offset; /* offset to the string */
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
struct dylib {
|
|
437
|
+
union lc_str name; /* library's path name */
|
|
438
|
+
uint32_t timestamp; /* library's build time stamp */
|
|
439
|
+
uint32_t current_version; /* library's current version number */
|
|
440
|
+
uint32_t compatibility_version; /* library's compatibility vers number*/
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
struct dylib_command {
|
|
444
|
+
uint32_t cmd; /* LC_ID_DYLIB, LC_LOAD_{,WEAK_}DYLIB,LC_REEXPORT_DYLIB */
|
|
445
|
+
uint32_t cmdsize; /* includes pathname string */
|
|
446
|
+
struct dylib dylib; /* the library identification */
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
#pragma pack(pop)
|
|
450
|
+
|
|
451
|
+
//////CodeSignature
|
|
452
|
+
|
|
453
|
+
enum eCSFLAGS
|
|
454
|
+
{
|
|
455
|
+
CSMAGIC_REQUIREMENT = 0xfade0c00, /* single Requirement blob */
|
|
456
|
+
CSMAGIC_REQUIREMENTS = 0xfade0c01, /* Requirements vector (internal requirements) */
|
|
457
|
+
CSMAGIC_CODEDIRECTORY = 0xfade0c02, /* CodeDirectory blob */
|
|
458
|
+
CSMAGIC_EMBEDDED_SIGNATURE = 0xfade0cc0, /* embedded form of signature data */
|
|
459
|
+
CSMAGIC_EMBEDDED_SIGNATURE_OLD = 0xfade0b02, /* XXX */
|
|
460
|
+
CSMAGIC_EMBEDDED_ENTITLEMENTS = 0xfade7171, /* embedded entitlements */
|
|
461
|
+
CSMAGIC_EMBEDDED_DER_ENTITLEMENTS = 0xfade7172, /* der format entitlements */
|
|
462
|
+
CSMAGIC_DETACHED_SIGNATURE = 0xfade0cc1, /* multi-arch collection of embedded signatures */
|
|
463
|
+
CSMAGIC_BLOBWRAPPER = 0xfade0b01, /* CMS Signature, among other things */
|
|
464
|
+
CS_SUPPORTSSCATTER = 0x20100,
|
|
465
|
+
CS_SUPPORTSTEAMID = 0x20200,
|
|
466
|
+
CS_SUPPORTSCODELIMIT64 = 0x20300,
|
|
467
|
+
CS_SUPPORTSEXECSEG = 0x20400,
|
|
468
|
+
CSSLOT_CODEDIRECTORY = 0, /* slot index for CodeDirectory */
|
|
469
|
+
CSSLOT_INFOSLOT = 1,
|
|
470
|
+
CSSLOT_REQUIREMENTS = 2,
|
|
471
|
+
CSSLOT_RESOURCEDIR = 3,
|
|
472
|
+
CSSLOT_APPLICATION = 4,
|
|
473
|
+
CSSLOT_ENTITLEMENTS = 5,
|
|
474
|
+
CSSLOT_DER_ENTITLEMENTS = 7, /* der format entitlement type */
|
|
475
|
+
CSSLOT_ALTERNATE_CODEDIRECTORIES = 0x1000, /* first alternate CodeDirectory, if any */
|
|
476
|
+
CSSLOT_ALTERNATE_CODEDIRECTORY_MAX = 5, /* max number of alternate CD slots */
|
|
477
|
+
CSSLOT_ALTERNATE_CODEDIRECTORY_LIMIT = CSSLOT_ALTERNATE_CODEDIRECTORIES + CSSLOT_ALTERNATE_CODEDIRECTORY_MAX, /* one past the last */
|
|
478
|
+
CSSLOT_SIGNATURESLOT = 0x10000, /* CMS Signature */
|
|
479
|
+
CSSLOT_IDENTIFICATIONSLOT = 0x10001,
|
|
480
|
+
CSSLOT_TICKETSLOT = 0x10002,
|
|
481
|
+
CSTYPE_INDEX_REQUIREMENTS = 0x00000002, /* compat with amfi */
|
|
482
|
+
CSTYPE_INDEX_ENTITLEMENTS = 0x00000005, /* compat with amfi */
|
|
483
|
+
CS_HASHTYPE_SHA1 = 1,
|
|
484
|
+
CS_HASHTYPE_SHA256 = 2,
|
|
485
|
+
CS_HASHTYPE_SHA256_TRUNCATED = 3,
|
|
486
|
+
CS_HASHTYPE_SHA384 = 4,
|
|
487
|
+
CS_SHA1_LEN = 20,
|
|
488
|
+
CS_SHA256_LEN = 32,
|
|
489
|
+
CS_SHA256_TRUNCATED_LEN = 20,
|
|
490
|
+
CS_CDHASH_LEN = 20, /* always - larger hashes are truncated */
|
|
491
|
+
CS_HASH_MAX_SIZE = 48, /* max size of the hash we'll support */
|
|
492
|
+
CS_EXECSEG_MAIN_BINARY = 0x1,
|
|
493
|
+
CS_EXECSEG_ALLOW_UNSIGNED = 0x10,
|
|
494
|
+
|
|
495
|
+
/*
|
|
496
|
+
* Currently only to support Legacy VPN plugins,
|
|
497
|
+
* but intended to replace all the various platform code, dev code etc. bits.
|
|
498
|
+
*/
|
|
499
|
+
CS_SIGNER_TYPE_UNKNOWN = 0,
|
|
500
|
+
CS_SIGNER_TYPE_LEGACYVPN = 5,
|
|
501
|
+
|
|
502
|
+
/*
|
|
503
|
+
* Flags that can be specified in `CS_CodeDirectory::flags`.
|
|
504
|
+
*/
|
|
505
|
+
CS_SEC_CODESIGNATURE_ADHOC = 0x0002, /* kSecCodeSignatureAdhoc */
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
#pragma pack(push, 1)
|
|
509
|
+
|
|
510
|
+
/*
|
|
511
|
+
* Structure of an embedded-signature SuperBlob
|
|
512
|
+
*/
|
|
513
|
+
struct CS_BlobIndex {
|
|
514
|
+
uint32_t type; /* type of entry */
|
|
515
|
+
uint32_t offset; /* offset of entry */
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
struct CS_SuperBlob {
|
|
519
|
+
uint32_t magic; /* magic number */
|
|
520
|
+
uint32_t length; /* total length of SuperBlob */
|
|
521
|
+
uint32_t count; /* number of index entries following */
|
|
522
|
+
//CS_BlobIndex index[]; /* (count) entries */
|
|
523
|
+
/* followed by Blobs in no particular order as indicated by offsets in index */
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
/*
|
|
527
|
+
* C form of a CodeDirectory.
|
|
528
|
+
*/
|
|
529
|
+
struct CS_CodeDirectory {
|
|
530
|
+
uint32_t magic; /* magic number (CSMAGIC_CODEDIRECTORY) */
|
|
531
|
+
uint32_t length; /* total length of CodeDirectory blob */
|
|
532
|
+
uint32_t version; /* compatibility version */
|
|
533
|
+
uint32_t flags; /* setup and mode flags */
|
|
534
|
+
uint32_t hashOffset; /* offset of hash slot element at index zero */
|
|
535
|
+
uint32_t identOffset; /* offset of identifier string */
|
|
536
|
+
uint32_t nSpecialSlots; /* number of special hash slots */
|
|
537
|
+
uint32_t nCodeSlots; /* number of ordinary (code) hash slots */
|
|
538
|
+
uint32_t codeLimit; /* limit to main image signature range */
|
|
539
|
+
uint8_t hashSize; /* size of each hash in bytes */
|
|
540
|
+
uint8_t hashType; /* type of hash (cdHashType* constants) */
|
|
541
|
+
uint8_t spare1; /* unused (must be zero) */
|
|
542
|
+
uint8_t pageSize; /* log2(page size in bytes); 0 => infinite */
|
|
543
|
+
uint32_t spare2; /* unused (must be zero) */
|
|
544
|
+
//char end_earliest[0];
|
|
545
|
+
|
|
546
|
+
/* Version 0x20100 */
|
|
547
|
+
uint32_t scatterOffset; /* offset of optional scatter vector */
|
|
548
|
+
//char end_withScatter[0];
|
|
549
|
+
|
|
550
|
+
/* Version 0x20200 */
|
|
551
|
+
uint32_t teamOffset; /* offset of optional team identifier */
|
|
552
|
+
//char end_withTeam[0];
|
|
553
|
+
|
|
554
|
+
/* Version 0x20300 */
|
|
555
|
+
uint32_t spare3; /* unused (must be zero) */
|
|
556
|
+
uint64_t codeLimit64; /* limit to main image signature range, 64 bits */
|
|
557
|
+
//char end_withCodeLimit64[0];
|
|
558
|
+
|
|
559
|
+
/* Version 0x20400 */
|
|
560
|
+
uint64_t execSegBase; /* offset of executable segment */
|
|
561
|
+
uint64_t execSegLimit; /* limit of executable segment */
|
|
562
|
+
uint64_t execSegFlags; /* executable segment flags */
|
|
563
|
+
//char end_withExecSeg[0];
|
|
564
|
+
|
|
565
|
+
/* followed by dynamic content as located by offset fields above */
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
struct CS_Entitlement {
|
|
569
|
+
uint32_t magic;
|
|
570
|
+
uint32_t length;
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
struct CS_GenericBlob {
|
|
574
|
+
uint32_t magic; /* magic number */
|
|
575
|
+
uint32_t length; /* total length of blob */
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
struct CS_Scatter {
|
|
579
|
+
uint32_t count; // number of pages; zero for sentinel (only)
|
|
580
|
+
uint32_t base; // first page number
|
|
581
|
+
uint64_t targetOffset; // offset in target
|
|
582
|
+
uint64_t spare; // reserved
|
|
583
|
+
};
|
|
584
|
+
|
|
585
|
+
#pragma pack(pop)
|