From c3f8de399bc089f973f6766e5dcd06922d5639cd Mon Sep 17 00:00:00 2001 From: Daisuke Nojiri Date: Thu, 22 Sep 2016 12:03:31 -0700 Subject: bdb: Add test for futility bdb --resign BUG=chromium:649554 BRANCH=none TEST=make runtests Change-Id: Id33911a1a05375f860c38ee6df3f98fa59066acf Signed-off-by: Daisuke Nojiri Reviewed-on: https://chromium-review.googlesource.com/388734 Reviewed-by: Randall Spangler --- tests/futility/test_bdb.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/futility/test_bdb.sh b/tests/futility/test_bdb.sh index 15339ec9..c84c6d6e 100755 --- a/tests/futility/test_bdb.sh +++ b/tests/futility/test_bdb.sh @@ -37,6 +37,22 @@ ${FUTILITY} bdb --add ${BDB_FILE} \ --data ${DATA_FILE} --partition 1 --type 2 --offset 3 --load_address 4 # TODO: Use futility show command to verify the hash is added +# Demonstrate futility bdb --resign can resign the BDB +${FUTILITY} bdb --resign ${BDB_FILE} --datakey_pri ${DATAKEY_PRI} +verify + +# Demonstrate futility bdb --resign can resign with a new data key +# Note resigning with a new data key requires a private BDB key as well +${FUTILITY} bdb --resign ${BDB_FILE} \ + --bdbkey_pri ${BDBKEY_PRI} \ + --datakey_pri ${BDBKEY_PRI} --datakey_pub ${BDBKEY_PUB} +verify + +# Demonstrate futility bdb --resign can resign with a new BDB key +${FUTILITY} bdb --resign ${BDB_FILE} \ + --bdbkey_pri ${DATAKEY_PRI} --bdbkey_pub ${DATAKEY_PUB} +verify ${DATAKEY_DIGEST} + # cleanup rm -rf ${TMP}* exit 0 -- cgit v1.2.1