diff options
author | Jose <jose@zeroc.com> | 2017-01-10 14:34:05 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2017-01-10 14:34:05 +0100 |
commit | 82f314a870b145e81553987100067558498a1be0 (patch) | |
tree | 2b94ca3464ee643c53237021bc7035394fecb4fd /cpp/src/IceSSL/UWPTransceiverI.cpp | |
parent | Fix for static initialization issue with VS 2013 (diff) | |
download | ice-82f314a870b145e81553987100067558498a1be0.tar.bz2 ice-82f314a870b145e81553987100067558498a1be0.tar.xz ice-82f314a870b145e81553987100067558498a1be0.zip |
UWP code simplifications
Diffstat (limited to 'cpp/src/IceSSL/UWPTransceiverI.cpp')
-rw-r--r-- | cpp/src/IceSSL/UWPTransceiverI.cpp | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/cpp/src/IceSSL/UWPTransceiverI.cpp b/cpp/src/IceSSL/UWPTransceiverI.cpp index bef7d0769b5..50f82800897 100644 --- a/cpp/src/IceSSL/UWPTransceiverI.cpp +++ b/cpp/src/IceSSL/UWPTransceiverI.cpp @@ -152,30 +152,15 @@ IceSSL::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal::B //{ // params->ExclusiveTrustRoots->Append(_engine->ca()->getCert()); //} - - promise<CertificateChain^> p; - create_task(fd->Information->ServerCertificate->BuildChainAsync( - fd->Information->ServerIntermediateCertificates, params)).then( - [&](task<CertificateChain^> previous) - { - try - { - p.set_value(previous.get()); - } - catch(Platform::Exception^ ex) - { - try - { - throw SyscallException(__FILE__, __LINE__, ex->HResult); - } - catch(...) - { - p.set_exception(current_exception()); - } - } - }); - - _chain = p.get_future().get(); + try + { + _chain = create_task(fd->Information->ServerCertificate->BuildChainAsync( + fd->Information->ServerIntermediateCertificates, params)).get(); + } + catch(Platform::Exception^ ex) + { + throw SyscallException(__FILE__, __LINE__, ex->HResult); + } ChainValidationResult result = _chain->Validate(); // |