Alon Bar-Lev has uploaded a new change for review. Change subject: pki: backup previous ca when creating new one ......................................................................
pki: backup previous ca when creating new one Change-Id: Ie4111dee70ea746dbb481d0a7597898ad51ec13d Signed-off-by: Alon Bar-Lev <[email protected]> --- M packaging/bin/pki-create-ca.sh 1 file changed, 13 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/46/17146/1 diff --git a/packaging/bin/pki-create-ca.sh b/packaging/bin/pki-create-ca.sh index d726923..0d92fa7 100755 --- a/packaging/bin/pki-create-ca.sh +++ b/packaging/bin/pki-create-ca.sh @@ -2,12 +2,21 @@ KEYTOOL="${JAVA_HOME:-/usr}/bin/keytool" -enroll() { - local subject="$1" - +config() { + common_backup "${PKIDIR}/cacert.conf" "${PKIDIR}/cert.conf" cp "${PKIDIR}/cacert.template" "${PKIDIR}/cacert.conf" || die "Cannot create cacert.conf" cp "${PKIDIR}/cert.template" "${PKIDIR}/cert.conf" | die "Cannot create cert.conf" chmod a+r "${PKIDIR}/cacert.conf" "${PKIDIR}/cert.conf" || die "Cannot set config files permissions" +} + +enroll() { + local subject="$1" + + common_backup \ + "${PKIDIR}/serial.txt" \ + "${PKIDIR}"/database.txt* \ + "${PKIDIR}/private/ca.pem" \ + "${PKIDIR}/ca.pem" # # openssl ca directory must @@ -126,5 +135,6 @@ [ -n "${SUBJECT}" ] || die "Please specify subject" [ -n "${KEYSTORE_PASSWORD}" ] || die "Please specify keystore password" +config enroll "${SUBJECT}" keystore "${KEYSTORE_PASSWORD}" -- To view, visit http://gerrit.ovirt.org/17146 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie4111dee70ea746dbb481d0a7597898ad51ec13d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
