okhttp3.Handshake.localCertificates()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中okhttp3.Handshake.localCertificates()方法的一些代码示例,展示了Handshake.localCertificates()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Handshake.localCertificates()方法的具体详情如下:
包路径:okhttp3.Handshake
类名称:Handshake
方法名:localCertificates

Handshake.localCertificates介绍

[英]Returns a possibly-empty list of certificates that identify this peer.
[中]返回标识此对等方的证书的可能为空的列表。

代码示例

代码示例来源:origin: square/okhttp

@Override
public List<Certificate> getLocalCertificateChain() {
 if (handshake == null) return null;
 // Java requires null, not an empty list here.
 List<Certificate> certificates = handshake.localCertificates();
 return certificates.size() > 0 ? certificates : null;
}

代码示例来源:origin: square/okhttp

@Override public Certificate[] getLocalCertificates() {
 Handshake handshake = handshake();
 if (handshake == null) return null;
 List<Certificate> result = handshake.localCertificates();
 return !result.isEmpty() ? result.toArray(new Certificate[result.size()]) : null;
}

代码示例来源:origin: square/okhttp

.writeByte('\n');
writeCertList(sink, handshake.peerCertificates());
writeCertList(sink, handshake.localCertificates());
sink.writeUtf8(handshake.tlsVersion().javaName()).writeByte('\n');

代码示例来源:origin: com.squareup.okhttp3/okhttp

.writeByte('\n');
writeCertList(sink, handshake.peerCertificates());
writeCertList(sink, handshake.localCertificates());
sink.writeUtf8(handshake.tlsVersion().javaName()).writeByte('\n');

代码示例来源:origin: apollographql/apollo-android

.writeByte('\n');
writeCertList(bufferedSink, handshake.peerCertificates());
writeCertList(bufferedSink, handshake.localCertificates());

代码示例来源:origin: com.squareup.okhttp3/okhttp-android-support

@Override
public List<Certificate> getLocalCertificateChain() {
 if (handshake == null) return null;
 // Java requires null, not an empty list here.
 List<Certificate> certificates = handshake.localCertificates();
 return certificates.size() > 0 ? certificates : null;
}

代码示例来源:origin: com.squareup.okhttp3/okhttp-urlconnection

@Override public Certificate[] getLocalCertificates() {
 Handshake handshake = handshake();
 if (handshake == null) return null;
 List<Certificate> result = handshake.localCertificates();
 return !result.isEmpty() ? result.toArray(new Certificate[result.size()]) : null;
}

代码示例来源:origin: apache/servicemix-bundles

@Override public Certificate[] getLocalCertificates() {
 Handshake handshake = handshake();
 if (handshake == null) return null;
 List<Certificate> result = handshake.localCertificates();
 return !result.isEmpty() ? result.toArray(new Certificate[result.size()]) : null;
}

代码示例来源:origin: com.github.ljun20160606/okhttp-urlconnection

@Override public Certificate[] getLocalCertificates() {
 Handshake handshake = handshake();
 if (handshake == null) return null;
 List<Certificate> result = handshake.localCertificates();
 return !result.isEmpty() ? result.toArray(new Certificate[result.size()]) : null;
}

代码示例来源:origin: huxq17/SwipeCardsView

sink.writeByte('\n');
writeCertList(sink, handshake.peerCertificates());
writeCertList(sink, handshake.localCertificates());

代码示例来源:origin: huxq17/tractor

sink.writeByte('\n');
writeCertList(sink, handshake.peerCertificates());
writeCertList(sink, handshake.localCertificates());

代码示例来源:origin: duzechao/OKHttpUtils

sink.writeByte('\n');
writeCertList(sink, handshake.peerCertificates());
writeCertList(sink, handshake.localCertificates());

代码示例来源:origin: com.github.ljun20160606/okhttp

.writeByte('\n');
writeCertList(sink, handshake.peerCertificates());
writeCertList(sink, handshake.localCertificates());
sink.writeUtf8(handshake.tlsVersion().javaName()).writeByte('\n');

代码示例来源:origin: apache/servicemix-bundles

.writeByte('\n');
writeCertList(sink, handshake.peerCertificates());
writeCertList(sink, handshake.localCertificates());
sink.writeUtf8(handshake.tlsVersion().javaName()).writeByte('\n');

相关文章