mirror of
https://github.com/flatcar/scripts.git
synced 2026-02-27 02:21:37 +01:00
Fake authserver SSL certs now valid for 21 days, instead of 2
BUG=5130 TEST=create a test image, boot it on a device, and run "sudo nsscertutil -d "sql:/etc/fake_root_ca/nssdb" -L -n FakeCert | less". Look at the section of the output marked "Validity:" and make sure the Not Before and Not After sections indicate dates that are 3 weeks apart Change-Id: I67cf7e71027147f83c1bc916557bc06ef66fa0e0 Review URL: http://codereview.chromium.org/3075025
This commit is contained in:
parent
6d49138087
commit
626ced822c
@ -29,7 +29,7 @@ mv -f "${TMP_KEY}" "${ROOT_FS_DIR}/${TMP_KEY}"
|
||||
mv -f "${TMP_CERT}" "${ROOT_FS_DIR}/${TMP_CERT}"
|
||||
|
||||
# Generate testing root cert on the fly.
|
||||
sudo chroot "${ROOT_FS_DIR}" ${QEMU} /usr/bin/openssl req -x509 -days 2 \
|
||||
sudo chroot "${ROOT_FS_DIR}" ${QEMU} /usr/bin/openssl req -x509 -days 21 \
|
||||
-subj "/CN=www.google.com" \
|
||||
-newkey rsa:1024 -nodes -keyout "${TMP_KEY}" -out "${TMP_CERT}"
|
||||
|
||||
@ -53,7 +53,7 @@ cat "${ROOT_FS_DIR}/${TMP_CERT}" "${CERT_FILE}" > "${TMPFILE}"
|
||||
mv -f "${TMPFILE}" "${CERT_FILE}"
|
||||
chmod "${PERMS}" "${CERT_FILE}"
|
||||
|
||||
if [ -n "${QEMU}" ] ; then
|
||||
if [ -n "${QEMU}" ] ; then
|
||||
rm "${ROOT_FS_DIR}/${QEMU}"
|
||||
fi
|
||||
rm "${ROOT_FS_DIR}/${TMP_KEY}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user