Lines Matching refs:certificate
21 import java.security.cert.Certificate;
43 Certificate[] certificates = session.getPeerCertificates();
50 public boolean verify(String host, X509Certificate certificate) {
52 ? verifyIpAddress(host, certificate)
53 : verifyHostName(host, certificate);
57 * Returns true if {@code certificate} matches {@code ipAddress}.
59 private boolean verifyIpAddress(String ipAddress, X509Certificate certificate) {
60 for (String altName : getSubjectAltNames(certificate, ALT_IPA_NAME)) {
69 * Returns true if {@code certificate} matches {@code hostName}.
71 private boolean verifyHostName(String hostName, X509Certificate certificate) {
74 for (String altName : getSubjectAltNames(certificate, ALT_DNS_NAME)) {
82 X500Principal principal = certificate.getSubjectX500Principal();
93 private List<String> getSubjectAltNames(X509Certificate certificate, int type) {
96 Collection<?> subjectAltNames = certificate.getSubjectAlternativeNames();
126 * @param cn certificate host name. May include wildcards like