PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
)
+INSTALL(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/scripts/500.ca-certificates_upgrade.sh
+ DESTINATION "/usr/share/upgrade/scripts"
+ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
+)
CONFIGURE_FILE(packaging/ca-certificates.manifest.in ca-certificates.manifest @ONLY)
BuildRequires: findutils
Requires: filesystem
Requires: security-config
+Requires: openssl1.1
%description
Utilities for system wide CA certificate installation
# scripts for managing certificates
%dir %{ro_ca_certs_script_dir}
%attr(744, root, root) %{ro_ca_certs_script_dir}/*
+# update script for CA bundle re-creation
+%attr(755,root,root) /usr/share/upgrade/scripts/500.ca-certificates_upgrade.sh
%files devel
%config %{macro_ca_certificates}
--- /dev/null
+#!/bin/sh -e
+
+#
+# Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved.
+#
+# This file is licensed under the terms of MIT License or the Apache License
+# Version 2.0 of your choice. See the LICENSE.MIT file for MIT license details.
+# See the LICENSE file or the notice below for Apache License Version 2.0
+# details.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+. /etc/tizen-platform.conf
+
+# create bundle
+exec $TZ_SYS_RO_SHARE/ca-certificates/scripts/concat-cacerts.sh $TZ_SYS_RO_SHARE/ca-certificates/certs/ $TZ_SYS_VAR/lib/ca-certificates/ca-bundle.pem
+
+# gen-symlinks.sh script also creates links on RO partition but these links
+# should be still valid after platfrom update; this script only fixes RW partition
+
+# clear old links
+rm -f $TZ_SYS_ETC/ssl/certs/*
+
+# link files : for certs RW area
+CERTS_LIST=`find $TZ_SYS_RO_SHARE/ca-certificates/certs/ -type f -printf "%f "`
+for cert in ${CERTS_LIST}
+do
+ ln -sf $TZ_SYS_RO_SHARE/ca-certificates/certs/${cert} $TZ_SYS_ETC/ssl/certs/
+done