Andy Ning 32b8dfda6f Generate self-signed certificate when https is enabled
Currently the self-signed certificate used as the REST API/GUI
server certificate for the first time HTTPS is enabled is generate
at build time and embedded in the ISO. This will make it expire less
than a year from the date the system is installed.

This change removed the certificate generation at build time, instead
generate it at the first time HTTPS is enabled.

Closes-Bug: 1944438
Depends-On: https://review.opendev.org/c/starlingx/config/+/810263
Signed-off-by: Andy Ning <andy.ning@windriver.com>
Change-Id: I7835534c11df3b03ea8e6f6ea7e88878386bcc12
2021-09-23 14:57:45 -04:00

35 lines
826 B
RPMSpec

Summary: stx-ssl version 1.0.0-r2
Name: stx-ssl
Version: 1.0.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
Packager: Wind River <info@windriver.com>
URL: unknown
Source0: LICENSE
Source2: tpmdevice-setup
%description
Wind River Security
%install
rm -rf $RPM_BUILD_ROOT
RPM_BUILD_DIR_PKG="%{name}-%{version}"
mkdir -p $RPM_BUILD_DIR_PKG
PEMFILE="$RPM_BUILD_DIR_PKG/self-signed-server-cert.pem"
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/ssl/private
mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
install -m 700 %{SOURCE2} $RPM_BUILD_ROOT/%{_sbindir}/tpmdevice-setup
mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}-%{version}
install -m 644 %{SOURCE0} $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}-%{version}
%files
%defattr(-,root,root,-)
%{_sysconfdir}/*
%{_sbindir}/*
%{_defaultdocdir}/%{name}-%{version}