e229. creating a certification path.txt

来自「这里面包含了一百多个JAVA源文件」· 文本 代码 · 共 14 行

TXT
14
字号
This example demonstrates how to create a CertPath object from an list of certificates. 
    // The CA's certificate should be the last element in the array
    public static CertPath createCertPath(java.security.cert.Certificate[] certs) {
        try {
            CertificateFactory certFact = CertificateFactory.getInstance("X.509");
            CertPath path = certFact.generateCertPath(Arrays.asList(certs));
            return path;
        } catch (java.security.cert.CertificateEncodingException e) {
        } catch (CertificateException e) {
        }
        return null;
    }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?