Note: Advice in this article will only work for JxBrowser 6. See the corresponding article for JxBrowser 7 here.(注意:本文中的建议仅适用于JxBrowser6,JxBrowser7相应文章请点击这里。)
In the DialogHandler.onSelectCertificate(CertificatesDialogParams params) method you can select not only SSL certificate from the given list of certificates, but also select SSL certificate instantiated from standard Java X509Certificate class. For example:(在DialogHandler.onSelectCertificate(CertificatesDialogParams params)方法中,您不仅可以从给定的证书列表中选择SSL证书,还可以选择从标准Java X509Certificate类实例化的SSL证书。例如:)
browser.setDialogHandler(new DefaultDialogHandler(view) { @Override public CloseStatus onSelectCertificate(CertificatesDialogParams params) { X509Certificate x509Certificate = loadCertificate(); params.setSelectedCertificate(new Certificate(x509Certificate)); return CloseStatus.OK; } });