diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-04-25 17:32:37 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-04-25 17:32:37 (GMT) |
commit | 76b6528058e1cb9fefb0547b672acb83e7b41ff4 (patch) | |
tree | a491b00a68475abd0ec92e398326228c187d6f2b | |
parent | b997b3cdc0ebd32e8be97e5c6265c6c15de7706a (diff) | |
download | swift-76b6528058e1cb9fefb0547b672acb83e7b41ff4.zip swift-76b6528058e1cb9fefb0547b672acb83e7b41ff4.tar.bz2 |
Support channel binding with Schannel.
Resolves: #1012
-rw-r--r-- | Swiften/TLS/Schannel/SchannelContext.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Swiften/TLS/Schannel/SchannelContext.cpp b/Swiften/TLS/Schannel/SchannelContext.cpp index 20cb7d3..641568d 100644 --- a/Swiften/TLS/Schannel/SchannelContext.cpp +++ b/Swiften/TLS/Schannel/SchannelContext.cpp @@ -640,10 +640,12 @@ CertificateVerificationError::ref SchannelContext::getPeerCertificateVerificatio //------------------------------------------------------------------------ ByteArray SchannelContext::getFinishMessage() const { - // TODO: Implement - - ByteArray emptyArray; - return emptyArray; + SecPkgContext_Bindings bindings; + int ret = QueryContextAttributes(m_ctxtHandle, SECPKG_ATTR_UNIQUE_BINDINGS, &bindings); + if (ret == SEC_E_OK) { + return createByteArray(((unsigned char*) bindings.Bindings) + bindings.Bindings->dwApplicationDataOffset + 11 /* tls-unique:*/, bindings.Bindings->cbApplicationDataLength - 11); + } + return ByteArray(); } //------------------------------------------------------------------------ |