~ubuntu-branches/ubuntu/vivid/gloox/vivid-proposed

« back to all changes in this revision

Viewing changes to src/tlsschannel.cpp

  • Committer: Package Import Robot
  • Author(s): Vincent Cheng
  • Date: 2014-03-16 17:34:43 UTC
  • mfrom: (12.1.2 experimental)
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: package-import@ubuntu.com-20140316173443-4s177dovzaz5dm8o
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2007-2009 by Jakob Schroeter <js@camaya.net>
 
2
 * Copyright (c) 2007-2013 by Jakob Schroeter <js@camaya.net>
3
3
 * This file is part of the gloox library. http://camaya.net/gloox
4
4
 *
5
5
 * This software is distributed under a license. The full license
465
465
    while( true );
466
466
  }
467
467
 
 
468
  bool SChannel::hasChannelBinding() const
 
469
  {
 
470
#ifdef HAVE_WINTLS_CHANNEL_BINDING
 
471
    return true;
 
472
#else
 
473
    return false;
 
474
#endif
 
475
  }
 
476
 
 
477
  const std::string SChannel::channelBinding() const
 
478
  {
 
479
#ifdef HAVE_WINTLS_CHANNEL_BINDING // see ../config.h.win if the following doesn't compile
 
480
    SecPkgContext_Bindings buf;
 
481
    if( QueryContextAttributes( &m_context, SECPKG_ATTR_UNIQUE_BINDINGS, &buf ) == SEC_E_OK )
 
482
    {
 
483
      return std::string( buf->Bindings[buf->Bindings.dwApplicationDataOffset], buf->Bindings.cbApplicationDataLength );
 
484
    }
 
485
#endif
 
486
    return EmptyString;
 
487
  }
 
488
 
468
489
  void SChannel::setCACerts( const StringList& /*cacerts*/ ) {}
469
490
 
470
491
  void SChannel::setClientCert( const std::string& /*clientKey*/, const std::string& /*clientCerts*/ ) {}