diff options
author | Colin Walters <walters@verbum.org> | 2020-04-16 16:43:43 +0000 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2020-04-16 16:43:43 +0000 |
commit | d1e5ed379ebcfca7d9623c006528475bac88993b (patch) | |
tree | 8e39f90fd20e9fcbf006b8e7e29b756da76ce728 | |
parent | eae41ea20337e131594aaabce25a358b31263c4b (diff) | |
download | ostree-d1e5ed379ebcfca7d9623c006528475bac88993b.tar.gz |
Use `sign-ed25519` for the feature name
`libsodium` is an implementation detail. In particular, I'd like
to consider using OpenSSL for ed25519 (if libsodium isn't configured
and openssl is).
So switch the name of the exposed feature and adjust the tests.
-rw-r--r-- | configure.ac | 2 | ||||
-rwxr-xr-x | tests/libtest.sh | 4 | ||||
-rwxr-xr-x | tests/test-local-pull.sh | 2 | ||||
-rwxr-xr-x | tests/test-signed-commit.sh | 2 | ||||
-rwxr-xr-x | tests/test-signed-pull-summary.sh | 4 | ||||
-rwxr-xr-x | tests/test-signed-pull.sh | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 5d9d2a23..92e47b2a 100644 --- a/configure.ac +++ b/configure.ac @@ -253,7 +253,7 @@ AS_IF([test x$with_libsodium != xno], [ AS_IF([ test x$have_libsodium = xno ], [ AC_MSG_ERROR([Need LIBSODIUM version $LIBSODIUM_DEPENDENCY or later]) ]) - OSTREE_FEATURES="$OSTREE_FEATURES libsodium" + OSTREE_FEATURES="$OSTREE_FEATURES sign-ed25519" ], with_libsodium=no ) AM_CONDITIONAL(USE_LIBSODIUM, test "x$have_libsodium" = xyes) diff --git a/tests/libtest.sh b/tests/libtest.sh index c473fd82..315c4df5 100755 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -679,10 +679,10 @@ libtest_cleanup_gpg () { } libtest_exit_cmds+=(libtest_cleanup_gpg) -has_libsodium () { +has_sign_ed25519 () { local ret ${CMD_PREFIX} ostree --version > version.txt - grep -q -e '- libsodium' version.txt + grep -q -e '- sign-ed25519' version.txt ret=$? rm -f version.txt return ${ret} diff --git a/tests/test-local-pull.sh b/tests/test-local-pull.sh index 8cbc9732..d443421a 100755 --- a/tests/test-local-pull.sh +++ b/tests/test-local-pull.sh @@ -116,7 +116,7 @@ for src_object in `find repo/objects -name '*.filez'`; do done echo "ok pull-local z2 to z2 default hardlink" -if has_libsodium; then +if has_sign_ed25519; then gen_ed25519_keys mkdir repo8 diff --git a/tests/test-signed-commit.sh b/tests/test-signed-commit.sh index 3ac3f3c1..dd76f28f 100755 --- a/tests/test-signed-commit.sh +++ b/tests/test-signed-commit.sh @@ -63,7 +63,7 @@ assert_file_has_content_literal err.txt ' No valid signatures found' echo "ok dummy sig requires env" # tests below require libsodium support -if ! has_libsodium; then +if ! has_sign_ed25519; then echo "ok Detached ed25519 signature # SKIP due libsodium unavailability" echo "ok ed25519 signature verified # SKIP due libsodium unavailability" echo "ok multiple signing # SKIP due libsodium unavailability" diff --git a/tests/test-signed-pull-summary.sh b/tests/test-signed-pull-summary.sh index 7a7dd073..6a240635 100755 --- a/tests/test-signed-pull-summary.sh +++ b/tests/test-signed-pull-summary.sh @@ -51,7 +51,7 @@ do PUBLIC_KEY="dummysign" ;; ed25519) - if ! has_libsodium; then + if ! has_sign_ed25519; then echo "ok ${engine} pull mirror summary # SKIP due libsodium unavailability" echo "ok ${engine} pull with signed summary # SKIP due libsodium unavailability" echo "ok ${engine} prune summary cache # SKIP due libsodium unavailability" @@ -173,7 +173,7 @@ do done -if ! has_libsodium; then +if ! has_sign_ed25519; then echo "ok ${engine} pull with signed summary remote old summary # SKIP due libsodium unavailability" echo "ok ${engine} pull with signed summary broken cache # SKIP due libsodium unavailability" exit 0 diff --git a/tests/test-signed-pull.sh b/tests/test-signed-pull.sh index a8d52bc5..075c5f2b 100755 --- a/tests/test-signed-pull.sh +++ b/tests/test-signed-pull.sh @@ -98,7 +98,7 @@ ${CMD_PREFIX} ostree --repo=repo config set 'remote "origin"'.verification-dummy ${CMD_PREFIX} ostree --repo=repo config unset 'remote "origin"'.verification-dummy-file test_signed_pull "dummy" "" -if ! has_libsodium; then +if ! has_sign_ed25519; then echo "ok ed25519-key pull signed commit # SKIP due libsodium unavailability" echo "ok ed25519-key re-pull signature for stored commit # SKIP due libsodium unavailability" echo "ok ed25519-key+file pull signed commit # SKIP due libsodium unavailability" |