apk-tools/src
Aydin Mercan 0b7d6dfbf2
crypto: start seperating public/private key usage
Digests now use bearssl + libsodium instead of openssl + libsodium.
It fits better with the API looking more similar and I don't think it
will be that much of a bottleneck.

Instead of a apk_pkey that mimicks the EVP_PKEY semantics, have seperate
public and private key structures. However, apk is broken because of it
and needs fixing. The rest of the code might compile but won't work
as I haven't handled the cases where pkey corressponds to public/private
keys in codebase properly. Also, DSA signatures are removed.

Public and private keys impls' now use a static array of vtables
internally. The indicies correspond to the signature scheme version and
checking `< APK_*_MAX` should be enough? I tried to make so that higher
values correspond to more desirable constructs, this might come in handy.

Signing/verifying start is free from keys as it isn't used though it
might be brought back for domain seperated hashes, ability to get
timestamps involved with epheremal keys in the future etc.

`apk_crypto.h` is free from openssl includes although some headers still
use them for now.
2022-08-24 10:15:14 +03:00
..
Makefile crypto: start seperating public/private key usage 2022-08-24 10:15:14 +03:00
adb.c crypto: start seperating public/private key usage 2022-08-24 10:15:14 +03:00
adb.h mkndx, adb: fix index searching 2022-03-21 14:09:06 +02:00
adb_comp.c remove IS_ERR_OR_NULL 2021-08-23 17:02:50 +03:00
adb_walk_adb.c adbdump: fix dumping signatures 2021-11-09 21:50:11 +02:00
adb_walk_genadb.c adb: refactor struct adb_header to adb_file_header 2021-07-22 16:14:49 +03:00
adb_walk_gentext.c add adbgen applet to generate databases from it's text dump 2021-06-02 22:35:58 +03:00
adb_walk_text.c remove IS_ERR_OR_NULL 2021-08-23 17:02:50 +03:00
apk-static.c static build: do not use openssl engines 2010-06-30 16:55:50 +03:00
apk-test.c test: rewrite the testing framework to use the real applets 2012-02-23 22:05:02 +02:00
apk.c crypto: start tinkering 2022-08-24 10:13:22 +03:00
apk.pc.in crypto: start tinkering 2022-08-24 10:13:22 +03:00
apk_adb.c mkndx, adb: fix index searching 2022-03-21 14:09:06 +02:00
apk_adb.h adb: add layer to pkginfo 2022-02-21 10:24:05 +02:00
apk_applet.h applet: rework APK_DEFINE_APPLET to use constructor attribute 2021-12-14 12:05:59 -06:00
apk_atom.h make the atom functions not use global state 2020-05-19 12:02:56 +03:00
apk_blob.h portability: take over strlcpy 2021-12-29 20:14:41 +02:00
apk_context.h apk: add --preserve-env option 2021-12-29 09:50:50 +02:00
apk_crypto.h crypto: start seperating public/private key usage 2022-08-24 10:15:14 +03:00
apk_database.h db: sort world dependencies to layers 2022-02-21 10:24:05 +02:00
apk_defines.h keep APK_DEFAULT_ARCH as the define used in source code 2022-03-30 09:17:25 +00:00
apk_extract.h database: implement uvol support 2021-11-09 21:50:11 +02:00
apk_fs.h db: fix change detection for symlinks 2022-08-17 21:13:40 +03:00
apk_hash.h use SPDX-License-Identifier in source files 2020-05-07 10:45:42 +03:00
apk_io.h io: move make_dirs as apk_make_dirs and use it 2022-04-05 10:53:52 +03:00
apk_openssl.h add basic abstraction for cryptographic operations 2021-06-11 13:35:32 +03:00
apk_package.h db: sort world dependencies to layers 2022-02-21 10:24:05 +02:00
apk_pathbuilder.h optimize apk_pathbuilder_pop to get the old length 2021-11-09 21:50:11 +02:00
apk_print.h print: improve indented printing api 2021-12-27 14:34:01 +02:00
apk_provider_data.h use SPDX-License-Identifier in source files 2020-05-07 10:45:42 +03:00
apk_solver.h fix, simplify and document upgrade --ignore 2020-08-24 15:26:25 +03:00
apk_solver_data.h use SPDX-License-Identifier in source files 2020-05-07 10:45:42 +03:00
apk_tar.h Refactor .apk extraction code 2021-07-27 14:09:38 +03:00
apk_trust.h crypto: start seperating public/private key usage 2022-08-24 10:15:14 +03:00
apk_version.h adb: fix handling of conflicts 2022-03-07 08:26:07 +00:00
apk_xattr.h abstract differences between GNU and Apple xattr functions 2021-12-29 20:14:41 +02:00
app_adbdump.c adb: unify various interfaces to adb_m_process 2021-07-22 15:30:08 +03:00
app_adbsign.c adb: make adb mmap/stream parser more united, add ADB_BLOCK_DATAX 2021-07-22 16:14:49 +03:00
app_add.c add: allow specifying a version for --virtual package 2022-05-04 19:56:00 +03:00
app_audit.c db, audit: support sha256-160 hashes for v3 pkg compat 2021-11-03 15:37:10 +02:00
app_cache.c cache: allow various flags, and addition of dependencies 2022-01-21 14:36:31 +02:00
app_convdb.c Refactor .apk extraction code 2021-07-27 14:09:38 +03:00
app_convndx.c Further refactor extract API to have separate ops vtable 2021-07-27 16:28:22 +03:00
app_del.c print: improve indented printing api 2021-12-27 14:34:01 +02:00
app_dot.c make apk_database optional for applets that don't need it 2020-10-09 16:09:19 +03:00
app_extract.c database: implement uvol support 2021-11-09 21:50:11 +02:00
app_fetch.c fetch: implement --world 2022-05-04 19:56:04 +03:00
app_fix.c make apk_database optional for applets that don't need it 2020-10-09 16:09:19 +03:00
app_index.c db, add: support adding v3 package files 2021-10-27 16:14:45 +03:00
app_info.c remove IS_ERR_OR_NULL 2021-08-23 17:02:50 +03:00
app_list.c list: sort options alphabetically 2021-12-27 10:34:17 +02:00
app_manifest.c optimize apk_pathbuilder_pop to get the old length 2021-11-09 21:50:11 +02:00
app_mkndx.c mkndx: fix v3 package handling 2022-03-21 15:25:12 +02:00
app_mkpkg.c mkpkg: use correct script counter when writing scripts to adb 2022-04-04 05:05:08 +00:00
app_policy.c db: prepare database reading for layers 2022-02-21 10:24:05 +02:00
app_search.c make apk_database optional for applets that don't need it 2020-10-09 16:09:19 +03:00
app_stats.c make apk_database optional for applets that don't need it 2020-10-09 16:09:19 +03:00
app_update.c apk_update: use URL_PRINTF 2020-12-29 13:52:29 +02:00
app_upgrade.c make apk_database optional for applets that don't need it 2020-10-09 16:09:19 +03:00
app_verify.c Refactor .apk extraction code 2021-07-27 14:09:38 +03:00
app_version.c add missing apk_trust.h 2020-10-09 16:18:23 +03:00
app_vertest.c make apk_database optional for applets that don't need it 2020-10-09 16:09:19 +03:00
applet.c support building with uncompressed help databases 2022-01-13 14:13:53 +00:00
atom.c make the atom functions not use global state 2020-05-19 12:02:56 +03:00
blob.c portability: take over strlcpy 2021-12-29 20:14:41 +02:00
commit.c solver: do not auto select virtual-only package with one provider 2022-02-24 14:18:41 +02:00
common.c everywhere: use stdlib.h for malloc(3) definition, not GNU-specific malloc.h 2021-12-14 16:23:29 +00:00
context.c io: move make_dirs as apk_make_dirs and use it 2022-04-05 10:53:52 +03:00
crypto_core.c crypto: start tinkering 2022-08-24 10:13:22 +03:00
crypto_digest.c crypto: start seperating public/private key usage 2022-08-24 10:15:14 +03:00
crypto_public.c crypto: start seperating public/private key usage 2022-08-24 10:15:14 +03:00
crypto_secret.c crypto: start seperating public/private key usage 2022-08-24 10:15:14 +03:00
database.c crypto: start seperating public/private key usage 2022-08-24 10:15:14 +03:00
extract_v2.c crypto: start seperating public/private key usage 2022-08-24 10:15:14 +03:00
extract_v3.c extract_v3: make sure empty file's hash is copied too 2021-12-03 15:06:49 +02:00
fs_fsys.c db: fix change detection for symlinks 2022-08-17 21:13:40 +03:00
fs_uvol.c db: fix change detection for symlinks 2022-08-17 21:13:40 +03:00
genhelp.lua genhelp: fix upper case substition 2022-01-21 14:47:54 +02:00
hash.c make the atom functions not use global state 2020-05-19 12:02:56 +03:00
io.c io: move make_dirs as apk_make_dirs and use it 2022-04-05 10:53:52 +03:00
io_gunzip.c io_gunzip: fix handling short reads near end-of-file 2022-02-21 12:36:46 +02:00
io_url.c defines: provide APKE_REMOTE_IO as portable alternative to EREMOTEIO 2021-12-14 18:48:18 +00:00
lua-apk.c lua: remove features.h 2021-12-13 14:44:21 -06:00
meson.build crypto: start seperating public/private key usage 2022-08-24 10:15:14 +03:00
package.c crypto: start seperating public/private key usage 2022-08-24 10:15:14 +03:00
pathbuilder.c pathbuilder: fix push return value 2021-11-11 11:24:49 +02:00
print.c mkpkg, adb: validate version and dependency format 2022-02-01 14:47:27 +02:00
solver.c solver: do not auto select virtual-only package with one provider 2022-02-24 14:18:41 +02:00
tar.c tar: allow for space as numeric field terminator 2022-02-21 08:26:20 +00:00
template.c use SPDX-License-Identifier in source files 2020-05-07 10:45:42 +03:00
trust.c crypto: start seperating public/private key usage 2022-08-24 10:15:14 +03:00
version.c version: increase number of digits supported in version component 2021-10-25 13:30:40 +03:00