📄 e229. creating a certification path.txt
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -