本文整理匯總了Java中com.digitalpetri.opcua.stack.core.util.CertificateUtil類的典型用法代碼示例。如果您正苦於以下問題:Java CertificateUtil類的具體用法?Java CertificateUtil怎麽用?Java CertificateUtil使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
CertificateUtil類屬於com.digitalpetri.opcua.stack.core.util包,在下文中一共展示了CertificateUtil類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: file2certificate
import com.digitalpetri.opcua.stack.core.util.CertificateUtil; //導入依賴的package包/類
private X509Certificate file2certificate(File f) {
try {
try (FileInputStream inputStream = new FileInputStream(f)) {
return CertificateUtil.decodeCertificate(inputStream);
}
} catch (Throwable ignored) {
return null;
}
}
示例2: setRemoteCertificate
import com.digitalpetri.opcua.stack.core.util.CertificateUtil; //導入依賴的package包/類
public void setRemoteCertificate(byte[] certificateBytes) throws UaException {
remoteCertificate = CertificateUtil.decodeCertificate(certificateBytes);
remoteCertificateChain = CertificateUtil.decodeCertificates(certificateBytes);
}