Merge "Generate self-signed certificate when https is enabled"
This commit is contained in:
commit
284044eb2b
@ -1,2 +1,2 @@
|
|||||||
COPY_LIST="$PKG_BASE/files/* $PKG_BASE/LICENSE $PKG_BASE/server-csr.conf"
|
COPY_LIST="$PKG_BASE/files/* $PKG_BASE/LICENSE"
|
||||||
TIS_PATCH_VER=PKG_GITREVCOUNT+8
|
TIS_PATCH_VER=PKG_GITREVCOUNT+8
|
||||||
|
@ -6,10 +6,8 @@ License: Apache-2.0
|
|||||||
Group: base
|
Group: base
|
||||||
Packager: Wind River <info@windriver.com>
|
Packager: Wind River <info@windriver.com>
|
||||||
URL: unknown
|
URL: unknown
|
||||||
BuildRequires: openssl
|
|
||||||
|
|
||||||
Source0: LICENSE
|
Source0: LICENSE
|
||||||
Source1: server-csr.conf
|
|
||||||
Source2: tpmdevice-setup
|
Source2: tpmdevice-setup
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -20,13 +18,8 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
RPM_BUILD_DIR_PKG="%{name}-%{version}"
|
RPM_BUILD_DIR_PKG="%{name}-%{version}"
|
||||||
mkdir -p $RPM_BUILD_DIR_PKG
|
mkdir -p $RPM_BUILD_DIR_PKG
|
||||||
CSRCONF="$RPM_BUILD_DIR_PKG/server-csr.conf"
|
|
||||||
PEMFILE="$RPM_BUILD_DIR_PKG/self-signed-server-cert.pem"
|
PEMFILE="$RPM_BUILD_DIR_PKG/self-signed-server-cert.pem"
|
||||||
cp %{SOURCE1} $CSRCONF
|
|
||||||
# generate a self signed default certificate
|
|
||||||
/usr/bin/openssl req -new -x509 -sha256 -keyout $PEMFILE -out $PEMFILE -days 365 -nodes -config $CSRCONF
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/ssl/private
|
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/ssl/private
|
||||||
install -m 400 $PEMFILE $RPM_BUILD_ROOT/%{_sysconfdir}/ssl/private/self-signed-server-cert.pem
|
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
|
mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
|
||||||
install -m 700 %{SOURCE2} $RPM_BUILD_ROOT/%{_sbindir}/tpmdevice-setup
|
install -m 700 %{SOURCE2} $RPM_BUILD_ROOT/%{_sbindir}/tpmdevice-setup
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
[ req ]
|
|
||||||
default_bits = 1024
|
|
||||||
distinguished_name = req_distinguished_name
|
|
||||||
prompt = no
|
|
||||||
|
|
||||||
[ req_distinguished_name ]
|
|
||||||
CN = StarlingX
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user