第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

Ubuntu 下的 OpenJDK 11 是否支持 TLSv1.3?

Ubuntu 下的 OpenJDK 11 是否支持 TLSv1.3?

慕工程0101907 2022-06-08 17:37:04
在 Ubuntu 18.04 上sudo apt install openjdk-11-source導(dǎo)致ProtocolVersion.java不知道 TLSv1.3 。有沒(méi)有辦法糾正這個(gè)問(wèn)題(沒(méi)有限制性許可)?
查看完整描述

2 回答

?
一只名叫tom的貓

TA貢獻(xiàn)1906條經(jīng)驗(yàn) 獲得超3個(gè)贊

更新

自2019 年 4 月 23 日起,Ubuntu(18.04 LTS 和更新版本)附帶 JRE/JDK 版本11.0.3。出于這個(gè)原因,alamar的原始答案已經(jīng)過(guò)時(shí)。


出于好奇,我編寫(xiě)了一個(gè)小的 TLS v1.3 檢查工具,它以編程方式檢查目標(biāo)運(yùn)行時(shí)環(huán)境的 TLS v1.3 支持。這樣,人們可以快速發(fā)現(xiàn)發(fā)生了什么:


public class TLS13Checker {


    public static void main(String[] args) {

        SSLContext context = null;

        try {

            KeyStore keyStore = KeyStore.getInstance("pkcs12");

            TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("PKIX");

            trustManagerFactory.init(keyStore);

            TrustManager[] trustAllCerts = trustManagerFactory.getTrustManagers();

            context = SSLContext.getInstance("TLSv1.3");

            context.init(null, trustAllCerts, new SecureRandom());


            SSLParameters params = context.getSupportedSSLParameters();

            String[] protocols = params.getProtocols();

            System.out.println("Java version : " + System.getProperty("java.runtime.version"));

            boolean supportsTLSv13 = false;

            for (String protocol : protocols) {

                if ("TLSv1.3".equals(protocol)) {

                    supportsTLSv13 = true;

                    break;

                }

            }

            if(supportsTLSv13) {

                System.out.println("JRE supports TLS v1.3!");

            } else {

                System.out.println("JRE does NOT support TLS v1.3!");

            }

            String[] suites = params.getCipherSuites();

            System.out.println("A total of " + suites.length + " TLS cipher suites is supported.");


        } catch (NoSuchAlgorithmException | KeyManagementException | KeyStoreException e) {

            e.printStackTrace();

            System.exit(42);

        }


    }

}

您可以簡(jiǎn)單地編譯并運(yùn)行它,輸出將類(lèi)似于我在最近的OpenJDK環(huán)境(在 MacOS 下)得到的結(jié)果:


Java version : 11.0.3+7

JRE supports TLS v1.3!

A total of 45 TLS cipher suites is supported.

此外,此列表概述了所有常規(guī)JSSE 密碼套件名稱(chēng)。它可能有助于參考或其他(實(shí)施)目的。


希望能幫助到你。


查看完整回答
反對(duì) 回復(fù) 2022-06-08
?
qq_遁去的一_1

TA貢獻(xiàn)1725條經(jīng)驗(yàn) 獲得超8個(gè)贊

似乎出于某種原因,Ubuntu 實(shí)際上在 openjdk-11-* 軟件包下提供了 Java 10。



查看完整回答
反對(duì) 回復(fù) 2022-06-08
  • 2 回答
  • 0 關(guān)注
  • 266 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)