diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-06-23 13:32:09 +0400 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-06-23 13:32:09 +0400 |
commit | ad2a7d6a07743254a32cf170be22fcabf5159aac (patch) | |
tree | 3faad271ea5b3566779987d2b7ce4c556a424acf /core/src/main/java/org/bouncycastle/crypto/tls/TlsClientProtocol.java | |
parent | 34656055887593414f3941edd38a8140e171b711 (diff) |
Add the peer certificate, if any, to the SessionParameters
Diffstat (limited to 'core/src/main/java/org/bouncycastle/crypto/tls/TlsClientProtocol.java')
-rw-r--r-- | core/src/main/java/org/bouncycastle/crypto/tls/TlsClientProtocol.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/tls/TlsClientProtocol.java b/core/src/main/java/org/bouncycastle/crypto/tls/TlsClientProtocol.java index 7db426ca..5e948b3d 100644 --- a/core/src/main/java/org/bouncycastle/crypto/tls/TlsClientProtocol.java +++ b/core/src/main/java/org/bouncycastle/crypto/tls/TlsClientProtocol.java @@ -27,7 +27,6 @@ public class TlsClientProtocol protected TlsKeyExchange keyExchange = null; protected TlsAuthentication authentication = null; - protected Certificate serverCertificate = null; protected CertificateStatus certificateStatus = null; protected CertificateRequest certificateRequest = null; @@ -114,7 +113,6 @@ public class TlsClientProtocol this.selectedSessionID = null; this.keyExchange = null; this.authentication = null; - this.serverCertificate = null; this.certificateStatus = null; this.certificateRequest = null; } @@ -166,20 +164,20 @@ public class TlsClientProtocol { // Parse the Certificate message and send to cipher suite - this.serverCertificate = Certificate.parse(buf); + this.peerCertificate = Certificate.parse(buf); assertEmpty(buf); // TODO[RFC 3546] Check whether empty certificates is possible, allowed, or excludes CertificateStatus - if (this.serverCertificate == null || this.serverCertificate.isEmpty()) + if (this.peerCertificate == null || this.peerCertificate.isEmpty()) { this.allowCertificateStatus = false; } - this.keyExchange.processServerCertificate(this.serverCertificate); + this.keyExchange.processServerCertificate(this.peerCertificate); this.authentication = tlsClient.getAuthentication(); - this.authentication.notifyServerCertificate(this.serverCertificate); + this.authentication.notifyServerCertificate(this.peerCertificate); break; } |