1*e7b1675dSTing-Kang Chang#!/bin/bash 2*e7b1675dSTing-Kang Chang 3*e7b1675dSTing-Kang Chang# Copyright 2022 Google LLC 4*e7b1675dSTing-Kang Chang# 5*e7b1675dSTing-Kang Chang# Licensed under the Apache License, Version 2.0 (the "License"); 6*e7b1675dSTing-Kang Chang# you may not use this file except in compliance with the License. 7*e7b1675dSTing-Kang Chang# You may obtain a copy of the License at 8*e7b1675dSTing-Kang Chang# 9*e7b1675dSTing-Kang Chang# http://www.apache.org/licenses/LICENSE-2.0 10*e7b1675dSTing-Kang Chang# 11*e7b1675dSTing-Kang Chang# Unless required by applicable law or agreed to in writing, software 12*e7b1675dSTing-Kang Chang# distributed under the License is distributed on an "AS IS" BASIS, 13*e7b1675dSTing-Kang Chang# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14*e7b1675dSTing-Kang Chang# See the License for the specific language governing permissions and 15*e7b1675dSTing-Kang Chang# limitations under the License. 16*e7b1675dSTing-Kang Chang################################################################################ 17*e7b1675dSTing-Kang Chang 18*e7b1675dSTing-Kang Chang# This script updates SSL certificates in the Kokoro GCP Ubuntu environment. 19*e7b1675dSTing-Kang Chang# 20*e7b1675dSTing-Kang Chang# TODO(b/201806781): Remove when no longer necessary. 21*e7b1675dSTing-Kang Chang# 22*e7b1675dSTing-Kang Chang# Usage instructions: 23*e7b1675dSTing-Kang Chang# 24*e7b1675dSTing-Kang Chang# ./kokoro/testutils/update_certs.sh 25*e7b1675dSTing-Kang Chang 26*e7b1675dSTing-Kang Changreadonly PLATFORM="$(uname | tr '[:upper:]' '[:lower:]')" 27*e7b1675dSTing-Kang Changif [[ -z "${KOKORO_ROOT}" || "${PLATFORM}" != "linux" ]]; then 28*e7b1675dSTing-Kang Chang exit 0 29*e7b1675dSTing-Kang Changfi 30*e7b1675dSTing-Kang Chang 31*e7b1675dSTing-Kang Changsudo apt-get install -y ca-certificates 32*e7b1675dSTing-Kang Changsudo rm -f /usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt 33*e7b1675dSTing-Kang Changsudo update-ca-certificates 34