- Community Home
- >
- Software
- >
- HPE OneView
- >
- Disable TSL vs 1.0
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2021 04:26 AM - last edited on 09-08-2021 07:50 PM by support_s
08-18-2021 04:26 AM - last edited on 09-08-2021 07:50 PM by support_s
Just another method to disable TLS vs 1.0 in case it helps anyone?
# Extract the current TLS settings
TLSEnabled=$(curl --insecure \
--header "X-API-Version: ${currentVersion}" \
--header "auth: ${sessionID}" \
--request GET ${OneView}/rest/security-standards/protocols | jq -r ".[] | .protocolName,.enabled")
declare -A TLS
i=0
for f in $(echo ${TLSEnabled}); do
echo ${f}
TLS[${i}]=${f}
((i++))
done
((i--))
# Create a function to disable TLS vs 1 and enable TLS vs 1.1 & 1.2
enableTLS () {
TLSSet=$(curl --insecure \
--header "content-type: application/json" \
--header "X-API-Version: ${currentVersion}" \
--header "auth: ${sessionID}" \
--data '[ { "protocolName":"TLSv1", "enabled":false }, "protocolName":"TLSv1.1", "enabled":true, "protocolName":"TLSv1.2", "enabled":true }]' \
--request PUT ${OneView}/rest/security-standards/protocols | jq -r '.'
}
#
for k in $(seq 0 2 ${i}); do
l=$((${k} + 1))
if [[ ${TLS[${k}]} == "TLSv1" && ${TLS[${l}]} == 'true" ]]; then
echo "Have identified TLS v1 as being enabled."
enableTLS
elif [[ ${TLS[${k}]} == "TLSv1.1" ]]; then
if [[ ${TLS[${l}]} == "false" ]]; then
echo "Need to enable ${TLS[${k}]}"
enableTLS
else
echo "${TLS[${k}]} is already enabled"
fi
elif [[ ${TLS[${k}]} == "TLSv1.2" ]]; then
if [[ ${TLS[${l}]} == "false" ]]; then
echo "Need to enable ${TLS[${k}]}"
enableTLS
else
echo "${TLS[${k}]} is already enabled"
fi
else
echo "TLS v1 is already disabled"
fi
done
Solved! Go to Solution.
- Tags:
- OneView
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2021 02:38 PM
08-19-2021 02:38 PM
SolutionThanks for sharing, @BradV.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
