Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/about.json +220 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/files +2 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/git +0 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/hash_input.json +5 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/index.json +15 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/licenses/LICENSE +20 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/link.json +6 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/paths.json +17 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/recipe/bld.bat +9 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/recipe/build.sh +8 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/recipe/conda_build_config.yaml +31 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/recipe/meta.yaml +45 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/recipe/meta.yaml.template +49 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/recipe/recipe-scripts-license.txt +27 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/repodata_record.json +21 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/test/run_test.bat +11 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/test/run_test.sh +10 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/test/test_time_dependencies.json +1 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/ssl/cacert.pem +0 -0
- data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/ssl/cert.pem +0 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/bin/conda-content-trust +11 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/info/about.json +124 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/info/files +30 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/info/git +0 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/info/has_prefix +1 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/info/hash_input.json +4 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/info/index.json +17 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/info/paths.json +187 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/info/repodata_record.json +24 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/__init__.py +3 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/__main__.py +5 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/__version__.py +16 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/authentication.py +539 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/cli.py +534 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/common.py +918 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/metadata_construction.py +277 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/plugin.py +14 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/root_signing.py +365 -0
- data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/signing.py +213 -0
- data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/about.json +180 -0
- data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/files +14 -0
- data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/git +0 -0
- data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/hash_input.json +4 -0
- data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/index.json +14 -0
- data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/licenses/LICENCE.txt +96 -0
- data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/link.json +6 -0
- data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/paths.json +89 -0
- data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/recipe/bld.bat +4 -0
- data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/recipe/build.sh +11 -0
- data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/recipe/conda_build_config.yaml +32 -0
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/about.json
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"channels": [
|
| 3 |
+
"https://conda.anaconda.org/conda-forge"
|
| 4 |
+
],
|
| 5 |
+
"conda_build_version": "25.11.1",
|
| 6 |
+
"conda_version": "25.11.1",
|
| 7 |
+
"env_vars": {
|
| 8 |
+
"CIO_TEST": "<not set>"
|
| 9 |
+
},
|
| 10 |
+
"extra": {
|
| 11 |
+
"copy_test_source_files": true,
|
| 12 |
+
"final": true,
|
| 13 |
+
"flow_run_id": "azure_20260103.2.1",
|
| 14 |
+
"recipe-maintainers": [
|
| 15 |
+
"jakirkham",
|
| 16 |
+
"msarahan",
|
| 17 |
+
"mwcraig",
|
| 18 |
+
"ocefpaf",
|
| 19 |
+
"patricksnape",
|
| 20 |
+
"pelson",
|
| 21 |
+
"scopatz"
|
| 22 |
+
],
|
| 23 |
+
"remote_url": "https://github.com/conda-forge/ca-certificates-feedstock",
|
| 24 |
+
"sha": "6cb3f56e09652a1196b9d624fb79a6aedf93ed27"
|
| 25 |
+
},
|
| 26 |
+
"home": "https://github.com/conda-forge/ca-certificates-feedstock",
|
| 27 |
+
"identifiers": [],
|
| 28 |
+
"keywords": [],
|
| 29 |
+
"license": "ISC",
|
| 30 |
+
"license_file": "LICENSE",
|
| 31 |
+
"root_pkgs": [
|
| 32 |
+
"tzdata 2025c hc9c84f9_1",
|
| 33 |
+
"markupsafe 3.0.3 py312h8a5da7c_0",
|
| 34 |
+
"conda-package-handling 2.4.0 pyh7900ff3_2",
|
| 35 |
+
"zstd 1.5.7 hb78ec9c_6",
|
| 36 |
+
"libfreetype 2.14.1 ha770c72_0",
|
| 37 |
+
"libjpeg-turbo 3.1.2 hb03c661_0",
|
| 38 |
+
"charset-normalizer 3.4.4 pyhd8ed1ab_0",
|
| 39 |
+
"libxcb 1.17.0 h8a09558_0",
|
| 40 |
+
"libfreetype6 2.14.1 h73754d4_0",
|
| 41 |
+
"typing_extensions 4.15.0 pyhcf101f3_0",
|
| 42 |
+
"jsonpatch 1.33 pyhd8ed1ab_1",
|
| 43 |
+
"setuptools 80.9.0 pyhff2d567_0",
|
| 44 |
+
"wheel 0.45.1 pyhd8ed1ab_1",
|
| 45 |
+
"perl 5.32.1 7_hd590300_perl5",
|
| 46 |
+
"pip 25.3 pyh8b19718_0",
|
| 47 |
+
"anaconda-client 1.13.1 pyhcf101f3_0",
|
| 48 |
+
"tomli 2.3.0 pyhcf101f3_0",
|
| 49 |
+
"xorg-libxdmcp 1.1.5 hb03c661_1",
|
| 50 |
+
"lzo 2.10 h280c20c_1002",
|
| 51 |
+
"python-dateutil 2.9.0.post0 pyhe01879c_2",
|
| 52 |
+
"lerc 4.0.0 h0aef613_1",
|
| 53 |
+
"libstdcxx-ng 15.2.0 hdf11a46_16",
|
| 54 |
+
"idna 3.11 pyhd8ed1ab_0",
|
| 55 |
+
"typing-inspection 0.4.2 pyhd8ed1ab_1",
|
| 56 |
+
"ncurses 6.5 h2d0b736_3",
|
| 57 |
+
"readchar 4.2.1 pyhe01879c_0",
|
| 58 |
+
"libtiff 4.7.1 h9d88235_1",
|
| 59 |
+
"hyperframe 6.1.0 pyhd8ed1ab_0",
|
| 60 |
+
"ld_impl_linux-64 2.45 default_hbd61a6d_105",
|
| 61 |
+
"defusedxml 0.7.1 pyhd8ed1ab_0",
|
| 62 |
+
"pixi 0.62.2 ha759004_0",
|
| 63 |
+
"pygments 2.19.2 pyhd8ed1ab_0",
|
| 64 |
+
"frozendict 2.4.7 py312h4c3975b_0",
|
| 65 |
+
"pkginfo 1.12.1.2 pyhd8ed1ab_0",
|
| 66 |
+
"ruamel.yaml.clib 0.2.15 py312h5253ce2_1",
|
| 67 |
+
"libwebp-base 1.6.0 hd42ef1d_0",
|
| 68 |
+
"python-libarchive-c 5.3 pyhe01879c_1",
|
| 69 |
+
"referencing 0.37.0 pyhcf101f3_0",
|
| 70 |
+
"soupsieve 2.8.1 pyhd8ed1ab_0",
|
| 71 |
+
"libxcrypt 4.4.36 hd590300_1",
|
| 72 |
+
"mbedtls 3.6.3.1 h5888daf_0",
|
| 73 |
+
"keyutils 1.6.3 hb9d3cd8_0",
|
| 74 |
+
"conda-libmamba-solver 25.11.0 pyhd8ed1ab_0",
|
| 75 |
+
"python 3.12.12 hd63d673_1_cpython",
|
| 76 |
+
"pyyaml 6.0.3 py312h8a5da7c_0",
|
| 77 |
+
"mamba 2.4.0 h7ae174a_1",
|
| 78 |
+
"libdeflate 1.25 h17f619e_0",
|
| 79 |
+
"cffi 2.0.0 py312h460c074_1",
|
| 80 |
+
"git 2.52.0 pl5321h6d3cee1_1",
|
| 81 |
+
"traitlets 5.14.3 pyhd8ed1ab_1",
|
| 82 |
+
"annotated-types 0.7.0 pyhd8ed1ab_1",
|
| 83 |
+
"libcurl 8.17.0 h4e3cde8_1",
|
| 84 |
+
"tini 0.19.0 h166bdaf_1",
|
| 85 |
+
"filelock 3.20.1 pyhd8ed1ab_0",
|
| 86 |
+
"readline 8.3 h853b02a_0",
|
| 87 |
+
"jupyter_core 5.9.1 pyhc90fa1f_0",
|
| 88 |
+
"evalidate 2.0.5 pyhe01879c_0",
|
| 89 |
+
"c-ares 1.34.6 hb03c661_0",
|
| 90 |
+
"typer-slim-standard 0.21.0 hd63da06_0",
|
| 91 |
+
"libedit 3.1.20250104 pl5321h7949ede_0",
|
| 92 |
+
"markdown-it-py 4.0.0 pyhd8ed1ab_0",
|
| 93 |
+
"libgcc-ng 15.2.0 h69a702a_16",
|
| 94 |
+
"libsqlite 3.51.1 hf4e2dac_1",
|
| 95 |
+
"archspec 0.2.5 pyhd8ed1ab_0",
|
| 96 |
+
"reproc-cpp 14.2.5.post0 h5888daf_0",
|
| 97 |
+
"distro 1.9.0 pyhd8ed1ab_1",
|
| 98 |
+
"jsonschema 4.25.1 pyhe01879c_0",
|
| 99 |
+
"libev 4.33 hd590300_2",
|
| 100 |
+
"libmamba 2.4.0 hed7d790_1",
|
| 101 |
+
"rpds-py 0.30.0 py312h868fb18_0",
|
| 102 |
+
"truststore 0.10.4 pyhcf101f3_0",
|
| 103 |
+
"_libgcc_mutex 0.1 conda_forge",
|
| 104 |
+
"h2 4.3.0 pyhcf101f3_0",
|
| 105 |
+
"pybind11-abi 11 hc364b38_1",
|
| 106 |
+
"rich 14.2.0 pyhcf101f3_0",
|
| 107 |
+
"requests-toolbelt 1.0.0 pyhd8ed1ab_1",
|
| 108 |
+
"lcms2 2.17 h717163a_0",
|
| 109 |
+
"requests 2.32.5 pyhcf101f3_1",
|
| 110 |
+
"pthread-stubs 0.4 hb9d3cd8_1002",
|
| 111 |
+
"psutil 7.2.1 py312h5253ce2_0",
|
| 112 |
+
"backports.zstd 1.3.0 py312h90b7ffd_0",
|
| 113 |
+
"ripgrep 15.1.0 hdab8a38_0",
|
| 114 |
+
"xorg-libxau 1.0.12 hb03c661_1",
|
| 115 |
+
"icu 78.1 h33c6efd_0",
|
| 116 |
+
"chardet 5.2.0 pyhd8ed1ab_3",
|
| 117 |
+
"patchelf 0.17.2 h58526e2_0",
|
| 118 |
+
"libzlib 1.3.1 hb9d3cd8_2",
|
| 119 |
+
"patch 2.8 hb03c661_1002",
|
| 120 |
+
"six 1.17.0 pyhe01879c_1",
|
| 121 |
+
"tqdm 4.67.1 pyhd8ed1ab_1",
|
| 122 |
+
"krb5 1.21.3 h659f571_0",
|
| 123 |
+
"su-exec 0.2 h166bdaf_1003",
|
| 124 |
+
"anaconda-cli-base 0.7.0 pyhd8ed1ab_0",
|
| 125 |
+
"nbformat 5.10.4 pyhd8ed1ab_1",
|
| 126 |
+
"libxml2 2.15.1 he237659_1",
|
| 127 |
+
"fmt 12.0.0 h2b0788b_0",
|
| 128 |
+
"python-fastjsonschema 2.21.2 pyhe01879c_0",
|
| 129 |
+
"python-dotenv 1.2.1 pyhcf101f3_0",
|
| 130 |
+
"libstdcxx 15.2.0 h934c35e_16",
|
| 131 |
+
"xz 5.8.1 hbcc6ac9_2",
|
| 132 |
+
"libmambapy 2.4.0 py312h17091a9_1",
|
| 133 |
+
"libgomp 15.2.0 he0feb66_16",
|
| 134 |
+
"conda 25.11.1 py312h7900ff3_0",
|
| 135 |
+
"conda-build 25.11.1 py312ha128529_0",
|
| 136 |
+
"liblief 0.16.6 hecca717_1",
|
| 137 |
+
"jsonschema-specifications 2025.9.1 pyhcf101f3_0",
|
| 138 |
+
"xz-gpl-tools 5.8.1 hbcc6ac9_2",
|
| 139 |
+
"bzip2 1.0.8 hda65f42_8",
|
| 140 |
+
"yaml 0.2.5 h280c20c_3",
|
| 141 |
+
"pytz 2025.2 pyhd8ed1ab_0",
|
| 142 |
+
"libuuid 2.41.3 h5347b49_0",
|
| 143 |
+
"openssl 3.6.0 h26f9b46_0",
|
| 144 |
+
"jsonpointer 3.0.0 pyhcf101f3_3",
|
| 145 |
+
"libgcc 15.2.0 he0feb66_16",
|
| 146 |
+
"typer-slim 0.21.0 pyhcf101f3_0",
|
| 147 |
+
"openjpeg 2.5.4 h55fea9a_0",
|
| 148 |
+
"urllib3 2.6.2 pyhd8ed1ab_0",
|
| 149 |
+
"boltons 25.0.0 pyhd8ed1ab_0",
|
| 150 |
+
"reproc 14.2.5.post0 hb9d3cd8_0",
|
| 151 |
+
"liblzma-devel 5.8.1 hb9d3cd8_2",
|
| 152 |
+
"certifi 2025.11.12 pyhd8ed1ab_0",
|
| 153 |
+
"python_abi 3.12 8_cp312",
|
| 154 |
+
"libnghttp2 1.67.0 had1ee68_0",
|
| 155 |
+
"pysocks 1.7.1 pyha55dd90_7",
|
| 156 |
+
"pluggy 1.6.0 pyhf9edf01_1",
|
| 157 |
+
"platformdirs 4.5.1 pyhcf101f3_0",
|
| 158 |
+
"zlib-ng 2.3.2 hceb46e0_1",
|
| 159 |
+
"_openmp_mutex 4.5 2_gnu",
|
| 160 |
+
"libnsl 2.0.1 hb9d3cd8_1",
|
| 161 |
+
"pycosat 0.6.6 py312h4c3975b_3",
|
| 162 |
+
"zstandard 0.25.0 py312h5253ce2_1",
|
| 163 |
+
"conda-index 0.7.0 pyhd8ed1ab_0",
|
| 164 |
+
"msgpack-python 1.1.2 py312hd9148b4_1",
|
| 165 |
+
"cpp-expected 1.3.1 h171cf75_0",
|
| 166 |
+
"ca-certificates 2025.11.12 hbd8a1cb_0",
|
| 167 |
+
"hpack 4.1.0 pyhd8ed1ab_0",
|
| 168 |
+
"beautifulsoup4 4.14.3 pyha770c72_0",
|
| 169 |
+
"conda-package-streaming 0.12.0 pyhd8ed1ab_0",
|
| 170 |
+
"lz4-c 1.10.0 h5888daf_1",
|
| 171 |
+
"libxml2-16 2.15.1 hca6bf5a_1",
|
| 172 |
+
"brotli-python 1.2.0 py312hdb49522_1",
|
| 173 |
+
"py-lief 0.16.6 py312h1289d80_1",
|
| 174 |
+
"libpng 1.6.53 h421ea60_0",
|
| 175 |
+
"simdjson 4.2.4 hb700be7_0",
|
| 176 |
+
"xz-tools 5.8.1 hb9d3cd8_2",
|
| 177 |
+
"attrs 25.4.0 pyhcf101f3_1",
|
| 178 |
+
"pycparser 2.22 pyh29332c3_1",
|
| 179 |
+
"libiconv 1.18 h3b78370_2",
|
| 180 |
+
"libssh2 1.11.1 hcf80075_0",
|
| 181 |
+
"menuinst 2.4.2 py312h7900ff3_0",
|
| 182 |
+
"typing-extensions 4.15.0 h396c80c_0",
|
| 183 |
+
"pillow 12.1.0 py312h50c33e8_0",
|
| 184 |
+
"shellingham 1.5.4 pyhd8ed1ab_2",
|
| 185 |
+
"pydantic-core 2.41.5 py312h868fb18_1",
|
| 186 |
+
"click 8.3.1 pyh8f84b5b_1",
|
| 187 |
+
"mdurl 0.1.2 pyhd8ed1ab_1",
|
| 188 |
+
"pcre2 10.47 haa7fec5_0",
|
| 189 |
+
"pydantic 2.12.5 pyhcf101f3_1",
|
| 190 |
+
"pydantic-settings 2.12.0 pyh3cfb1c2_0",
|
| 191 |
+
"packaging 25.0 pyh29332c3_1",
|
| 192 |
+
"liblzma 5.8.1 hb9d3cd8_2",
|
| 193 |
+
"libexpat 2.7.3 hecca717_0",
|
| 194 |
+
"nlohmann_json-abi 3.12.0 h0f90c79_1",
|
| 195 |
+
"tk 8.6.13 noxft_ha0e22de_103",
|
| 196 |
+
"jinja2 3.1.6 pyhcf101f3_1",
|
| 197 |
+
"typer 0.21.0 pyhbb89825_0",
|
| 198 |
+
"colorama 0.4.6 pyhd8ed1ab_1",
|
| 199 |
+
"libsolv 0.7.35 h9463b59_0",
|
| 200 |
+
"libarchive 3.8.2 gpl_h7be2006_100",
|
| 201 |
+
"yaml-cpp 0.8.0 h59595ed_0",
|
| 202 |
+
"libffi 3.5.2 h9ec8514_0",
|
| 203 |
+
"ruamel.yaml 0.18.17 py312h5253ce2_2",
|
| 204 |
+
"oniguruma 6.9.10 hb9d3cd8_0",
|
| 205 |
+
"jq 1.8.1 h73b1eb8_0",
|
| 206 |
+
"deprecated 1.3.1 pyhd8ed1ab_0",
|
| 207 |
+
"conda-oci-mirror 0.2.3 pyhd8ed1ab_0",
|
| 208 |
+
"conda-forge-metadata 0.12.0 pyhcf101f3_1",
|
| 209 |
+
"oras-py 0.1.14 pyhd8ed1ab_0",
|
| 210 |
+
"conda-env 2.6.0 1",
|
| 211 |
+
"shyaml 0.6.2 pyhd3deb0d_0",
|
| 212 |
+
"rattler-build 0.55.0 he64ecbb_0",
|
| 213 |
+
"wrapt 1.17.3 py312h4c3975b_1",
|
| 214 |
+
"conda-forge-ci-setup 4.24.0 py312hef7310e_100",
|
| 215 |
+
"rattler-build-conda-compat 1.4.10 pyhd8ed1ab_0",
|
| 216 |
+
"joblib 1.5.3 pyhd8ed1ab_0"
|
| 217 |
+
],
|
| 218 |
+
"summary": "Certificates for use with other packages.",
|
| 219 |
+
"tags": []
|
| 220 |
+
}
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/files
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ssl/cacert.pem
|
| 2 |
+
ssl/cert.pem
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/git
ADDED
|
File without changes
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/hash_input.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"channel_targets": "conda-forge main",
|
| 3 |
+
"curl": "8",
|
| 4 |
+
"__unix": "__unix"
|
| 5 |
+
}
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/index.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"arch": null,
|
| 3 |
+
"build": "hbd8a1cb_0",
|
| 4 |
+
"build_number": 0,
|
| 5 |
+
"depends": [
|
| 6 |
+
"__unix"
|
| 7 |
+
],
|
| 8 |
+
"license": "ISC",
|
| 9 |
+
"name": "ca-certificates",
|
| 10 |
+
"noarch": "generic",
|
| 11 |
+
"platform": null,
|
| 12 |
+
"subdir": "noarch",
|
| 13 |
+
"timestamp": 1767500828366,
|
| 14 |
+
"version": "2026.1.4"
|
| 15 |
+
}
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/licenses/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
This package contains a modified version of ca-bundle.crt:
|
| 2 |
+
|
| 3 |
+
ca-bundle.crt -- Bundle of CA Root Certificates
|
| 4 |
+
|
| 5 |
+
This is a bundle of X.509 certificates of public Certificate Authorities
|
| 6 |
+
(CA). These were automatically extracted from Mozilla's root certificates
|
| 7 |
+
file (certdata.txt). This file can be found in the mozilla source tree:
|
| 8 |
+
https://hg.mozilla.org/mozilla-central/file/tip/security/nss/lib/ckfw/builtins/certdata.txt
|
| 9 |
+
It contains the certificates in PEM format and therefore
|
| 10 |
+
can be directly used with curl / libcurl / php_curl, or with
|
| 11 |
+
an Apache+mod_ssl webserver for SSL client authentication.
|
| 12 |
+
Just configure this file as the SSLCACertificateFile.#
|
| 13 |
+
|
| 14 |
+
***** BEGIN LICENSE BLOCK *****
|
| 15 |
+
This Source Code Form is subject to the terms of the Mozilla Public License,
|
| 16 |
+
v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain
|
| 17 |
+
one at http://mozilla.org/MPL/2.0/.
|
| 18 |
+
|
| 19 |
+
***** END LICENSE BLOCK *****
|
| 20 |
+
@(#) $RCSfile: certdata.txt,v $ $Revision: 1.80 $ $Date: 2011/11/03 15:11:58 $
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/link.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"noarch": {
|
| 3 |
+
"type": "generic"
|
| 4 |
+
},
|
| 5 |
+
"package_metadata_version": 1
|
| 6 |
+
}
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/paths.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"paths": [
|
| 3 |
+
{
|
| 4 |
+
"_path": "ssl/cacert.pem",
|
| 5 |
+
"path_type": "hardlink",
|
| 6 |
+
"sha256": "4f3975ff30abbf35443b486064ae8bcb41dff707ffdf576c76d292fb458aa0a9",
|
| 7 |
+
"size_in_bytes": 270954
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"_path": "ssl/cert.pem",
|
| 11 |
+
"path_type": "softlink",
|
| 12 |
+
"sha256": "4f3975ff30abbf35443b486064ae8bcb41dff707ffdf576c76d292fb458aa0a9",
|
| 13 |
+
"size_in_bytes": 270954
|
| 14 |
+
}
|
| 15 |
+
],
|
| 16 |
+
"paths_version": 1
|
| 17 |
+
}
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/recipe/bld.bat
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
:: Create the directory to hold the certificates.
|
| 2 |
+
if not exist %LIBRARY_PREFIX%\ssl mkdir %LIBRARY_PREFIX%\ssl
|
| 3 |
+
if errorlevel 1 exit 1
|
| 4 |
+
|
| 5 |
+
:: Copy the certificates from certifi.
|
| 6 |
+
copy /y %SRC_DIR%\certifi\cacert.pem %LIBRARY_PREFIX%\ssl
|
| 7 |
+
if errorlevel 1 exit 1
|
| 8 |
+
copy /y %LIBRARY_PREFIX%\ssl\cacert.pem %LIBRARY_PREFIX%\ssl\cert.pem
|
| 9 |
+
if errorlevel 1 exit 1
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/recipe/build.sh
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Create the directory to hold the certificates.
|
| 4 |
+
mkdir -p "${PREFIX}/ssl"
|
| 5 |
+
|
| 6 |
+
# Copy the certificates from certifi.
|
| 7 |
+
cp -f "${SRC_DIR}/certifi/cacert.pem" "${PREFIX}/ssl"
|
| 8 |
+
ln -fs "${PREFIX}/ssl/cacert.pem" "${PREFIX}/ssl/cert.pem"
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/recipe/conda_build_config.yaml
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CI: azure
|
| 2 |
+
c_compiler: gcc
|
| 3 |
+
channel_sources: conda-forge
|
| 4 |
+
channel_targets: conda-forge main
|
| 5 |
+
cpu_optimization_target: nocona
|
| 6 |
+
cran_mirror: https://cran.r-project.org
|
| 7 |
+
curl: '8'
|
| 8 |
+
cxx_compiler: gxx
|
| 9 |
+
docker_image: quay.io/condaforge/linux-anvil-x86_64:alma9
|
| 10 |
+
extend_keys:
|
| 11 |
+
- pin_run_as_build
|
| 12 |
+
- extend_keys
|
| 13 |
+
- ignore_build_only_deps
|
| 14 |
+
- ignore_version
|
| 15 |
+
fortran_compiler: gfortran
|
| 16 |
+
ignore_build_only_deps:
|
| 17 |
+
- numpy
|
| 18 |
+
- python
|
| 19 |
+
lua: '5'
|
| 20 |
+
numpy: '1.26'
|
| 21 |
+
perl: 5.26.2
|
| 22 |
+
pin_run_as_build:
|
| 23 |
+
python:
|
| 24 |
+
max_pin: x.x
|
| 25 |
+
min_pin: x.x
|
| 26 |
+
r-base:
|
| 27 |
+
max_pin: x.x
|
| 28 |
+
min_pin: x.x
|
| 29 |
+
python: '3.12'
|
| 30 |
+
r_base: '3.5'
|
| 31 |
+
target_platform: linux-64
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/recipe/meta.yaml
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file created by conda-build 25.11.1
|
| 2 |
+
# meta.yaml template originally from:
|
| 3 |
+
# /home/conda/recipe_root, last modified Sun Jan 4 04:24:58 2026
|
| 4 |
+
# ------------------------------------------------
|
| 5 |
+
|
| 6 |
+
package:
|
| 7 |
+
name: ca-certificates
|
| 8 |
+
version: 2026.1.4
|
| 9 |
+
source:
|
| 10 |
+
url: https://pypi.org/packages/source/c/certifi/certifi-2026.1.4.tar.gz
|
| 11 |
+
sha256: ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120
|
| 12 |
+
build:
|
| 13 |
+
number: '0'
|
| 14 |
+
noarch: generic
|
| 15 |
+
string: hbd8a1cb_0
|
| 16 |
+
requirements:
|
| 17 |
+
run:
|
| 18 |
+
- __unix
|
| 19 |
+
build: []
|
| 20 |
+
test:
|
| 21 |
+
requires:
|
| 22 |
+
- curl
|
| 23 |
+
commands:
|
| 24 |
+
- test -f "${PREFIX}/ssl/cacert.pem"
|
| 25 |
+
- test -f "${PREFIX}/ssl/cert.pem"
|
| 26 |
+
- curl --cacert "${PREFIX}/ssl/cacert.pem" https://www.google.com
|
| 27 |
+
about:
|
| 28 |
+
home: https://github.com/conda-forge/ca-certificates-feedstock
|
| 29 |
+
license: ISC
|
| 30 |
+
license_file: LICENSE
|
| 31 |
+
summary: Certificates for use with other packages.
|
| 32 |
+
extra:
|
| 33 |
+
recipe-maintainers:
|
| 34 |
+
- jakirkham
|
| 35 |
+
- msarahan
|
| 36 |
+
- mwcraig
|
| 37 |
+
- ocefpaf
|
| 38 |
+
- patricksnape
|
| 39 |
+
- pelson
|
| 40 |
+
- scopatz
|
| 41 |
+
final: true
|
| 42 |
+
copy_test_source_files: true
|
| 43 |
+
flow_run_id: azure_20260103.2.1
|
| 44 |
+
remote_url: https://github.com/conda-forge/ca-certificates-feedstock
|
| 45 |
+
sha: 6cb3f56e09652a1196b9d624fb79a6aedf93ed27
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/recipe/meta.yaml.template
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% set version = "2026.1.4" %}
|
| 2 |
+
|
| 3 |
+
package:
|
| 4 |
+
name: ca-certificates
|
| 5 |
+
version: {{ version }}
|
| 6 |
+
|
| 7 |
+
source:
|
| 8 |
+
url: https://pypi.org/packages/source/c/certifi/certifi-{{ version }}.tar.gz
|
| 9 |
+
sha256: ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120
|
| 10 |
+
|
| 11 |
+
build:
|
| 12 |
+
number: 0
|
| 13 |
+
noarch: generic
|
| 14 |
+
|
| 15 |
+
requirements:
|
| 16 |
+
run:
|
| 17 |
+
- __unix # [unix]
|
| 18 |
+
- __win # [win]
|
| 19 |
+
|
| 20 |
+
test:
|
| 21 |
+
requires:
|
| 22 |
+
- curl
|
| 23 |
+
|
| 24 |
+
commands:
|
| 25 |
+
# Verify the certificates are there.
|
| 26 |
+
- test -f "${PREFIX}/ssl/cacert.pem" # [unix]
|
| 27 |
+
- test -f "${PREFIX}/ssl/cert.pem" # [unix]
|
| 28 |
+
- if not exist %LIBRARY_PREFIX%\\ssl\\cacert.pem exit 1 # [win]
|
| 29 |
+
- if not exist %LIBRARY_PREFIX%\\ssl\\cert.pem exit 1 # [win]
|
| 30 |
+
|
| 31 |
+
# Use the certificates to download something.
|
| 32 |
+
- curl --cacert "${PREFIX}/ssl/cacert.pem" https://www.google.com # [unix]
|
| 33 |
+
- curl --cacert %LIBRARY_PREFIX%\\ssl\\cacert.pem https://www.google.com # [win]
|
| 34 |
+
|
| 35 |
+
about:
|
| 36 |
+
home: https://github.com/conda-forge/ca-certificates-feedstock
|
| 37 |
+
license: ISC
|
| 38 |
+
license_file: LICENSE
|
| 39 |
+
summary: Certificates for use with other packages.
|
| 40 |
+
|
| 41 |
+
extra:
|
| 42 |
+
recipe-maintainers:
|
| 43 |
+
- jakirkham
|
| 44 |
+
- msarahan
|
| 45 |
+
- mwcraig
|
| 46 |
+
- ocefpaf
|
| 47 |
+
- patricksnape
|
| 48 |
+
- pelson
|
| 49 |
+
- scopatz
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/recipe/recipe-scripts-license.txt
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
BSD-3-Clause license
|
| 2 |
+
Copyright (c) 2015-2022, conda-forge contributors
|
| 3 |
+
All rights reserved.
|
| 4 |
+
|
| 5 |
+
Redistribution and use in source and binary forms, with or without
|
| 6 |
+
modification, are permitted provided that the following conditions are met:
|
| 7 |
+
|
| 8 |
+
1. Redistributions of source code must retain the above copyright notice,
|
| 9 |
+
this list of conditions and the following disclaimer.
|
| 10 |
+
2. Redistributions in binary form must reproduce the above copyright
|
| 11 |
+
notice, this list of conditions and the following disclaimer in the
|
| 12 |
+
documentation and/or other materials provided with the distribution.
|
| 13 |
+
3. Neither the name of the copyright holder nor the names of its
|
| 14 |
+
contributors may be used to endorse or promote products derived from
|
| 15 |
+
this software without specific prior written permission.
|
| 16 |
+
|
| 17 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 18 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 19 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
| 20 |
+
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
|
| 21 |
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 22 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 23 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 24 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
| 25 |
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
| 26 |
+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
| 27 |
+
DAMAGE.
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/repodata_record.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "ca-certificates",
|
| 3 |
+
"version": "2026.1.4",
|
| 4 |
+
"build": "hbd8a1cb_0",
|
| 5 |
+
"build_number": 0,
|
| 6 |
+
"channel": "https://conda.anaconda.org/conda-forge/noarch",
|
| 7 |
+
"subdir": "noarch",
|
| 8 |
+
"fn": "ca-certificates-2026.1.4-hbd8a1cb_0.conda",
|
| 9 |
+
"md5": "bddacf101bb4dd0e51811cb69c7790e2",
|
| 10 |
+
"url": "https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2026.1.4-hbd8a1cb_0.conda",
|
| 11 |
+
"sha256": "b5974ec9b50e3c514a382335efa81ed02b05906849827a34061c496f4defa0b2",
|
| 12 |
+
"depends": [
|
| 13 |
+
"__unix"
|
| 14 |
+
],
|
| 15 |
+
"constrains": [],
|
| 16 |
+
"noarch": "generic",
|
| 17 |
+
"license": "ISC",
|
| 18 |
+
"package_type": "noarch_generic",
|
| 19 |
+
"timestamp": 1767500828000,
|
| 20 |
+
"size": 146519
|
| 21 |
+
}
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/test/run_test.bat
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
test -f "${PREFIX}/ssl/cacert.pem"
|
| 6 |
+
IF %ERRORLEVEL% NEQ 0 exit /B 1
|
| 7 |
+
test -f "${PREFIX}/ssl/cert.pem"
|
| 8 |
+
IF %ERRORLEVEL% NEQ 0 exit /B 1
|
| 9 |
+
curl --cacert "${PREFIX}/ssl/cacert.pem" https://www.google.com
|
| 10 |
+
IF %ERRORLEVEL% NEQ 0 exit /B 1
|
| 11 |
+
exit /B 0
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/test/run_test.sh
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
|
| 3 |
+
set -ex
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
test -f "${PREFIX}/ssl/cacert.pem"
|
| 8 |
+
test -f "${PREFIX}/ssl/cert.pem"
|
| 9 |
+
curl --cacert "${PREFIX}/ssl/cacert.pem" https://www.google.com
|
| 10 |
+
exit 0
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/info/test/test_time_dependencies.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
["curl"]
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/ssl/cacert.pem
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/miniconda3/pkgs/ca-certificates-2026.1.4-hbd8a1cb_0/ssl/cert.pem
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/bin/conda-content-trust
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/work/perseverance-python-buildout/croot/conda-content-trust_1728487058234/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/bin/python
|
| 2 |
+
|
| 3 |
+
# -*- coding: utf-8 -*-
|
| 4 |
+
import re
|
| 5 |
+
import sys
|
| 6 |
+
|
| 7 |
+
from conda_content_trust.cli import cli
|
| 8 |
+
|
| 9 |
+
if __name__ == '__main__':
|
| 10 |
+
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
| 11 |
+
sys.exit(cli())
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/info/about.json
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"channels": [
|
| 3 |
+
"https://repo.anaconda.com/pkgs/main"
|
| 4 |
+
],
|
| 5 |
+
"conda_build_version": "24.1.2",
|
| 6 |
+
"conda_version": "24.1.2",
|
| 7 |
+
"dev_url": "https://github.com/conda/conda-content-trust",
|
| 8 |
+
"doc_url": "https://github.com/conda/conda-content-trust/blob/main/README.md",
|
| 9 |
+
"env_vars": {
|
| 10 |
+
"CIO_TEST": "<not set>"
|
| 11 |
+
},
|
| 12 |
+
"extra": {
|
| 13 |
+
"copy_test_source_files": true,
|
| 14 |
+
"final": true
|
| 15 |
+
},
|
| 16 |
+
"home": "https://github.com/conda/conda-content-trust",
|
| 17 |
+
"identifiers": [],
|
| 18 |
+
"keywords": [],
|
| 19 |
+
"license": "BSD-3-Clause",
|
| 20 |
+
"license_family": "BSD",
|
| 21 |
+
"license_file": "LICENSE",
|
| 22 |
+
"root_pkgs": [
|
| 23 |
+
"_libgcc_mutex 0.1 main",
|
| 24 |
+
"_openmp_mutex 5.1 1_gnu",
|
| 25 |
+
"archspec 0.2.1 pyhd3eb1b0_0",
|
| 26 |
+
"boltons 23.0.0 py39h06a4308_0",
|
| 27 |
+
"brotli-python 1.0.9 py39h6a678d5_7",
|
| 28 |
+
"bzip2 1.0.8 h7b6447c_0",
|
| 29 |
+
"c-ares 1.19.1 h5eee18b_0",
|
| 30 |
+
"charset-normalizer 2.0.4 pyhd3eb1b0_0",
|
| 31 |
+
"conda-content-trust 0.2.0 py39h06a4308_0",
|
| 32 |
+
"conda-package-handling 2.2.0 py39h06a4308_0",
|
| 33 |
+
"conda-package-streaming 0.9.0 py39h06a4308_0",
|
| 34 |
+
"fmt 9.1.0 hdb19cb5_0",
|
| 35 |
+
"icu 73.1 h6a678d5_0",
|
| 36 |
+
"idna 3.4 py39h06a4308_0",
|
| 37 |
+
"jsonpatch 1.32 pyhd3eb1b0_0",
|
| 38 |
+
"jsonpointer 2.1 pyhd3eb1b0_0",
|
| 39 |
+
"krb5 1.20.1 h143b758_1",
|
| 40 |
+
"ld_impl_linux-64 2.38 h1181459_1",
|
| 41 |
+
"libarchive 3.6.2 h6ac8c49_2",
|
| 42 |
+
"libev 4.33 h7f8727e_1",
|
| 43 |
+
"libffi 3.4.4 h6a678d5_0",
|
| 44 |
+
"libgcc-ng 11.2.0 h1234567_1",
|
| 45 |
+
"libgomp 11.2.0 h1234567_1",
|
| 46 |
+
"libnghttp2 1.57.0 h2d74bed_0",
|
| 47 |
+
"libsolv 0.7.24 he621ea3_0",
|
| 48 |
+
"libssh2 1.10.0 hdbd6064_2",
|
| 49 |
+
"libstdcxx-ng 11.2.0 h1234567_1",
|
| 50 |
+
"libxml2 2.10.4 hf1b16e4_1",
|
| 51 |
+
"lz4-c 1.9.4 h6a678d5_0",
|
| 52 |
+
"ncurses 6.4 h6a678d5_0",
|
| 53 |
+
"packaging 23.1 py39h06a4308_0",
|
| 54 |
+
"pcre2 10.42 hebb0a14_0",
|
| 55 |
+
"pluggy 1.0.0 py39h06a4308_1",
|
| 56 |
+
"pybind11-abi 4 hd3eb1b0_1",
|
| 57 |
+
"pycosat 0.6.6 py39h5eee18b_0",
|
| 58 |
+
"pycparser 2.21 pyhd3eb1b0_0",
|
| 59 |
+
"pysocks 1.7.1 py39h06a4308_0",
|
| 60 |
+
"python 3.9.18 h955ad1f_0",
|
| 61 |
+
"readline 8.2 h5eee18b_0",
|
| 62 |
+
"reproc 14.2.4 h295c915_1",
|
| 63 |
+
"reproc-cpp 14.2.4 h295c915_1",
|
| 64 |
+
"ruamel.yaml 0.17.21 py39h5eee18b_0",
|
| 65 |
+
"ruamel.yaml.clib 0.2.6 py39h5eee18b_1",
|
| 66 |
+
"sqlite 3.41.2 h5eee18b_0",
|
| 67 |
+
"tk 8.6.12 h1ccaba5_0",
|
| 68 |
+
"tqdm 4.65.0 py39hb070fc8_0",
|
| 69 |
+
"wheel 0.41.2 py39h06a4308_0",
|
| 70 |
+
"yaml-cpp 0.8.0 h6a678d5_0",
|
| 71 |
+
"zlib 1.2.13 h5eee18b_0",
|
| 72 |
+
"zstandard 0.19.0 py39h5eee18b_0",
|
| 73 |
+
"zstd 1.5.5 hc292b87_0",
|
| 74 |
+
"attrs 23.1.0 py39h06a4308_0",
|
| 75 |
+
"beautifulsoup4 4.12.2 py39h06a4308_0",
|
| 76 |
+
"ca-certificates 2023.12.12 h06a4308_0",
|
| 77 |
+
"certifi 2024.2.2 py39h06a4308_0",
|
| 78 |
+
"cffi 1.16.0 py39h5eee18b_0",
|
| 79 |
+
"chardet 4.0.0 py39h06a4308_1003",
|
| 80 |
+
"click 8.1.7 py39h06a4308_0",
|
| 81 |
+
"conda 24.1.2 py39h06a4308_0",
|
| 82 |
+
"conda-build 24.1.2 py39h06a4308_0",
|
| 83 |
+
"conda-index 0.4.0 pyhd3eb1b0_0",
|
| 84 |
+
"conda-libmamba-solver 24.1.0 pyhd3eb1b0_0",
|
| 85 |
+
"cryptography 42.0.2 py39hdda0065_0",
|
| 86 |
+
"distro 1.8.0 py39h06a4308_0",
|
| 87 |
+
"filelock 3.13.1 py39h06a4308_0",
|
| 88 |
+
"jinja2 3.1.3 py39h06a4308_0",
|
| 89 |
+
"jsonschema 4.19.2 py39h06a4308_0",
|
| 90 |
+
"jsonschema-specifications 2023.7.1 py39h06a4308_0",
|
| 91 |
+
"libcurl 8.5.0 h251f7ec_0",
|
| 92 |
+
"libedit 3.1.20230828 h5eee18b_0",
|
| 93 |
+
"liblief 0.12.3 h6a678d5_0",
|
| 94 |
+
"libmamba 1.5.6 haf1ee3a_0",
|
| 95 |
+
"libmambapy 1.5.6 py39h2dafd23_0",
|
| 96 |
+
"markupsafe 2.1.3 py39h5eee18b_0",
|
| 97 |
+
"menuinst 2.0.2 py39h06a4308_0",
|
| 98 |
+
"more-itertools 10.1.0 py39h06a4308_0",
|
| 99 |
+
"openssl 3.0.13 h7f8727e_0",
|
| 100 |
+
"patch 2.7.6 h7b6447c_1001",
|
| 101 |
+
"patchelf 0.17.2 h6a678d5_0",
|
| 102 |
+
"pip 23.3.1 py39h06a4308_0",
|
| 103 |
+
"pkginfo 1.9.6 py39h06a4308_0",
|
| 104 |
+
"platformdirs 3.10.0 py39h06a4308_0",
|
| 105 |
+
"psutil 5.9.0 py39h5eee18b_0",
|
| 106 |
+
"py-lief 0.12.3 py39h6a678d5_0",
|
| 107 |
+
"pyopenssl 24.0.0 py39h06a4308_0",
|
| 108 |
+
"python-libarchive-c 2.9 pyhd3eb1b0_1",
|
| 109 |
+
"pytz 2023.3.post1 py39h06a4308_0",
|
| 110 |
+
"pyyaml 6.0.1 py39h5eee18b_0",
|
| 111 |
+
"referencing 0.30.2 py39h06a4308_0",
|
| 112 |
+
"requests 2.31.0 py39h06a4308_1",
|
| 113 |
+
"rpds-py 0.10.6 py39hb02cf49_0",
|
| 114 |
+
"setuptools 68.2.2 py39h06a4308_0",
|
| 115 |
+
"soupsieve 2.5 py39h06a4308_0",
|
| 116 |
+
"tomli 2.0.1 py39h06a4308_0",
|
| 117 |
+
"tzdata 2023d h04d1e81_0",
|
| 118 |
+
"urllib3 2.1.0 py39h06a4308_1",
|
| 119 |
+
"xz 5.4.5 h5eee18b_0",
|
| 120 |
+
"yaml 0.2.5 h7b6447c_0"
|
| 121 |
+
],
|
| 122 |
+
"summary": "Signing and verification tools for conda",
|
| 123 |
+
"tags": []
|
| 124 |
+
}
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/info/files
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
bin/conda-content-trust
|
| 2 |
+
lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/INSTALLER
|
| 3 |
+
lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/METADATA
|
| 4 |
+
lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/RECORD
|
| 5 |
+
lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/REQUESTED
|
| 6 |
+
lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/WHEEL
|
| 7 |
+
lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/direct_url.json
|
| 8 |
+
lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/entry_points.txt
|
| 9 |
+
lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/licenses/AUTHORS.md
|
| 10 |
+
lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/licenses/LICENSE
|
| 11 |
+
lib/python3.13/site-packages/conda_content_trust/__init__.py
|
| 12 |
+
lib/python3.13/site-packages/conda_content_trust/__main__.py
|
| 13 |
+
lib/python3.13/site-packages/conda_content_trust/__pycache__/__init__.cpython-313.pyc
|
| 14 |
+
lib/python3.13/site-packages/conda_content_trust/__pycache__/__main__.cpython-313.pyc
|
| 15 |
+
lib/python3.13/site-packages/conda_content_trust/__pycache__/__version__.cpython-313.pyc
|
| 16 |
+
lib/python3.13/site-packages/conda_content_trust/__pycache__/authentication.cpython-313.pyc
|
| 17 |
+
lib/python3.13/site-packages/conda_content_trust/__pycache__/cli.cpython-313.pyc
|
| 18 |
+
lib/python3.13/site-packages/conda_content_trust/__pycache__/common.cpython-313.pyc
|
| 19 |
+
lib/python3.13/site-packages/conda_content_trust/__pycache__/metadata_construction.cpython-313.pyc
|
| 20 |
+
lib/python3.13/site-packages/conda_content_trust/__pycache__/plugin.cpython-313.pyc
|
| 21 |
+
lib/python3.13/site-packages/conda_content_trust/__pycache__/root_signing.cpython-313.pyc
|
| 22 |
+
lib/python3.13/site-packages/conda_content_trust/__pycache__/signing.cpython-313.pyc
|
| 23 |
+
lib/python3.13/site-packages/conda_content_trust/__version__.py
|
| 24 |
+
lib/python3.13/site-packages/conda_content_trust/authentication.py
|
| 25 |
+
lib/python3.13/site-packages/conda_content_trust/cli.py
|
| 26 |
+
lib/python3.13/site-packages/conda_content_trust/common.py
|
| 27 |
+
lib/python3.13/site-packages/conda_content_trust/metadata_construction.py
|
| 28 |
+
lib/python3.13/site-packages/conda_content_trust/plugin.py
|
| 29 |
+
lib/python3.13/site-packages/conda_content_trust/root_signing.py
|
| 30 |
+
lib/python3.13/site-packages/conda_content_trust/signing.py
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/info/git
ADDED
|
File without changes
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/info/has_prefix
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
/work/perseverance-python-buildout/croot/conda-content-trust_1728487058234/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla text bin/conda-content-trust
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/info/hash_input.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"target_platform": "linux-64",
|
| 3 |
+
"channel_targets": "defaults"
|
| 4 |
+
}
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/info/index.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"arch": "x86_64",
|
| 3 |
+
"build": "py313h06a4308_1",
|
| 4 |
+
"build_number": 1,
|
| 5 |
+
"depends": [
|
| 6 |
+
"cryptography >=41",
|
| 7 |
+
"python >=3.13,<3.14.0a0",
|
| 8 |
+
"python_abi 3.13.* *_cp313"
|
| 9 |
+
],
|
| 10 |
+
"license": "BSD-3-Clause",
|
| 11 |
+
"license_family": "BSD",
|
| 12 |
+
"name": "conda-content-trust",
|
| 13 |
+
"platform": "linux",
|
| 14 |
+
"subdir": "linux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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"paths": [
|
| 3 |
+
{
|
| 4 |
+
"_path": "bin/conda-content-trust",
|
| 5 |
+
"file_mode": "text",
|
| 6 |
+
"path_type": "hardlink",
|
| 7 |
+
"prefix_placeholder": "/work/perseverance-python-buildout/croot/conda-content-trust_1728487058234/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla",
|
| 8 |
+
"sha256": "f7eb89a73c12c4d17397c4c9f27bb824a660c9fd2c53b6fc3fd531522f6bef92",
|
| 9 |
+
"size_in_bytes": 474
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/INSTALLER",
|
| 13 |
+
"path_type": "hardlink",
|
| 14 |
+
"sha256": "d0edee15f91b406f3f99726e44eb990be6e34fd0345b52b910c568e0eef6a2a8",
|
| 15 |
+
"size_in_bytes": 5
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/METADATA",
|
| 19 |
+
"path_type": "hardlink",
|
| 20 |
+
"sha256": "7a8f35d551d263115a4d1efb23e4f81dd9a1588b633b80c3045fc456be18ab5f",
|
| 21 |
+
"size_in_bytes": 5708
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/RECORD",
|
| 25 |
+
"path_type": "hardlink",
|
| 26 |
+
"sha256": "6a222c8c97dfd2724b5eef1ab521e6ef93fdca28c859b935123552d58ba8d78a",
|
| 27 |
+
"size_in_bytes": 2496
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/REQUESTED",
|
| 31 |
+
"path_type": "hardlink",
|
| 32 |
+
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
| 33 |
+
"size_in_bytes": 0
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/WHEEL",
|
| 37 |
+
"path_type": "hardlink",
|
| 38 |
+
"sha256": "d7215d7625cc9af60aed0613aad44db57eba589d0ccfc3d8122114a0e514c516",
|
| 39 |
+
"size_in_bytes": 87
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/direct_url.json",
|
| 43 |
+
"path_type": "hardlink",
|
| 44 |
+
"sha256": "0b58f3aeb7beeb0a4310701157f2ef35bd24fa82e7d83d42a71b2880917463b3",
|
| 45 |
+
"size_in_bytes": 113
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/entry_points.txt",
|
| 49 |
+
"path_type": "hardlink",
|
| 50 |
+
"sha256": "f2421f4d25769ae214a905748d9cd953e5d670b3a125e6ccd559a2383aaf4980",
|
| 51 |
+
"size_in_bytes": 126
|
| 52 |
+
},
|
| 53 |
+
{
|
| 54 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/licenses/AUTHORS.md",
|
| 55 |
+
"path_type": "hardlink",
|
| 56 |
+
"sha256": "33aeeb6f840b33de7ae4d6ba08766729e96310eb5ca3355c85a44fd35d4e1bfd",
|
| 57 |
+
"size_in_bytes": 281
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust-0.2.0.dist-info/licenses/LICENSE",
|
| 61 |
+
"path_type": "hardlink",
|
| 62 |
+
"sha256": "09dfa8272613416b4e2121ea9fdf9709a25e1abf144e4c17c81a975a6fd771c9",
|
| 63 |
+
"size_in_bytes": 1505
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/__init__.py",
|
| 67 |
+
"path_type": "hardlink",
|
| 68 |
+
"sha256": "115bbaa1d16eea05d98fb4c3e0eda173d2dcf3390e1ff5603a5a76071bc8d5e5",
|
| 69 |
+
"size_in_bytes": 126
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/__main__.py",
|
| 73 |
+
"path_type": "hardlink",
|
| 74 |
+
"sha256": "dbdd77abe5ad64fe105a698be07558ea8314457d68397bcdcd7c1ba4acc2e070",
|
| 75 |
+
"size_in_bytes": 122
|
| 76 |
+
},
|
| 77 |
+
{
|
| 78 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/__pycache__/__init__.cpython-313.pyc",
|
| 79 |
+
"path_type": "hardlink",
|
| 80 |
+
"sha256": "300895afb49072f51f883843f2a104a7c17f144b999c7444b0e5cfdb83a4e366",
|
| 81 |
+
"size_in_bytes": 194
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/__pycache__/__main__.cpython-313.pyc",
|
| 85 |
+
"path_type": "hardlink",
|
| 86 |
+
"sha256": "e644eedd208ae4ff125c16fb27002ca6940809724094408c00910fc9b1c2a0de",
|
| 87 |
+
"size_in_bytes": 252
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/__pycache__/__version__.cpython-313.pyc",
|
| 91 |
+
"path_type": "hardlink",
|
| 92 |
+
"sha256": "9cd0c2e17945a6aeeda87efeb335c2adf0568b3bcdf1f05fdbc412a3db240741",
|
| 93 |
+
"size_in_bytes": 572
|
| 94 |
+
},
|
| 95 |
+
{
|
| 96 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/__pycache__/authentication.cpython-313.pyc",
|
| 97 |
+
"path_type": "hardlink",
|
| 98 |
+
"sha256": "e04ff4f684ba4264af6ec8157341d7f3ee4af429db7871e655d24be890f48f2a",
|
| 99 |
+
"size_in_bytes": 14192
|
| 100 |
+
},
|
| 101 |
+
{
|
| 102 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/__pycache__/cli.cpython-313.pyc",
|
| 103 |
+
"path_type": "hardlink",
|
| 104 |
+
"sha256": "afe3275256829c80de08229fdbd36d167dee208d0cd47e20c24f4f7993ece668",
|
| 105 |
+
"size_in_bytes": 16203
|
| 106 |
+
},
|
| 107 |
+
{
|
| 108 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/__pycache__/common.cpython-313.pyc",
|
| 109 |
+
"path_type": "hardlink",
|
| 110 |
+
"sha256": "e5eeab2be8a9109d04b1b1bb73b1ba76af7def01698a3d6435e55cf43dd7190d",
|
| 111 |
+
"size_in_bytes": 32290
|
| 112 |
+
},
|
| 113 |
+
{
|
| 114 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/__pycache__/metadata_construction.cpython-313.pyc",
|
| 115 |
+
"path_type": "hardlink",
|
| 116 |
+
"sha256": "0cf9caa8df13189f3e94a63504801ae82207418b85810a15ddabf97d9bc185fb",
|
| 117 |
+
"size_in_bytes": 5483
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/__pycache__/plugin.cpython-313.pyc",
|
| 121 |
+
"path_type": "hardlink",
|
| 122 |
+
"sha256": "7f17c841115791bdd58bb6e909f0f55a1b068ac8f89dfc453306eb7466da1b90",
|
| 123 |
+
"size_in_bytes": 664
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/__pycache__/root_signing.cpython-313.pyc",
|
| 127 |
+
"path_type": "hardlink",
|
| 128 |
+
"sha256": "b22e15b06580bb70c55f085be0518937f969688e36d6452d09a461e1a810fdb3",
|
| 129 |
+
"size_in_bytes": 11286
|
| 130 |
+
},
|
| 131 |
+
{
|
| 132 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/__pycache__/signing.cpython-313.pyc",
|
| 133 |
+
"path_type": "hardlink",
|
| 134 |
+
"sha256": "c74059695814998298b9846df9ff3d6e32bf2265e5499f42eba6b8cc0b4c5bb1",
|
| 135 |
+
"size_in_bytes": 6117
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/__version__.py",
|
| 139 |
+
"path_type": "hardlink",
|
| 140 |
+
"sha256": "1feaacbebc42a5d85a433c9d751fb26a312a23bd613f12dae0ac73a4fdee4b58",
|
| 141 |
+
"size_in_bytes": 411
|
| 142 |
+
},
|
| 143 |
+
{
|
| 144 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/authentication.py",
|
| 145 |
+
"path_type": "hardlink",
|
| 146 |
+
"sha256": "b990fadee3daaf0ed8978d6093187a201060a9b1f758e6a1790b7cc4581fc101",
|
| 147 |
+
"size_in_bytes": 22695
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/cli.py",
|
| 151 |
+
"path_type": "hardlink",
|
| 152 |
+
"sha256": "5c6ff220d1c35a411e3228546b7130c69828ab1b1ef9c96478e9a5144b65ce09",
|
| 153 |
+
"size_in_bytes": 18553
|
| 154 |
+
},
|
| 155 |
+
{
|
| 156 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/common.py",
|
| 157 |
+
"path_type": "hardlink",
|
| 158 |
+
"sha256": "c36ded0c7d4398670d6cee8755ed5d695d6d02c11fbbdd8c4a196ff126307783",
|
| 159 |
+
"size_in_bytes": 33377
|
| 160 |
+
},
|
| 161 |
+
{
|
| 162 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/metadata_construction.py",
|
| 163 |
+
"path_type": "hardlink",
|
| 164 |
+
"sha256": "9e5a3d3669f2537315a067835e2746d10eac230e91e13d098556d6863c73b47e",
|
| 165 |
+
"size_in_bytes": 10325
|
| 166 |
+
},
|
| 167 |
+
{
|
| 168 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/plugin.py",
|
| 169 |
+
"path_type": "hardlink",
|
| 170 |
+
"sha256": "56b1707aca5ac95c91c0c3d55b154ce30ec38d9f1750e811e5881e867abd93d3",
|
| 171 |
+
"size_in_bytes": 326
|
| 172 |
+
},
|
| 173 |
+
{
|
| 174 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/root_signing.py",
|
| 175 |
+
"path_type": "hardlink",
|
| 176 |
+
"sha256": "7f02cea3c23c1ff9e72ed2552d9df006badabbfc964f62809c13d54ce5c3285b",
|
| 177 |
+
"size_in_bytes": 15395
|
| 178 |
+
},
|
| 179 |
+
{
|
| 180 |
+
"_path": "lib/python3.13/site-packages/conda_content_trust/signing.py",
|
| 181 |
+
"path_type": "hardlink",
|
| 182 |
+
"sha256": "676de0d96ff55ab44b0a92a929b17f61e0b71f3725011a791ddbc8725acd2ca6",
|
| 183 |
+
"size_in_bytes": 8741
|
| 184 |
+
}
|
| 185 |
+
],
|
| 186 |
+
"paths_version": 1
|
| 187 |
+
}
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/info/repodata_record.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"arch": "x86_64",
|
| 3 |
+
"build": "py313h06a4308_1",
|
| 4 |
+
"build_number": 1,
|
| 5 |
+
"channel": "https://repo.anaconda.com/pkgs/main/linux-64/",
|
| 6 |
+
"constrains": [],
|
| 7 |
+
"depends": [
|
| 8 |
+
"cryptography >=41",
|
| 9 |
+
"python >=3.13,<3.14.0a0",
|
| 10 |
+
"python_abi 3.13.* *_cp313"
|
| 11 |
+
],
|
| 12 |
+
"fn": "conda-content-trust-0.2.0-py313h06a4308_1.conda",
|
| 13 |
+
"license": "BSD-3-Clause",
|
| 14 |
+
"license_family": "BSD",
|
| 15 |
+
"md5": "aefc551e21e13ecc1de44ee589aea77d",
|
| 16 |
+
"name": "conda-content-trust",
|
| 17 |
+
"platform": "linux",
|
| 18 |
+
"sha256": "4a9f6f94219e6e603a7e69beb3a391096a1cf9aec249e100f30dce3eac7a233e",
|
| 19 |
+
"size": 62054,
|
| 20 |
+
"subdir": "linux-64",
|
| 21 |
+
"timestamp": 1728487079000,
|
| 22 |
+
"url": "https://repo.anaconda.com/pkgs/main/linux-64/conda-content-trust-0.2.0-py313h06a4308_1.conda",
|
| 23 |
+
"version": "0.2.0"
|
| 24 |
+
}
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/__init__.py
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2019 Anaconda, Inc
|
| 2 |
+
# SPDX-License-Identifier: BSD-3-Clause
|
| 3 |
+
from .__version__ import __version__ # noqa: F401
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/__main__.py
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2019 Anaconda, Inc
|
| 2 |
+
# SPDX-License-Identifier: BSD-3-Clause
|
| 3 |
+
from conda_content_trust import cli
|
| 4 |
+
|
| 5 |
+
cli.cli()
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/__version__.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# file generated by setuptools_scm
|
| 2 |
+
# don't change, don't track in version control
|
| 3 |
+
TYPE_CHECKING = False
|
| 4 |
+
if TYPE_CHECKING:
|
| 5 |
+
from typing import Tuple, Union
|
| 6 |
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
| 7 |
+
else:
|
| 8 |
+
VERSION_TUPLE = object
|
| 9 |
+
|
| 10 |
+
version: str
|
| 11 |
+
__version__: str
|
| 12 |
+
__version_tuple__: VERSION_TUPLE
|
| 13 |
+
version_tuple: VERSION_TUPLE
|
| 14 |
+
|
| 15 |
+
__version__ = version = '0.2.0'
|
| 16 |
+
__version_tuple__ = version_tuple = (0, 2, 0)
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/authentication.py
ADDED
|
@@ -0,0 +1,539 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2019 Anaconda, Inc
|
| 2 |
+
# SPDX-License-Identifier: BSD-3-Clause
|
| 3 |
+
"""
|
| 4 |
+
This module contains functions that verify signatures and thereby authenticate
|
| 5 |
+
data.
|
| 6 |
+
|
| 7 |
+
Function Manifest for this Module
|
| 8 |
+
verify_signature
|
| 9 |
+
verify_gpg_signature
|
| 10 |
+
verify_signable
|
| 11 |
+
verify_root
|
| 12 |
+
verify_delegation
|
| 13 |
+
"""
|
| 14 |
+
from binascii import unhexlify
|
| 15 |
+
from struct import pack
|
| 16 |
+
|
| 17 |
+
import cryptography.exceptions
|
| 18 |
+
from cryptography.hazmat.primitives.asymmetric import ed25519
|
| 19 |
+
|
| 20 |
+
from .common import (
|
| 21 |
+
MetadataVerificationError,
|
| 22 |
+
PublicKey,
|
| 23 |
+
SignatureError,
|
| 24 |
+
UnknownRoleError,
|
| 25 |
+
canonserialize,
|
| 26 |
+
checkformat_byteslike,
|
| 27 |
+
checkformat_delegating_metadata,
|
| 28 |
+
checkformat_gpg_signature,
|
| 29 |
+
checkformat_hex_key,
|
| 30 |
+
checkformat_signable,
|
| 31 |
+
is_gpg_signature,
|
| 32 |
+
is_hex_key,
|
| 33 |
+
is_hex_signature,
|
| 34 |
+
is_signable,
|
| 35 |
+
is_signature,
|
| 36 |
+
)
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
# TODO✅: Consider reversing this argument order? What's more intuitive?
|
| 40 |
+
def verify_root(trusted_current_root_metadata, untrusted_new_root_metadata):
|
| 41 |
+
"""
|
| 42 |
+
Given currently trusted root metadata, verify that new root metadata is
|
| 43 |
+
trustworthy per the currently trusted root metadata.
|
| 44 |
+
|
| 45 |
+
This requires a root chaining process as specified in The Update Framework
|
| 46 |
+
specification. (Version N must be used in order to verify version N+1.
|
| 47 |
+
Versions cannot be skipped.)
|
| 48 |
+
|
| 49 |
+
# TODO✅: Proper docstring.
|
| 50 |
+
"""
|
| 51 |
+
# TODO✅💣❌⚠️: Vet against root chaining algorithm we updated in TUF,
|
| 52 |
+
# and add the attack tests to tests/test_authentication.py.
|
| 53 |
+
|
| 54 |
+
# TODO✅: More argument validation
|
| 55 |
+
checkformat_delegating_metadata(trusted_current_root_metadata)
|
| 56 |
+
checkformat_delegating_metadata(untrusted_new_root_metadata)
|
| 57 |
+
|
| 58 |
+
if (
|
| 59 |
+
trusted_current_root_metadata["signed"]["type"] != "root"
|
| 60 |
+
or untrusted_new_root_metadata["signed"]["type"] != "root"
|
| 61 |
+
):
|
| 62 |
+
raise ValueError(
|
| 63 |
+
"Expected two instances of root metadata. Listed metadata "
|
| 64 |
+
"type in one or both pieces of metadata provided is not "
|
| 65 |
+
'"root".'
|
| 66 |
+
)
|
| 67 |
+
|
| 68 |
+
# Extract rules for root from old, trusted version of root.
|
| 69 |
+
root_expectations = trusted_current_root_metadata["signed"]["delegations"]["root"]
|
| 70 |
+
expected_threshold = root_expectations["threshold"]
|
| 71 |
+
authorized_pub_keys = root_expectations["pubkeys"]
|
| 72 |
+
|
| 73 |
+
# Also extract new rules for root per new untrusted version of root.
|
| 74 |
+
# NOTE THAT it is important that a new root version be verified BOTH
|
| 75 |
+
# based on the prior, trusted version of root, and also based on ITSELF
|
| 76 |
+
# (the latter in order to reduce the odds of accidentally breaking the root
|
| 77 |
+
# trust chain).
|
| 78 |
+
new_root_expectations = untrusted_new_root_metadata["signed"]["delegations"]["root"]
|
| 79 |
+
new_expected_threshold = new_root_expectations["threshold"]
|
| 80 |
+
new_authorized_pub_keys = new_root_expectations["pubkeys"]
|
| 81 |
+
|
| 82 |
+
trusted_root_version = trusted_current_root_metadata["signed"]["version"]
|
| 83 |
+
untrusted_root_version = untrusted_new_root_metadata["signed"]["version"]
|
| 84 |
+
|
| 85 |
+
if trusted_root_version + 1 != untrusted_root_version:
|
| 86 |
+
# TODO ✅: Create a suitable error class for this.
|
| 87 |
+
raise MetadataVerificationError(
|
| 88 |
+
"Root chaining failure: we currently trust a version of root "
|
| 89 |
+
"that marks itself as version "
|
| 90 |
+
+ str(trusted_root_version)
|
| 91 |
+
+ ", and the provided new root metadata to verify marks itself "
|
| 92 |
+
"as version " + str(untrusted_root_version) + "; the new "
|
| 93 |
+
"version must be 1 more than the old version: root updates "
|
| 94 |
+
"MUST be processed one at a time for security reasons: no "
|
| 95 |
+
"root version may be skipped."
|
| 96 |
+
)
|
| 97 |
+
|
| 98 |
+
# Verify the new root metadata based on the prior, trusted root version.
|
| 99 |
+
verify_signable(
|
| 100 |
+
untrusted_new_root_metadata, authorized_pub_keys, expected_threshold, gpg=True
|
| 101 |
+
)
|
| 102 |
+
|
| 103 |
+
# Make sure that the signatures on the new root metadata would be
|
| 104 |
+
# sufficient to verify it using the new root metadata's own rules as well.
|
| 105 |
+
# Doing this helps avoid breaking the chain of trust.
|
| 106 |
+
verify_signable(
|
| 107 |
+
untrusted_new_root_metadata,
|
| 108 |
+
new_authorized_pub_keys,
|
| 109 |
+
new_expected_threshold,
|
| 110 |
+
gpg=True,
|
| 111 |
+
)
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
# TODO ✅: Consider verify_untrusted_based_on_trusted(), a function that just
|
| 115 |
+
# takes the two roles and does the digging to fetch authorized keys
|
| 116 |
+
# and threshold for you, along with an argument specifying what role
|
| 117 |
+
# we're trying to verify (redundant, perhaps, but important to make
|
| 118 |
+
# explicit, to avoid bad patterns of trusting attackers in the calling
|
| 119 |
+
# code).
|
| 120 |
+
# The function should:
|
| 121 |
+
# - return if verification succeeds
|
| 122 |
+
# - raise UnknownRoleError if there's no matching delegation
|
| 123 |
+
# - raise a verification failure error if a signature is bad or
|
| 124 |
+
# signatures don't match expectations (threshold, wrong keys,
|
| 125 |
+
# etc.)
|
| 126 |
+
# - of course, raise ValueError if the arguments are invalid
|
| 127 |
+
#
|
| 128 |
+
# TODO ✅: Autodetect signature type rather than expecting an argument,
|
| 129 |
+
# and allow both OpenPGP-facilitated ed25519 and raw ed25519
|
| 130 |
+
# signatures for any authority metadata (root, key_mgr, etc.)
|
| 131 |
+
# TODO ✅: Find way to specifically discourage anti-pattern of calling
|
| 132 |
+
# verify_delegation() directly to verify root metadata (instead of
|
| 133 |
+
# calling verify_root). We could add a _helper function and have
|
| 134 |
+
# both verify_delegation and verify_root call that, and each check
|
| 135 |
+
# to make sure the metadata type provided is/isn't root as
|
| 136 |
+
# appropriate, but I'd like to avoid adding another level of
|
| 137 |
+
# functions if possible.
|
| 138 |
+
# TODO ✅: Remove delegation_name and just take it from
|
| 139 |
+
# untrusted_delegating_metadata['signed']['type']. Consider utility
|
| 140 |
+
# of keeping argument, though... (allow enforcement, if you have
|
| 141 |
+
# reason to constrain the verifications? unlikely to be a useful arg)
|
| 142 |
+
def verify_delegation(
|
| 143 |
+
delegation_name,
|
| 144 |
+
untrusted_delegated_metadata,
|
| 145 |
+
trusted_delegating_metadata,
|
| 146 |
+
gpg=False,
|
| 147 |
+
):
|
| 148 |
+
"""
|
| 149 |
+
Verify that the given untrusted, delegated-to metadata is trustworthy,
|
| 150 |
+
based on the given trusted metadata's expectations (expected keys and
|
| 151 |
+
threshold). This function returns if verification succeeds.
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
In other words, check trusted_delegating_metadata's delegation
|
| 155 |
+
to delegation_name to find the expected signing keys and threshold for
|
| 156 |
+
delegation_name, and then check untrusted_delegated_metadata to see if it
|
| 157 |
+
is signed by enough of the right keys to be trustworthy.
|
| 158 |
+
|
| 159 |
+
For example, using root metadata to verify key_mgr metadata looks like
|
| 160 |
+
this:
|
| 161 |
+
verify_delegation(
|
| 162 |
+
'key_mgr', <full root metadata>, <full key_mgr metadata>)
|
| 163 |
+
|
| 164 |
+
Arguments:
|
| 165 |
+
(string) delegation_name is the name of the role delegated.
|
| 166 |
+
(dict) trusted_delegating_metadata is a signable JSON-serializable
|
| 167 |
+
object representing the full metadata that delegates to role
|
| 168 |
+
delegation_name.
|
| 169 |
+
(dict) untrusted_delegated_metadata is a signable JSON-serializable
|
| 170 |
+
object
|
| 171 |
+
(bool) gpg should be true if the signatures to be verified in the
|
| 172 |
+
delegated metadata are expected to be OpenPGP signatures
|
| 173 |
+
rather than the usual raw ed25519 signatures.
|
| 174 |
+
|
| 175 |
+
Exceptions:
|
| 176 |
+
- raises UnknownRoleError if there's no matching delegation
|
| 177 |
+
- raises SignatureError if a signature is bad or signatures
|
| 178 |
+
don't match expectations (threshold, wrong keys, etc.)
|
| 179 |
+
# TODO: Consider exception handling to raise MetadataVerificationError instead?
|
| 180 |
+
- raises MetadataVerificationError if the metadata type is unexpected
|
| 181 |
+
- raises TypeError or ValueError if the arguments are invalid
|
| 182 |
+
"""
|
| 183 |
+
|
| 184 |
+
# Argument validation
|
| 185 |
+
|
| 186 |
+
if not isinstance(delegation_name, str):
|
| 187 |
+
raise TypeError(
|
| 188 |
+
"delegation_name must be a string, not a " + str(type(delegation_name))
|
| 189 |
+
)
|
| 190 |
+
|
| 191 |
+
if gpg not in [True, False]:
|
| 192 |
+
raise TypeError(
|
| 193 |
+
'Argument "gpg" must be a boolean.'
|
| 194 |
+
) # should probably be ValueError
|
| 195 |
+
|
| 196 |
+
checkformat_delegating_metadata(trusted_delegating_metadata)
|
| 197 |
+
|
| 198 |
+
# Note that we don't really know the structure of the metadata we're
|
| 199 |
+
# verifying beyond that we expect it to be a signed envelope.
|
| 200 |
+
# We can't assume, for example, that it is itself delegating metadata also,
|
| 201 |
+
# (so no checkformat_delegating_metadata on it): while it could be
|
| 202 |
+
# that we're verifying key_mgr using root, it could also be that we're
|
| 203 |
+
# verifying some package metadata (which is not delegating metadata) using
|
| 204 |
+
# key_mgr.
|
| 205 |
+
# If, however, the untrusted_delegated_metadata *is* delegating metadata,
|
| 206 |
+
# we want to make sure that its type matches what the caller passed in as
|
| 207 |
+
# delegation_name.
|
| 208 |
+
checkformat_signable(untrusted_delegated_metadata)
|
| 209 |
+
try:
|
| 210 |
+
checkformat_delegating_metadata(untrusted_delegated_metadata)
|
| 211 |
+
except:
|
| 212 |
+
# If we can't verify that we're verifying more delegating metadata
|
| 213 |
+
# (e.g. we're using root to verify key_mgr), then we don't need to
|
| 214 |
+
# perform the type check, as it can just be any signed content we're
|
| 215 |
+
# verifying.
|
| 216 |
+
pass
|
| 217 |
+
else:
|
| 218 |
+
# If this is indeed more delegating metadata, make sure the type
|
| 219 |
+
# the caller expects matches what the metadata claims.
|
| 220 |
+
if delegation_name != untrusted_delegated_metadata["signed"]["type"]:
|
| 221 |
+
raise MetadataVerificationError(
|
| 222 |
+
"Instructed to verify provided metadata as if it is of "
|
| 223 |
+
'type "' + delegation_name + '", but it claims to be of '
|
| 224 |
+
'type "' + untrusted_delegated_metadata["signed"]["type"] + '"!'
|
| 225 |
+
)
|
| 226 |
+
|
| 227 |
+
# Process the delegation.
|
| 228 |
+
delegations = trusted_delegating_metadata["signed"]["delegations"]
|
| 229 |
+
|
| 230 |
+
if delegation_name not in delegations:
|
| 231 |
+
raise UnknownRoleError(
|
| 232 |
+
"Role " + delegation_name + " not found in the given "
|
| 233 |
+
"delegating metadata."
|
| 234 |
+
)
|
| 235 |
+
|
| 236 |
+
expected_keys = delegations[delegation_name]["pubkeys"]
|
| 237 |
+
threshold = delegations[delegation_name]["threshold"]
|
| 238 |
+
|
| 239 |
+
verify_signable(
|
| 240 |
+
untrusted_delegated_metadata,
|
| 241 |
+
expected_keys, # drawn from trusted_delegating_metadata
|
| 242 |
+
threshold, # drawn from trusted_delegating_metadata
|
| 243 |
+
gpg=gpg,
|
| 244 |
+
) # from argument to this func
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
# TODO ✅: Consider taking a hex public key instead of a key object, so that:
|
| 248 |
+
# 1: the API is simpler (verify_signature is part of the API)
|
| 249 |
+
# 2: we can remove PublicKey from the higher-level code, making it
|
| 250 |
+
# simpler.
|
| 251 |
+
# The tradeoff is that we can't later accept key objects that might
|
| 252 |
+
# be used as interfaces to hardware keys, for example.
|
| 253 |
+
def verify_signature(signature, public_key, data):
|
| 254 |
+
"""
|
| 255 |
+
Raises ❌cryptography.exceptions.InvalidSignature if signature is not a
|
| 256 |
+
correct signature by the given key over the given data.
|
| 257 |
+
|
| 258 |
+
Raises ❌TypeError if public_key, signature, or data are not correctly
|
| 259 |
+
formatted.
|
| 260 |
+
|
| 261 |
+
Otherwise, returns (nothing), indicating the signature was verified.
|
| 262 |
+
|
| 263 |
+
Note that this does not use the generalized signature format (which would
|
| 264 |
+
be compatible with OpenPGP/GPG signatures as well as pyca/cryptography's
|
| 265 |
+
simple ed25519 sigs).
|
| 266 |
+
|
| 267 |
+
Args:
|
| 268 |
+
- public_key must be an ed25519.Ed25519PublicKeyObject
|
| 269 |
+
- signature must be a hex string, length 128, representing a 64-byte
|
| 270 |
+
raw ed25519 signature
|
| 271 |
+
- data must be bytes
|
| 272 |
+
"""
|
| 273 |
+
if not isinstance(public_key, ed25519.Ed25519PublicKey):
|
| 274 |
+
raise TypeError(
|
| 275 |
+
"verify_signature expects a "
|
| 276 |
+
"cryptography.hazmat.primitives.asymmetric.ed25519ed25519.Ed25519PublicKey"
|
| 277 |
+
'object as the "public_key" argument. Instead, received '
|
| 278 |
+
+ str(type(public_key))
|
| 279 |
+
)
|
| 280 |
+
|
| 281 |
+
if not is_hex_signature(signature):
|
| 282 |
+
raise TypeError(
|
| 283 |
+
"verify_signature expects a hex string representing an "
|
| 284 |
+
'ed25519 signature as the "signature" argument. Instead, '
|
| 285 |
+
"received object of type " + str(type(signature))
|
| 286 |
+
)
|
| 287 |
+
|
| 288 |
+
if not isinstance(data, bytes):
|
| 289 |
+
raise TypeError(
|
| 290 |
+
'verify_signature expects a bytes object as the "signature" '
|
| 291 |
+
"argument. Instead, received " + str(type(data))
|
| 292 |
+
)
|
| 293 |
+
|
| 294 |
+
public_key.verify(unhexlify(signature), data)
|
| 295 |
+
|
| 296 |
+
# If no error is raised, return, indicating success (Explicit for editors)
|
| 297 |
+
return
|
| 298 |
+
|
| 299 |
+
|
| 300 |
+
def verify_signable(signable, authorized_pub_keys, threshold, gpg=False):
|
| 301 |
+
"""
|
| 302 |
+
Raises a ❌SignatureError if signable does not include at least threshold
|
| 303 |
+
good signatures from (unique) keys with public keys listed in
|
| 304 |
+
authorized_pub_keys, over the data contained in signable['signed'].
|
| 305 |
+
|
| 306 |
+
Raises ❌TypeError if the arguments are invalid.
|
| 307 |
+
|
| 308 |
+
Else returns (nothing).
|
| 309 |
+
|
| 310 |
+
Args:
|
| 311 |
+
- signable
|
| 312 |
+
common.is_a_signable(signable) must return true.
|
| 313 |
+
wrap_as_signable() produces output of this type. See those
|
| 314 |
+
functions.
|
| 315 |
+
|
| 316 |
+
- authorized_pub_keys
|
| 317 |
+
a list of ed25519 public keys (32 bytes) expressed as 64-character
|
| 318 |
+
hex strings. This is the form in which they appear in authority
|
| 319 |
+
metadata (root.json, etc.) Only good signatures from keys listed
|
| 320 |
+
in authorized_pub_keys count against the threshold of signatures
|
| 321 |
+
required to verify the signable.
|
| 322 |
+
|
| 323 |
+
- threshold
|
| 324 |
+
the number of good signatures from unique authorized keys required
|
| 325 |
+
in order to verify the signable.
|
| 326 |
+
|
| 327 |
+
- gpg (boolean, default False)
|
| 328 |
+
If True, expects OpenPGP ed25519 signatures (see RFC 4880 bis-08)
|
| 329 |
+
instead of raw ed25519 signatures.
|
| 330 |
+
If False, expects raw ed25519 signatures.
|
| 331 |
+
"""
|
| 332 |
+
|
| 333 |
+
# TODO: ✅ Be sure to check with the analogous code in the tuf reference
|
| 334 |
+
# implementation in case one of us had some clever gotcha there.
|
| 335 |
+
# Would be in tuf.sig or securesystemslib. See
|
| 336 |
+
# get_signature_status() there, in addition to any prettier
|
| 337 |
+
# verify_signable code I may have swapped in (dunno if that's in yet).
|
| 338 |
+
|
| 339 |
+
# TODO: ✅ Consider allowing this func (or another) to accept public keys
|
| 340 |
+
# in the form of ed25519.Ed25519PublicKey objects (instead of just
|
| 341 |
+
# the hex string representation of the public key bytes). I think
|
| 342 |
+
# we'll mostly have the hex strings on hand, but....
|
| 343 |
+
|
| 344 |
+
# Argument validation
|
| 345 |
+
if not is_signable(signable):
|
| 346 |
+
raise TypeError(
|
| 347 |
+
"verify_signable expects a signable dictionary. "
|
| 348 |
+
"Given argument failed the test."
|
| 349 |
+
) # TODO: Tidier / expressive.
|
| 350 |
+
if not (
|
| 351 |
+
isinstance(authorized_pub_keys, list)
|
| 352 |
+
and all([is_hex_key(k) for k in authorized_pub_keys])
|
| 353 |
+
):
|
| 354 |
+
raise TypeError("authorized_pub_keys must be a list of hex strings ")
|
| 355 |
+
# if not (isinstance(authorized_pub_keys, list) and all(
|
| 356 |
+
# [isinstance(k, ed25519.Ed25519PublicKey) for k in authorized_pub_keys])):
|
| 357 |
+
# raise TypeError(
|
| 358 |
+
# 'authorized_pub_keys must be a list of '
|
| 359 |
+
# 'ed25519.Ed25519PublicKeyobjects.')
|
| 360 |
+
if not isinstance(threshold, int) or threshold <= 0:
|
| 361 |
+
raise TypeError("threshold must be a positive integer.")
|
| 362 |
+
|
| 363 |
+
# TODO: ✅⚠️ Metadata specification version compatibility check.
|
| 364 |
+
# Check to see if signable['signed']['metadata_spec_version']
|
| 365 |
+
# is CLOSE ENOUGH to SECURITY_METADATA_SPEC_VERSION (same
|
| 366 |
+
# major version?). If it is not, raise an exception noting
|
| 367 |
+
# that the version cannot be verified because either it or the
|
| 368 |
+
# client are out of date. If versions are close enough,
|
| 369 |
+
# consider a warning instead. If the client is at major spec
|
| 370 |
+
# version x, and the metadata obtained is at major spec version
|
| 371 |
+
# x + 1, then proceed with a warning that the client must be
|
| 372 |
+
# updated. Note that root versions produced must never
|
| 373 |
+
# increase by more than one major spec version at a time, as a
|
| 374 |
+
# result.
|
| 375 |
+
|
| 376 |
+
# Put the 'signed' portion of the data into the format it should be in
|
| 377 |
+
# before it is signed, so that we can verify the signatures.
|
| 378 |
+
signed_data = canonserialize(signable["signed"])
|
| 379 |
+
|
| 380 |
+
# Even though we're not returning this, we produce this dictionary (instead
|
| 381 |
+
# of just counting) to facilitate future checks and logging.
|
| 382 |
+
# TODO: ✅ Keep track of unknown keys and bad signatures for diagnostic and
|
| 383 |
+
# other logging purposes.
|
| 384 |
+
good_sigs_from_trusted_keys = {}
|
| 385 |
+
|
| 386 |
+
for pubkey_hex, signature in signable["signatures"].items():
|
| 387 |
+
# Validate the signature data first (make sure it looks right).
|
| 388 |
+
if not is_hex_key(pubkey_hex):
|
| 389 |
+
# TODO: ✅ Make this a warning instead.
|
| 390 |
+
print(
|
| 391 |
+
'Ignoring signature from "key" with public key value that '
|
| 392 |
+
"does not look like a key value: " + str(pubkey_hex)
|
| 393 |
+
)
|
| 394 |
+
continue
|
| 395 |
+
|
| 396 |
+
if gpg and not is_gpg_signature(signature):
|
| 397 |
+
# TODO: ✅ Make this a warning instead.
|
| 398 |
+
print(
|
| 399 |
+
'Ignoring "signature" that does not look like a gpg '
|
| 400 |
+
"signature value: " + str(signature)
|
| 401 |
+
)
|
| 402 |
+
continue
|
| 403 |
+
|
| 404 |
+
if pubkey_hex not in authorized_pub_keys:
|
| 405 |
+
# TODO: ✅ Make this an INFO-level log message.
|
| 406 |
+
print(
|
| 407 |
+
'Ignoring signature from a key ("'
|
| 408 |
+
+ str(pubkey_hex)
|
| 409 |
+
+ '") that is not authorized to sign this metadata.'
|
| 410 |
+
)
|
| 411 |
+
continue
|
| 412 |
+
|
| 413 |
+
if not gpg: # normal ed25519 signatures using pyca/cryptography
|
| 414 |
+
if not is_signature(signature):
|
| 415 |
+
# TODO: ✅ Make this a warning instead.
|
| 416 |
+
print(
|
| 417 |
+
'Ignoring "signature" that does not look like a hex '
|
| 418 |
+
"signature value: " + str(signature)
|
| 419 |
+
)
|
| 420 |
+
continue
|
| 421 |
+
|
| 422 |
+
public = PublicKey.from_hex(pubkey_hex)
|
| 423 |
+
|
| 424 |
+
try:
|
| 425 |
+
verify_signature(signature["signature"], public, signed_data)
|
| 426 |
+
|
| 427 |
+
except cryptography.exceptions.InvalidSignature:
|
| 428 |
+
# TODO: ✅ Log at debug or info level.
|
| 429 |
+
continue
|
| 430 |
+
|
| 431 |
+
else:
|
| 432 |
+
good_sigs_from_trusted_keys[pubkey_hex] = signature
|
| 433 |
+
|
| 434 |
+
else: # expecting OpenPGP ed25519 signatures (RFC 4880-bis08)
|
| 435 |
+
assert gpg # code paranoia
|
| 436 |
+
|
| 437 |
+
try:
|
| 438 |
+
verify_gpg_signature(signature, pubkey_hex, signed_data)
|
| 439 |
+
|
| 440 |
+
except cryptography.exceptions.InvalidSignature:
|
| 441 |
+
# TODO: ✅ Log at debug or info level.
|
| 442 |
+
continue
|
| 443 |
+
|
| 444 |
+
else:
|
| 445 |
+
good_sigs_from_trusted_keys[pubkey_hex] = signature
|
| 446 |
+
|
| 447 |
+
# TODO: ✅ Logging or more detailed info (which keys).
|
| 448 |
+
if len(good_sigs_from_trusted_keys) < threshold:
|
| 449 |
+
raise SignatureError(
|
| 450 |
+
"Expected good signatures from at least "
|
| 451 |
+
+ str(threshold)
|
| 452 |
+
+ " unique keys from a set of "
|
| 453 |
+
+ str(len(authorized_pub_keys))
|
| 454 |
+
+ " keys. Saw "
|
| 455 |
+
+ str(len(signable["signatures"]))
|
| 456 |
+
+ " signatures, only "
|
| 457 |
+
+ str(len(good_sigs_from_trusted_keys))
|
| 458 |
+
+ " of which were good signatures over the given data from the "
|
| 459 |
+
"expected keys."
|
| 460 |
+
)
|
| 461 |
+
|
| 462 |
+
# Otherwise, return, indicating success. (Explicit for code editors)
|
| 463 |
+
return
|
| 464 |
+
|
| 465 |
+
|
| 466 |
+
def verify_gpg_signature(signature, key_value, data):
|
| 467 |
+
"""
|
| 468 |
+
Verifies a raw ed25519 signature that happens to have been produced by an
|
| 469 |
+
OpenPGP signing process (RFC4880).
|
| 470 |
+
|
| 471 |
+
NOTE that this code DISREGARDS most OpenPGP semantics: is interested solely
|
| 472 |
+
in the verification of a signature over the given data, with the raw
|
| 473 |
+
ed25519 public key given (in the form of a hex string). This code does not
|
| 474 |
+
care about the GPG public key infrastructure, including key
|
| 475 |
+
self-revocation, expiry, or the relationship of any key with any other key
|
| 476 |
+
through OpenPGP (subkeys, key-to-key signoff, etc.).
|
| 477 |
+
|
| 478 |
+
This codebase uses OpenPGP signatures solely as a means of facilitating a
|
| 479 |
+
TUF-style public key infrastructure, where the public key values are
|
| 480 |
+
trusted with specific privileges directly.
|
| 481 |
+
|
| 482 |
+
|
| 483 |
+
⚠️💣 ABSOLUTELY DO NOT use this for general purpose verification of GPG
|
| 484 |
+
signatures!! It is for our root signatures only, where OpenPGP
|
| 485 |
+
signing is just a proxy for a simple ed25519 signature through a
|
| 486 |
+
hardware signing mechanism.
|
| 487 |
+
|
| 488 |
+
|
| 489 |
+
# TODO: ✅ Proper docstring modeled on verify_signature.
|
| 490 |
+
"""
|
| 491 |
+
|
| 492 |
+
checkformat_gpg_signature(signature)
|
| 493 |
+
checkformat_hex_key(key_value)
|
| 494 |
+
checkformat_byteslike(data)
|
| 495 |
+
# if not isinstance(data, bytes): # TODO: ✅ use the byteslike checker in conda_content_trust.common.
|
| 496 |
+
# raise TypeError()
|
| 497 |
+
|
| 498 |
+
public_key = PublicKey.from_hex(key_value)
|
| 499 |
+
|
| 500 |
+
# -------
|
| 501 |
+
# This next part takes advantage of code pulled from:
|
| 502 |
+
# securesystemslib.gpg.eddsa.verify_signature(),
|
| 503 |
+
# securesystemslib.gpg.eddsa.create_pubkey(),
|
| 504 |
+
# and securesystemslib.gpg.util.hash_object().
|
| 505 |
+
#
|
| 506 |
+
# It has been unrolled, had formatting adjustments, variable
|
| 507 |
+
# renaming, unneeded code removal, etc.
|
| 508 |
+
# -------
|
| 509 |
+
|
| 510 |
+
# See RFC4880-bis8 14.8. EdDSA and 5.2.4 "Computing Signatures"
|
| 511 |
+
# digest = securesystemslib.gpg.util.hash_object(
|
| 512 |
+
# unhexlify(signature["other_headers"]),
|
| 513 |
+
# hasher(), data)
|
| 514 |
+
|
| 515 |
+
# Additional headers in the OpenPGP signature (bleh).
|
| 516 |
+
additional_header_data = unhexlify(signature["other_headers"])
|
| 517 |
+
|
| 518 |
+
# As per RFC4880 Section 5.2.4., we need to hash the content,
|
| 519 |
+
# signature headers and add a very opinionated trailing header
|
| 520 |
+
hasher = cryptography.hazmat.primitives.hashes.Hash(
|
| 521 |
+
cryptography.hazmat.primitives.hashes.SHA256(),
|
| 522 |
+
cryptography.hazmat.backends.default_backend(),
|
| 523 |
+
)
|
| 524 |
+
hasher.update(data)
|
| 525 |
+
hasher.update(additional_header_data)
|
| 526 |
+
hasher.update(b"\x04\xff")
|
| 527 |
+
hasher.update(pack(">I", len(additional_header_data)))
|
| 528 |
+
|
| 529 |
+
digest = hasher.finalize()
|
| 530 |
+
|
| 531 |
+
# # DEBUG 💣💥
|
| 532 |
+
# # DEBUG 💣💥
|
| 533 |
+
# print('Digest as produced by verify_gpg_signature: ' + str(digest))
|
| 534 |
+
|
| 535 |
+
# Raises cryptography.exceptions.InvalidSignature if not a valid signature.
|
| 536 |
+
public_key.verify(unhexlify(signature["signature"]), digest)
|
| 537 |
+
|
| 538 |
+
# Return if we succeeded.
|
| 539 |
+
return # explicit for clarity
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/cli.py
ADDED
|
@@ -0,0 +1,534 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2019 Anaconda, Inc
|
| 2 |
+
# SPDX-License-Identifier: BSD-3-Clause
|
| 3 |
+
"""
|
| 4 |
+
This module provides the CLI interface for conda-content-trust.
|
| 5 |
+
This is intended to provide a command-line signing and metadata update
|
| 6 |
+
interface.
|
| 7 |
+
"""
|
| 8 |
+
from argparse import ArgumentParser
|
| 9 |
+
from copy import deepcopy
|
| 10 |
+
from json import dumps
|
| 11 |
+
|
| 12 |
+
from . import __version__
|
| 13 |
+
from . import authentication as cct_authentication
|
| 14 |
+
from . import root_signing as cct_root_signing
|
| 15 |
+
from . import signing as cct_signing
|
| 16 |
+
from .common import (
|
| 17 |
+
CCT_Error,
|
| 18 |
+
PrivateKey,
|
| 19 |
+
is_gpg_fingerprint,
|
| 20 |
+
is_hex_key,
|
| 21 |
+
load_metadata_from_file,
|
| 22 |
+
write_metadata_to_file,
|
| 23 |
+
)
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def cli(args=None):
|
| 27 |
+
parser = ArgumentParser(
|
| 28 |
+
description="Signing and verification tools for Conda",
|
| 29 |
+
conflict_handler="resolve",
|
| 30 |
+
)
|
| 31 |
+
parser.add_argument(
|
| 32 |
+
"-V",
|
| 33 |
+
"--version",
|
| 34 |
+
action="version",
|
| 35 |
+
help="Show the conda-content-trust version number and exit.",
|
| 36 |
+
version="conda-content-trust %s" % __version__,
|
| 37 |
+
)
|
| 38 |
+
|
| 39 |
+
# Create separate parsers for the subcommands.
|
| 40 |
+
sp = parser.add_subparsers(title="subcommands", dest="subcommand_name")
|
| 41 |
+
|
| 42 |
+
# subcommand: sign-artifacts
|
| 43 |
+
|
| 44 |
+
p_signrepo = sp.add_parser(
|
| 45 |
+
"sign-artifacts",
|
| 46 |
+
help=(
|
| 47 |
+
"Given a repodata.json "
|
| 48 |
+
"file, produce signatures over the metadata for each artifact listed, "
|
| 49 |
+
"and update the repodata.json file with their individual signatures."
|
| 50 |
+
),
|
| 51 |
+
)
|
| 52 |
+
p_signrepo.add_argument(
|
| 53 |
+
"repodata_fname",
|
| 54 |
+
help=(
|
| 55 |
+
"the filename of a repodata.json file from "
|
| 56 |
+
"which to retrieve metadata for individual artifacts."
|
| 57 |
+
),
|
| 58 |
+
)
|
| 59 |
+
p_signrepo.add_argument(
|
| 60 |
+
"private_key_fname",
|
| 61 |
+
help=(
|
| 62 |
+
"the filename of a file containing a "
|
| 63 |
+
"hex string representation of an ed25519 private key to be used "
|
| 64 |
+
"to sign each artifact's metadata"
|
| 65 |
+
),
|
| 66 |
+
)
|
| 67 |
+
|
| 68 |
+
# subcommand: verify-metadata
|
| 69 |
+
|
| 70 |
+
p_verifymd = sp.add_parser(
|
| 71 |
+
"verify-metadata",
|
| 72 |
+
help=(
|
| 73 |
+
"Uses the first (trusted) metadata file "
|
| 74 |
+
"to verify the second (not yet trusted) metadata file. For "
|
| 75 |
+
"example, "
|
| 76 |
+
'"conda-content-trust verify-metadata 4.root.json 5.root.json"'
|
| 77 |
+
" to verify version 5 of root based on version 4 of root, or "
|
| 78 |
+
'"conda-content-trust verify-metadata 4.root.json key_mgr.json" '
|
| 79 |
+
"to verify key manager metadata based on version 4 of root."
|
| 80 |
+
),
|
| 81 |
+
)
|
| 82 |
+
p_verifymd.add_argument(
|
| 83 |
+
"trusted_metadata_filename",
|
| 84 |
+
help=(
|
| 85 |
+
"the filename of the "
|
| 86 |
+
"already-trusted metadata file that sets the rules for verifying "
|
| 87 |
+
"the untrusted metadata file"
|
| 88 |
+
),
|
| 89 |
+
)
|
| 90 |
+
p_verifymd.add_argument(
|
| 91 |
+
"untrusted_metadata_filename",
|
| 92 |
+
help=("the filename of the " "(untrusted) metadata file to verify"),
|
| 93 |
+
)
|
| 94 |
+
|
| 95 |
+
# subcommand: modify-metadata
|
| 96 |
+
|
| 97 |
+
p_modifymd = sp.add_parser(
|
| 98 |
+
"modify-metadata",
|
| 99 |
+
help=(
|
| 100 |
+
"Interactive metadata modification. Use "
|
| 101 |
+
"this to produce a new version of a metadata file (like root.json "
|
| 102 |
+
"or key_mgr.json), or correct an error in an unpublished metadata "
|
| 103 |
+
"file, or review and sign a metadata file. This increments "
|
| 104 |
+
"version number / timestamp, reports changes on console, etc. For "
|
| 105 |
+
'example, "conda-content-trust modify-metadata 8.root.json" '
|
| 106 |
+
"for assistance in "
|
| 107 |
+
"producing a new version of root (version 9) using version 8."
|
| 108 |
+
),
|
| 109 |
+
)
|
| 110 |
+
p_modifymd.add_argument(
|
| 111 |
+
"metadata_filename",
|
| 112 |
+
help=("the filename of the existing metadata " "file to modify"),
|
| 113 |
+
)
|
| 114 |
+
|
| 115 |
+
# If we're missing optional requirements for the next few options, note
|
| 116 |
+
# that in their help strings.
|
| 117 |
+
opt_reqs_str = ""
|
| 118 |
+
if not cct_root_signing.SSLIB_AVAILABLE:
|
| 119 |
+
opt_reqs_str = (
|
| 120 |
+
"[Unavailable]: Requires optional "
|
| 121 |
+
"dependencies: securesystemslib and gpg. "
|
| 122 |
+
)
|
| 123 |
+
|
| 124 |
+
# subcommand: gpg-key-lookup
|
| 125 |
+
p_gpglookup = sp.add_parser(
|
| 126 |
+
"gpg-key-lookup",
|
| 127 |
+
help=(
|
| 128 |
+
opt_reqs_str
|
| 129 |
+
+ "Given the OpenPGP fingerprint of an ed25519-type OpenPGP key, fetch "
|
| 130 |
+
"the actual ed25519 public key value of the underlying key."
|
| 131 |
+
),
|
| 132 |
+
)
|
| 133 |
+
p_gpglookup.add_argument(
|
| 134 |
+
"gpg_key_fingerprint",
|
| 135 |
+
help=(
|
| 136 |
+
"the 40-hex-character key fingerprint (long keyid) for the "
|
| 137 |
+
"OpenPGP/GPG key that you want to sign something with. Do not "
|
| 138 |
+
'add prefix "0x".'
|
| 139 |
+
),
|
| 140 |
+
)
|
| 141 |
+
|
| 142 |
+
# subcommand: gpg-sign
|
| 143 |
+
|
| 144 |
+
p_gpgsign = sp.add_parser(
|
| 145 |
+
"gpg-sign",
|
| 146 |
+
help=(
|
| 147 |
+
opt_reqs_str + "Sign a given "
|
| 148 |
+
"piece of metadata using GPG instead of the usual signing "
|
| 149 |
+
"mechanisms. Takes an OpenPGP key fingerprint and a filename."
|
| 150 |
+
),
|
| 151 |
+
)
|
| 152 |
+
p_gpgsign.add_argument(
|
| 153 |
+
"gpg_key_fingerprint",
|
| 154 |
+
help=(
|
| 155 |
+
"the 40-hex-character key fingerprint (long keyid) for the "
|
| 156 |
+
"OpenPGP/GPG key that you want to sign something with. Do not "
|
| 157 |
+
'add prefix "0x".'
|
| 158 |
+
),
|
| 159 |
+
)
|
| 160 |
+
p_gpgsign.add_argument(
|
| 161 |
+
"filename", help=("the filename of the file that will be signed")
|
| 162 |
+
)
|
| 163 |
+
|
| 164 |
+
args = parser.parse_args(args)
|
| 165 |
+
|
| 166 |
+
if args.subcommand_name == "gpg-sign":
|
| 167 |
+
# TODO: Validate arguments.
|
| 168 |
+
|
| 169 |
+
# Strip any whitespace from the key fingerprint and lowercase it.
|
| 170 |
+
# GPG pops out keys in a variety of whitespace arrangements and cases,
|
| 171 |
+
# so this is necessary for convenience.
|
| 172 |
+
gpg_key_fingerprint = "".join(args.gpg_key_fingerprint.split()).lower()
|
| 173 |
+
|
| 174 |
+
cct_root_signing.sign_root_metadata_via_gpg(args.filename, gpg_key_fingerprint)
|
| 175 |
+
|
| 176 |
+
elif args.subcommand_name == "sign-artifacts":
|
| 177 |
+
with open(args.private_key_fname) as key_fobj:
|
| 178 |
+
# Lower-case the hex string and ignore any whitespace before and
|
| 179 |
+
# after it (in case someone adds some).
|
| 180 |
+
private_key_hex = key_fobj.read().strip().lower()
|
| 181 |
+
|
| 182 |
+
if not is_hex_key(private_key_hex):
|
| 183 |
+
print(
|
| 184 |
+
"ABORTED. Expected key file to contain only a hex string "
|
| 185 |
+
"representation of an ed25519 key. It does not."
|
| 186 |
+
)
|
| 187 |
+
return
|
| 188 |
+
|
| 189 |
+
cct_signing.sign_all_in_repodata(args.repodata_fname, args.private_key_hex)
|
| 190 |
+
|
| 191 |
+
elif args.subcommand_name == "gpg-key-lookup":
|
| 192 |
+
gpg_key_fingerprint = "".join(args.gpg_key_fingerprint.split()).lower()
|
| 193 |
+
keyval = cct_root_signing.fetch_keyval_from_gpg(gpg_key_fingerprint)
|
| 194 |
+
print("Underlying ed25519 public key value: " + str(keyval))
|
| 195 |
+
|
| 196 |
+
elif args.subcommand_name == "modify-metadata":
|
| 197 |
+
# `conda-content-trust update-metadata <metadata file to produce new version of>`
|
| 198 |
+
|
| 199 |
+
# underlying functions: build_delegating_metadata,
|
| 200 |
+
# load_metadata_from_file
|
| 201 |
+
|
| 202 |
+
# given a metadata file, increment the version number and timestamps,
|
| 203 |
+
# reporting the changes on the console
|
| 204 |
+
|
| 205 |
+
# strip signatures
|
| 206 |
+
|
| 207 |
+
# indicate what signatures are required
|
| 208 |
+
|
| 209 |
+
# ask if the user wants to sign; query for the key hex or fname;
|
| 210 |
+
# ideally, offer this functionality for both root and non-root keys.
|
| 211 |
+
# For root metadata, we can (and should) also report which keys are
|
| 212 |
+
# expected / still needed in order for the metadata to be verifiable
|
| 213 |
+
# according to the old metadata and the new metadata
|
| 214 |
+
|
| 215 |
+
old_metadata = load_metadata_from_file(args.metadata_filename)
|
| 216 |
+
|
| 217 |
+
# new_metadata = cct_metadata_construction.interactive_modify_metadata(old_metadata)
|
| 218 |
+
# if new_metadata is not None and new_metadata:
|
| 219 |
+
# write_metadata_to_file(new_metadata, args.metadata_filename)
|
| 220 |
+
|
| 221 |
+
interactive_modify_metadata(old_metadata)
|
| 222 |
+
|
| 223 |
+
elif args.subcommand_name == "verify-metadata":
|
| 224 |
+
# `conda-content-trust verify-metadata <trusted delegating metadata> <untrusted
|
| 225 |
+
# metadata> <(optional) role name>`
|
| 226 |
+
|
| 227 |
+
# underlying functions: cct_authentication.verify_delegation,
|
| 228 |
+
# load_metadata_from_file
|
| 229 |
+
|
| 230 |
+
# takes two metadata files, the first being a trusted file that should
|
| 231 |
+
# provide the verification criteria (expected keys and expected number
|
| 232 |
+
# of keys) for the second file. This should support root-root
|
| 233 |
+
# verification (root chaining as currently implemented in
|
| 234 |
+
# conda-content-trust) and delegation from one metadata type to another
|
| 235 |
+
# (e.g. root to key_mgr)
|
| 236 |
+
|
| 237 |
+
# conveys to the user whether or not the file is trusted, and for what
|
| 238 |
+
# role. e.g., would convey that the first file is (e.g.) a root
|
| 239 |
+
# metadata file, that it provides a delegation to <role name>, and that
|
| 240 |
+
# the <untrusted metadata> file provides <role name> and is signed
|
| 241 |
+
# appropriately based on what the root metadata file requires of that
|
| 242 |
+
# delegation.
|
| 243 |
+
|
| 244 |
+
untrusted_metadata = load_metadata_from_file(args.untrusted_metadata_filename)
|
| 245 |
+
|
| 246 |
+
trusted_metadata = load_metadata_from_file(args.trusted_metadata_filename)
|
| 247 |
+
|
| 248 |
+
# TODO✅: Argument validation via the check_format_* calls.
|
| 249 |
+
|
| 250 |
+
metadata_type = untrusted_metadata["signed"]["type"]
|
| 251 |
+
|
| 252 |
+
if metadata_type == "root":
|
| 253 |
+
# Verifying root has additional steps beyond verify_delegation.
|
| 254 |
+
try:
|
| 255 |
+
cct_authentication.verify_root(trusted_metadata, untrusted_metadata)
|
| 256 |
+
print("Root metadata verification successful.")
|
| 257 |
+
return 0 # success
|
| 258 |
+
|
| 259 |
+
except CCT_Error as e:
|
| 260 |
+
errorcode = 10
|
| 261 |
+
errorstring = str(e)
|
| 262 |
+
|
| 263 |
+
else:
|
| 264 |
+
# Verifying anything other than root just uses verify_delegation
|
| 265 |
+
# directly.
|
| 266 |
+
try:
|
| 267 |
+
cct_authentication.verify_delegation(
|
| 268 |
+
delegation_name=metadata_type,
|
| 269 |
+
untrusted_delegated_metadata=untrusted_metadata,
|
| 270 |
+
trusted_delegating_metadata=trusted_metadata,
|
| 271 |
+
)
|
| 272 |
+
print("Metadata verification successful.")
|
| 273 |
+
return 0 # success
|
| 274 |
+
|
| 275 |
+
except CCT_Error as e:
|
| 276 |
+
errorcode = 20
|
| 277 |
+
errorstring = str(e)
|
| 278 |
+
|
| 279 |
+
# We should only get here if verification failed.
|
| 280 |
+
print(
|
| 281 |
+
"Verification of untrusted metadata failed. Metadata "
|
| 282 |
+
'type was "' + metadata_type + '". Error reads:\n "' + errorstring + '"'
|
| 283 |
+
)
|
| 284 |
+
return errorcode # failure; exit code
|
| 285 |
+
|
| 286 |
+
else:
|
| 287 |
+
parser.print_help()
|
| 288 |
+
|
| 289 |
+
|
| 290 |
+
def interactive_modify_metadata(metadata):
|
| 291 |
+
""" """
|
| 292 |
+
|
| 293 |
+
# Update version if there is a version.
|
| 294 |
+
# Update timestamp if there is a timestamp.
|
| 295 |
+
#
|
| 296 |
+
# Show metadata contents ('signed') -- pprint?
|
| 297 |
+
# indicate updated version/timestamp
|
| 298 |
+
#
|
| 299 |
+
# Changes phase:
|
| 300 |
+
# Prompt to
|
| 301 |
+
# (m) modify a value, (a) add a new entry, (d) delete an entry,
|
| 302 |
+
# (r) revert to original, (f) finish and sign ((move on to signing
|
| 303 |
+
# prompts))
|
| 304 |
+
#
|
| 305 |
+
# Signing phase:
|
| 306 |
+
# Show metadata again, ask if metadata looks right
|
| 307 |
+
# Show what keys the original was signed by and ask if those should be
|
| 308 |
+
# the keys used for the new version.
|
| 309 |
+
# ((Later: if root, vet against contents of new and old root versions))
|
| 310 |
+
# Prompt for key (raw key file, raw key data, or gpg key fingerprint)
|
| 311 |
+
# Sign using the given key (gpg if gpg, else normal signing mechanism).
|
| 312 |
+
# Write (making sure not to overwrite, and -- if root -- making sure to
|
| 313 |
+
# prepend "<version>." to root.json file.
|
| 314 |
+
|
| 315 |
+
initial_metadata = metadata
|
| 316 |
+
metadata = deepcopy(initial_metadata)
|
| 317 |
+
|
| 318 |
+
try:
|
| 319 |
+
import pygments
|
| 320 |
+
import pygments.formatters
|
| 321 |
+
import pygments.lexers
|
| 322 |
+
except ImportError:
|
| 323 |
+
print(
|
| 324 |
+
"interactive modify-metadata mode employs pygments for syntax "
|
| 325 |
+
"highlighting, if pygments is available. pygments was not "
|
| 326 |
+
"found, so the JSON contents will be... uglier than they "
|
| 327 |
+
"would otherwise be. If you would like syntax highlighting "
|
| 328 |
+
"and prettier printing of JSON, you may install pygments."
|
| 329 |
+
)
|
| 330 |
+
pygments = None
|
| 331 |
+
from pprint import pprint
|
| 332 |
+
|
| 333 |
+
# Build the modification options and prompt.
|
| 334 |
+
def promptfor(s):
|
| 335 |
+
return input(F_INSTRUCT + "\n----- Please provide " + s + ENDC + ": ")
|
| 336 |
+
|
| 337 |
+
def fn_write():
|
| 338 |
+
fname = promptfor("a filename to save this metadata as")
|
| 339 |
+
print("Writing to file....")
|
| 340 |
+
write_metadata_to_file(metadata, fname)
|
| 341 |
+
print("Modified metadata written!")
|
| 342 |
+
return 1
|
| 343 |
+
|
| 344 |
+
def fn_abort():
|
| 345 |
+
# TODO✅: Ask to confirm.
|
| 346 |
+
print(RED + BOLD + "\nAborting!\n" + ENDC)
|
| 347 |
+
return 1
|
| 348 |
+
|
| 349 |
+
def fn_addsig():
|
| 350 |
+
if not cct_root_signing.SSLIB_AVAILABLE:
|
| 351 |
+
print(
|
| 352 |
+
F_OPTS + "Signing. " + RED + "Please ABORT (control-c) if "
|
| 353 |
+
"the metadata above is not EXACTLY what you want to sign!" + ENDC
|
| 354 |
+
)
|
| 355 |
+
key = promptfor(
|
| 356 |
+
"a key: either:\n - a 40-character-hex-string GPG PUBLIC "
|
| 357 |
+
"key fingerprint\n"
|
| 358 |
+
" for GPG keys (e.g. root YubiKeys), or \n - a "
|
| 359 |
+
"64-character-hex-string PRIVATE key value for normal "
|
| 360 |
+
"keys.\n\n Whitespace will be removed and characters will "
|
| 361 |
+
"be lowercased.\n Key"
|
| 362 |
+
)
|
| 363 |
+
key = "".join(key.split()).lower()
|
| 364 |
+
|
| 365 |
+
if is_hex_key(key):
|
| 366 |
+
private_key = PrivateKey.from_hex(key)
|
| 367 |
+
cct_signing.sign_signable(metadata, private_key)
|
| 368 |
+
print(F_OPTS + "\n\n--- Successfully signed! Please save." + ENDC)
|
| 369 |
+
|
| 370 |
+
elif is_gpg_fingerprint(key):
|
| 371 |
+
try:
|
| 372 |
+
cct_root_signing.sign_root_metadata_dict_via_gpg(metadata, key)
|
| 373 |
+
except:
|
| 374 |
+
print(
|
| 375 |
+
F_OPTS
|
| 376 |
+
+ "\n\n--- "
|
| 377 |
+
+ RED
|
| 378 |
+
+ "Signing FAILED."
|
| 379 |
+
+ F_OPTS
|
| 380 |
+
+ " Do you have this key loaded in GPG on "
|
| 381 |
+
"this system?"
|
| 382 |
+
)
|
| 383 |
+
else:
|
| 384 |
+
print(F_OPTS + "\n\n--- Successfully signed! Please save." + ENDC)
|
| 385 |
+
|
| 386 |
+
else:
|
| 387 |
+
print(F_OPTS + RED + "Unable to recognize key. Please try again." + ENDC)
|
| 388 |
+
return 0
|
| 389 |
+
|
| 390 |
+
def fn_remsig():
|
| 391 |
+
return 0
|
| 392 |
+
|
| 393 |
+
def fn_update():
|
| 394 |
+
return 0
|
| 395 |
+
|
| 396 |
+
def fn_adddel():
|
| 397 |
+
return 0
|
| 398 |
+
|
| 399 |
+
def fn_remdel():
|
| 400 |
+
return 0
|
| 401 |
+
|
| 402 |
+
def fn_thresh():
|
| 403 |
+
delegation = promptfor(
|
| 404 |
+
"a delegation name (one of the entries in the"
|
| 405 |
+
'\n "delegations" dictionary in the metadata above). '
|
| 406 |
+
"This will\n be the delegation whose threshold number of "
|
| 407 |
+
"required keys we\n will change."
|
| 408 |
+
)
|
| 409 |
+
if delegation not in metadata["signed"]["delegations"]:
|
| 410 |
+
print(
|
| 411 |
+
F_OPTS + "\n\n--- " + RED + "Unable to find that delegation."
|
| 412 |
+
" Please try again." + ENDC
|
| 413 |
+
)
|
| 414 |
+
return 0
|
| 415 |
+
|
| 416 |
+
new_thresh = promptfor(
|
| 417 |
+
"a new threshold value. The current value is "
|
| 418 |
+
+ str(metadata["signed"]["delegations"][delegation]["threshold"])
|
| 419 |
+
)
|
| 420 |
+
|
| 421 |
+
try:
|
| 422 |
+
new_thresh = int(new_thresh)
|
| 423 |
+
assert new_thresh >= 1
|
| 424 |
+
except:
|
| 425 |
+
print(
|
| 426 |
+
F_OPTS + "\n--- " + RED + "Invalid value. Expecting integer "
|
| 427 |
+
"greater than or equal to 1. Please try again." + ENDC
|
| 428 |
+
)
|
| 429 |
+
return 0
|
| 430 |
+
|
| 431 |
+
metadata["signed"]["delegations"][delegation]["threshold"] = new_thresh
|
| 432 |
+
|
| 433 |
+
print(F_OPTS + "\n--- Threshold successfully updated." + ENDC)
|
| 434 |
+
|
| 435 |
+
return 0
|
| 436 |
+
|
| 437 |
+
def fn_addkey():
|
| 438 |
+
return 0
|
| 439 |
+
|
| 440 |
+
def fn_remkey():
|
| 441 |
+
return 0
|
| 442 |
+
|
| 443 |
+
options = {
|
| 444 |
+
0: [fn_write, "Done: write and save metadata"],
|
| 445 |
+
1: [fn_abort, "Abort: discard changes -- abort without writing"],
|
| 446 |
+
2: [fn_addsig, "Add a signature (sign with a key you have)"],
|
| 447 |
+
3: [fn_remsig, "Remove a signature"],
|
| 448 |
+
4: [fn_update, "Update any top-level dictionary entry"],
|
| 449 |
+
5: [fn_adddel, "Add a delegation"],
|
| 450 |
+
6: [fn_remdel, "Remove a delegation"],
|
| 451 |
+
7: [fn_thresh, "Change the threshold number of keys for a delegation"],
|
| 452 |
+
8: [fn_addkey, "Add an authorized key to a delegation"],
|
| 453 |
+
9: [fn_remkey, "Remove an authorized key from a delegation"],
|
| 454 |
+
}
|
| 455 |
+
|
| 456 |
+
option_text = (
|
| 457 |
+
F_INSTRUCT + "\n--- Please choose an operation by entering its "
|
| 458 |
+
"number\n" + ENDC
|
| 459 |
+
)
|
| 460 |
+
for index in options:
|
| 461 |
+
option_text += (
|
| 462 |
+
" "
|
| 463 |
+
+ F_LABEL
|
| 464 |
+
+ str(index)
|
| 465 |
+
+ ENDC
|
| 466 |
+
+ ": "
|
| 467 |
+
+ options[index][1]
|
| 468 |
+
+ ENDC
|
| 469 |
+
+ "\n"
|
| 470 |
+
)
|
| 471 |
+
|
| 472 |
+
done = False
|
| 473 |
+
while not done:
|
| 474 |
+
print(
|
| 475 |
+
F_OPTS
|
| 476 |
+
+ BOLD
|
| 477 |
+
+ "\n\n---------------------\n--- Current metadata:\n---------------------\n"
|
| 478 |
+
+ ENDC
|
| 479 |
+
)
|
| 480 |
+
|
| 481 |
+
if pygments is not None:
|
| 482 |
+
formatted_metadata = dumps(metadata, sort_keys=True, indent=4)
|
| 483 |
+
print(
|
| 484 |
+
pygments.highlight(
|
| 485 |
+
formatted_metadata.encode("utf-8"),
|
| 486 |
+
pygments.lexers.JsonLexer(),
|
| 487 |
+
pygments.formatters.TerminalFormatter(),
|
| 488 |
+
)
|
| 489 |
+
)
|
| 490 |
+
else:
|
| 491 |
+
pprint(metadata)
|
| 492 |
+
|
| 493 |
+
print(option_text)
|
| 494 |
+
selected = input(F_OPTS + "Choice: " + ENDC)
|
| 495 |
+
try:
|
| 496 |
+
selected = int(selected)
|
| 497 |
+
except:
|
| 498 |
+
print(RED + BOLD + "\nInvalid entry. Try again.\n" + ENDC)
|
| 499 |
+
continue
|
| 500 |
+
if selected not in options:
|
| 501 |
+
print(RED + BOLD + "\nInvalid entry. Try again.\n" + ENDC)
|
| 502 |
+
continue
|
| 503 |
+
|
| 504 |
+
print(F_OPTS + '\nChose "' + options[selected][1] + '"' + ENDC)
|
| 505 |
+
|
| 506 |
+
done = options[selected][0]() # Run the func associated with the option.
|
| 507 |
+
|
| 508 |
+
# Pull modified from debugging script
|
| 509 |
+
# Pull modified from debugging script
|
| 510 |
+
# Pull modified from debugging script
|
| 511 |
+
|
| 512 |
+
|
| 513 |
+
# Basic text formatting string constants
|
| 514 |
+
PINK = "\033[95m"
|
| 515 |
+
BLUE = "\033[94m"
|
| 516 |
+
CYAN = "\033[96m"
|
| 517 |
+
GREEN = "\033[92m"
|
| 518 |
+
YELLOW = "\033[93m"
|
| 519 |
+
RED = "\033[91m"
|
| 520 |
+
ENDC = "\033[0m"
|
| 521 |
+
BOLD = "\033[1m"
|
| 522 |
+
UNDERLINE = "\033[4m"
|
| 523 |
+
|
| 524 |
+
# Complete formats
|
| 525 |
+
F_LABEL = ENDC + UNDERLINE + BOLD + PINK
|
| 526 |
+
F_INSTRUCT = ENDC + BOLD + PINK
|
| 527 |
+
F_OPTS = ENDC + GREEN
|
| 528 |
+
|
| 529 |
+
|
| 530 |
+
if __name__ == "__main__":
|
| 531 |
+
import sys
|
| 532 |
+
|
| 533 |
+
exit_status = cli(sys.argv[1:])
|
| 534 |
+
sys.exit(exit_status)
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/common.py
ADDED
|
@@ -0,0 +1,918 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2019 Anaconda, Inc
|
| 2 |
+
# SPDX-License-Identifier: BSD-3-Clause
|
| 3 |
+
"""
|
| 4 |
+
This module contains functions that provide format validation, serialization,
|
| 5 |
+
and some key transformations for the pyca/cryptography library. These are used
|
| 6 |
+
across conda_content_trust modules.
|
| 7 |
+
|
| 8 |
+
Function Manifest for this Module, by Category
|
| 9 |
+
|
| 10 |
+
Encoding:
|
| 11 |
+
x canonserialize
|
| 12 |
+
|
| 13 |
+
Formats and Validation:
|
| 14 |
+
PrivateKey -- extends cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PrivateKey
|
| 15 |
+
PublicKey -- extends cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PublicKey
|
| 16 |
+
checkformat_string
|
| 17 |
+
x is_hex_string
|
| 18 |
+
x is_hex_signature
|
| 19 |
+
r is_hex_key
|
| 20 |
+
r checkformat_hex_key
|
| 21 |
+
r checkformat_list_of_hex_keys
|
| 22 |
+
x is_signable
|
| 23 |
+
x checkformat_byteslike
|
| 24 |
+
x checkformat_natural_int
|
| 25 |
+
x checkformat_expiration_distance
|
| 26 |
+
x checkformat_utc_isoformat
|
| 27 |
+
x checkformat_gpg_fingerprint
|
| 28 |
+
is_gpg_fingerprint
|
| 29 |
+
x checkformat_gpg_signature
|
| 30 |
+
is_gpg_signature
|
| 31 |
+
checkformat_any_signature
|
| 32 |
+
checkformat_delegation
|
| 33 |
+
checkformat_delegations
|
| 34 |
+
checkformat_delegating_metadata
|
| 35 |
+
x iso8601_time_plus_delta
|
| 36 |
+
|
| 37 |
+
Crypto Utility:
|
| 38 |
+
x sha512256
|
| 39 |
+
x keyfiles_to_keys
|
| 40 |
+
x keyfiles_to_bytes
|
| 41 |
+
|
| 42 |
+
Exceptions:
|
| 43 |
+
CCT_Error
|
| 44 |
+
SignatureError
|
| 45 |
+
MetadataVerificationError
|
| 46 |
+
UnknownRoleError
|
| 47 |
+
"""
|
| 48 |
+
from __future__ import annotations
|
| 49 |
+
|
| 50 |
+
from binascii import hexlify, unhexlify
|
| 51 |
+
from datetime import datetime, timedelta
|
| 52 |
+
from json import dumps, load
|
| 53 |
+
from typing import Any, Protocol
|
| 54 |
+
|
| 55 |
+
from cryptography.hazmat.primitives import serialization
|
| 56 |
+
from cryptography.hazmat.primitives.asymmetric import ed25519
|
| 57 |
+
|
| 58 |
+
# specification version for the metadata produced by conda-content-trust
|
| 59 |
+
# Details in the Conda Security Metadata Specification. Note that this
|
| 60 |
+
# version string is parsed via setuptools's packaging.version library, and so
|
| 61 |
+
# supports PEP 440; however, we should use a limited subset that is numerical
|
| 62 |
+
# only, and according to SemVer principles.
|
| 63 |
+
# PEP 440 compatibility:
|
| 64 |
+
# > None is not re.match(r'^([1-9]\d*!)?(0|[1-9]\d*)(\.(0|[1-9]\d*))*((a|b|rc)(0|[1-9]\d*))?(\.post(0|[1-9]\d*))?(\.dev(0|[1-9]\d*))?$', version_string)
|
| 65 |
+
# SemVer compatibility:
|
| 66 |
+
# > None is not re.match(r'^(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$', version_string)
|
| 67 |
+
# Try, however, to keep to three simple numeric elements separated by periods,
|
| 68 |
+
# i.e., things that match this subset of SemVer:
|
| 69 |
+
# > None is not re.match(r'^(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$', version_string)
|
| 70 |
+
SECURITY_METADATA_SPEC_VERSION = "0.6.0"
|
| 71 |
+
|
| 72 |
+
# The only types we're allowed to wrap as "signables" and sign are
|
| 73 |
+
# the JSON-serializable types. (There are further constraints to what is
|
| 74 |
+
# JSON-serializable in addition to these type constraints.)
|
| 75 |
+
SUPPORTED_SERIALIZABLE_TYPES = [dict, list, tuple, str, int, float, bool, type(None)]
|
| 76 |
+
|
| 77 |
+
# These are the permissible strings in the "type" field of delegating metadata.
|
| 78 |
+
SUPPORTED_DELEGATING_METADATA_TYPES = ["root", "key_mgr"] # May be loosened later.
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
class CCT_Error(Exception):
|
| 82 |
+
"""
|
| 83 |
+
All errors we raise that are not ValueErrors, TypeErrors, or
|
| 84 |
+
certain errors from securesystemslib should be instances of this class or
|
| 85 |
+
of subclasses of this class.
|
| 86 |
+
"""
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
class SignatureError(CCT_Error):
|
| 90 |
+
"""
|
| 91 |
+
Indicates that a signable cannot be verified due to issues with the
|
| 92 |
+
signature(s) inside it.
|
| 93 |
+
"""
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
class MetadataVerificationError(CCT_Error):
|
| 97 |
+
"""
|
| 98 |
+
Indicates that a chain of authority metadata cannot be verified (e.g.
|
| 99 |
+
a metadata update is found on the repository, but could not be
|
| 100 |
+
authenticated).
|
| 101 |
+
"""
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
class UnknownRoleError(CCT_Error):
|
| 105 |
+
"""
|
| 106 |
+
Indicates that a piece of role metadata (like root.json, or key_mgr.json)
|
| 107 |
+
was expected but not found.
|
| 108 |
+
"""
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
def canonserialize(obj):
|
| 112 |
+
"""
|
| 113 |
+
Given a JSON-compatible object, does the following:
|
| 114 |
+
- serializes the dictionary as utf-8-encoded JSON, lazy-canonicalized
|
| 115 |
+
such that any dictionary keys in any dictionaries inside <dictionary>
|
| 116 |
+
are sorted and indentation is used and set to 2 spaces (using json lib)
|
| 117 |
+
|
| 118 |
+
TODO: ✅ Implement the serialization checks from serialization document.
|
| 119 |
+
|
| 120 |
+
Note that if the provided object includes a dictionary that is *indexed*
|
| 121 |
+
by both strings and integers, a TypeError will be raised complaining about
|
| 122 |
+
comparing strings and integers during the sort. (Each dictionary in an
|
| 123 |
+
object must be indexed only by strings or only by integers.)
|
| 124 |
+
"""
|
| 125 |
+
|
| 126 |
+
# Try converting to a JSON string.
|
| 127 |
+
try:
|
| 128 |
+
# TODO: In the future, assess whether or not to employ more typical
|
| 129 |
+
# practice of using no whitespace (instead of NLs and 2-indent).
|
| 130 |
+
json_string = dumps(obj, indent=2, sort_keys=True)
|
| 131 |
+
except TypeError:
|
| 132 |
+
# TODO: ✅ Log or craft/use an appropriate exception class.
|
| 133 |
+
raise
|
| 134 |
+
|
| 135 |
+
return json_string.encode("utf-8")
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
def load_metadata_from_file(fname):
|
| 139 |
+
# TODO ✅: Argument validation for fname. Consider adding "pathvalidate"
|
| 140 |
+
# as a dependency, and calling its sanitize_filename() here.
|
| 141 |
+
|
| 142 |
+
with open(fname, "rb") as fobj:
|
| 143 |
+
metadata = load(fobj)
|
| 144 |
+
|
| 145 |
+
# TODO ✅: Consider validating what is read here, for everywhere.
|
| 146 |
+
|
| 147 |
+
return metadata
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
def write_metadata_to_file(metadata, filename):
|
| 151 |
+
"""
|
| 152 |
+
Canonicalizes and serializes JSON-friendly metadata, and writes that to the
|
| 153 |
+
given filename.
|
| 154 |
+
"""
|
| 155 |
+
|
| 156 |
+
# TODO ✅: Argument validation for filename. Consider adding
|
| 157 |
+
# "pathvalidate" as a dependency, and calling its
|
| 158 |
+
# sanitize_filename() here.
|
| 159 |
+
|
| 160 |
+
metadata = canonserialize(metadata)
|
| 161 |
+
|
| 162 |
+
with open(filename, "wb") as fobj:
|
| 163 |
+
fobj.write(metadata)
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
class MixinKey:
|
| 167 |
+
"""
|
| 168 |
+
This is a mix-in (https://www.ianlewis.org/en/mixins-and-python) for the
|
| 169 |
+
PrivateKey and PublicKey classes, specifically. It provides some
|
| 170 |
+
convenience functions.
|
| 171 |
+
"""
|
| 172 |
+
|
| 173 |
+
@classmethod
|
| 174 |
+
def to_hex(cls, key):
|
| 175 |
+
return hexlify(cls.to_bytes(key)).decode("utf-8")
|
| 176 |
+
|
| 177 |
+
@classmethod
|
| 178 |
+
def is_equivalent_to(cls, k1, k2):
|
| 179 |
+
"""
|
| 180 |
+
Given Ed25519PrivateKey or Ed25519PublicKey objects, determines if the
|
| 181 |
+
underlying key data is identical.
|
| 182 |
+
"""
|
| 183 |
+
checkformat_key(k2)
|
| 184 |
+
if type(k1) is not type(k2):
|
| 185 |
+
return False
|
| 186 |
+
return cls.to_bytes(k1) == cls.to_bytes(k2)
|
| 187 |
+
|
| 188 |
+
@classmethod # a class method for inheritors of this mix-in
|
| 189 |
+
def from_hex(cls, key_value_in_hex):
|
| 190 |
+
# from_private_bytes() and from_public_bytes() both check length (32),
|
| 191 |
+
# but do not produce helpful errors if the argument provided it is not
|
| 192 |
+
# the right type, so we'll do that here before calling them.
|
| 193 |
+
checkformat_hex_key(key_value_in_hex)
|
| 194 |
+
key_value_in_bytes = unhexlify(key_value_in_hex)
|
| 195 |
+
new_object = cls.from_bytes(key_value_in_bytes)
|
| 196 |
+
checkformat_key(new_object)
|
| 197 |
+
return new_object
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
class PrivateKey(MixinKey, ed25519.Ed25519PrivateKey):
|
| 201 |
+
"""
|
| 202 |
+
This class expands the class
|
| 203 |
+
cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PrivateKey
|
| 204 |
+
very slightly, adding some functionality from MixinKey.
|
| 205 |
+
|
| 206 |
+
Note on the sign() method:
|
| 207 |
+
We preserve Ed25519PrivateKey's sign method unchanged. The sign()
|
| 208 |
+
method is deterministic and does not depend at any point on the ability
|
| 209 |
+
to generate random data (unlike the key generation). The returned
|
| 210 |
+
value for sign() is a length 64 bytes() object, a raw ed25519
|
| 211 |
+
signature.
|
| 212 |
+
"""
|
| 213 |
+
|
| 214 |
+
@classmethod
|
| 215 |
+
def to_bytes(cls, key):
|
| 216 |
+
return key.private_bytes(
|
| 217 |
+
encoding=serialization.Encoding.Raw,
|
| 218 |
+
format=serialization.PrivateFormat.Raw,
|
| 219 |
+
encryption_algorithm=serialization.NoEncryption(),
|
| 220 |
+
)
|
| 221 |
+
|
| 222 |
+
@classmethod
|
| 223 |
+
def from_bytes(cls, key_value_in_bytes):
|
| 224 |
+
"""
|
| 225 |
+
Constructs an object of the class based on the given key value.
|
| 226 |
+
The "cryptography" library provides from_public_bytes() and
|
| 227 |
+
from_private_bytes() class methods for Ed25519PublicKey and
|
| 228 |
+
Ed25519PrivateKey classes in place of constructors. We extend provide
|
| 229 |
+
a single API for those, and make the created objects objects of the
|
| 230 |
+
subclass using this mix-in.
|
| 231 |
+
"""
|
| 232 |
+
# from_private_bytes() and from_public_bytes() both check length (32),
|
| 233 |
+
# but do not produce helpful errors if the argument provided it is not
|
| 234 |
+
# the right type, so we'll do that here before calling them.
|
| 235 |
+
checkformat_byteslike(key_value_in_bytes)
|
| 236 |
+
return super().from_private_bytes(key_value_in_bytes)
|
| 237 |
+
|
| 238 |
+
|
| 239 |
+
class PublicKey(MixinKey, ed25519.Ed25519PublicKey):
|
| 240 |
+
"""
|
| 241 |
+
This class expands the class
|
| 242 |
+
cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PublicKey
|
| 243 |
+
very slightly, adding some functionality from MixinKey.
|
| 244 |
+
|
| 245 |
+
We preserve Ed25519PublicKey's verify() method unchanged.
|
| 246 |
+
"""
|
| 247 |
+
|
| 248 |
+
@classmethod
|
| 249 |
+
def to_bytes(cls, key):
|
| 250 |
+
"""
|
| 251 |
+
Pops out the nice, tidy bytes of a given ed25519 key object, public or
|
| 252 |
+
private.
|
| 253 |
+
"""
|
| 254 |
+
return key.public_bytes(
|
| 255 |
+
serialization.Encoding.Raw, serialization.PublicFormat.Raw
|
| 256 |
+
)
|
| 257 |
+
|
| 258 |
+
@classmethod
|
| 259 |
+
def from_bytes(cls, key_value_in_bytes):
|
| 260 |
+
"""
|
| 261 |
+
Constructs an object of the class based on the given key value.
|
| 262 |
+
The "cryptography" library provides from_public_bytes() and
|
| 263 |
+
from_private_bytes() class methods for Ed25519PublicKey and
|
| 264 |
+
Ed25519PrivateKey classes in place of constructors. We extend provide
|
| 265 |
+
a single API for those, and make the created objects objects of the
|
| 266 |
+
subclass using this mix-in.
|
| 267 |
+
"""
|
| 268 |
+
# from_private_bytes() and from_public_bytes() both check length (32),
|
| 269 |
+
# but do not produce helpful errors if the argument provided it is not
|
| 270 |
+
# the right type, so we'll do that here before calling them.
|
| 271 |
+
checkformat_byteslike(key_value_in_bytes)
|
| 272 |
+
return super().from_public_bytes(key_value_in_bytes)
|
| 273 |
+
|
| 274 |
+
|
| 275 |
+
# No.... For now, I'll stick with the raw dictionary representations.
|
| 276 |
+
# If function profusion makes it inconvenient for folks to use this library,
|
| 277 |
+
# it MAY then be time to make signatures into class objects... but it's
|
| 278 |
+
# probably best to avoid that potential complexity and confusion.
|
| 279 |
+
# class Signature():
|
| 280 |
+
# def __init__(self, ):
|
| 281 |
+
# self.is_gpg_sig = False
|
| 282 |
+
|
| 283 |
+
|
| 284 |
+
# ✅ TODO: Consider a schema definitions module, e.g. PyPI project "schema"
|
| 285 |
+
def is_hex_string(hex_string: Any) -> bool:
|
| 286 |
+
"""
|
| 287 |
+
Returns True if hex is a hex string with no uppercase characters, no spaces,
|
| 288 |
+
etc. Else, False.
|
| 289 |
+
"""
|
| 290 |
+
try:
|
| 291 |
+
checkformat_hex_string(hex_string)
|
| 292 |
+
return True
|
| 293 |
+
except (ValueError, TypeError):
|
| 294 |
+
return False
|
| 295 |
+
|
| 296 |
+
|
| 297 |
+
HexString = str
|
| 298 |
+
|
| 299 |
+
|
| 300 |
+
def checkformat_hex_string(hex_string: Any) -> HexString:
|
| 301 |
+
"""
|
| 302 |
+
Throws TypeError if s is not a string.
|
| 303 |
+
Throws ValueError if the given string is not a string of hexadecimal
|
| 304 |
+
characters (upper-case not allowed to prevent redundancy).
|
| 305 |
+
"""
|
| 306 |
+
bytes.fromhex(hex_string)
|
| 307 |
+
# isalnum() checks for no whitespace which bytes.fromhex() would allow.
|
| 308 |
+
if not hex_string.isalnum() or hex_string.lower() != hex_string:
|
| 309 |
+
raise ValueError(
|
| 310 |
+
"Expected a hex string; non-hexadecimal or upper-case character found."
|
| 311 |
+
)
|
| 312 |
+
|
| 313 |
+
return hex_string
|
| 314 |
+
|
| 315 |
+
|
| 316 |
+
def is_hex_signature(hex_signature: Any) -> bool:
|
| 317 |
+
"""
|
| 318 |
+
Returns True if key is a hex string with no uppercase characters, no
|
| 319 |
+
spaces, no '0x' prefix(es), etc., and is 128 hexadecimal characters (the
|
| 320 |
+
correct length for an ed25519 signature, 64 bytes of raw data represented
|
| 321 |
+
as 128 hexadecimal characters).
|
| 322 |
+
Else, returns False.
|
| 323 |
+
"""
|
| 324 |
+
if is_hex_string(hex_signature) and len(hex_signature) == 128:
|
| 325 |
+
return True
|
| 326 |
+
|
| 327 |
+
return False
|
| 328 |
+
|
| 329 |
+
|
| 330 |
+
def is_hex_key(hex_key: Any) -> bool:
|
| 331 |
+
"""
|
| 332 |
+
Returns True if key is a hex string with no uppercase characters, no
|
| 333 |
+
spaces, no '0x' prefix(es), etc., and is 64 hexadecimal characters (the
|
| 334 |
+
correct length for an ed25519 key, 32 bytes of raw data represented as 64
|
| 335 |
+
hexadecimal characters).
|
| 336 |
+
Else, returns False.
|
| 337 |
+
"""
|
| 338 |
+
try:
|
| 339 |
+
checkformat_hex_key(hex_key)
|
| 340 |
+
return True
|
| 341 |
+
except (TypeError, ValueError):
|
| 342 |
+
return False
|
| 343 |
+
|
| 344 |
+
|
| 345 |
+
def is_signable(signable: Any) -> bool:
|
| 346 |
+
"""
|
| 347 |
+
Returns True if the given dictionary is a signable dictionary as produced
|
| 348 |
+
by wrap_as_signable. Note that there MUST be no additional elements beyond
|
| 349 |
+
'signed' and 'signable' in the dictionary. (The only data in the envelope
|
| 350 |
+
outside the signed portion of the data should be the signatures; what's
|
| 351 |
+
outside of 'signed' is under attacker control.)
|
| 352 |
+
"""
|
| 353 |
+
return (
|
| 354 |
+
isinstance(signable, dict)
|
| 355 |
+
and set(signable) == {"signatures", "signed"}
|
| 356 |
+
and isinstance(signable["signatures"], dict)
|
| 357 |
+
and type(signable["signed"]) in SUPPORTED_SERIALIZABLE_TYPES
|
| 358 |
+
)
|
| 359 |
+
|
| 360 |
+
|
| 361 |
+
Signable = dict
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
# TODO: ✅ Consolidate: switch to use of this wherever is_a_signable is called
|
| 365 |
+
# and then an error is raised if the result is False.
|
| 366 |
+
def checkformat_signable(signable: Any) -> Signable:
|
| 367 |
+
if not is_signable(signable):
|
| 368 |
+
raise TypeError(
|
| 369 |
+
"Expected a signable dictionary, but the given argument "
|
| 370 |
+
"does not match expectations for a signable dictionary "
|
| 371 |
+
'(must be a dictionary containing only keys "signatures" and '
|
| 372 |
+
'"signed", where the value for key "signatures" is a dict '
|
| 373 |
+
'and the value for key "signed" is a supported serializable '
|
| 374 |
+
"type (" + str(SUPPORTED_SERIALIZABLE_TYPES) + ")"
|
| 375 |
+
)
|
| 376 |
+
|
| 377 |
+
return signable
|
| 378 |
+
|
| 379 |
+
|
| 380 |
+
class BytesLike(Protocol):
|
| 381 |
+
def decode(self, *args, **kwargs) -> str:
|
| 382 |
+
...
|
| 383 |
+
|
| 384 |
+
|
| 385 |
+
def checkformat_byteslike(byteslike: Any) -> BytesLike:
|
| 386 |
+
if not hasattr(byteslike, "decode"):
|
| 387 |
+
raise TypeError("Expected a bytes-like object with a decode method.")
|
| 388 |
+
|
| 389 |
+
return byteslike
|
| 390 |
+
|
| 391 |
+
|
| 392 |
+
def checkformat_natural_int(natural_int: Any) -> int: # Annotated[int, ">= 1"]
|
| 393 |
+
# Technically a TypeError or ValueError, depending, but meh.
|
| 394 |
+
if int(natural_int) != natural_int or natural_int < 1:
|
| 395 |
+
raise ValueError("Expected an integer >= 1.")
|
| 396 |
+
|
| 397 |
+
return natural_int
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
# This is not yet widely used.
|
| 401 |
+
# TODO: ✅ See to it that anywhere we're checking for a string, we use this.
|
| 402 |
+
def checkformat_string(string: Any) -> str:
|
| 403 |
+
if not isinstance(string, str):
|
| 404 |
+
raise TypeError("Expecting a string")
|
| 405 |
+
|
| 406 |
+
return string
|
| 407 |
+
|
| 408 |
+
|
| 409 |
+
def checkformat_expiration_distance(expiration_distance: Any) -> timedelta:
|
| 410 |
+
if not isinstance(expiration_distance, timedelta):
|
| 411 |
+
raise TypeError(
|
| 412 |
+
"Expiration distance must be a datetime.timedelta object. "
|
| 413 |
+
"Instead received a " + str(type(expiration_distance))
|
| 414 |
+
)
|
| 415 |
+
|
| 416 |
+
return expiration_distance
|
| 417 |
+
|
| 418 |
+
|
| 419 |
+
HexKey = HexString # Annotated[HexString, "len() == 64"]
|
| 420 |
+
|
| 421 |
+
|
| 422 |
+
def checkformat_hex_key(hex_key: Any) -> HexKey:
|
| 423 |
+
checkformat_hex_string(hex_key)
|
| 424 |
+
|
| 425 |
+
if 64 != len(hex_key):
|
| 426 |
+
raise ValueError("Expected a 64-character hex string representing a key value.")
|
| 427 |
+
|
| 428 |
+
return hex_key
|
| 429 |
+
|
| 430 |
+
|
| 431 |
+
def checkformat_list_of_hex_keys(list_of_hex_keys: Any) -> list[HexKey]:
|
| 432 |
+
"""
|
| 433 |
+
Note that this rejects any list of keys that includes any exact duplicates.
|
| 434 |
+
"""
|
| 435 |
+
if not isinstance(list_of_hex_keys, list):
|
| 436 |
+
raise TypeError(
|
| 437 |
+
"Expected a list of 64-character hex strings representing keys."
|
| 438 |
+
)
|
| 439 |
+
|
| 440 |
+
for hex_key in list_of_hex_keys:
|
| 441 |
+
checkformat_hex_key(hex_key)
|
| 442 |
+
|
| 443 |
+
if len(set(list_of_hex_keys)) != len(list_of_hex_keys):
|
| 444 |
+
raise ValueError(
|
| 445 |
+
"The given list of keys in hex string form contains duplicates. "
|
| 446 |
+
"Duplicates are not permitted."
|
| 447 |
+
)
|
| 448 |
+
|
| 449 |
+
return list_of_hex_keys
|
| 450 |
+
|
| 451 |
+
|
| 452 |
+
def checkformat_utc_isoformat(date_string: Any) -> str:
|
| 453 |
+
try:
|
| 454 |
+
datetime.strptime(date_string, "%Y-%m-%dT%H:%M:%SZ")
|
| 455 |
+
except ValueError:
|
| 456 |
+
# ValueError: date_string does not match format '%Y-%m-%dT%H:%M:%SZ'
|
| 457 |
+
raise TypeError(
|
| 458 |
+
"The provided string appears not to be a datetime string "
|
| 459 |
+
"formatted as an ISO8601 UTC-specific datetime (e.g. "
|
| 460 |
+
'"1999-12-31T23:59:59Z").'
|
| 461 |
+
) from None
|
| 462 |
+
|
| 463 |
+
return date_string
|
| 464 |
+
|
| 465 |
+
|
| 466 |
+
def is_gpg_fingerprint(gpg_fingerprint: Any) -> bool:
|
| 467 |
+
"""
|
| 468 |
+
True if the given value is a hex string of length 40 (representing a
|
| 469 |
+
20-byte SHA-1 value, which is what OpenPGP/GPG uses as a key fingerprint).
|
| 470 |
+
"""
|
| 471 |
+
try:
|
| 472 |
+
checkformat_gpg_fingerprint(gpg_fingerprint)
|
| 473 |
+
return True
|
| 474 |
+
except (TypeError, ValueError):
|
| 475 |
+
return False
|
| 476 |
+
|
| 477 |
+
|
| 478 |
+
GPGFingerprint = HexKey # Annotated[HexKey, "len()==40"]
|
| 479 |
+
|
| 480 |
+
|
| 481 |
+
def checkformat_gpg_fingerprint(gpg_fingerprint: Any) -> GPGFingerprint:
|
| 482 |
+
"""
|
| 483 |
+
See is_gpg_fingerprint. Raises a TypeError if is_gpg_fingerprint is not
|
| 484 |
+
True.
|
| 485 |
+
"""
|
| 486 |
+
if len(gpg_fingerprint) != 40:
|
| 487 |
+
raise ValueError(
|
| 488 |
+
'The given value, "' + str(gpg_fingerprint) + '", is not a full '
|
| 489 |
+
"GPG fingerprint (40 hex characters)."
|
| 490 |
+
)
|
| 491 |
+
|
| 492 |
+
# ⚠️ Yes, the following is a redundant test. Please leave it here in case
|
| 493 |
+
# code changes elsewhere.
|
| 494 |
+
# Prevent multiple possible representations of keys. There are security
|
| 495 |
+
# implications. For example, we cannot permit two signatures from the
|
| 496 |
+
# same key -- with the key represented differently -- to count as two
|
| 497 |
+
# signatures from distinct keys.
|
| 498 |
+
# local hex test. isalnum() checks for no whitespace.
|
| 499 |
+
bytes.fromhex(gpg_fingerprint)
|
| 500 |
+
if not gpg_fingerprint.isalnum() or gpg_fingerprint.lower() != gpg_fingerprint:
|
| 501 |
+
raise ValueError(
|
| 502 |
+
"Expected a hex string; non-hexadecimal or upper-case character found."
|
| 503 |
+
)
|
| 504 |
+
|
| 505 |
+
return gpg_fingerprint
|
| 506 |
+
|
| 507 |
+
|
| 508 |
+
def is_gpg_signature(gpg_signature: Any) -> bool:
|
| 509 |
+
# TODO: ✅ docstring based on docstring from checkformat_gpg_signature
|
| 510 |
+
|
| 511 |
+
try:
|
| 512 |
+
checkformat_gpg_signature(gpg_signature)
|
| 513 |
+
return True
|
| 514 |
+
except (ValueError, TypeError):
|
| 515 |
+
return False
|
| 516 |
+
|
| 517 |
+
|
| 518 |
+
GPGSignature = dict
|
| 519 |
+
|
| 520 |
+
|
| 521 |
+
def checkformat_gpg_signature(gpg_signature: Any) -> GPGSignature:
|
| 522 |
+
"""
|
| 523 |
+
Raises a TypeError if the given object is not a dictionary representing a
|
| 524 |
+
signature in a format that we expect.
|
| 525 |
+
|
| 526 |
+
This is similar to BUT NOT THE SAME AS that produced by
|
| 527 |
+
securesystemslib.gpg.functions.create_signature(), conforming to
|
| 528 |
+
securesystemslib.formats.GPG_SIGNATURE_SCHEMA.
|
| 529 |
+
|
| 530 |
+
We use a slightly different format in order to include the raw ed25519
|
| 531 |
+
public key value. This is the format we expect for Root signatures.
|
| 532 |
+
|
| 533 |
+
If the given object matches the format, returns silently.
|
| 534 |
+
"""
|
| 535 |
+
if not isinstance(gpg_signature, dict):
|
| 536 |
+
raise TypeError(
|
| 537 |
+
"OpenPGP signatures objects must be dictionaries. Received "
|
| 538 |
+
"type " + str(type(gpg_signature)) + " instead."
|
| 539 |
+
)
|
| 540 |
+
|
| 541 |
+
if sorted(list(gpg_signature.keys())) not in [
|
| 542 |
+
["other_headers", "signature"],
|
| 543 |
+
["other_headers", "see_also", "signature"],
|
| 544 |
+
]:
|
| 545 |
+
raise ValueError(
|
| 546 |
+
'OpenPGP signature objects must include a "signature" and an '
|
| 547 |
+
'"other_headers" entry, and may include a "see_also" entry. No '
|
| 548 |
+
"other entries are permitted."
|
| 549 |
+
)
|
| 550 |
+
|
| 551 |
+
if not is_hex_string(gpg_signature["other_headers"]):
|
| 552 |
+
raise ValueError(
|
| 553 |
+
'"other_headers" entry in OpenPGP signature object must be a ' "hex string."
|
| 554 |
+
)
|
| 555 |
+
# TODO ✅: Determine if we can constrain "other_headers" beyond
|
| 556 |
+
# limiting it to a hex string. (No length constraint is
|
| 557 |
+
# provided here, for example.)
|
| 558 |
+
|
| 559 |
+
if not is_hex_signature(gpg_signature["signature"]):
|
| 560 |
+
raise ValueError(
|
| 561 |
+
'"signature" entry in OpenPGP signature obj must be a hex '
|
| 562 |
+
"string representing an ed25519 signature, 128 hex characters "
|
| 563 |
+
"representing 64 bytes of data."
|
| 564 |
+
)
|
| 565 |
+
|
| 566 |
+
if "see_also" in gpg_signature:
|
| 567 |
+
checkformat_gpg_fingerprint(gpg_signature["see_also"])
|
| 568 |
+
|
| 569 |
+
return gpg_signature
|
| 570 |
+
|
| 571 |
+
|
| 572 |
+
def is_signature(signature: Any) -> bool:
|
| 573 |
+
"""
|
| 574 |
+
Returns True if signature_obj is a dictionary representing an ed25519
|
| 575 |
+
signature, either in the conda-content-trust normal format, or
|
| 576 |
+
the format for a GPG signature.
|
| 577 |
+
|
| 578 |
+
See conda_content_trust.common.checkformat_signature() docstring for more details.
|
| 579 |
+
"""
|
| 580 |
+
try:
|
| 581 |
+
checkformat_signature(signature)
|
| 582 |
+
return True
|
| 583 |
+
except (TypeError, ValueError):
|
| 584 |
+
return False
|
| 585 |
+
|
| 586 |
+
|
| 587 |
+
Signature = dict
|
| 588 |
+
|
| 589 |
+
|
| 590 |
+
def checkformat_signature(signature: Any) -> Signature:
|
| 591 |
+
"""
|
| 592 |
+
Raises a TypeError if the given object is not a dictionary.
|
| 593 |
+
Raises a ValueError if the given object is a dictionary, but is not in
|
| 594 |
+
our generalized signature format (supports both raw ed25519 signatures
|
| 595 |
+
OpenPGP/GPG signatures).
|
| 596 |
+
|
| 597 |
+
If the given object matches the format, returns silently.
|
| 598 |
+
|
| 599 |
+
The generalized signature format is:
|
| 600 |
+
{
|
| 601 |
+
(REQUIRED) 'signature': <64-byte value ed25519 signature, as 128 hex chars>,
|
| 602 |
+
(GPG SIGS ONLY) 'other_headers': <hex string of irrelevant OpenPGP data hashed in the signature digest>,
|
| 603 |
+
(OPTIONAL) 'see_also': <40-hex-character SHA1 OpenPGP/GPG key identifier, for diagnostic purposes>
|
| 604 |
+
}
|
| 605 |
+
Examples:
|
| 606 |
+
{ 'signature': 'deadbeef'*32} # normal ed25519 signature (no OpenPGP)
|
| 607 |
+
|
| 608 |
+
{ 'signature': 'deadbeef'*32, # OpenPGP ed25519 signature
|
| 609 |
+
'other_headers': 'deadbeef'*??} # extra info OpenPGP insists on signing over
|
| 610 |
+
|
| 611 |
+
{ 'signature': 'deadbeef'*32, # OpenPGP ed25519 signature
|
| 612 |
+
'other_headers': 'deadbeef'*??,
|
| 613 |
+
'see_also': 'deadbeef'*10}} # listing an OpenPGP key fingerprint
|
| 614 |
+
"""
|
| 615 |
+
if not isinstance(signature, dict):
|
| 616 |
+
raise TypeError("Expected a signature object, of type dict.")
|
| 617 |
+
elif not ("signature" in signature and is_hex_signature(signature["signature"])):
|
| 618 |
+
# Even the minimal required element is not correct, so...
|
| 619 |
+
raise ValueError(
|
| 620 |
+
"Expected a dictionary representing an ed25519 signature as a "
|
| 621 |
+
"128-character hex string. This requires at least key "
|
| 622 |
+
'"signature", with value a 128-character hexadecimal string '
|
| 623 |
+
"representing a (64-byte) ed25519 signature."
|
| 624 |
+
)
|
| 625 |
+
|
| 626 |
+
# simple ed25519 signature, not an OpenPGP signature
|
| 627 |
+
elif len(signature) == 1:
|
| 628 |
+
# If this is a simple ed25519 signature, and not an OpenPGP/GPG
|
| 629 |
+
# signature, then we're all set, since 'signature' is included and
|
| 630 |
+
# has a reasonable value.
|
| 631 |
+
return signature
|
| 632 |
+
|
| 633 |
+
# Permit an OpenPGP (GPG / RFC 4880) signature noted as defined in
|
| 634 |
+
# function is_gpg_signature.
|
| 635 |
+
elif is_gpg_signature(signature):
|
| 636 |
+
return signature
|
| 637 |
+
|
| 638 |
+
else:
|
| 639 |
+
raise ValueError(
|
| 640 |
+
"Provided signature does not have the correct format for a "
|
| 641 |
+
"signature object (neither simple ed25519 sig nor OpenPGP "
|
| 642 |
+
"ed25519 sig)."
|
| 643 |
+
)
|
| 644 |
+
|
| 645 |
+
|
| 646 |
+
Delegation = dict
|
| 647 |
+
|
| 648 |
+
|
| 649 |
+
def checkformat_delegation(delegation: Any) -> Delegation:
|
| 650 |
+
"""
|
| 651 |
+
A dictionary specifying public key values and threshold of keys
|
| 652 |
+
e.g.
|
| 653 |
+
{ 'pubkeys': ['ff'*32, '1e'*32],
|
| 654 |
+
'threshold': 1}
|
| 655 |
+
threshold must be an integer >= 1. pubkeys must be a list of hexadecimal
|
| 656 |
+
representations of ed25519 public keys.
|
| 657 |
+
|
| 658 |
+
Note that because drafts are allowed, we do not demand here that the list
|
| 659 |
+
of pubkeys include enough keys to meet threshold. Not listing pubkeys yet
|
| 660 |
+
is okay during writing, but when verifying metadata, one should not accept
|
| 661 |
+
delegations with impossible-to-meet requirements (len(pubkeys) < threshold)
|
| 662 |
+
"""
|
| 663 |
+
if not isinstance(delegation, dict):
|
| 664 |
+
raise TypeError(
|
| 665 |
+
"Delegation information must be a dictionary specifying "
|
| 666 |
+
'"pubkeys" and "threshold" elements.'
|
| 667 |
+
)
|
| 668 |
+
elif not (
|
| 669 |
+
set(delegation) == {"threshold", "pubkeys"}
|
| 670 |
+
and delegation["threshold"] >= 1
|
| 671 |
+
and isinstance(delegation["pubkeys"], list)
|
| 672 |
+
and all([is_hex_key(k) for k in delegation["pubkeys"]])
|
| 673 |
+
):
|
| 674 |
+
raise ValueError(
|
| 675 |
+
"Delegation information must be a dictionary specifying "
|
| 676 |
+
'exactly two elements: "pubkeys" (assigned a list of '
|
| 677 |
+
"64-character hex strings representing individual ed25519 "
|
| 678 |
+
'public keys) and "threshold", assigned an integer >= 1.'
|
| 679 |
+
)
|
| 680 |
+
|
| 681 |
+
# We have the right type, and the right keys. Check the values.
|
| 682 |
+
checkformat_list_of_hex_keys(delegation["pubkeys"])
|
| 683 |
+
checkformat_natural_int(delegation["threshold"])
|
| 684 |
+
|
| 685 |
+
return delegation
|
| 686 |
+
|
| 687 |
+
|
| 688 |
+
def checkformat_delegations(delegations: Any) -> dict[str, Delegation]:
|
| 689 |
+
"""
|
| 690 |
+
A dictionary specifying a delegation for any number of role names.
|
| 691 |
+
Index: rolename. Value: delegation (see checkformat_delegation).
|
| 692 |
+
e.g.
|
| 693 |
+
{ 'root.json':
|
| 694 |
+
{'pubkeys': ['01'*32, '02'*32, '03'*32], # each is a lower-case hex string w/ length 64
|
| 695 |
+
'threshold': 2}, # integer >= 1
|
| 696 |
+
'channeler.json':
|
| 697 |
+
{'pubkeys': ['04'*32], 'threshold': 1}}
|
| 698 |
+
"""
|
| 699 |
+
if not isinstance(delegations, dict):
|
| 700 |
+
raise TypeError(
|
| 701 |
+
'"Delegations" information must be a dictionary indexed by '
|
| 702 |
+
"role names, with values equal to dictionaries that each "
|
| 703 |
+
'specify elements "pubkeys" and "threshold".'
|
| 704 |
+
)
|
| 705 |
+
|
| 706 |
+
for index in delegations:
|
| 707 |
+
checkformat_string(index)
|
| 708 |
+
checkformat_delegation(delegations[index])
|
| 709 |
+
|
| 710 |
+
return delegations
|
| 711 |
+
|
| 712 |
+
|
| 713 |
+
DelegatingMetadata = Signable
|
| 714 |
+
|
| 715 |
+
|
| 716 |
+
def checkformat_delegating_metadata(metadata: Any) -> DelegatingMetadata:
|
| 717 |
+
"""
|
| 718 |
+
Validates argument "metadata" as delegating metadata. Passes if it is,
|
| 719 |
+
raises a TypeError or ValueError if it is not.
|
| 720 |
+
|
| 721 |
+
The required format is a dictionary containing all contents of a delegating
|
| 722 |
+
metadata file, like root.json or key_mgr.json. (This includes both the
|
| 723 |
+
signatures portion and the signed contents portion, in the usual envelope
|
| 724 |
+
-- see also checkformat_signable.)
|
| 725 |
+
|
| 726 |
+
The required structure:
|
| 727 |
+
{
|
| 728 |
+
'signatures': {}, # for each entry in the 'signatures' dict:
|
| 729 |
+
# - the key must pass checkformat_hex_key
|
| 730 |
+
# - the value must pass checkformat_signature()
|
| 731 |
+
# or checkformat_gpg_signature()
|
| 732 |
+
'signed': {
|
| 733 |
+
'type': <type>: # must match a string in SUPPORTED_DELEGATING_METADATA_TYPES (e.g. 'root')
|
| 734 |
+
'metadata_spec_version': <SemVer string>,
|
| 735 |
+
'delegations': {}, # value must pass checkformat_delegations()
|
| 736 |
+
'expiration': <date>, # date must pass checkformat_utc_isoformat()
|
| 737 |
+
|
| 738 |
+
# The 'signed' dict must always include either a 'timestamp' entry,
|
| 739 |
+
# a 'version' entry, or both. Further, in root metadata the
|
| 740 |
+
# 'signed' dict must always include a 'version' entry (to support
|
| 741 |
+
# root chaining).
|
| 742 |
+
|
| 743 |
+
'timestamp': <date>, # if included, must pass checkformat_utc_isoformat()
|
| 744 |
+
'version': <integer> # if included, must pass checkformat_natural_int(), i.e. be an integer >= 1
|
| 745 |
+
}
|
| 746 |
+
}
|
| 747 |
+
|
| 748 |
+
e.g.
|
| 749 |
+
{
|
| 750 |
+
"signatures": { # 0 or more signatures over the signed contents
|
| 751 |
+
<public key>: {
|
| 752 |
+
"other_headers": "04001608001d162104f075dd2f6f4cb3bd76134bbb81b6ca16ef9cd58905025f0bf546",
|
| 753 |
+
"signature": "ab3e03385f757da74e08b46f1bf82709fbc2ce21823c28e2f0e3452415e2a9f1e2c82e418cc44e2908618cf0c7375f32fe0a5a75494909a59a82875ebc703c02",
|
| 754 |
+
},
|
| 755 |
+
...
|
| 756 |
+
},
|
| 757 |
+
"signed": { # signed contents
|
| 758 |
+
"delegations": {
|
| 759 |
+
"key_mgr.json": {
|
| 760 |
+
"pubkeys": [
|
| 761 |
+
"013ddd714962866d12ba5bae273f14d48c89cf0773dee2dbf6d4561e521c83f7"
|
| 762 |
+
],
|
| 763 |
+
"threshold": 1
|
| 764 |
+
},
|
| 765 |
+
"root.json": {
|
| 766 |
+
"pubkeys": [
|
| 767 |
+
"bfbeb6554fca9558da7aa05c5e9952b7a1aa3995dede93f3bb89f0abecc7dc07"
|
| 768 |
+
],
|
| 769 |
+
"threshold": 1
|
| 770 |
+
}
|
| 771 |
+
},
|
| 772 |
+
"expiration": "2021-07-13T05:46:45Z",
|
| 773 |
+
"metadata_spec_version": "0.1.0",
|
| 774 |
+
"timestamp": "2020-07-13T05:46:45Z",
|
| 775 |
+
"type": "root",
|
| 776 |
+
"version": 1
|
| 777 |
+
}
|
| 778 |
+
}
|
| 779 |
+
"""
|
| 780 |
+
# Signing envelope required
|
| 781 |
+
checkformat_signable(metadata)
|
| 782 |
+
|
| 783 |
+
for k in metadata["signatures"]:
|
| 784 |
+
checkformat_any_signature(metadata["signatures"][k])
|
| 785 |
+
|
| 786 |
+
contents = metadata["signed"]
|
| 787 |
+
|
| 788 |
+
for entry in [ # required fields
|
| 789 |
+
"type",
|
| 790 |
+
"metadata_spec_version",
|
| 791 |
+
"delegations",
|
| 792 |
+
"expiration",
|
| 793 |
+
]:
|
| 794 |
+
if entry not in contents:
|
| 795 |
+
raise ValueError(
|
| 796 |
+
'Expected a "' + str(entry) + '" entry in the given '
|
| 797 |
+
"delegating metadata."
|
| 798 |
+
)
|
| 799 |
+
|
| 800 |
+
checkformat_string(contents["type"])
|
| 801 |
+
if contents["type"] not in SUPPORTED_DELEGATING_METADATA_TYPES:
|
| 802 |
+
raise ValueError(
|
| 803 |
+
'Given type entry ("' + contents["type"] + '") is not '
|
| 804 |
+
"one of the supported types of delegating metadata."
|
| 805 |
+
)
|
| 806 |
+
|
| 807 |
+
checkformat_string(contents["metadata_spec_version"])
|
| 808 |
+
# TODO ✅⚠️: For metadata_spec_version, add semantic versioning checks:
|
| 809 |
+
# - check format
|
| 810 |
+
# - check for compatibility with common.SECURITY_METADATA_SPEC_VERSION
|
| 811 |
+
|
| 812 |
+
checkformat_delegations(contents["delegations"])
|
| 813 |
+
|
| 814 |
+
checkformat_utc_isoformat(contents["expiration"])
|
| 815 |
+
|
| 816 |
+
# Timestamp and/or Version:
|
| 817 |
+
if "timestamp" not in contents and "version" not in contents:
|
| 818 |
+
raise ValueError(
|
| 819 |
+
'All metadata must include a "version" entry, or a '
|
| 820 |
+
'"timestamp" entry, or both.'
|
| 821 |
+
)
|
| 822 |
+
|
| 823 |
+
if contents["type"] == "root" and "version" not in contents:
|
| 824 |
+
raise ValueError("Root metadata must specify its version number.")
|
| 825 |
+
# Catch a possible future coding error at the PR stage, here where the
|
| 826 |
+
# assumption is being made.
|
| 827 |
+
assert "root" in SUPPORTED_DELEGATING_METADATA_TYPES
|
| 828 |
+
|
| 829 |
+
if "timestamp" in contents:
|
| 830 |
+
checkformat_utc_isoformat(contents["timestamp"])
|
| 831 |
+
if "version" in contents: # optional field for non-root metadata
|
| 832 |
+
checkformat_natural_int(contents["version"])
|
| 833 |
+
# TODO ✅: Ensure that expiration > timestamp, to help people not shoot
|
| 834 |
+
# themselves in the foot.
|
| 835 |
+
|
| 836 |
+
|
| 837 |
+
def checkformat_any_signature(signature: Any) -> Signature | GPGSignature:
|
| 838 |
+
if not is_signature(signature) and not is_gpg_signature(signature):
|
| 839 |
+
raise ValueError(
|
| 840 |
+
"Expected either a hex string representing a raw ed25519 "
|
| 841 |
+
"signature (see checkformat_signature) or a dictionary "
|
| 842 |
+
"representing an OpenPGP/GPG signature "
|
| 843 |
+
"(see checkformat_gpg_signature)."
|
| 844 |
+
)
|
| 845 |
+
|
| 846 |
+
return signature
|
| 847 |
+
|
| 848 |
+
|
| 849 |
+
def keyfiles_to_bytes(name):
|
| 850 |
+
"""
|
| 851 |
+
Toy function. Import an ed25519 key pair, in the forms of raw public and
|
| 852 |
+
raw private keys, from name.pub and name.pri respectively.
|
| 853 |
+
|
| 854 |
+
Cavalier about private key bytes.
|
| 855 |
+
Does not perform input validation ('/'...).
|
| 856 |
+
|
| 857 |
+
Return the 32 bytes of the private key object and the 32 bytes of the
|
| 858 |
+
public key object, in that order.
|
| 859 |
+
"""
|
| 860 |
+
with open(name + ".pri", "rb") as fobj:
|
| 861 |
+
private_bytes = fobj.read()
|
| 862 |
+
|
| 863 |
+
with open(name + ".pub", "rb") as fobj:
|
| 864 |
+
public_bytes = fobj.read()
|
| 865 |
+
|
| 866 |
+
return private_bytes, public_bytes
|
| 867 |
+
|
| 868 |
+
|
| 869 |
+
def keyfiles_to_keys(name):
|
| 870 |
+
"""
|
| 871 |
+
Doesn't perform input validation.
|
| 872 |
+
Import an ed25519 key pair, in the forms of raw public key
|
| 873 |
+
bytes and raw private key bytes, from name.pub and name.pri respectively.
|
| 874 |
+
Cavalier about private key bytes.
|
| 875 |
+
Return a private key object and public key object, in that order.
|
| 876 |
+
"""
|
| 877 |
+
private_bytes, public_bytes = keyfiles_to_bytes(name)
|
| 878 |
+
|
| 879 |
+
private = PrivateKey.from_bytes(private_bytes)
|
| 880 |
+
public = PublicKey.from_bytes(public_bytes)
|
| 881 |
+
|
| 882 |
+
return private, public
|
| 883 |
+
|
| 884 |
+
|
| 885 |
+
def checkformat_key(key: Any) -> ed25519.Ed25519PublicKey | ed25519.Ed25519PrivateKey:
|
| 886 |
+
"""
|
| 887 |
+
Enforces expectation that argument is an object of type
|
| 888 |
+
cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PublicKey or
|
| 889 |
+
cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PrivateKey.
|
| 890 |
+
"""
|
| 891 |
+
if not isinstance(key, (ed25519.Ed25519PublicKey, ed25519.Ed25519PrivateKey)):
|
| 892 |
+
raise TypeError(
|
| 893 |
+
"Expected an Ed25519PublicKey or Ed25519PrivateKey object "
|
| 894 |
+
'from the "cryptography" library. Received object of type '
|
| 895 |
+
+ str(type(key))
|
| 896 |
+
+ " instead."
|
| 897 |
+
)
|
| 898 |
+
|
| 899 |
+
return key
|
| 900 |
+
|
| 901 |
+
|
| 902 |
+
def iso8601_time_plus_delta(delta):
|
| 903 |
+
"""
|
| 904 |
+
Applies a datetime.timedelta to the current time in UTC with microseconds
|
| 905 |
+
stripped, then converts to ISO8601 format and appends a 'Z' indicating that
|
| 906 |
+
it is UTC time, not local time. We only deal with UTC times!
|
| 907 |
+
|
| 908 |
+
This is used for two purposes:
|
| 909 |
+
- get current time in ISO8601 format, by passing in a 0 timedelta
|
| 910 |
+
- get ISO8601 UTC timestamp for expiration dates
|
| 911 |
+
|
| 912 |
+
regex for time: '^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$'
|
| 913 |
+
"""
|
| 914 |
+
checkformat_expiration_distance(delta)
|
| 915 |
+
|
| 916 |
+
unix_expiry = datetime.utcnow().replace(microsecond=0) + delta
|
| 917 |
+
|
| 918 |
+
return unix_expiry.isoformat() + "Z"
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2019 Anaconda, Inc
|
| 2 |
+
# SPDX-License-Identifier: BSD-3-Clause
|
| 3 |
+
"""
|
| 4 |
+
This module contains functions that construct metadata and generate signing
|
| 5 |
+
keys.
|
| 6 |
+
|
| 7 |
+
Function Manifest for this Module
|
| 8 |
+
|
| 9 |
+
Key Creation:
|
| 10 |
+
gen_keys
|
| 11 |
+
gen_and_write_keys
|
| 12 |
+
|
| 13 |
+
Metadata Construction:
|
| 14 |
+
build_delegating_metadata
|
| 15 |
+
build_root_metadata (wraps build_delegating_metadata)
|
| 16 |
+
"""
|
| 17 |
+
from datetime import timedelta
|
| 18 |
+
|
| 19 |
+
from .common import (
|
| 20 |
+
SECURITY_METADATA_SPEC_VERSION,
|
| 21 |
+
PrivateKey,
|
| 22 |
+
PublicKey,
|
| 23 |
+
checkformat_delegations,
|
| 24 |
+
checkformat_natural_int,
|
| 25 |
+
checkformat_string,
|
| 26 |
+
checkformat_utc_isoformat,
|
| 27 |
+
iso8601_time_plus_delta,
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
+
# Default expiration distance for repodata_verify.json.
|
| 31 |
+
REPODATA_VERIF_MD_EXPIRY_DISTANCE = timedelta(days=31)
|
| 32 |
+
ROOT_MD_EXPIRY_DISTANCE = timedelta(days=365)
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
def build_delegating_metadata(
|
| 36 |
+
metadata_type, delegations=None, version=1, timestamp=None, expiration=None
|
| 37 |
+
):
|
| 38 |
+
"""
|
| 39 |
+
# ✅ TODO: Docstring
|
| 40 |
+
|
| 41 |
+
Builds delegating metadata, e.g. root.json, key_mgr.json.
|
| 42 |
+
|
| 43 |
+
See metadata specification at:
|
| 44 |
+
anaconda.atlassian.net/wiki/spaces/AD/pages/285147281/Conda+Security+Metadata+Specification
|
| 45 |
+
|
| 46 |
+
Arguments:
|
| 47 |
+
metadata_type:
|
| 48 |
+
The type of this metadata (e.g. root or key_mgr). This should
|
| 49 |
+
match the intended filename (without .json)
|
| 50 |
+
|
| 51 |
+
delegations (default {} )
|
| 52 |
+
a dictionary defining the delegations this metadata makes.
|
| 53 |
+
Each key is the role delegated to, with the value equal to a
|
| 54 |
+
dictionary listing the acceptable public keys and threshold
|
| 55 |
+
(number of signatures from distinct acceptable public keys) for the
|
| 56 |
+
delegated role. e.g.
|
| 57 |
+
{ 'root.json':
|
| 58 |
+
{'pubkeys': ['01'*32, '02'*32, '03'*32], 'threshold': 2},
|
| 59 |
+
'key_mgr.json':
|
| 60 |
+
{'pubkeys': ['04'*32], 'threshold': 1}}
|
| 61 |
+
|
| 62 |
+
If not provided, an empty dictionary (no delegations) will be used.
|
| 63 |
+
|
| 64 |
+
version (default 1)
|
| 65 |
+
the version of the metadata; root metadata must advance one version
|
| 66 |
+
at a time (root chaining). For other types of metadata, versions
|
| 67 |
+
are advisory.
|
| 68 |
+
|
| 69 |
+
timestamp (default: current system time)
|
| 70 |
+
UTC time associated with the production of this metadata, in
|
| 71 |
+
ISO8601 format (e.g. '2020-10-31T14:45:19Z')
|
| 72 |
+
|
| 73 |
+
expiration (default: current system time plus ROOT_MD_EXPIRY_DISTANCE)
|
| 74 |
+
UTC time beyond which this metadata should be considered expired
|
| 75 |
+
and not verifiable by any client seeking new metadata
|
| 76 |
+
"""
|
| 77 |
+
|
| 78 |
+
# Handle optional args
|
| 79 |
+
if delegations is None:
|
| 80 |
+
delegations = {}
|
| 81 |
+
if timestamp is None:
|
| 82 |
+
timestamp = iso8601_time_plus_delta(timedelta(0)) # now plus 0
|
| 83 |
+
if expiration is None:
|
| 84 |
+
expiration = iso8601_time_plus_delta(ROOT_MD_EXPIRY_DISTANCE)
|
| 85 |
+
|
| 86 |
+
# Argument validation. Note that this (checkformat_delegations) also
|
| 87 |
+
# checks for duplicates in lists of keys, which is important to reduce the
|
| 88 |
+
# odds of a developer introducing certain bugs that cause security issues
|
| 89 |
+
# (multiple signatures from same key being treated as two unique sigs,
|
| 90 |
+
# etc.)
|
| 91 |
+
checkformat_string(metadata_type)
|
| 92 |
+
# TODO: ✅⚠️ Consider a set of acceptable metadata types (root, key_mgr,
|
| 93 |
+
# channel_authority). Have to be careful about backward
|
| 94 |
+
# compatibility, though....
|
| 95 |
+
checkformat_utc_isoformat(timestamp)
|
| 96 |
+
checkformat_utc_isoformat(expiration)
|
| 97 |
+
checkformat_natural_int(version)
|
| 98 |
+
checkformat_delegations(delegations)
|
| 99 |
+
|
| 100 |
+
md = {
|
| 101 |
+
"type": metadata_type,
|
| 102 |
+
"version": version,
|
| 103 |
+
"metadata_spec_version": SECURITY_METADATA_SPEC_VERSION,
|
| 104 |
+
"timestamp": timestamp,
|
| 105 |
+
"expiration": expiration,
|
| 106 |
+
"delegations": delegations,
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
# # This very redundant, but might be useful as defensive code.
|
| 110 |
+
# checkformat_delegating_metadata(wrap_as_signable(md)
|
| 111 |
+
|
| 112 |
+
return md
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
def build_root_metadata(
|
| 116 |
+
root_version,
|
| 117 |
+
root_pubkeys,
|
| 118 |
+
root_threshold,
|
| 119 |
+
key_mgr_pubkeys,
|
| 120 |
+
key_mgr_threshold,
|
| 121 |
+
root_timestamp=None,
|
| 122 |
+
root_expiration=None,
|
| 123 |
+
):
|
| 124 |
+
"""
|
| 125 |
+
Wrapper for build_delegating_metadata(). Helpfully requires root to list
|
| 126 |
+
itself and key_mgr in its delegations.
|
| 127 |
+
|
| 128 |
+
# ✅ TODO: Docstring
|
| 129 |
+
|
| 130 |
+
# ✅ TODO: Expand build_root_metadata flexibility for
|
| 131 |
+
# directly-root-delegated roles (i.e. in addition to channeler).
|
| 132 |
+
"""
|
| 133 |
+
|
| 134 |
+
# Note that argument validation is performed in the
|
| 135 |
+
# build_delegation_metadata call below. So is some of the optional
|
| 136 |
+
# argument default setting (timestamp). We set expiration explicitly here
|
| 137 |
+
# in case the defaults for generic delegating metadata and root metadata
|
| 138 |
+
# diverge later.
|
| 139 |
+
# Note that it is probably best to provide less revealing timestamps for
|
| 140 |
+
# root metadata generation (00:00:00 of a past day), since it is a manual
|
| 141 |
+
# process and patterns in that information might be somewhat useful to a
|
| 142 |
+
# sophisticated attacker.
|
| 143 |
+
if root_expiration is None:
|
| 144 |
+
root_expiration = iso8601_time_plus_delta(ROOT_MD_EXPIRY_DISTANCE)
|
| 145 |
+
# if channeler_pubkeys is None:
|
| 146 |
+
# channeler_pubkeys = []
|
| 147 |
+
# if channeler_threshold = None:
|
| 148 |
+
# channeler_threshold = max(1, len(channeler_pubkeys))
|
| 149 |
+
|
| 150 |
+
delegations = {
|
| 151 |
+
"root": {"pubkeys": root_pubkeys, "threshold": root_threshold},
|
| 152 |
+
"key_mgr": {"pubkeys": key_mgr_pubkeys, "threshold": key_mgr_threshold},
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
root_md = build_delegating_metadata(
|
| 156 |
+
metadata_type="root",
|
| 157 |
+
delegations=delegations,
|
| 158 |
+
version=root_version,
|
| 159 |
+
timestamp=root_timestamp,
|
| 160 |
+
expiration=root_expiration,
|
| 161 |
+
)
|
| 162 |
+
|
| 163 |
+
return root_md
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
def gen_and_write_keys(fname):
|
| 167 |
+
"""
|
| 168 |
+
Generate an ed25519 key pair, then write the key files to disk.
|
| 169 |
+
|
| 170 |
+
Given fname, write the private key to fname.pri, and the public key to
|
| 171 |
+
fname.pub. Performs no filename validation, etc. Also returns the private
|
| 172 |
+
key object and the public key object, in that order.
|
| 173 |
+
"""
|
| 174 |
+
|
| 175 |
+
# Create an ed25519 key pair, employing OS random generation.
|
| 176 |
+
# Note that this just has the private key sitting around. In the real
|
| 177 |
+
# implementation, we'll want to use an HSM equipped with an ed25519 key.
|
| 178 |
+
private, public = gen_keys()
|
| 179 |
+
|
| 180 |
+
# Write the actual bytes of the key values to disk as requested.
|
| 181 |
+
# Note that where the private key is concerned, we're just grabbing the
|
| 182 |
+
# not-encrypted private key value.
|
| 183 |
+
with open(fname + ".pri", "wb") as fobj:
|
| 184 |
+
fobj.write(PrivateKey.to_bytes(private))
|
| 185 |
+
with open(fname + ".pub", "wb") as fobj:
|
| 186 |
+
fobj.write(PublicKey.to_bytes(public))
|
| 187 |
+
|
| 188 |
+
return private, public
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
def gen_keys():
|
| 192 |
+
"""
|
| 193 |
+
Generate an ed25519 key pair and return it (private key, public key).
|
| 194 |
+
|
| 195 |
+
Returns two objects:
|
| 196 |
+
- a conda_content_trust.common.PrivateKey, a subclass of
|
| 197 |
+
cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PrivateKey
|
| 198 |
+
- a conda_content_trust.common.PublicKey, a subclass of
|
| 199 |
+
cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PublicKey
|
| 200 |
+
"""
|
| 201 |
+
# Create an ed25519 key pair, employing OS random generation.
|
| 202 |
+
# Note that this just has the private key sitting around. In the real
|
| 203 |
+
# implementation, we'll want to use an HSM equipped with an ed25519 key.
|
| 204 |
+
private = PrivateKey.generate()
|
| 205 |
+
public = private.public_key()
|
| 206 |
+
|
| 207 |
+
return private, public
|
| 208 |
+
|
| 209 |
+
|
| 210 |
+
# This function is not in use. It's here for reference, in case it's useful
|
| 211 |
+
# again in the future.
|
| 212 |
+
# def build_repodata_verification_metadata(
|
| 213 |
+
# repodata_hashmap, channel=None, expiry=None, timestamp=None):
|
| 214 |
+
# """
|
| 215 |
+
# # TODO: ✅ Full docstring.
|
| 216 |
+
|
| 217 |
+
# # TODO: ✅ Contemplate the addition of "version" to this metadata. As yet,
|
| 218 |
+
# # the timestamp serves our purposes....
|
| 219 |
+
|
| 220 |
+
# Note that if expiry or timestamp are not provided or left as None, now is
|
| 221 |
+
# used for the timestamp, and expiry is produced using a default expiration
|
| 222 |
+
# distance, via iso8601_time_plus_delta(). (It does not mean no expiration!)
|
| 223 |
+
|
| 224 |
+
# Channel may be optionally specified, and is only included if specified.
|
| 225 |
+
|
| 226 |
+
# Sample input (repodata_hashmap):
|
| 227 |
+
# {
|
| 228 |
+
# "noarch/current_repodata.json": "908724926552827ab58dfc0bccba92426cec9f1f483883da3ff0d8664e18c0fe",
|
| 229 |
+
# "noarch/repodata.json": "...",
|
| 230 |
+
# "noarch/repodata_from_packages.json": "...",
|
| 231 |
+
# "osx-64/current_repodata.json": "...",
|
| 232 |
+
# "osx-64/repodata.json": "...",
|
| 233 |
+
# "osx-64/repodata_from_packages.json": "..."
|
| 234 |
+
# }
|
| 235 |
+
|
| 236 |
+
# Sample output:
|
| 237 |
+
# See metadata specification (version defined by
|
| 238 |
+
# SECURITY_METADATA_SPEC_VERSION) for definition and samples of type
|
| 239 |
+
# "Repodata Verification Metadata".
|
| 240 |
+
# """
|
| 241 |
+
|
| 242 |
+
# if expiry is None:
|
| 243 |
+
# expiry = iso8601_time_plus_delta(REPODATA_VERIF_MD_EXPIRY_DISTANCE)
|
| 244 |
+
|
| 245 |
+
# if timestamp is None:
|
| 246 |
+
# timestamp = iso8601_time_plus_delta(timedelta(0))
|
| 247 |
+
|
| 248 |
+
# # TODO: ✅ More argument validation: channel,
|
| 249 |
+
# checkformat_utc_isoformat(expiry)
|
| 250 |
+
# checkformat_utc_isoformat(timestamp)
|
| 251 |
+
# if not ( # dict with string keys and 32-byte-hash-as-hex-string values
|
| 252 |
+
# isinstance(repodata_hashmap, dict)
|
| 253 |
+
# and all([isinstance(x, string_types) for x in repodata_hashmap])
|
| 254 |
+
# and all([is_hex_hash(repodata_hashmap[x]) for x in repodata_hashmap])):
|
| 255 |
+
# raise ValueError(
|
| 256 |
+
# 'Argument repodata_hashmap must be a dictionary with strings '
|
| 257 |
+
# 'as keys (filenames of repodata.json files), and values that '
|
| 258 |
+
# 'are 64-character hex strings representing 32-byte hashes (of '
|
| 259 |
+
# 'those repodata.json files)')
|
| 260 |
+
|
| 261 |
+
# # TODO: ✅ Really have to make TypeError and ValueError usages consistent
|
| 262 |
+
# # with norms throughout this codebase.
|
| 263 |
+
|
| 264 |
+
|
| 265 |
+
# rd_v_md = {
|
| 266 |
+
# 'type': 'repodata_verify',
|
| 267 |
+
# # (Take advantage of iso8601_time_plus_delta() to get current time
|
| 268 |
+
# # in the ISO8601 UTC format we want.)
|
| 269 |
+
# 'timestamp': timestamp, # version->timestamp in spec v 0.0.5
|
| 270 |
+
# 'metadata_spec_version': SECURITY_METADATA_SPEC_VERSION,
|
| 271 |
+
# 'expiration': expiry,
|
| 272 |
+
# 'secured_files': repodata_hashmap}
|
| 273 |
+
|
| 274 |
+
# if channel is not None:
|
| 275 |
+
# rd_v_md['channel'] = channel
|
| 276 |
+
|
| 277 |
+
# return rd_v_md
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/plugin.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2019 Anaconda, Inc
|
| 2 |
+
# SPDX-License-Identifier: BSD-3-Clause
|
| 3 |
+
import conda.plugins
|
| 4 |
+
|
| 5 |
+
from .cli import cli
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
@conda.plugins.hookimpl
|
| 9 |
+
def conda_subcommands():
|
| 10 |
+
yield conda.plugins.CondaSubcommand(
|
| 11 |
+
name="content-trust",
|
| 12 |
+
summary="Signing and verification tools for Conda",
|
| 13 |
+
action=cli,
|
| 14 |
+
)
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/root_signing.py
ADDED
|
@@ -0,0 +1,365 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2019 Anaconda, Inc
|
| 2 |
+
# SPDX-License-Identifier: BSD-3-Clause
|
| 3 |
+
"""
|
| 4 |
+
This module contains functions that sign data in an OpenPGP-compliant (i.e.
|
| 5 |
+
GPG-friendly) way. Root metadata may be signed in this manner. Functions that
|
| 6 |
+
perform simpler, direct signing using raw ed25519 keys are provided in
|
| 7 |
+
conda_content_trust.signing instead.
|
| 8 |
+
|
| 9 |
+
This library takes advantage of the securesystemslib library for its gpg
|
| 10 |
+
signing interface.
|
| 11 |
+
|
| 12 |
+
Function Manifest for this Module:
|
| 13 |
+
sign_via_gpg # requires securesystemslib
|
| 14 |
+
sign_root_metadata_via_gpg # requires securesystemslib
|
| 15 |
+
fetch_keyval_from_gpg # requires securesystemslib
|
| 16 |
+
|
| 17 |
+
Note that there is a function in conda_content_trust.authentication that verifies these
|
| 18 |
+
signatures without requiring securesystemslib.
|
| 19 |
+
"""
|
| 20 |
+
# securesystemslib is an optional dependency, and required only for signing
|
| 21 |
+
# root metadata via GPG. Verification of those signatures, and signing other
|
| 22 |
+
# metadata with raw ed25519 signatures, does not require securesystemslib.
|
| 23 |
+
try:
|
| 24 |
+
import securesystemslib.formats # noqa: F401
|
| 25 |
+
from securesystemslib.gpg import functions as gpg_funcs
|
| 26 |
+
|
| 27 |
+
SSLIB_AVAILABLE = True
|
| 28 |
+
except ImportError: # pragma: no cover
|
| 29 |
+
SSLIB_AVAILABLE = False
|
| 30 |
+
|
| 31 |
+
from .common import (
|
| 32 |
+
canonserialize,
|
| 33 |
+
checkformat_byteslike,
|
| 34 |
+
checkformat_gpg_fingerprint,
|
| 35 |
+
checkformat_hex_key,
|
| 36 |
+
is_signable,
|
| 37 |
+
load_metadata_from_file,
|
| 38 |
+
write_metadata_to_file,
|
| 39 |
+
)
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
def _check_sslib_available():
|
| 43 |
+
if not SSLIB_AVAILABLE:
|
| 44 |
+
raise ImportError(
|
| 45 |
+
"The securesystemslib library is required, which appears to be unavailable."
|
| 46 |
+
)
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
def sign_via_gpg(data_to_sign, gpg_key_fingerprint, include_fingerprint=False):
|
| 50 |
+
"""
|
| 51 |
+
<Purpose>
|
| 52 |
+
|
| 53 |
+
This is an alternative to the conda_content_trust.common.PrivateKey.sign() method, for
|
| 54 |
+
use with OpenPGP keys, allowing us to use protected keys in YubiKeys
|
| 55 |
+
(which provide an OpenPGP interface) to sign data.
|
| 56 |
+
|
| 57 |
+
The signature is not simply over data_to_sign, as is the case with the
|
| 58 |
+
PrivateKey.sign() function, but over an expanded payload with
|
| 59 |
+
metadata about the signature to be signed, as specified by the OpenPGP
|
| 60 |
+
standard (RFC 4880). See data_to_sign and Security Note below.
|
| 61 |
+
|
| 62 |
+
This process is nominally deterministic, but varies with the precise
|
| 63 |
+
time, since there is a timestamp added by GPG into the signed payload.
|
| 64 |
+
Nonetheless, this process does not depend at any point on the ability
|
| 65 |
+
to generate random data (unlike key generation).
|
| 66 |
+
|
| 67 |
+
This function requires securesystemslib, which is otherwise an optional
|
| 68 |
+
dependency.
|
| 69 |
+
|
| 70 |
+
<Arguments>
|
| 71 |
+
|
| 72 |
+
data_to_sign
|
| 73 |
+
The raw bytes of interest that will be signed by GPG. Note that
|
| 74 |
+
pursuant to the OpenPGP standard, GPG will add to this data:
|
| 75 |
+
specifically, it includes metadata about the signature that is
|
| 76 |
+
about to be made into the data that will be signed. We do not care
|
| 77 |
+
about that metadata, and we do not want to burden signature
|
| 78 |
+
verification with its processing, so we essentially ignore it.
|
| 79 |
+
This should have negligible security impact, but for more
|
| 80 |
+
information, see "A note on security" below.
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
gpg_key_fingerprint
|
| 84 |
+
This is a (fairly) unique identifier for an OpenPGP key pair.
|
| 85 |
+
Also Known as a "long" GPG keyid, a GPG fingerprint is
|
| 86 |
+
40-hex-character string representing 20 bytes of raw data, the
|
| 87 |
+
SHA-1 hash of a collection of the GPG key's properties.
|
| 88 |
+
Internally, GPG uses the key fingerprint to identify keys the
|
| 89 |
+
client knows of.
|
| 90 |
+
|
| 91 |
+
Note that an OpenPGP public key is a larger object identified by a
|
| 92 |
+
fingerprint. GPG public keys include two things, from our
|
| 93 |
+
perspective:
|
| 94 |
+
|
| 95 |
+
- the raw bytes of the actual cryptographic key
|
| 96 |
+
(in our case the 32-byte value referred to as "q" for an ed25519
|
| 97 |
+
public key)
|
| 98 |
+
|
| 99 |
+
- lots of data that is totally extraneous to us, including a
|
| 100 |
+
timestamp, some representations of relationships with other keys
|
| 101 |
+
(subkeys, signed-by lists, etc.), Superman's real name
|
| 102 |
+
(see also https://bit.ly/38GcaGj), potential key revocations,
|
| 103 |
+
etc.
|
| 104 |
+
We do not care about this extra data because we are using the
|
| 105 |
+
OpenPGP standard not for its key-to-key semantics or any element
|
| 106 |
+
of its Public Key Infrastructure features (revocation, vouching
|
| 107 |
+
for other keys, key relationships, etc.), but simply as a means
|
| 108 |
+
of asking YubiKeys to sign data for us, with ed25519 keys whose
|
| 109 |
+
raw public key value ("q") we know to expect.
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
<Returns>
|
| 113 |
+
Returns a dictionary representing a GPG signature. This is similar to
|
| 114 |
+
but not *quite* the same as
|
| 115 |
+
securesystemslib.formats.GPG_SIGNATURE_SCHEMA (which uses 'keyid'
|
| 116 |
+
as the key for the fingerprint, instead of 'gpg_key_fingerprint').
|
| 117 |
+
|
| 118 |
+
Specifically, this looks like:
|
| 119 |
+
{'gpg_key_fingerprint': <gpg key fingerprint>,
|
| 120 |
+
'other_headers': <extra data mandated in OpenPGP signatures>,
|
| 121 |
+
'signature': <ed25519 signature, 64 bytes as 128 hex chars>}
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
This is unlike conda_content_trust.signing.sign(), which simply returns 64 bytes of raw
|
| 125 |
+
ed25519 signature.
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
<Security Note>
|
| 129 |
+
|
| 130 |
+
A note on the security implications of this treatment of OpenPGP
|
| 131 |
+
signatures:
|
| 132 |
+
|
| 133 |
+
TL;DR:
|
| 134 |
+
It is NOT easier for an attacker to find a collision; however, it
|
| 135 |
+
IS easier, IF an attacker CAN find a collision, to do so in a way
|
| 136 |
+
that presents a specific, arbitrary payload.
|
| 137 |
+
|
| 138 |
+
Note that pursuant to the OpenPGP standard, GPG will add to the data we
|
| 139 |
+
ask it to sign (data_to_sign) before signing it. Specifically, GPG will
|
| 140 |
+
add, to the payload-to-be-signed, OpenPGP metadata about the signature
|
| 141 |
+
it is about to create. We do not care about that metadata, and we do
|
| 142 |
+
not want to burden signature verification with its processing (that is,
|
| 143 |
+
we do not want to use GPG to verify these signatures; conda will do
|
| 144 |
+
that with simpler code). As a result, we will ignore this data when
|
| 145 |
+
parsing the signed payload. This will mean that there will be many
|
| 146 |
+
different messages that have the same meaning to us:
|
| 147 |
+
|
| 148 |
+
signed:
|
| 149 |
+
<some raw data we send to GPG: 'ABCDEF...'>
|
| 150 |
+
<some data GPG adds in: '123456...'>
|
| 151 |
+
|
| 152 |
+
Since we will not be processing the '123456...' above, '654321...'
|
| 153 |
+
would have the same effect: as long as the signature is verified,
|
| 154 |
+
we don't care what's in that portion of the payload.
|
| 155 |
+
|
| 156 |
+
Since there are many, many payloads that mean the same thing to us, an
|
| 157 |
+
attacker has a vast space of options all with the same meaning to us in
|
| 158 |
+
which to search for (effectively) a useful SHA256 hash collision to
|
| 159 |
+
find different data that says something *specific* and still
|
| 160 |
+
*succeeds* in signature verification using the same signature.
|
| 161 |
+
While that is not ideal, it is difficult enough simply to find a SHA256
|
| 162 |
+
collision that this is acceptable.
|
| 163 |
+
"""
|
| 164 |
+
_check_sslib_available()
|
| 165 |
+
|
| 166 |
+
# Argument validation
|
| 167 |
+
checkformat_gpg_fingerprint(gpg_key_fingerprint)
|
| 168 |
+
checkformat_byteslike(data_to_sign)
|
| 169 |
+
|
| 170 |
+
sig = gpg_funcs.create_signature(data_to_sign, gpg_key_fingerprint)
|
| 171 |
+
|
| 172 |
+
# securesystemslib.gpg makes use of the GPG key fingerprint. We don't
|
| 173 |
+
# care about that as much -- we want to use the raw ed25519 public key
|
| 174 |
+
# value to refer to the key in a manner consistent with the way we refer to
|
| 175 |
+
# non-GPG (non-OpenPGP) keys.
|
| 176 |
+
keyval = fetch_keyval_from_gpg(gpg_key_fingerprint)
|
| 177 |
+
|
| 178 |
+
# ssl gpg sigs look like this:
|
| 179 |
+
#
|
| 180 |
+
# {'keyid': <gpg key fingerprint>,
|
| 181 |
+
# 'other_headers': <extra data mandated in OpenPGP signatures>,
|
| 182 |
+
# 'signature': <actual ed25519 signature, 64 bytes as 128 hex chars>}
|
| 183 |
+
#
|
| 184 |
+
# We want to store the real public key instead of just the gpg key
|
| 185 |
+
# fingerprint, so we add that, and we'll rename keyid to
|
| 186 |
+
# gpg_key_fingerprint. That gives us:
|
| 187 |
+
#
|
| 188 |
+
# {'gpg_key_fingerprint': <gpg key fingerprint>,
|
| 189 |
+
# 'other_headers': <extra data mandated in OpenPGP signatures>,
|
| 190 |
+
# 'signature': <actual ed25519 signature, 64 bytes as 128 hex chars>}
|
| 191 |
+
|
| 192 |
+
# sig['key'] = keyval # q, the 32-byte raw ed25519 public key value, expressed as 64 hex characters
|
| 193 |
+
|
| 194 |
+
# The OpenPGP Fingerprint of the OpenPGP key used to sign. This is not
|
| 195 |
+
# required for verification, but it's useful for debugging and for
|
| 196 |
+
# root keyholder convenience. So it's optional.
|
| 197 |
+
if include_fingerprint:
|
| 198 |
+
sig["see_also"] = sig[
|
| 199 |
+
"keyid"
|
| 200 |
+
] # strictly not needed, useful for debugging; 20-byte sha1 gpg key identifier per OpenPGP spec, expressed as 40 hex characters
|
| 201 |
+
|
| 202 |
+
del sig["keyid"]
|
| 203 |
+
|
| 204 |
+
return sig
|
| 205 |
+
|
| 206 |
+
|
| 207 |
+
def sign_root_metadata_dict_via_gpg(root_signable, gpg_key_fingerprint):
|
| 208 |
+
# Signs root_signable in place, returns nothing.
|
| 209 |
+
|
| 210 |
+
_check_sslib_available()
|
| 211 |
+
|
| 212 |
+
# Make sure it's the right format.
|
| 213 |
+
if not is_signable(root_signable):
|
| 214 |
+
raise TypeError("Expected a signable dictionary.")
|
| 215 |
+
|
| 216 |
+
# TODO: Add root-specific checks.
|
| 217 |
+
|
| 218 |
+
# Canonicalize and serialize the data, putting it in the form we expect to
|
| 219 |
+
# sign over. Note that we'll canonicalize and serialize the whole thing
|
| 220 |
+
# again once the signatures have been added.
|
| 221 |
+
data_to_sign = canonserialize(root_signable["signed"])
|
| 222 |
+
|
| 223 |
+
sig_dict = sign_via_gpg(data_to_sign, gpg_key_fingerprint)
|
| 224 |
+
|
| 225 |
+
# sig_dict looks like this:
|
| 226 |
+
# {'keyid': 'f075dd2f6f4cb3bd76134bbb81b6ca16ef9cd589',
|
| 227 |
+
# 'other_headers': '04001608001d162104f075dd2f6f4cb3bd76134bbb81b6ca16ef9cd58905025dbc3e68',
|
| 228 |
+
# 'signature': '29282a8fe75871f9d4cf10a5a9e8d92303f8c361ce4b474a0ce641c9b8a74e4baaf810cc383af318a8e21cbe252789c2c30894d94e8b0288c3c45ceacf6c1d0c'}
|
| 229 |
+
# pgp_pubkey looks like this:
|
| 230 |
+
# {'creation_time': 1571411344,
|
| 231 |
+
# 'hashes': ['pgp+SHA2'],
|
| 232 |
+
# 'keyid': 'f075dd2f6f4cb3bd76134bbb81b6ca16ef9cd589',
|
| 233 |
+
# 'keyval': {'private': '',
|
| 234 |
+
# 'public': {'q': 'bfbeb6554fca9558da7aa05c5e9952b7a1aa3995dede93f3bb89f0abecc7dc07'}},
|
| 235 |
+
# 'method': 'pgp+eddsa-ed25519',
|
| 236 |
+
# 'type': 'eddsa'}
|
| 237 |
+
|
| 238 |
+
# securesystemslib.gpg makes use of the GPG key fingerprint. We don't
|
| 239 |
+
# care about that as much -- we want to use the raw ed25519 public key
|
| 240 |
+
# value to refer to the key in a manner consistent with the way we refer to
|
| 241 |
+
# non-GPG (non-OpenPGP) keys.
|
| 242 |
+
# raw_pubkey = pgp_pubkey['keyval']['public']['q']
|
| 243 |
+
raw_pubkey = fetch_keyval_from_gpg(gpg_key_fingerprint)
|
| 244 |
+
|
| 245 |
+
# non-GPG signing here would look like this:
|
| 246 |
+
# signature_as_hexstr = serialize_and_sign(signable['signed'], private_key)
|
| 247 |
+
# public_key_as_hexstr = binascii.hexlify(key_to_bytes(
|
| 248 |
+
# private_key.public_key())).decode('utf-8')
|
| 249 |
+
|
| 250 |
+
# Add signature in-place.
|
| 251 |
+
root_signable["signatures"][raw_pubkey] = sig_dict
|
| 252 |
+
|
| 253 |
+
return root_signable
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
def sign_root_metadata_via_gpg(root_md_fname, gpg_key_fingerprint):
|
| 257 |
+
"""
|
| 258 |
+
# This is a higher-level function than sign_via_gpg, including code that
|
| 259 |
+
# deals with the filesystem. It is not actually limited to root metadata,
|
| 260 |
+
# and SHOULD BE RENAMED.
|
| 261 |
+
"""
|
| 262 |
+
# Read in json
|
| 263 |
+
root_signable = load_metadata_from_file(root_md_fname)
|
| 264 |
+
|
| 265 |
+
root_signable = sign_root_metadata_dict_via_gpg(root_signable, gpg_key_fingerprint)
|
| 266 |
+
|
| 267 |
+
# TODO: Consider removing write_metadata_to_file. It might be better for
|
| 268 |
+
# readers to see the canonserialize() call being made (again) here,
|
| 269 |
+
# and it's not that much longer....
|
| 270 |
+
write_metadata_to_file(root_signable, root_md_fname)
|
| 271 |
+
|
| 272 |
+
|
| 273 |
+
def fetch_keyval_from_gpg(fingerprint):
|
| 274 |
+
"""
|
| 275 |
+
Retrieve the underlying 32-byte raw ed25519 public key for a GPG key.
|
| 276 |
+
|
| 277 |
+
Given a GPG key fingerprint (40-character hex string), retrieve the GPG
|
| 278 |
+
key, parse it, and return "q", the 32-byte ed25519 key value.
|
| 279 |
+
|
| 280 |
+
This takes advantage of the GPG key parser in securesystemslib.
|
| 281 |
+
|
| 282 |
+
The fingerprint will be stripped of spaces and lowercased, so you can use
|
| 283 |
+
the GPG output even if it's in a funky format:
|
| 284 |
+
94A3 EED0 806C 1F10 7754 A446 FDAD 11B8 2DD4 0E8C
|
| 285 |
+
94A3 EED0 806C 1F10 7754 A446 FDAD 11B8 2DD4 0E8C # <-- No, this is actually not the same as the previous one, which uses \\xa0....
|
| 286 |
+
94A3EED0806C1F107754A446FDAD11B82DD40E8C
|
| 287 |
+
94a3eed0806c1f107754a446fdad11b82dd40e8c
|
| 288 |
+
etc.
|
| 289 |
+
"""
|
| 290 |
+
_check_sslib_available()
|
| 291 |
+
|
| 292 |
+
fingerprint = (
|
| 293 |
+
fingerprint.lower().replace(" ", "").replace("\xa0", "")
|
| 294 |
+
) # \xa0 is another space character that GPG sometimes outputs
|
| 295 |
+
|
| 296 |
+
checkformat_gpg_fingerprint(fingerprint)
|
| 297 |
+
|
| 298 |
+
key_parameters = gpg_funcs.export_pubkey(fingerprint)
|
| 299 |
+
|
| 300 |
+
return key_parameters["keyval"]["public"]["q"]
|
| 301 |
+
|
| 302 |
+
|
| 303 |
+
def _gpg_pubkey_in_ssl_format(fingerprint, q):
|
| 304 |
+
"""
|
| 305 |
+
THIS IS PROVIDED ONLY FOR TESTING PURPOSES.
|
| 306 |
+
We do not need to convert pubkeys to securesystemslib's format, except to
|
| 307 |
+
try out securesystemslib's gpg signature verification (which we use only
|
| 308 |
+
for comparison during testing).
|
| 309 |
+
|
| 310 |
+
Given a GPG key fingerprint (40 hex characters) and a q value (64 hex
|
| 311 |
+
characters representing a 32-byte ed25519 public key raw value), produces a
|
| 312 |
+
key object in a format that securesystemslib expects, so that we can use
|
| 313 |
+
securesystemslib.gpg.functions.verify_signature for part of the GPG
|
| 314 |
+
signature verification. For our purposes, this means that we should
|
| 315 |
+
produce a dictionary conforming to
|
| 316 |
+
securesystemslib.formats._GPG_ED25519_PUBKEY_SCHEMA.
|
| 317 |
+
|
| 318 |
+
If securesystemslib.formats._GPG_ED25519_PUBKEY_SCHEMA changes, those
|
| 319 |
+
changes will likely need to be reflected here.
|
| 320 |
+
|
| 321 |
+
Example value produced:
|
| 322 |
+
{
|
| 323 |
+
'type': 'eddsa',
|
| 324 |
+
'method': 'pgp+eddsa-ed25519',
|
| 325 |
+
'hashes': ['pgp+SHA2'],
|
| 326 |
+
'keyid': 'F075DD2F6F4CB3BD76134BBB81B6CA16EF9CD589',
|
| 327 |
+
'keyval': {
|
| 328 |
+
'public': {'q': 'bfbeb6554fca9558da7aa05c5e9952b7a1aa3995dede93f3bb89f0abecc7dc07'},
|
| 329 |
+
'private': ''}
|
| 330 |
+
}
|
| 331 |
+
}
|
| 332 |
+
"""
|
| 333 |
+
checkformat_gpg_fingerprint(fingerprint)
|
| 334 |
+
checkformat_hex_key(q)
|
| 335 |
+
|
| 336 |
+
ssl_format_key = {
|
| 337 |
+
"type": "eddsa",
|
| 338 |
+
"method": securesystemslib.formats.GPG_ED25519_PUBKEY_METHOD_STRING,
|
| 339 |
+
"hashes": [securesystemslib.formats.GPG_HASH_ALGORITHM_STRING],
|
| 340 |
+
"keyid": fingerprint,
|
| 341 |
+
"keyval": {"private": "", "public": {"q": q}},
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
return ssl_format_key
|
| 345 |
+
|
| 346 |
+
|
| 347 |
+
# def _gpgsig_to_sslgpgsig(gpg_sig):
|
| 348 |
+
#
|
| 349 |
+
# conda_content_trust.common.checkformat_gpg_signature(gpg_sig)
|
| 350 |
+
#
|
| 351 |
+
# return {
|
| 352 |
+
# 'keyid': copy.deepcopy(gpg_sig['key_fingerprint']),
|
| 353 |
+
# 'other_headers': copy.deepcopy(gpg_sig[other_headers]),
|
| 354 |
+
# 'signature': copy.deepcopy(gpg_sig['signature'])}
|
| 355 |
+
|
| 356 |
+
|
| 357 |
+
# def _sslgpgsig_to_gpgsig(ssl_gpg_sig):
|
| 358 |
+
#
|
| 359 |
+
# securesystemslib.formats.GPG_SIGNATURE_SCHEMA.check_match(ssl_gpg_sig)
|
| 360 |
+
#
|
| 361 |
+
# return {
|
| 362 |
+
# 'key_fingerprint': copy.deepcopy(ssl_gpg_sig['keyid']),
|
| 363 |
+
# 'other_headers': copy.deepcopy(ssl_gpg_sig[other_headers]),
|
| 364 |
+
# 'signature': copy.depcopy(ssl_gpg_sig['signature'])
|
| 365 |
+
# }
|
data/miniconda3/pkgs/conda-content-trust-0.2.0-py313h06a4308_1/lib/python3.13/site-packages/conda_content_trust/signing.py
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2019 Anaconda, Inc
|
| 2 |
+
# SPDX-License-Identifier: BSD-3-Clause
|
| 3 |
+
"""
|
| 4 |
+
This module contains functions that sign data using ed25519 keys, via the
|
| 5 |
+
pyca/cryptography library. Functions that perform OpenPGP-compliant (e.g. GPG)
|
| 6 |
+
signing are provided instead in root_signing.
|
| 7 |
+
|
| 8 |
+
Function Manifest for this Module:
|
| 9 |
+
serialize_and_sign
|
| 10 |
+
wrap_as_signable
|
| 11 |
+
sign_signable
|
| 12 |
+
"""
|
| 13 |
+
from binascii import hexlify
|
| 14 |
+
from copy import deepcopy
|
| 15 |
+
|
| 16 |
+
from .common import (
|
| 17 |
+
SUPPORTED_SERIALIZABLE_TYPES,
|
| 18 |
+
PrivateKey,
|
| 19 |
+
PublicKey,
|
| 20 |
+
canonserialize,
|
| 21 |
+
checkformat_hex_key,
|
| 22 |
+
checkformat_key,
|
| 23 |
+
checkformat_signable,
|
| 24 |
+
checkformat_signature,
|
| 25 |
+
checkformat_string,
|
| 26 |
+
load_metadata_from_file,
|
| 27 |
+
write_metadata_to_file,
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
def serialize_and_sign(obj, private_key):
|
| 32 |
+
"""
|
| 33 |
+
Given a JSON-compatible object, does the following:
|
| 34 |
+
- serializes the dictionary as utf-8-encoded JSON, lazy-canonicalized
|
| 35 |
+
such that any dictionary keys in any dictionaries inside <dictionary>
|
| 36 |
+
are sorted and indentation is used and set to 2 spaces (using json lib)
|
| 37 |
+
- creates a signature over that serialized result using private_key
|
| 38 |
+
- returns that signature as a hex string
|
| 39 |
+
|
| 40 |
+
See comments in common.canonserialize()
|
| 41 |
+
|
| 42 |
+
Arguments:
|
| 43 |
+
obj: a JSON-compatible object -- see common.canonserialize()
|
| 44 |
+
private_key: a conda_content_trust.common.PrivateKey object
|
| 45 |
+
|
| 46 |
+
# TODO ✅: Consider taking the private key data as a hex string instead?
|
| 47 |
+
# On the other hand, it's useful to support an object that could
|
| 48 |
+
# obscure the key (or provide an interface to a hardware key).
|
| 49 |
+
"""
|
| 50 |
+
|
| 51 |
+
# Try converting to a JSON string.
|
| 52 |
+
serialized = canonserialize(obj)
|
| 53 |
+
|
| 54 |
+
signature_as_bytes = private_key.sign(serialized)
|
| 55 |
+
|
| 56 |
+
signature_as_hexstr = hexlify(signature_as_bytes).decode("utf-8")
|
| 57 |
+
|
| 58 |
+
return signature_as_hexstr
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
def wrap_as_signable(obj):
|
| 62 |
+
"""
|
| 63 |
+
Given a JSON-serializable object (dictionary, list, string, numeric, etc.),
|
| 64 |
+
returns a wrapped copy of that object:
|
| 65 |
+
|
| 66 |
+
{'signatures': {},
|
| 67 |
+
'signed': <deep copy of the given object>}
|
| 68 |
+
|
| 69 |
+
Expects strict typing matches (not duck typing), for no good reason.
|
| 70 |
+
(Trying JSON serialization repeatedly could be too time consuming.)
|
| 71 |
+
|
| 72 |
+
TODO: ✅ Consider whether or not the copy can be shallow instead, for speed.
|
| 73 |
+
|
| 74 |
+
Raises ❌TypeError if the given object is not a JSON-serializable type per
|
| 75 |
+
SUPPORTED_SERIALIZABLE_TYPES
|
| 76 |
+
"""
|
| 77 |
+
if not type(obj) in SUPPORTED_SERIALIZABLE_TYPES:
|
| 78 |
+
raise TypeError(
|
| 79 |
+
"wrap_dict_as_signable requires a JSON-serializable object, "
|
| 80 |
+
"but the given argument is of type " + str(type(obj)) + ", "
|
| 81 |
+
"which is not supported by the json library functions."
|
| 82 |
+
)
|
| 83 |
+
|
| 84 |
+
# TODO: ✅ Later on, consider switching back to TUF-style
|
| 85 |
+
# signatures-as-a-list. (Is there some reason it's saner?)
|
| 86 |
+
# Going with my sense of what's best now, which is dicts instead.
|
| 87 |
+
# It's simpler and it naturally avoids duplicates. We don't do it
|
| 88 |
+
# this way in TUF, but we also don't depend on it being an ordered
|
| 89 |
+
# list anyway, so a dictionary is probably better.
|
| 90 |
+
|
| 91 |
+
return {"signatures": {}, "signed": deepcopy(obj)}
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def sign_signable(signable, private_key):
|
| 95 |
+
"""
|
| 96 |
+
Given a JSON-compatible signable dictionary (as produced by calling
|
| 97 |
+
wrap_dict_as_signable with a JSON-compatible dictionary), calls
|
| 98 |
+
serialize_and_sign on the enclosed dictionary at signable['signed'],
|
| 99 |
+
producing a signature, and places the signature in
|
| 100 |
+
signable['signatures'], in an entry indexed by the public key
|
| 101 |
+
corresponding to the given private_key.
|
| 102 |
+
|
| 103 |
+
Updates the given signable in place, returning nothing.
|
| 104 |
+
Overwrites if there is already an existing signature by the given key.
|
| 105 |
+
|
| 106 |
+
# TODO ✅: Take hex string keys for sign_signable and serialize_and_sign
|
| 107 |
+
# instead of constructed PrivateKey objects? Add the comment
|
| 108 |
+
# below if so:
|
| 109 |
+
# # Unlike with lower-level functions, both signatures and public keys are
|
| 110 |
+
# # always written as hex strings.
|
| 111 |
+
|
| 112 |
+
Raises ❌TypeError if the given object is not a JSON-serializable type per
|
| 113 |
+
SUPPORTED_SERIALIZABLE_TYPES
|
| 114 |
+
"""
|
| 115 |
+
# Argument checking
|
| 116 |
+
checkformat_key(private_key)
|
| 117 |
+
checkformat_signable(signable)
|
| 118 |
+
# if not is_a_signable(signable):
|
| 119 |
+
# raise TypeError(
|
| 120 |
+
# 'Expected a signable dictionary; the given argument of type ' +
|
| 121 |
+
# str(type(signable)) + ' failed the check.')
|
| 122 |
+
|
| 123 |
+
# private_key = PrivateKey.from_hex(private_key_hex)
|
| 124 |
+
|
| 125 |
+
signature_as_hexstr = serialize_and_sign(signable["signed"], private_key)
|
| 126 |
+
|
| 127 |
+
public_key_as_hexstr = PublicKey.to_hex(private_key.public_key())
|
| 128 |
+
|
| 129 |
+
# To fit a general format, we wrap it this way, instead of just using the
|
| 130 |
+
# hexstring. This is because OpenPGP signatures that we use for root
|
| 131 |
+
# signatures look similar and have a few extra fields beyond the signature
|
| 132 |
+
# value itself.
|
| 133 |
+
signature_dict = {"signature": signature_as_hexstr}
|
| 134 |
+
|
| 135 |
+
checkformat_signature(signature_dict)
|
| 136 |
+
|
| 137 |
+
# TODO: ✅⚠️ Log a warning in whatever conda's style is (or conda-build):
|
| 138 |
+
#
|
| 139 |
+
# if public_key_as_hexstr in signable['signatures']:
|
| 140 |
+
# warn( # replace: log, 'warnings' module, print statement, whatever
|
| 141 |
+
# 'Overwriting existing signature by the same key on given '
|
| 142 |
+
# 'signable. Public key: ' + public_key + '.')
|
| 143 |
+
|
| 144 |
+
# Add signature in-place, in the usual signature format.
|
| 145 |
+
signable["signatures"][public_key_as_hexstr] = signature_dict
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
def sign_all_in_repodata(fname, private_key_hex):
|
| 149 |
+
"""
|
| 150 |
+
Given a repodata.json filename, reads the "packages" entries in that file,
|
| 151 |
+
and produces a signature over each artifact, with the given key. The
|
| 152 |
+
signatures are then placed in a "signatures" entry parallel to the
|
| 153 |
+
"packages" entry in the json file. The file is overwritten.
|
| 154 |
+
|
| 155 |
+
Arguments:
|
| 156 |
+
fname: filename of a repodata.json file
|
| 157 |
+
private_key_hex:
|
| 158 |
+
a private ed25519 key value represented as a 64-char hex string
|
| 159 |
+
"""
|
| 160 |
+
checkformat_hex_key(private_key_hex)
|
| 161 |
+
checkformat_string(fname)
|
| 162 |
+
# TODO ✅⚠️: Consider filename validation. What does conda use for that?
|
| 163 |
+
|
| 164 |
+
private = PrivateKey.from_hex(private_key_hex)
|
| 165 |
+
public_hex = PublicKey.to_hex(private.public_key())
|
| 166 |
+
|
| 167 |
+
# Loading the whole file at once instead of reading it as we go, because
|
| 168 |
+
# it's less complex and this only needs to run repository-side.
|
| 169 |
+
repodata = load_metadata_from_file(fname)
|
| 170 |
+
# with open(fname, 'rb') as fobj:
|
| 171 |
+
# repodata = json.load(fname)
|
| 172 |
+
|
| 173 |
+
# TODO ✅: Consider more validation for the gross structure expected of
|
| 174 |
+
# repodata.json
|
| 175 |
+
if "packages" not in repodata:
|
| 176 |
+
raise ValueError('Expected a "packages" entry in given repodata file.')
|
| 177 |
+
|
| 178 |
+
# Add an empty 'signatures' dict to repodata.
|
| 179 |
+
# If it's already there for whatever reason, we replace it entirely. This
|
| 180 |
+
# avoids leaving existing signatures that might not get replaced -- e.g. if
|
| 181 |
+
# the artifact is not in the "packages" dict, but is in the "signatures"
|
| 182 |
+
# dict for some reason. What comes out of this process will be limited to
|
| 183 |
+
# what we sign in this function.
|
| 184 |
+
repodata["signatures"] = {}
|
| 185 |
+
|
| 186 |
+
for artifact_name, metadata in repodata["packages"].items():
|
| 187 |
+
# TODO ✅: Further consider the significance of the artifact name
|
| 188 |
+
# itself not being part of the signed metadata. The info used
|
| 189 |
+
# to generate the name (package name + version + build) is
|
| 190 |
+
# part of the signed metadata, but the full name is not.
|
| 191 |
+
# Keep in mind attacks that swap metadata among artifacts;
|
| 192 |
+
# signatures would still read as correct in that circumstance.
|
| 193 |
+
signature_hex = serialize_and_sign(metadata, private)
|
| 194 |
+
|
| 195 |
+
# To fit a general format, we wrap it this way, instead of just using
|
| 196 |
+
# the hexstring. This is because OpenPGP signatures that we use for
|
| 197 |
+
# root signatures look similar and have a few extra fields beyond the
|
| 198 |
+
# signature value itself.
|
| 199 |
+
signature_dict = {"signature": signature_hex}
|
| 200 |
+
|
| 201 |
+
checkformat_signature(signature_dict)
|
| 202 |
+
|
| 203 |
+
repodata["signatures"][artifact_name] = {public_hex: signature_dict}
|
| 204 |
+
|
| 205 |
+
# Repeat for the .conda packages in 'packages.conda'.
|
| 206 |
+
for artifact_name, metadata in repodata.get("packages.conda", {}).items():
|
| 207 |
+
signature_hex = serialize_and_sign(metadata, private)
|
| 208 |
+
repodata["signatures"][artifact_name] = {
|
| 209 |
+
public_hex: {"signature": signature_hex}
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
# Note: takes >0.5s on a macbook for large files
|
| 213 |
+
write_metadata_to_file(repodata, fname)
|
data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/about.json
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"channels": [
|
| 3 |
+
"https://conda.anaconda.org/conda-forge"
|
| 4 |
+
],
|
| 5 |
+
"conda_build_version": "24.9.0",
|
| 6 |
+
"conda_version": "24.7.1",
|
| 7 |
+
"description": "A unique, custom designed font that has a very distinctive look and feel.\n",
|
| 8 |
+
"env_vars": {
|
| 9 |
+
"CIO_TEST": "<not set>"
|
| 10 |
+
},
|
| 11 |
+
"extra": {
|
| 12 |
+
"copy_test_source_files": true,
|
| 13 |
+
"final": true,
|
| 14 |
+
"flow_run_id": "azure_20240928.3.1",
|
| 15 |
+
"recipe-maintainers": [
|
| 16 |
+
"dbast",
|
| 17 |
+
"xhochy"
|
| 18 |
+
],
|
| 19 |
+
"remote_url": "https://github.com/conda-forge/font-ttf-ubuntu-feedstock",
|
| 20 |
+
"sha": "e0124cc5a2cfff85f9584b558ec4f43bf091761b"
|
| 21 |
+
},
|
| 22 |
+
"home": "https://design.ubuntu.com/font/",
|
| 23 |
+
"identifiers": [],
|
| 24 |
+
"keywords": [],
|
| 25 |
+
"license": "LicenseRef-Ubuntu-Font-Licence-Version-1.0",
|
| 26 |
+
"license_family": "Other",
|
| 27 |
+
"license_file": "LICENCE.txt",
|
| 28 |
+
"root_pkgs": [
|
| 29 |
+
"tqdm 4.66.5 pyhd8ed1ab_0",
|
| 30 |
+
"libssh2 1.11.0 h0841786_0",
|
| 31 |
+
"hyperframe 6.0.1 pyhd8ed1ab_0",
|
| 32 |
+
"ruamel.yaml 0.18.6 py310h2372a71_0",
|
| 33 |
+
"wheel 0.44.0 pyhd8ed1ab_0",
|
| 34 |
+
"python-fastjsonschema 2.20.0 pyhd8ed1ab_0",
|
| 35 |
+
"menuinst 2.1.2 py310hff52083_1",
|
| 36 |
+
"python-libarchive-c 5.1 py310hff52083_1",
|
| 37 |
+
"truststore 0.9.2 pyhd8ed1ab_0",
|
| 38 |
+
"libstdcxx 14.1.0 hc0a3c3a_1",
|
| 39 |
+
"xz 5.2.6 h166bdaf_0",
|
| 40 |
+
"conda-libmamba-solver 24.7.0 pyhd8ed1ab_0",
|
| 41 |
+
"certifi 2024.8.30 pyhd8ed1ab_0",
|
| 42 |
+
"pkgutil-resolve-name 1.3.10 pyhd8ed1ab_1",
|
| 43 |
+
"traitlets 5.14.3 pyhd8ed1ab_0",
|
| 44 |
+
"nbformat 5.10.4 pyhd8ed1ab_0",
|
| 45 |
+
"libnsl 2.0.1 hd590300_0",
|
| 46 |
+
"yaml 0.2.5 h7f98852_2",
|
| 47 |
+
"conda 24.7.1 py310hff52083_0",
|
| 48 |
+
"hpack 4.0.0 pyh9f0ad1d_0",
|
| 49 |
+
"reproc-cpp 14.2.4.post0 h59595ed_1",
|
| 50 |
+
"zstd 1.5.6 ha6fb4c9_0",
|
| 51 |
+
"conda-package-streaming 0.10.0 pyhd8ed1ab_0",
|
| 52 |
+
"libuuid 2.38.1 h0b41bf4_0",
|
| 53 |
+
"libxcrypt 4.4.36 hd590300_1",
|
| 54 |
+
"requests-toolbelt 1.0.0 pyhd8ed1ab_0",
|
| 55 |
+
"libgomp 14.1.0 h77fa898_1",
|
| 56 |
+
"libmambapy 1.5.10 py310h86cbe3b_0",
|
| 57 |
+
"lzo 2.10 hd590300_1001",
|
| 58 |
+
"jupyter_core 5.7.2 pyh31011fe_1",
|
| 59 |
+
"conda-package-handling 2.3.0 pyh7900ff3_0",
|
| 60 |
+
"markupsafe 2.1.5 py310ha75aee5_1",
|
| 61 |
+
"git 2.46.1 pl5321h59d505e_0",
|
| 62 |
+
"c-ares 1.32.3 h4bc722e_0",
|
| 63 |
+
"krb5 1.21.3 h659f571_0",
|
| 64 |
+
"attrs 24.2.0 pyh71513ae_0",
|
| 65 |
+
"libcurl 8.10.1 hbbe4b11_0",
|
| 66 |
+
"pip 24.2 pyh8b19718_1",
|
| 67 |
+
"ncurses 6.5 he02047a_1",
|
| 68 |
+
"libsqlite 3.46.1 hadc24fc_0",
|
| 69 |
+
"rpds-py 0.20.0 py310h505e2c1_1",
|
| 70 |
+
"chardet 5.2.0 py310hff52083_2",
|
| 71 |
+
"python_abi 3.10 5_cp310",
|
| 72 |
+
"pcre2 10.44 hba22ea6_2",
|
| 73 |
+
"libev 4.33 hd590300_2",
|
| 74 |
+
"libnghttp2 1.58.0 h47da74e_1",
|
| 75 |
+
"h2 4.1.0 pyhd8ed1ab_0",
|
| 76 |
+
"tk 8.6.13 noxft_h4845f30_101",
|
| 77 |
+
"libstdcxx-ng 14.1.0 h4852527_1",
|
| 78 |
+
"zipp 3.20.2 pyhd8ed1ab_0",
|
| 79 |
+
"liblief 0.14.1 h5888daf_2",
|
| 80 |
+
"requests 2.32.3 pyhd8ed1ab_0",
|
| 81 |
+
"libffi 3.4.2 h7f98852_5",
|
| 82 |
+
"mamba 1.5.10 py310h51d5547_0",
|
| 83 |
+
"libiconv 1.17 hd590300_2",
|
| 84 |
+
"tini 0.19.0 h166bdaf_1",
|
| 85 |
+
"pkginfo 1.11.1 pyhd8ed1ab_0",
|
| 86 |
+
"fmt 10.2.1 h00ab1b0_0",
|
| 87 |
+
"pyyaml 6.0.2 py310ha75aee5_1",
|
| 88 |
+
"urllib3 2.2.3 pyhd8ed1ab_0",
|
| 89 |
+
"libarchive 3.7.4 hfca40fe_0",
|
| 90 |
+
"patch 2.7.6 h7f98852_1002",
|
| 91 |
+
"pycosat 0.6.6 py310h2372a71_0",
|
| 92 |
+
"cryptography 43.0.1 py310h6c63255_0",
|
| 93 |
+
"keyutils 1.6.1 h166bdaf_0",
|
| 94 |
+
"jsonschema 4.23.0 pyhd8ed1ab_0",
|
| 95 |
+
"packaging 24.1 pyhd8ed1ab_0",
|
| 96 |
+
"libmamba 1.5.10 h4cc3d14_0",
|
| 97 |
+
"soupsieve 2.5 pyhd8ed1ab_1",
|
| 98 |
+
"readline 8.2 h8228510_1",
|
| 99 |
+
"ld_impl_linux-64 2.43 h712a8e2_0",
|
| 100 |
+
"jsonpatch 1.33 pyhd8ed1ab_0",
|
| 101 |
+
"charset-normalizer 3.3.2 pyhd8ed1ab_0",
|
| 102 |
+
"frozendict 2.4.4 py310ha75aee5_1",
|
| 103 |
+
"click 8.1.7 unix_pyh707e725_0",
|
| 104 |
+
"cffi 1.17.1 py310h8deb56e_0",
|
| 105 |
+
"ruamel.yaml.clib 0.2.8 py310h2372a71_0",
|
| 106 |
+
"beautifulsoup4 4.12.3 pyha770c72_0",
|
| 107 |
+
"_openmp_mutex 4.5 2_gnu",
|
| 108 |
+
"distro 1.9.0 pyhd8ed1ab_0",
|
| 109 |
+
"libxml2 2.12.7 he7c6b58_4",
|
| 110 |
+
"conda-build 24.9.0 py310hff52083_0",
|
| 111 |
+
"reproc 14.2.4.post0 hd590300_1",
|
| 112 |
+
"importlib_resources 6.4.5 pyhd8ed1ab_0",
|
| 113 |
+
"setuptools 75.1.0 pyhd8ed1ab_0",
|
| 114 |
+
"libgcc-ng 14.1.0 h69a702a_1",
|
| 115 |
+
"referencing 0.35.1 pyhd8ed1ab_0",
|
| 116 |
+
"pyopenssl 24.2.1 pyhd8ed1ab_2",
|
| 117 |
+
"libedit 3.1.20191231 he28a2e2_2",
|
| 118 |
+
"_libgcc_mutex 0.1 conda_forge",
|
| 119 |
+
"libexpat 2.6.3 h5888daf_0",
|
| 120 |
+
"lz4-c 1.9.4 hcb278e6_0",
|
| 121 |
+
"tzdata 2024a h8827d51_1",
|
| 122 |
+
"psutil 6.0.0 py310ha75aee5_1",
|
| 123 |
+
"libsolv 0.7.30 h3509ff9_0",
|
| 124 |
+
"zstandard 0.23.0 py310ha39cb0e_1",
|
| 125 |
+
"libgcc 14.1.0 h77fa898_1",
|
| 126 |
+
"pysocks 1.7.1 pyha2e5f31_6",
|
| 127 |
+
"platformdirs 4.3.6 pyhd8ed1ab_0",
|
| 128 |
+
"python 3.10.15 h4a871b0_0_cpython",
|
| 129 |
+
"perl 5.32.1 7_hd590300_perl5",
|
| 130 |
+
"jinja2 3.1.4 pyhd8ed1ab_0",
|
| 131 |
+
"more-itertools 10.5.0 pyhd8ed1ab_0",
|
| 132 |
+
"anaconda-client 1.12.3 pyhd8ed1ab_1",
|
| 133 |
+
"icu 75.1 he02047a_0",
|
| 134 |
+
"ca-certificates 2024.8.30 hbcca054_0",
|
| 135 |
+
"yaml-cpp 0.8.0 h59595ed_0",
|
| 136 |
+
"defusedxml 0.7.1 pyhd8ed1ab_0",
|
| 137 |
+
"libzlib 1.3.1 h4ab18f5_1",
|
| 138 |
+
"patchelf 0.17.2 h58526e2_0",
|
| 139 |
+
"py-lief 0.14.1 py310hf71b8c6_2",
|
| 140 |
+
"openssl 3.3.2 hb9d3cd8_0",
|
| 141 |
+
"six 1.16.0 pyh6c4a22f_0",
|
| 142 |
+
"tomli 2.0.1 pyhd8ed1ab_0",
|
| 143 |
+
"jsonschema-specifications 2023.12.1 pyhd8ed1ab_0",
|
| 144 |
+
"pycparser 2.22 pyhd8ed1ab_0",
|
| 145 |
+
"su-exec 0.2 h166bdaf_1003",
|
| 146 |
+
"idna 3.10 pyhd8ed1ab_0",
|
| 147 |
+
"python-dateutil 2.9.0 pyhd8ed1ab_0",
|
| 148 |
+
"boltons 24.0.0 pyhd8ed1ab_0",
|
| 149 |
+
"colorama 0.4.6 pyhd8ed1ab_0",
|
| 150 |
+
"filelock 3.16.1 pyhd8ed1ab_0",
|
| 151 |
+
"toolz 0.12.1 pyhd8ed1ab_0",
|
| 152 |
+
"bzip2 1.0.8 h4bc722e_7",
|
| 153 |
+
"pybind11-abi 4 hd8ed1ab_3",
|
| 154 |
+
"pytz 2024.2 pyhd8ed1ab_0",
|
| 155 |
+
"jsonpointer 3.0.0 py310hff52083_1",
|
| 156 |
+
"pluggy 1.5.0 pyhd8ed1ab_0",
|
| 157 |
+
"conda-index 0.5.0 pyhd8ed1ab_0",
|
| 158 |
+
"ripgrep 14.1.0 he8a937b_0",
|
| 159 |
+
"archspec 0.2.3 pyhd8ed1ab_0",
|
| 160 |
+
"brotli-python 1.1.0 py310hf71b8c6_2",
|
| 161 |
+
"ruamel_yaml 0.15.80 py310h2372a71_1009",
|
| 162 |
+
"rattler-build-conda-compat 1.2.1 pyhd8ed1ab_0",
|
| 163 |
+
"conda-oci-mirror 0.1.0 pyhd8ed1ab_0",
|
| 164 |
+
"typing-extensions 4.12.2 hd8ed1ab_0",
|
| 165 |
+
"oniguruma 6.9.9 hd590300_0",
|
| 166 |
+
"conda-forge-metadata 0.10.0 pyhd8ed1ab_0",
|
| 167 |
+
"typing_extensions 4.12.2 pyha770c72_0",
|
| 168 |
+
"joblib 1.4.2 pyhd8ed1ab_0",
|
| 169 |
+
"conda-forge-ci-setup 4.10.2 py310h7a2d8a0_100",
|
| 170 |
+
"wrapt 1.16.0 py310ha75aee5_1",
|
| 171 |
+
"conda-env 2.6.0 1",
|
| 172 |
+
"jq 1.7.1 hd590300_0",
|
| 173 |
+
"shyaml 0.6.2 pyhd3deb0d_0",
|
| 174 |
+
"oras-py 0.1.14 pyhd8ed1ab_0",
|
| 175 |
+
"rattler-build 0.22.0 h51b9b6e_0",
|
| 176 |
+
"deprecated 1.2.14 pyh1a96a4e_0"
|
| 177 |
+
],
|
| 178 |
+
"summary": "The Ubuntu Font Family",
|
| 179 |
+
"tags": []
|
| 180 |
+
}
|
data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/files
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
fonts/Ubuntu-B.ttf
|
| 2 |
+
fonts/Ubuntu-BI.ttf
|
| 3 |
+
fonts/Ubuntu-C.ttf
|
| 4 |
+
fonts/Ubuntu-L.ttf
|
| 5 |
+
fonts/Ubuntu-LI.ttf
|
| 6 |
+
fonts/Ubuntu-M.ttf
|
| 7 |
+
fonts/Ubuntu-MI.ttf
|
| 8 |
+
fonts/Ubuntu-R.ttf
|
| 9 |
+
fonts/Ubuntu-RI.ttf
|
| 10 |
+
fonts/Ubuntu-Th.ttf
|
| 11 |
+
fonts/UbuntuMono-B.ttf
|
| 12 |
+
fonts/UbuntuMono-BI.ttf
|
| 13 |
+
fonts/UbuntuMono-R.ttf
|
| 14 |
+
fonts/UbuntuMono-RI.ttf
|
data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/git
ADDED
|
File without changes
|
data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/hash_input.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bzip2": "1",
|
| 3 |
+
"channel_targets": "conda-forge main"
|
| 4 |
+
}
|
data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/index.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"arch": null,
|
| 3 |
+
"build": "h77eed37_3",
|
| 4 |
+
"build_number": 3,
|
| 5 |
+
"depends": [],
|
| 6 |
+
"license": "LicenseRef-Ubuntu-Font-Licence-Version-1.0",
|
| 7 |
+
"license_family": "Other",
|
| 8 |
+
"name": "font-ttf-ubuntu",
|
| 9 |
+
"noarch": "generic",
|
| 10 |
+
"platform": null,
|
| 11 |
+
"subdir": "noarch",
|
| 12 |
+
"timestamp": 1727511233259,
|
| 13 |
+
"version": "0.83"
|
| 14 |
+
}
|
data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/licenses/LICENCE.txt
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-------------------------------
|
| 2 |
+
UBUNTU FONT LICENCE Version 1.0
|
| 3 |
+
-------------------------------
|
| 4 |
+
|
| 5 |
+
PREAMBLE
|
| 6 |
+
This licence allows the licensed fonts to be used, studied, modified and
|
| 7 |
+
redistributed freely. The fonts, including any derivative works, can be
|
| 8 |
+
bundled, embedded, and redistributed provided the terms of this licence
|
| 9 |
+
are met. The fonts and derivatives, however, cannot be released under
|
| 10 |
+
any other licence. The requirement for fonts to remain under this
|
| 11 |
+
licence does not require any document created using the fonts or their
|
| 12 |
+
derivatives to be published under this licence, as long as the primary
|
| 13 |
+
purpose of the document is not to be a vehicle for the distribution of
|
| 14 |
+
the fonts.
|
| 15 |
+
|
| 16 |
+
DEFINITIONS
|
| 17 |
+
"Font Software" refers to the set of files released by the Copyright
|
| 18 |
+
Holder(s) under this licence and clearly marked as such. This may
|
| 19 |
+
include source files, build scripts and documentation.
|
| 20 |
+
|
| 21 |
+
"Original Version" refers to the collection of Font Software components
|
| 22 |
+
as received under this licence.
|
| 23 |
+
|
| 24 |
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
| 25 |
+
or substituting -- in part or in whole -- any of the components of the
|
| 26 |
+
Original Version, by changing formats or by porting the Font Software to
|
| 27 |
+
a new environment.
|
| 28 |
+
|
| 29 |
+
"Copyright Holder(s)" refers to all individuals and companies who have a
|
| 30 |
+
copyright ownership of the Font Software.
|
| 31 |
+
|
| 32 |
+
"Substantially Changed" refers to Modified Versions which can be easily
|
| 33 |
+
identified as dissimilar to the Font Software by users of the Font
|
| 34 |
+
Software comparing the Original Version with the Modified Version.
|
| 35 |
+
|
| 36 |
+
To "Propagate" a work means to do anything with it that, without
|
| 37 |
+
permission, would make you directly or secondarily liable for
|
| 38 |
+
infringement under applicable copyright law, except executing it on a
|
| 39 |
+
computer or modifying a private copy. Propagation includes copying,
|
| 40 |
+
distribution (with or without modification and with or without charging
|
| 41 |
+
a redistribution fee), making available to the public, and in some
|
| 42 |
+
countries other activities as well.
|
| 43 |
+
|
| 44 |
+
PERMISSION & CONDITIONS
|
| 45 |
+
This licence does not grant any rights under trademark law and all such
|
| 46 |
+
rights are reserved.
|
| 47 |
+
|
| 48 |
+
Permission is hereby granted, free of charge, to any person obtaining a
|
| 49 |
+
copy of the Font Software, to propagate the Font Software, subject to
|
| 50 |
+
the below conditions:
|
| 51 |
+
|
| 52 |
+
1) Each copy of the Font Software must contain the above copyright
|
| 53 |
+
notice and this licence. These can be included either as stand-alone
|
| 54 |
+
text files, human-readable headers or in the appropriate machine-
|
| 55 |
+
readable metadata fields within text or binary files as long as those
|
| 56 |
+
fields can be easily viewed by the user.
|
| 57 |
+
|
| 58 |
+
2) The font name complies with the following:
|
| 59 |
+
(a) The Original Version must retain its name, unmodified.
|
| 60 |
+
(b) Modified Versions which are Substantially Changed must be renamed to
|
| 61 |
+
avoid use of the name of the Original Version or similar names entirely.
|
| 62 |
+
(c) Modified Versions which are not Substantially Changed must be
|
| 63 |
+
renamed to both (i) retain the name of the Original Version and (ii) add
|
| 64 |
+
additional naming elements to distinguish the Modified Version from the
|
| 65 |
+
Original Version. The name of such Modified Versions must be the name of
|
| 66 |
+
the Original Version, with "derivative X" where X represents the name of
|
| 67 |
+
the new work, appended to that name.
|
| 68 |
+
|
| 69 |
+
3) The name(s) of the Copyright Holder(s) and any contributor to the
|
| 70 |
+
Font Software shall not be used to promote, endorse or advertise any
|
| 71 |
+
Modified Version, except (i) as required by this licence, (ii) to
|
| 72 |
+
acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with
|
| 73 |
+
their explicit written permission.
|
| 74 |
+
|
| 75 |
+
4) The Font Software, modified or unmodified, in part or in whole, must
|
| 76 |
+
be distributed entirely under this licence, and must not be distributed
|
| 77 |
+
under any other licence. The requirement for fonts to remain under this
|
| 78 |
+
licence does not affect any document created using the Font Software,
|
| 79 |
+
except any version of the Font Software extracted from a document
|
| 80 |
+
created using the Font Software may only be distributed under this
|
| 81 |
+
licence.
|
| 82 |
+
|
| 83 |
+
TERMINATION
|
| 84 |
+
This licence becomes null and void if any of the above conditions are
|
| 85 |
+
not met.
|
| 86 |
+
|
| 87 |
+
DISCLAIMER
|
| 88 |
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 89 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
| 90 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
| 91 |
+
COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
| 92 |
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
| 93 |
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
| 94 |
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
| 95 |
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
|
| 96 |
+
DEALINGS IN THE FONT SOFTWARE.
|
data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/link.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"noarch": {
|
| 3 |
+
"type": "generic"
|
| 4 |
+
},
|
| 5 |
+
"package_metadata_version": 1
|
| 6 |
+
}
|
data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/paths.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"paths": [
|
| 3 |
+
{
|
| 4 |
+
"_path": "fonts/Ubuntu-B.ttf",
|
| 5 |
+
"path_type": "hardlink",
|
| 6 |
+
"sha256": "c90e629e932f768909bdce1481ccd259d8aff1490a4bc1cf94d5413492317336",
|
| 7 |
+
"size_in_bytes": 333612
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"_path": "fonts/Ubuntu-BI.ttf",
|
| 11 |
+
"path_type": "hardlink",
|
| 12 |
+
"sha256": "2c33de34d51065a5e56bae5e1c7c13cd128268b26569838a38db038e6ac9723d",
|
| 13 |
+
"size_in_bytes": 356980
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"_path": "fonts/Ubuntu-C.ttf",
|
| 17 |
+
"path_type": "hardlink",
|
| 18 |
+
"sha256": "6c1f68d2e85832feae9ea30d2a6c0ea71ea623e8ea342bf00a414f6493ccf720",
|
| 19 |
+
"size_in_bytes": 350444
|
| 20 |
+
},
|
| 21 |
+
{
|
| 22 |
+
"_path": "fonts/Ubuntu-L.ttf",
|
| 23 |
+
"path_type": "hardlink",
|
| 24 |
+
"sha256": "b7ec9b9f7cf293ecbc832e998ca4a802adeceb77c661c43ebd23eba1adc3e584",
|
| 25 |
+
"size_in_bytes": 415552
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
"_path": "fonts/Ubuntu-LI.ttf",
|
| 29 |
+
"path_type": "hardlink",
|
| 30 |
+
"sha256": "c5c2d884000930242b3052dd13f3bd250fe53e85b6f75046a53e92dd3de2b51c",
|
| 31 |
+
"size_in_bytes": 409608
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"_path": "fonts/Ubuntu-M.ttf",
|
| 35 |
+
"path_type": "hardlink",
|
| 36 |
+
"sha256": "e801a0867295367000c6dd3c337622ae4aaff85786ddbfbdb985ce774fe3cd62",
|
| 37 |
+
"size_in_bytes": 341324
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"_path": "fonts/Ubuntu-MI.ttf",
|
| 41 |
+
"path_type": "hardlink",
|
| 42 |
+
"sha256": "810029281da01d548a914899ec643c4ae54ee9a165dfcf731f1aa8551b226350",
|
| 43 |
+
"size_in_bytes": 366992
|
| 44 |
+
},
|
| 45 |
+
{
|
| 46 |
+
"_path": "fonts/Ubuntu-R.ttf",
|
| 47 |
+
"path_type": "hardlink",
|
| 48 |
+
"sha256": "52c1afa489ae7bfd893af6cdd9f1af258005703600449e70d338caabcff507e5",
|
| 49 |
+
"size_in_bytes": 353824
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"_path": "fonts/Ubuntu-RI.ttf",
|
| 53 |
+
"path_type": "hardlink",
|
| 54 |
+
"sha256": "0626647f11d9c911f934715d1060b590744887224601abaeb22ac8f582b57118",
|
| 55 |
+
"size_in_bytes": 386440
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"_path": "fonts/Ubuntu-Th.ttf",
|
| 59 |
+
"path_type": "hardlink",
|
| 60 |
+
"sha256": "b7b61aa1c9a8873f19767a2c8e0f16d355c66733b6e7aa5e329e6abe9a698eeb",
|
| 61 |
+
"size_in_bytes": 240020
|
| 62 |
+
},
|
| 63 |
+
{
|
| 64 |
+
"_path": "fonts/UbuntuMono-B.ttf",
|
| 65 |
+
"path_type": "hardlink",
|
| 66 |
+
"sha256": "11f15c3a6bbd998a8695fdefb3475931c3789aa035d7546f2efe78e83b352f6b",
|
| 67 |
+
"size_in_bytes": 191400
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"_path": "fonts/UbuntuMono-BI.ttf",
|
| 71 |
+
"path_type": "hardlink",
|
| 72 |
+
"sha256": "bd255784bb87b5c41513a12a86f0f9cf061bce4e8256d3bfe7234611002e8f48",
|
| 73 |
+
"size_in_bytes": 216208
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"_path": "fonts/UbuntuMono-R.ttf",
|
| 77 |
+
"path_type": "hardlink",
|
| 78 |
+
"sha256": "b35dd9d2131d5d83a9b87fe9ad22c6288fa3d17688d43302c14da29812417d63",
|
| 79 |
+
"size_in_bytes": 205748
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
"_path": "fonts/UbuntuMono-RI.ttf",
|
| 83 |
+
"path_type": "hardlink",
|
| 84 |
+
"sha256": "960b2bc286c2ff7d49073303858c65e1fc9013c17a971b61123b02c39454ef75",
|
| 85 |
+
"size_in_bytes": 210216
|
| 86 |
+
}
|
| 87 |
+
],
|
| 88 |
+
"paths_version": 1
|
| 89 |
+
}
|
data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/recipe/bld.bat
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
copy "%RECIPE_DIR%\build.sh" .
|
| 2 |
+
set PREFIX=%PREFIX:\=/%
|
| 3 |
+
bash -lc "./build.sh"
|
| 4 |
+
IF %ERRORLEVEL% NEQ 0 exit 1
|
data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/recipe/build.sh
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
set -xe
|
| 4 |
+
|
| 5 |
+
mkdir -p ${PREFIX}/fonts || true
|
| 6 |
+
# flatten by 1: automatic flattening does not always happen due to __MACOSX/* files
|
| 7 |
+
mv ubuntu-font-family-${PKG_VERSION}/* . || true
|
| 8 |
+
install -v -m644 *.ttf ${PREFIX}/fonts/
|
| 9 |
+
|
| 10 |
+
# add read file permissions to LICENCE.txt
|
| 11 |
+
chmod +r ${SRC_DIR}/LICENCE.txt
|
data/miniconda3/pkgs/font-ttf-ubuntu-0.83-h77eed37_3/info/recipe/conda_build_config.yaml
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CI: azure
|
| 2 |
+
bzip2: '1'
|
| 3 |
+
c_compiler: gcc
|
| 4 |
+
cdt_name: cos7
|
| 5 |
+
channel_sources: conda-forge
|
| 6 |
+
channel_targets: conda-forge main
|
| 7 |
+
cpu_optimization_target: nocona
|
| 8 |
+
cran_mirror: https://cran.r-project.org
|
| 9 |
+
cxx_compiler: gxx
|
| 10 |
+
docker_image: quay.io/condaforge/linux-anvil-cos7-x86_64
|
| 11 |
+
extend_keys:
|
| 12 |
+
- pin_run_as_build
|
| 13 |
+
- ignore_build_only_deps
|
| 14 |
+
- ignore_version
|
| 15 |
+
- extend_keys
|
| 16 |
+
fortran_compiler: gfortran
|
| 17 |
+
ignore_build_only_deps:
|
| 18 |
+
- numpy
|
| 19 |
+
- python
|
| 20 |
+
lua: '5'
|
| 21 |
+
numpy: '1.22'
|
| 22 |
+
perl: 5.26.2
|
| 23 |
+
pin_run_as_build:
|
| 24 |
+
python:
|
| 25 |
+
max_pin: x.x
|
| 26 |
+
min_pin: x.x
|
| 27 |
+
r-base:
|
| 28 |
+
max_pin: x.x
|
| 29 |
+
min_pin: x.x
|
| 30 |
+
python: '3.10'
|
| 31 |
+
r_base: '3.5'
|
| 32 |
+
target_platform: linux-64
|