【问题标题】:Find the algorithm of SSL Symmetric Encryption找到 SSL 对称加密的算法
【发布时间】:2021-09-25 13:30:20
【问题描述】:

有没有一种方法可以找到在 SSL 握手后用于加密服务器和客户端之间的 HTTPS 请求的算法。查看网络调用、服务器证书或浏览器设置等。

【问题讨论】:

  • 如果你想知道特定的 HTTPS 连接使用什么,你必须查看特定的连接,或者使用像 Wireshark 这样的网络嗅探器,或者在客户端或服务器程序内部:ServerHello 中显示的密码提供有关使用的对称算法的详细信息。看证书也无济于事。

标签: ssl encryption-symmetric


【解决方案1】:

用java你可以试试这个。

    private void printSSLDetails(){

        String https_url = "https://www.google.com/";
        URL url;
        try {

            url = new URL(https_url);
            HttpsURLConnection con = (HttpsURLConnection)url.openConnection();

            //dumpl all cert info
            if(con!=null){

                try {

                    System.out.println("Response Code : " + con.getResponseCode());
                    System.out.println("Cipher Suite : " + con.getCipherSuite());
                    System.out.println("\n");

                    Certificate[] certs = con.getServerCertificates();
                    for(Certificate cert : certs){
                        System.out.println("Cert Type : " + cert.getType());
                        System.out.println("Cert Hash Code : " + cert.hashCode());
                        System.out.println("Cert Public Key Algorithm : "
                            + cert.getPublicKey().getAlgorithm());
                        System.out.println("Cert Public Key Format : "
                            + cert.getPublicKey().getFormat());
                        System.out.println("\n");
                   }

                } catch (SSLPeerUnverifiedException e) {
                    e.printStackTrace();
                } catch (IOException e){
                    e.printStackTrace();
                }

            }

        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-10-30
    • 2023-04-02
    • 1970-01-01
    • 2021-07-31
    • 2012-12-17
    • 1970-01-01
    • 1970-01-01
    • 2014-03-29
    相关资源
    最近更新 更多