de901b9f09f00eb32fb97201c18bb5ef1de73453
[pti/rtp.git] / meta-stx / recipes-core / stx-utilities / security / stx-ssl.inc
1 #
2 ## Copyright (C) 2019 Wind River Systems, Inc.
3 #
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15
16 PACKAGES += " stx-ssl"
17
18 DESCRIPTION_stx-ssl = " Wind River Security"
19
20 do_install_append() {
21
22         openssl req -new -x509 -sha256 \
23                 -keyout ${S}/security/stx-ssl/self-signed-server-cert.pem \
24                 -out ${S}/security/stx-ssl/self-signed-server-cert.pem \
25                 -days 365 -nodes \
26                 -config ${S}/security/stx-ssl/server-csr.conf
27
28         install -p -d -m0755 ${D}/${sysconfdir}/ssl/private/
29         install -m0400 ${S}/security/stx-ssl/self-signed-server-cert.pem \
30                 ${D}/${sysconfdir}/ssl/private/self-signed-server-cert.pem 
31
32 #       install -p -d -m0755 ${D}/${sbindir}
33 #       install -m0700 ${S}/security/stx-ssl/files/tpmdevice-setup ${D}/${sbindir}/tpmdevice-setup
34
35         #install -d -m 0755 ${D}/${datadir}/stx-ssl-${PV}/
36         #install -m644 ${S}/security/stx-ssl/LICENSE ${D}/${datadir}/stx-ssl-${PV}/
37 }
38
39 FILES_stx-ssl = " \
40         ${sysconfdir}/ssl/private/self-signed-server-cert.pem  \
41         "
42 #       ${sbindir}/tpmdevice-setup