Skip to content

Commit

Permalink
GRP-4104: anchor certs need to be copied to
Browse files Browse the repository at this point in the history
/etc/pki/ca-trust/source/anchors before running anchor cert command
  • Loading branch information
mchyzer committed Jun 11, 2022
1 parent 5cd2789 commit 09f6691
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions container_files/usr-local-bin/librarySetupFilesTomcat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,15 @@ setupFilesTomcat_sslCertsAnchors() {
if [ "$amiroot" = "root" ]; then

echo "grouperContainer; INFO: (librarySetupFilesTomcat.sh-setupFilesTomcat_sslCertsAnchors) There are anchor certs in /opt/grouper/certs/anchors/ to process"

/usr/bin/cp -v /opt/grouper/certs/anchors/* /etc/pki/ca-trust/source/anchors
returnCode=$?
echo "grouperContainer; INFO: (librarySetupFilesTomcat.sh-setupFilesTomcat_sslCertsAnchors) /usr/bin/cp -v /opt/grouper/certs/anchors/* /etc/pki/ca-trust/source/anchors , result=$returnCode"
if [ $returnCode != 0 ]
then
exit $returnCode
fi

/bin/update-ca-trust
returnCode=$?
echo "grouperContainer; INFO: (librarySetupFilesTomcat.sh-setupFilesTomcat_sslCertsAnchors) /bin/update-ca-trust , result=$returnCode"
Expand All @@ -271,9 +280,9 @@ setupFilesTomcat_sslCertsClient() {

if [ -n "$(ls -A /opt/grouper/certs/client/*.pem 2>/dev/null)" ]; then

chmod +w /usr/lib/jvm/java/jre/lib/security/cacerts
chmod u+w /usr/lib/jvm/java/jre/lib/security/cacerts
returnCode=$?
echo "grouperContainer; INFO: (librarySetupFilesTomcat.sh-setupFilesTomcat_sslCertsAnchors) chmod +w /usr/lib/jvm/java/jre/lib/security/cacerts , result=$returnCode"
echo "grouperContainer; INFO: (librarySetupFilesTomcat.sh-setupFilesTomcat_sslCertsAnchors) chmod u+w /usr/lib/jvm/java/jre/lib/security/cacerts , result=$returnCode"
if [ $returnCode != 0 ]
then
exit $returnCode
Expand All @@ -295,9 +304,9 @@ setupFilesTomcat_sslCertsClient() {

done

chmod -w /usr/lib/jvm/java/jre/lib/security/cacerts
chmod u-w /usr/lib/jvm/java/jre/lib/security/cacerts
returnCode=$?
echo "grouperContainer; INFO: (librarySetupFilesTomcat.sh-setupFilesTomcat_sslCertsAnchors) chmod -w /usr/lib/jvm/java/jre/lib/security/cacerts , result=$returnCode"
echo "grouperContainer; INFO: (librarySetupFilesTomcat.sh-setupFilesTomcat_sslCertsAnchors) chmod u-w /usr/lib/jvm/java/jre/lib/security/cacerts , result=$returnCode"
if [ $returnCode != 0 ]
then
exit $returnCode
Expand Down

0 comments on commit 09f6691

Please sign in to comment.