From 505085017506c883ba0d38feaeca66ef7a327a63 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Thu, 13 Jun 2019 11:05:35 +0200 Subject: #802: Creating certificate to sign boot loaders. --- installer/opengnsys_installer.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'installer/opengnsys_installer.sh') diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 66cf0ad8..b62b0f50 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1376,6 +1376,7 @@ function copyInterfaceAdm () return $hayErrores } + #################################################################### ### Funciones instalacion cliente opengnsys #################################################################### @@ -1409,6 +1410,18 @@ function copyClientFiles() } +# Crear certificados para la firma de cargadores de arranque. +function createCerts () +{ + local SSLCFGDIR=$INSTALL_TARGET/client/etc/ssl + echoAndLog "${FUNCNAME}(): creating certificate files" + mkdir -p $SSLCFGDIR/{certs,private} + openssl req -new -x509 -newkey rsa:2048 -keyout $SSLCFGDIR/private/opengnsys.key -out $SSLCFGDIR/certs/opengnsys.crt -nodes -days 3650 -subj "/CN=OpenGnsys/" + openssl x509 -in $SSLCFGDIR/certs/opengnsys.crt -out $SSLCFGDIR/certs/opengnsys.cer -outform DER + echoAndLog "${FUNCNAME}(): certificate successfully created" +} + + # Crear cliente OpenGnsys. function clientCreate() { @@ -1803,6 +1816,9 @@ if [ $? -ne 0 ]; then errorAndLog "Error creating client structure" fi +# Crear certificado para firmar cargadores +createCerts + # Crear la estructura del cliente de OpenGnsys. for i in $OGLIVE; do if ! clientCreate "$i"; then -- cgit v1.2.3-18-g5258