diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-06-15 15:18:41 +0400 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-06-15 15:18:41 +0400 |
commit | bfdd645ac1f6f828889a03fa0a3396f90879eb2d (patch) | |
tree | efade729a36e5a4eafe0d2d97fea5423aaa11ca9 /core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java | |
parent | 9754a8788cac61791e0ea4afe45f3a18c00d24e7 (diff) |
Basic protocol outline for certificate_status handshake messages
Diffstat (limited to 'core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java')
-rw-r--r-- | core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java b/core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java index 7d8f48f9..1cbcfdb6 100644 --- a/core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java +++ b/core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java @@ -160,6 +160,9 @@ public class TlsServerProtocol this.keyExchange.init(getContext()); this.serverCredentials = tlsServer.getCredentials(); + + Certificate serverCertificate = null; + if (this.serverCredentials == null) { this.keyExchange.skipServerCredentials(); @@ -167,10 +170,18 @@ public class TlsServerProtocol else { this.keyExchange.processServerCredentials(this.serverCredentials); - sendCertificateMessage(this.serverCredentials.getCertificate()); + + serverCertificate = this.serverCredentials.getCertificate(); + sendCertificateMessage(serverCertificate); } this.connection_state = CS_SERVER_CERTIFICATE; + if (serverCertificate != null && !serverCertificate.isEmpty()) + { + // TODO[RFC 3546] Get certificate status, if any, and send + } + this.connection_state = CS_CERTIFICATE_STATUS; + byte[] serverKeyExchange = this.keyExchange.generateServerKeyExchange(); if (serverKeyExchange != null) { |