Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Unix/installbuilder/datafiles/Base_OMI.data
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ EOF
}

GenerateKeyCert() {
$OPENSSL_PATH req -x509 -sha256 -newkey rsa:2048 -days 3650 -nodes -config $cnffile -keyout $keyfile -out $certfile
$OPENSSL_PATH req -x509 -sha256 -newkey rsa:3072 -days 3650 -nodes -config $cnffile -keyout $keyfile -out $certfile
}

HandleConfigFiles() {
Expand Down Expand Up @@ -465,6 +465,13 @@ DeleteUnsupportedCertificate() {
echo "************************************************************"
rm -rf $certdir*
fi

if [ `$OPENSSL_PATH x509 -in $certfile -text | grep "Public-Key"| sed 's/[^0-9]*//g'` -lt 3072 ]; then
echo "************************************************************"
echo "* Deleting certificates whose public key is less than 3072 *"
echo "************************************************************"
rm -rf $certdir*
fi
fi
}

Expand Down