From 1b2779771073bd2da7bd5959c8fa1a4cf7acdede Mon Sep 17 00:00:00 2001 From: Chris Masone Date: Mon, 8 Aug 2011 18:51:23 -0700 Subject: [PATCH] Make nssdb creation in /etc/fake_root_ca work on ARM This command was failing before (and the error getting swamped in log output) resulting in a later command auto-creating the database and failing to set the trust settings of the fake SSL cert we use in tests correctly. BUG=chrome-os-partner:4923 TEST=build arm-generic test image, see that there are no error messages after "Generating a 1024 bit RSA private key" in the output log Change-Id: I5b0c05d90e528aa5047cb12aa338cef176d233aa Reviewed-on: http://gerrit.chromium.org/gerrit/5519 Reviewed-by: Chris Masone Tested-by: Chris Masone --- mod_for_test_scripts/710enableAuthTesting | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mod_for_test_scripts/710enableAuthTesting b/mod_for_test_scripts/710enableAuthTesting index de7ecd3d8a..690100730b 100755 --- a/mod_for_test_scripts/710enableAuthTesting +++ b/mod_for_test_scripts/710enableAuthTesting @@ -39,7 +39,9 @@ sudo chroot "${ROOT_FS_DIR}" ${QEMU} /usr/bin/openssl req -x509 -days 21 \ -newkey rsa:1024 -nodes -keyout "${TMP_KEY}" -out "${TMP_CERT}" mkdir -m 0755 -p "${ROOT_FS_DIR}/${FAKE_NSSDB}" -sudo chroot "${ROOT_FS_DIR}" bash -c "${QEMU} \ + +# Both bash and nsscertutil must be run under qemu-arm +sudo chroot "${ROOT_FS_DIR}" ${QEMU} /bin/bash -c "${QEMU} \ /usr/local/bin/nsscertutil -d sql:${FAKE_NSSDB} -N -f <(echo '')" cp "${ROOT_FS_DIR}/${TMP_KEY}" "${ROOT_FS_DIR}/${FAKE_CA_DIR}/${CERT_NAME}.key" cp "${ROOT_FS_DIR}/${TMP_CERT}" "${ROOT_FS_DIR}/${FAKE_CA_DIR}/${CERT_NAME}.pem"