public void notifyClientCertificate(org.bouncycastle.crypto.tls.Certificate clientCertificate) throws IOException { Certificate[] chain = clientCertificate.getCertificateList(); LOGGER.info(String.format("Received client certificate chain of length %d", chain.length)); for (int i = 0; i != chain.length; i++) { Certificate entry = chain[i]; LOGGER.info(String.format("WebRTC Client certificate fingerprint:%s (%s)", TlsUtils.fingerprint(this.hashFunction, entry), entry.getSubject())); } }
public void notifyClientCertificate(org.bouncycastle.crypto.tls.Certificate clientCertificate) throws IOException { Certificate[] chain = clientCertificate.getCertificateList(); LOGGER.info(String.format("Received client certificate chain of length %d", chain.length)); for (int i = 0; i != chain.length; i++) { Certificate entry = chain[i]; LOGGER.info(String.format("WebRTC Client certificate fingerprint:%s (%s)", TlsUtils.fingerprint(this.hashFunction, entry), entry.getSubject())); } }
public void notifyClientCertificate(org.bouncycastle.crypto.tls.Certificate clientCertificate) throws IOException { Certificate[] chain = clientCertificate.getCertificateList(); log.trace("Received client certificate chain of length " + chain.length); for (int i = 0; i != chain.length; i++) { Certificate entry = chain[i]; // TODO Create fingerprint based on certificate signature algorithm digest log.trace(" fingerprint:SHA-256 " + DtlsUtils.fingerprint(entry) + " (" + entry.getSubject() + ")"); } }
public void notifyServerCertificate(org.bouncycastle.crypto.tls.Certificate serverCertificate) throws IOException { Certificate[] chain = serverCertificate.getCertificateList(); log.trace("Received server certificate chain of length " + chain.length); for (int i = 0; i != chain.length; i++) { Certificate entry = chain[i]; // TODO Create fingerprint based on certificate signature algorithm digest log.trace(" fingerprint:SHA-256 " + DtlsUtils.fingerprint(entry) + " (" + entry.getSubject() + ")"); } }
public static void writeCertificate(Certificate cert, File file) { PemWriter pemWriter = null; try { pemWriter = new PemWriter(new FileWriter(file)); for (org.bouncycastle.asn1.x509.Certificate tempCert : cert.getCertificateList()) { PemObject pemObject = new PemObject("CERTIFICATE", tempCert.getEncoded()); pemWriter.writeObject(pemObject); } pemWriter.flush(); } catch (IOException ex) { LOGGER.warn(ex); } finally { try { pemWriter.close(); } catch (IOException ex) { LOGGER.warn(ex); } } }
= certificate.getCertificateList();
try { Certificate cert = Certificate.parse(new ByteArrayInputStream(certBytes)); for (org.bouncycastle.asn1.x509.Certificate subCert : cert.getCertificateList()) { pairList.add(new CertificatePair(subCert.getEncoded()));