@@ -83,17 +83,31 @@ jobs:
8383 java-package : " jre"
8484
8585 # java.security open tls1 Windows
86- - name : Enable tls1
87- if : ${{ runner.os == 'Windows' }}
88- run : |
89- sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "${{ env.JAVA_HOME }}/conf/security/java.security"
90- shell : pwsh
91-
92- # java.security open tls1 macOS
93- - name : Enable tls1
94- if : ${{ runner.os == 'macOS' }}
86+ # - name: Enable tls1
87+ # if: ${{ runner.os == 'Windows' }}
88+ # run: |
89+ # sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "${{ env.JAVA_HOME }}/conf/security/java.security"
90+ # shell: pwsh
91+ #
92+ # # java.security open tls1 macOS
93+ # - name: Enable tls1
94+ # if: ${{ runner.os == 'macOS' }}
95+ # run: |
96+ # sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" $JAVA_HOME/conf/security/java.security
97+ # 开放TLS
98+ - name : Enable TLS 1.0 and 1.1 in java.security
9599 run : |
96- sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" $JAVA_HOME/conf/security/java.security
100+ if [ "$RUNNER_OS" = "Windows" ]; then
101+ sed -i "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\(TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "$JAVA_HOME/conf/security/java.security"
102+ elif [ "$RUNNER_OS" = "Linux" ]; then
103+ sed -i "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\(TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "$JAVA_HOME/conf/security/java.security"
104+ elif [ "$RUNNER_OS" = "macOS" ]; then
105+ sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\(TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "$JAVA_HOME/conf/security/java.security"
106+ fi
107+ shell : bash
108+ env :
109+ RUNNER_OS : ${{ runner.os }}
110+ JAVA_HOME : ${{ env.JAVA_HOME }}
97111
98112 # Copy jre Windows
99113 - name : Copy Jre for Windows
0 commit comments