summaryrefslogtreecommitdiff
path: root/scripts/201.ca-certificates-bundle-upgrade.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/201.ca-certificates-bundle-upgrade.sh.in')
-rw-r--r--scripts/201.ca-certificates-bundle-upgrade.sh.in33
1 files changed, 33 insertions, 0 deletions
diff --git a/scripts/201.ca-certificates-bundle-upgrade.sh.in b/scripts/201.ca-certificates-bundle-upgrade.sh.in
new file mode 100644
index 0000000..edb2db2
--- /dev/null
+++ b/scripts/201.ca-certificates-bundle-upgrade.sh.in
@@ -0,0 +1,33 @@
+#!/bin/bash
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+# Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+#
+# 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.
+#
+# @file 201.ca-certificates-bundle-upgrade.sh.in
+# @author Sangwan Kwon (sangwan.kwon@samsung.com)
+# @brief CA bundle migration scripts for platform upgrade 2.4 -> 3.0
+#
+
+# delete old ca bundle
+rm -rf @OLD_CA_BUNDLE_DIR@
+
+# upgrade bundle file
+mkdir -p @TZ_SYS_CA_BUNDLE_DIR@
+cp @UPGRADE_DATA_DIR@/ca-bundle.pem @TZ_SYS_CA_BUNDLE_DIR@
+
+# change permission
+chsmack -a @SMACK_DOMAIN_NAME@ @TZ_SYS_CA_BUNDLE@
+chown root:@GROUP_NAME@ @TZ_SYS_CA_BUNDLE@
+chmod 664 @TZ_SYS_CA_BUNDLE@