mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 16:06:09 +00:00
Merge pull request #2478 from evoskuil/master
Problem: assert used for ZAP error handling aborts process.
This commit is contained in:
commit
9c6fb09929
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- These values are populated into the package.gsl templates by package.bat. -->
|
<!-- These values are populated into the package.gsl templates by package.bat. -->
|
||||||
<!-- The target attribute controls path and file name only, id controls package naming. -->
|
<!-- The target attribute controls path and file name only, id controls package naming. -->
|
||||||
<package id="libzmq_vc120" target="libzmq" version = "4.2.20.0" pathversion="4_2_20_0" platformtoolset="v120">
|
<package id="libzmq_vc120" target="libzmq" version = "4.2.20.1" pathversion="4_2_20_1" platformtoolset="v120">
|
||||||
<!--<dependency id="libsodium_vc120" version="1.0.12.0" />-->
|
<!--<dependency id="libsodium_vc120" version="1.0.12.0" />-->
|
||||||
</package>
|
</package>
|
@ -7,7 +7,7 @@
|
|||||||
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
|
||||||
<metadata minClientVersion="2.5">
|
<metadata minClientVersion="2.5">
|
||||||
<id>libzmq_vc120</id>
|
<id>libzmq_vc120</id>
|
||||||
<version>4.2.20.0</version>
|
<version>4.2.20.1</version>
|
||||||
<title>libzmq_vc120</title>
|
<title>libzmq_vc120</title>
|
||||||
<authors>libzmq contributors</authors>
|
<authors>libzmq contributors</authors>
|
||||||
<owners>Eric Voskuil</owners>
|
<owners>Eric Voskuil</owners>
|
||||||
@ -43,52 +43,52 @@
|
|||||||
<!-- libraries -->
|
<!-- libraries -->
|
||||||
|
|
||||||
<!-- x86 Dynamic libraries (.dll) -->
|
<!-- x86 Dynamic libraries (.dll) -->
|
||||||
<file src="..\..\bin\Win32\Release\v120\dynamic\libzmq.dll" target="build\native\bin\libzmq-x86-v120-mt-4_2_20_0.dll" />
|
<file src="..\..\bin\Win32\Release\v120\dynamic\libzmq.dll" target="build\native\bin\libzmq-x86-v120-mt-4_2_20_1.dll" />
|
||||||
<file src="..\..\bin\Win32\Debug\v120\dynamic\libzmq.dll" target="build\native\bin\libzmq-x86-v120-mt-gd-4_2_20_0.dll" />
|
<file src="..\..\bin\Win32\Debug\v120\dynamic\libzmq.dll" target="build\native\bin\libzmq-x86-v120-mt-gd-4_2_20_1.dll" />
|
||||||
|
|
||||||
<!-- x86 Debugging symbols (.pdb) -->
|
<!-- x86 Debugging symbols (.pdb) -->
|
||||||
<!--<file src="..\..\bin\Win32\Release\v120\dynamic\libzmq.pdb" target="build\native\bin\libzmq-x86-v120-mt-4_2_20_0.pdb" />-->
|
<!--<file src="..\..\bin\Win32\Release\v120\dynamic\libzmq.pdb" target="build\native\bin\libzmq-x86-v120-mt-4_2_20_1.pdb" />-->
|
||||||
<file src="..\..\bin\Win32\Debug\v120\dynamic\libzmq.pdb" target="build\native\bin\libzmq-x86-v120-mt-gd-4_2_20_0.pdb" />
|
<file src="..\..\bin\Win32\Debug\v120\dynamic\libzmq.pdb" target="build\native\bin\libzmq-x86-v120-mt-gd-4_2_20_1.pdb" />
|
||||||
|
|
||||||
<!-- x86 Import libraries (.imp.lib) -->
|
<!-- x86 Import libraries (.imp.lib) -->
|
||||||
<file src="..\..\bin\Win32\Release\v120\dynamic\libzmq.lib" target="build\native\bin\libzmq-x86-v120-mt-4_2_20_0.imp.lib" />
|
<file src="..\..\bin\Win32\Release\v120\dynamic\libzmq.lib" target="build\native\bin\libzmq-x86-v120-mt-4_2_20_1.imp.lib" />
|
||||||
<file src="..\..\bin\Win32\Debug\v120\dynamic\libzmq.lib" target="build\native\bin\libzmq-x86-v120-mt-gd-4_2_20_0.imp.lib" />
|
<file src="..\..\bin\Win32\Debug\v120\dynamic\libzmq.lib" target="build\native\bin\libzmq-x86-v120-mt-gd-4_2_20_1.imp.lib" />
|
||||||
|
|
||||||
<!-- x86 Export libraries (.exp) -->
|
<!-- x86 Export libraries (.exp) -->
|
||||||
<file src="..\..\bin\Win32\Release\v120\dynamic\libzmq.exp" target="build\native\bin\libzmq-x86-v120-mt-4_2_20_0.exp" />
|
<file src="..\..\bin\Win32\Release\v120\dynamic\libzmq.exp" target="build\native\bin\libzmq-x86-v120-mt-4_2_20_1.exp" />
|
||||||
<file src="..\..\bin\Win32\Debug\v120\dynamic\libzmq.exp" target="build\native\bin\libzmq-x86-v120-mt-gd-4_2_20_0.exp" />
|
<file src="..\..\bin\Win32\Debug\v120\dynamic\libzmq.exp" target="build\native\bin\libzmq-x86-v120-mt-gd-4_2_20_1.exp" />
|
||||||
|
|
||||||
<!-- x86 Static libraries (.lib) -->
|
<!-- x86 Static libraries (.lib) -->
|
||||||
<file src="..\..\bin\Win32\Release\v120\static\libzmq.lib" target="build\native\bin\libzmq-x86-v120-mt-s-4_2_20_0.lib" />
|
<file src="..\..\bin\Win32\Release\v120\static\libzmq.lib" target="build\native\bin\libzmq-x86-v120-mt-s-4_2_20_1.lib" />
|
||||||
<file src="..\..\bin\Win32\Debug\v120\static\libzmq.lib" target="build\native\bin\libzmq-x86-v120-mt-sgd-4_2_20_0.lib" />
|
<file src="..\..\bin\Win32\Debug\v120\static\libzmq.lib" target="build\native\bin\libzmq-x86-v120-mt-sgd-4_2_20_1.lib" />
|
||||||
|
|
||||||
<!-- x86 Static link time code generation libraries (.ltcg.lib) -->
|
<!-- x86 Static link time code generation libraries (.ltcg.lib) -->
|
||||||
<file src="..\..\bin\Win32\Release\v120\ltcg\libzmq.lib" target="build\native\bin\libzmq-x86-v120-mt-s-4_2_20_0.ltcg.lib" />
|
<file src="..\..\bin\Win32\Release\v120\ltcg\libzmq.lib" target="build\native\bin\libzmq-x86-v120-mt-s-4_2_20_1.ltcg.lib" />
|
||||||
<file src="..\..\bin\Win32\Debug\v120\ltcg\libzmq.lib" target="build\native\bin\libzmq-x86-v120-mt-sgd-4_2_20_0.ltcg.lib" />
|
<file src="..\..\bin\Win32\Debug\v120\ltcg\libzmq.lib" target="build\native\bin\libzmq-x86-v120-mt-sgd-4_2_20_1.ltcg.lib" />
|
||||||
|
|
||||||
<!-- x64 Dynamic libraries (.dll) -->
|
<!-- x64 Dynamic libraries (.dll) -->
|
||||||
<file src="..\..\bin\x64\Release\v120\dynamic\libzmq.dll" target="build\native\bin\libzmq-x64-v120-mt-4_2_20_0.dll" />
|
<file src="..\..\bin\x64\Release\v120\dynamic\libzmq.dll" target="build\native\bin\libzmq-x64-v120-mt-4_2_20_1.dll" />
|
||||||
<file src="..\..\bin\x64\Debug\v120\dynamic\libzmq.dll" target="build\native\bin\libzmq-x64-v120-mt-gd-4_2_20_0.dll" />
|
<file src="..\..\bin\x64\Debug\v120\dynamic\libzmq.dll" target="build\native\bin\libzmq-x64-v120-mt-gd-4_2_20_1.dll" />
|
||||||
|
|
||||||
<!-- x64 Debugging symbols (.pdb) -->
|
<!-- x64 Debugging symbols (.pdb) -->
|
||||||
<!--<file src="..\..\bin\x64\Release\v120\dynamic\libzmq.pdb" target="build\native\bin\libzmq-x64-v120-mt-4_2_20_0.pdb" />-->
|
<!--<file src="..\..\bin\x64\Release\v120\dynamic\libzmq.pdb" target="build\native\bin\libzmq-x64-v120-mt-4_2_20_1.pdb" />-->
|
||||||
<file src="..\..\bin\x64\Debug\v120\dynamic\libzmq.pdb" target="build\native\bin\libzmq-x64-v120-mt-gd-4_2_20_0.pdb" />
|
<file src="..\..\bin\x64\Debug\v120\dynamic\libzmq.pdb" target="build\native\bin\libzmq-x64-v120-mt-gd-4_2_20_1.pdb" />
|
||||||
|
|
||||||
<!-- x64 Import libraries (.imp.lib) -->
|
<!-- x64 Import libraries (.imp.lib) -->
|
||||||
<file src="..\..\bin\x64\Release\v120\dynamic\libzmq.lib" target="build\native\bin\libzmq-x64-v120-mt-4_2_20_0.imp.lib" />
|
<file src="..\..\bin\x64\Release\v120\dynamic\libzmq.lib" target="build\native\bin\libzmq-x64-v120-mt-4_2_20_1.imp.lib" />
|
||||||
<file src="..\..\bin\x64\Debug\v120\dynamic\libzmq.lib" target="build\native\bin\libzmq-x64-v120-mt-gd-4_2_20_0.imp.lib" />
|
<file src="..\..\bin\x64\Debug\v120\dynamic\libzmq.lib" target="build\native\bin\libzmq-x64-v120-mt-gd-4_2_20_1.imp.lib" />
|
||||||
|
|
||||||
<!-- x64 Export libraries (.exp) -->
|
<!-- x64 Export libraries (.exp) -->
|
||||||
<file src="..\..\bin\x64\Release\v120\dynamic\libzmq.exp" target="build\native\bin\libzmq-x64-v120-mt-4_2_20_0.exp" />
|
<file src="..\..\bin\x64\Release\v120\dynamic\libzmq.exp" target="build\native\bin\libzmq-x64-v120-mt-4_2_20_1.exp" />
|
||||||
<file src="..\..\bin\x64\Debug\v120\dynamic\libzmq.exp" target="build\native\bin\libzmq-x64-v120-mt-gd-4_2_20_0.exp" />
|
<file src="..\..\bin\x64\Debug\v120\dynamic\libzmq.exp" target="build\native\bin\libzmq-x64-v120-mt-gd-4_2_20_1.exp" />
|
||||||
|
|
||||||
<!-- x64 Static libraries (.lib) -->
|
<!-- x64 Static libraries (.lib) -->
|
||||||
<file src="..\..\bin\x64\Release\v120\static\libzmq.lib" target="build\native\bin\libzmq-x64-v120-mt-s-4_2_20_0.lib" />
|
<file src="..\..\bin\x64\Release\v120\static\libzmq.lib" target="build\native\bin\libzmq-x64-v120-mt-s-4_2_20_1.lib" />
|
||||||
<file src="..\..\bin\x64\Debug\v120\static\libzmq.lib" target="build\native\bin\libzmq-x64-v120-mt-sgd-4_2_20_0.lib" />
|
<file src="..\..\bin\x64\Debug\v120\static\libzmq.lib" target="build\native\bin\libzmq-x64-v120-mt-sgd-4_2_20_1.lib" />
|
||||||
|
|
||||||
<!-- x64 Static link time code generation libraries (.ltcg.lib) -->
|
<!-- x64 Static link time code generation libraries (.ltcg.lib) -->
|
||||||
<file src="..\..\bin\Win32\Release\v120\ltcg\libzmq.lib" target="build\native\bin\libzmq-x64-v120-mt-s-4_2_20_0.ltcg.lib" />
|
<file src="..\..\bin\Win32\Release\v120\ltcg\libzmq.lib" target="build\native\bin\libzmq-x64-v120-mt-s-4_2_20_1.ltcg.lib" />
|
||||||
<file src="..\..\bin\Win32\Debug\v120\ltcg\libzmq.lib" target="build\native\bin\libzmq-x64-v120-mt-sgd-4_2_20_0.ltcg.lib" />
|
<file src="..\..\bin\Win32\Debug\v120\ltcg\libzmq.lib" target="build\native\bin\libzmq-x64-v120-mt-sgd-4_2_20_1.ltcg.lib" />
|
||||||
</files>
|
</files>
|
||||||
<!--
|
<!--
|
||||||
#################################################################
|
#################################################################
|
||||||
|
@ -31,66 +31,66 @@
|
|||||||
<!-- static libraries -->
|
<!-- static libraries -->
|
||||||
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'static' And $(Configuration.IndexOf('Release')) != -1">
|
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'static' And $(Configuration.IndexOf('Release')) != -1">
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libzmq-x86-v120-mt-s-4_2_20_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libzmq-x86-v120-mt-s-4_2_20_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'static' And $(Configuration.IndexOf('Debug')) != -1">
|
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'static' And $(Configuration.IndexOf('Debug')) != -1">
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libzmq-x86-v120-mt-sgd-4_2_20_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libzmq-x86-v120-mt-sgd-4_2_20_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'static' And $(Configuration.IndexOf('Release')) != -1">
|
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'static' And $(Configuration.IndexOf('Release')) != -1">
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libzmq-x64-v120-mt-s-4_2_20_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libzmq-x64-v120-mt-s-4_2_20_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'static' And $(Configuration.IndexOf('Debug')) != -1">
|
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'static' And $(Configuration.IndexOf('Debug')) != -1">
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libzmq-x64-v120-mt-sgd-4_2_20_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libzmq-x64-v120-mt-sgd-4_2_20_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
|
||||||
<!-- static ltcg libraries -->
|
<!-- static ltcg libraries -->
|
||||||
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'ltcg' And $(Configuration.IndexOf('Release')) != -1">
|
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'ltcg' And $(Configuration.IndexOf('Release')) != -1">
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libzmq-x86-v120-mt-s-4_2_20_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libzmq-x86-v120-mt-s-4_2_20_1.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'ltcg' And $(Configuration.IndexOf('Debug')) != -1">
|
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'ltcg' And $(Configuration.IndexOf('Debug')) != -1">
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libzmq-x86-v120-mt-sgd-4_2_20_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libzmq-x86-v120-mt-sgd-4_2_20_1.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'ltcg' And $(Configuration.IndexOf('Release')) != -1">
|
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'ltcg' And $(Configuration.IndexOf('Release')) != -1">
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libzmq-x64-v120-mt-s-4_2_20_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libzmq-x64-v120-mt-s-4_2_20_1.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'ltcg' And $(Configuration.IndexOf('Debug')) != -1">
|
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'ltcg' And $(Configuration.IndexOf('Debug')) != -1">
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libzmq-x64-v120-mt-sgd-4_2_20_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libzmq-x64-v120-mt-sgd-4_2_20_1.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
|
||||||
<!-- dynamic import libraries -->
|
<!-- dynamic import libraries -->
|
||||||
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1">
|
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1">
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libzmq-x86-v120-mt-4_2_20_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libzmq-x86-v120-mt-4_2_20_1.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1">
|
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1">
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libzmq-x86-v120-mt-gd-4_2_20_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libzmq-x86-v120-mt-gd-4_2_20_1.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1">
|
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1">
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libzmq-x64-v120-mt-4_2_20_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libzmq-x64-v120-mt-4_2_20_1.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1">
|
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1">
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libzmq-x64-v120-mt-gd-4_2_20_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libzmq-x64-v120-mt-gd-4_2_20_1.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
|
||||||
@ -99,26 +99,26 @@
|
|||||||
<Target Name="libzmq_AfterBuild_Win32_v120_Dynamic_Release"
|
<Target Name="libzmq_AfterBuild_Win32_v120_Dynamic_Release"
|
||||||
Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1"
|
Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1"
|
||||||
AfterTargets="libzmq_AfterBuild">
|
AfterTargets="libzmq_AfterBuild">
|
||||||
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x86-v120-mt-4_2_20_0.dll" DestinationFiles="$(TargetDir)libzmq.dll" SkipUnchangedFiles="true" />
|
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x86-v120-mt-4_2_20_1.dll" DestinationFiles="$(TargetDir)libzmq.dll" SkipUnchangedFiles="true" />
|
||||||
<!--<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x86-v120-mt-4_2_20_0.pdb" DestinationFiles="$(TargetDir)libzmq.pdb" SkipUnchangedFiles="true" />-->
|
<!--<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x86-v120-mt-4_2_20_1.pdb" DestinationFiles="$(TargetDir)libzmq.pdb" SkipUnchangedFiles="true" />-->
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="libzmq_AfterBuild_Win32_v120_Dynamic_Debug"
|
<Target Name="libzmq_AfterBuild_Win32_v120_Dynamic_Debug"
|
||||||
Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1"
|
Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1"
|
||||||
AfterTargets="libzmq_AfterBuild">
|
AfterTargets="libzmq_AfterBuild">
|
||||||
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x86-v120-mt-gd-4_2_20_0.dll" DestinationFiles="$(TargetDir)libzmq.dll" SkipUnchangedFiles="true" />
|
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x86-v120-mt-gd-4_2_20_1.dll" DestinationFiles="$(TargetDir)libzmq.dll" SkipUnchangedFiles="true" />
|
||||||
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x86-v120-mt-gd-4_2_20_0.pdb" DestinationFiles="$(TargetDir)libzmq.pdb" SkipUnchangedFiles="true" />
|
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x86-v120-mt-gd-4_2_20_1.pdb" DestinationFiles="$(TargetDir)libzmq.pdb" SkipUnchangedFiles="true" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="libzmq_AfterBuild_x64_v120_Dynamic_Release"
|
<Target Name="libzmq_AfterBuild_x64_v120_Dynamic_Release"
|
||||||
Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1"
|
Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1"
|
||||||
AfterTargets="libzmq_AfterBuild">
|
AfterTargets="libzmq_AfterBuild">
|
||||||
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x64-v120-mt-4_2_20_0.dll" DestinationFiles="$(TargetDir)libzmq.dll" SkipUnchangedFiles="true" />
|
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x64-v120-mt-4_2_20_1.dll" DestinationFiles="$(TargetDir)libzmq.dll" SkipUnchangedFiles="true" />
|
||||||
<!--<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x64-v120-mt-4_2_20_0.pdb" DestinationFiles="$(TargetDir)libzmq.pdb" SkipUnchangedFiles="true" />-->
|
<!--<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x64-v120-mt-4_2_20_1.pdb" DestinationFiles="$(TargetDir)libzmq.pdb" SkipUnchangedFiles="true" />-->
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="libzmq_AfterBuild_x64_v120_Dynamic_Debug"
|
<Target Name="libzmq_AfterBuild_x64_v120_Dynamic_Debug"
|
||||||
Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1"
|
Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libzmq)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1"
|
||||||
AfterTargets="libzmq_AfterBuild">
|
AfterTargets="libzmq_AfterBuild">
|
||||||
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x64-v120-mt-gd-4_2_20_0.dll" DestinationFiles="$(TargetDir)libzmq.dll" SkipUnchangedFiles="true" />
|
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x64-v120-mt-gd-4_2_20_1.dll" DestinationFiles="$(TargetDir)libzmq.dll" SkipUnchangedFiles="true" />
|
||||||
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x64-v120-mt-gd-4_2_20_0.pdb" DestinationFiles="$(TargetDir)libzmq.pdb" SkipUnchangedFiles="true" />
|
<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libzmq-x64-v120-mt-gd-4_2_20_1.pdb" DestinationFiles="$(TargetDir)libzmq.pdb" SkipUnchangedFiles="true" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
@ -492,7 +492,9 @@ int zmq::curve_server_t::process_initiate (msg_t *msg_)
|
|||||||
// Use ZAP protocol (RFC 27) to authenticate the user.
|
// Use ZAP protocol (RFC 27) to authenticate the user.
|
||||||
rc = session->zap_connect ();
|
rc = session->zap_connect ();
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
send_zap_request (client_key);
|
rc = send_zap_request (client_key);
|
||||||
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
rc = receive_and_process_zap_reply ();
|
rc = receive_and_process_zap_reply ();
|
||||||
if (rc == 0)
|
if (rc == 0)
|
||||||
state = status_code == "200"
|
state = status_code == "200"
|
||||||
@ -569,7 +571,7 @@ int zmq::curve_server_t::produce_error (msg_t *msg_) const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void zmq::curve_server_t::send_zap_request (const uint8_t *key)
|
int zmq::curve_server_t::send_zap_request (const uint8_t *key)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
msg_t msg;
|
msg_t msg;
|
||||||
@ -579,7 +581,8 @@ void zmq::curve_server_t::send_zap_request (const uint8_t *key)
|
|||||||
errno_assert (rc == 0);
|
errno_assert (rc == 0);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Version frame
|
// Version frame
|
||||||
rc = msg.init_size (3);
|
rc = msg.init_size (3);
|
||||||
@ -587,7 +590,8 @@ void zmq::curve_server_t::send_zap_request (const uint8_t *key)
|
|||||||
memcpy (msg.data (), "1.0", 3);
|
memcpy (msg.data (), "1.0", 3);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Request ID frame
|
// Request ID frame
|
||||||
rc = msg.init_size (1);
|
rc = msg.init_size (1);
|
||||||
@ -595,7 +599,8 @@ void zmq::curve_server_t::send_zap_request (const uint8_t *key)
|
|||||||
memcpy (msg.data (), "1", 1);
|
memcpy (msg.data (), "1", 1);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Domain frame
|
// Domain frame
|
||||||
rc = msg.init_size (options.zap_domain.length ());
|
rc = msg.init_size (options.zap_domain.length ());
|
||||||
@ -603,7 +608,8 @@ void zmq::curve_server_t::send_zap_request (const uint8_t *key)
|
|||||||
memcpy (msg.data (), options.zap_domain.c_str (), options.zap_domain.length ());
|
memcpy (msg.data (), options.zap_domain.c_str (), options.zap_domain.length ());
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Address frame
|
// Address frame
|
||||||
rc = msg.init_size (peer_address.length ());
|
rc = msg.init_size (peer_address.length ());
|
||||||
@ -611,7 +617,8 @@ void zmq::curve_server_t::send_zap_request (const uint8_t *key)
|
|||||||
memcpy (msg.data (), peer_address.c_str (), peer_address.length ());
|
memcpy (msg.data (), peer_address.c_str (), peer_address.length ());
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Identity frame
|
// Identity frame
|
||||||
rc = msg.init_size (options.identity_size);
|
rc = msg.init_size (options.identity_size);
|
||||||
@ -619,7 +626,8 @@ void zmq::curve_server_t::send_zap_request (const uint8_t *key)
|
|||||||
memcpy (msg.data (), options.identity, options.identity_size);
|
memcpy (msg.data (), options.identity, options.identity_size);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Mechanism frame
|
// Mechanism frame
|
||||||
rc = msg.init_size (5);
|
rc = msg.init_size (5);
|
||||||
@ -627,14 +635,18 @@ void zmq::curve_server_t::send_zap_request (const uint8_t *key)
|
|||||||
memcpy (msg.data (), "CURVE", 5);
|
memcpy (msg.data (), "CURVE", 5);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Credentials frame
|
// Credentials frame
|
||||||
rc = msg.init_size (crypto_box_PUBLICKEYBYTES);
|
rc = msg.init_size (crypto_box_PUBLICKEYBYTES);
|
||||||
errno_assert (rc == 0);
|
errno_assert (rc == 0);
|
||||||
memcpy (msg.data (), key, crypto_box_PUBLICKEYBYTES);
|
memcpy (msg.data (), key, crypto_box_PUBLICKEYBYTES);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int zmq::curve_server_t::receive_and_process_zap_reply ()
|
int zmq::curve_server_t::receive_and_process_zap_reply ()
|
||||||
|
@ -125,7 +125,7 @@ namespace zmq
|
|||||||
int produce_ready (msg_t *msg_);
|
int produce_ready (msg_t *msg_);
|
||||||
int produce_error (msg_t *msg_) const;
|
int produce_error (msg_t *msg_) const;
|
||||||
|
|
||||||
void send_zap_request (const uint8_t *key);
|
int send_zap_request (const uint8_t *key);
|
||||||
int receive_and_process_zap_reply ();
|
int receive_and_process_zap_reply ();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -123,7 +123,9 @@ int zmq::gssapi_server_t::process_handshake_command (msg_t *msg_)
|
|||||||
bool expecting_zap_reply = false;
|
bool expecting_zap_reply = false;
|
||||||
int rc = session->zap_connect ();
|
int rc = session->zap_connect ();
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
send_zap_request();
|
rc = send_zap_request ();
|
||||||
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
rc = receive_and_process_zap_reply ();
|
rc = receive_and_process_zap_reply ();
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
if (errno != EAGAIN)
|
if (errno != EAGAIN)
|
||||||
@ -147,7 +149,7 @@ int zmq::gssapi_server_t::process_handshake_command (msg_t *msg_)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void zmq::gssapi_server_t::send_zap_request ()
|
int zmq::gssapi_server_t::send_zap_request ()
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
msg_t msg;
|
msg_t msg;
|
||||||
@ -157,7 +159,8 @@ void zmq::gssapi_server_t::send_zap_request ()
|
|||||||
errno_assert (rc == 0);
|
errno_assert (rc == 0);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Version frame
|
// Version frame
|
||||||
rc = msg.init_size (3);
|
rc = msg.init_size (3);
|
||||||
@ -165,7 +168,8 @@ void zmq::gssapi_server_t::send_zap_request ()
|
|||||||
memcpy (msg.data (), "1.0", 3);
|
memcpy (msg.data (), "1.0", 3);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Request ID frame
|
// Request ID frame
|
||||||
rc = msg.init_size (1);
|
rc = msg.init_size (1);
|
||||||
@ -173,7 +177,8 @@ void zmq::gssapi_server_t::send_zap_request ()
|
|||||||
memcpy (msg.data (), "1", 1);
|
memcpy (msg.data (), "1", 1);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Domain frame
|
// Domain frame
|
||||||
rc = msg.init_size (options.zap_domain.length ());
|
rc = msg.init_size (options.zap_domain.length ());
|
||||||
@ -181,7 +186,8 @@ void zmq::gssapi_server_t::send_zap_request ()
|
|||||||
memcpy (msg.data (), options.zap_domain.c_str (), options.zap_domain.length ());
|
memcpy (msg.data (), options.zap_domain.c_str (), options.zap_domain.length ());
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Address frame
|
// Address frame
|
||||||
rc = msg.init_size (peer_address.length ());
|
rc = msg.init_size (peer_address.length ());
|
||||||
@ -189,7 +195,8 @@ void zmq::gssapi_server_t::send_zap_request ()
|
|||||||
memcpy (msg.data (), peer_address.c_str (), peer_address.length ());
|
memcpy (msg.data (), peer_address.c_str (), peer_address.length ());
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Identity frame
|
// Identity frame
|
||||||
rc = msg.init_size (options.identity_size);
|
rc = msg.init_size (options.identity_size);
|
||||||
@ -197,7 +204,8 @@ void zmq::gssapi_server_t::send_zap_request ()
|
|||||||
memcpy (msg.data (), options.identity, options.identity_size);
|
memcpy (msg.data (), options.identity, options.identity_size);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Mechanism frame
|
// Mechanism frame
|
||||||
rc = msg.init_size (6);
|
rc = msg.init_size (6);
|
||||||
@ -205,7 +213,8 @@ void zmq::gssapi_server_t::send_zap_request ()
|
|||||||
memcpy (msg.data (), "GSSAPI", 6);
|
memcpy (msg.data (), "GSSAPI", 6);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Principal frame
|
// Principal frame
|
||||||
gss_buffer_desc principal;
|
gss_buffer_desc principal;
|
||||||
@ -215,8 +224,11 @@ void zmq::gssapi_server_t::send_zap_request ()
|
|||||||
errno_assert (rc == 0);
|
errno_assert (rc == 0);
|
||||||
memcpy (msg.data (), principal.value, principal.length);
|
memcpy (msg.data (), principal.value, principal.length);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
|
||||||
gss_release_buffer(&min_stat, &principal);
|
gss_release_buffer(&min_stat, &principal);
|
||||||
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int zmq::gssapi_server_t::receive_and_process_zap_reply ()
|
int zmq::gssapi_server_t::receive_and_process_zap_reply ()
|
||||||
|
@ -85,7 +85,7 @@ namespace zmq
|
|||||||
void accept_context ();
|
void accept_context ();
|
||||||
int produce_next_token (msg_t *msg_);
|
int produce_next_token (msg_t *msg_);
|
||||||
int process_next_token (msg_t *msg_);
|
int process_next_token (msg_t *msg_);
|
||||||
void send_zap_request ();
|
int send_zap_request ();
|
||||||
int receive_and_process_zap_reply();
|
int receive_and_process_zap_reply();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,9 +75,11 @@ int zmq::null_mechanism_t::next_handshake_command (msg_t *msg_)
|
|||||||
errno = EAGAIN;
|
errno = EAGAIN;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
send_zap_request ();
|
int rc = send_zap_request ();
|
||||||
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
zap_request_sent = true;
|
zap_request_sent = true;
|
||||||
const int rc = receive_and_process_zap_reply ();
|
rc = receive_and_process_zap_reply ();
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
return -1;
|
return -1;
|
||||||
zap_reply_received = true;
|
zap_reply_received = true;
|
||||||
@ -212,7 +214,7 @@ zmq::mechanism_t::status_t zmq::null_mechanism_t::status () const
|
|||||||
return handshaking;
|
return handshaking;
|
||||||
}
|
}
|
||||||
|
|
||||||
void zmq::null_mechanism_t::send_zap_request ()
|
int zmq::null_mechanism_t::send_zap_request ()
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
msg_t msg;
|
msg_t msg;
|
||||||
@ -222,7 +224,8 @@ void zmq::null_mechanism_t::send_zap_request ()
|
|||||||
errno_assert (rc == 0);
|
errno_assert (rc == 0);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Version frame
|
// Version frame
|
||||||
rc = msg.init_size (3);
|
rc = msg.init_size (3);
|
||||||
@ -230,7 +233,8 @@ void zmq::null_mechanism_t::send_zap_request ()
|
|||||||
memcpy (msg.data (), "1.0", 3);
|
memcpy (msg.data (), "1.0", 3);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Request id frame
|
// Request id frame
|
||||||
rc = msg.init_size (1);
|
rc = msg.init_size (1);
|
||||||
@ -238,7 +242,8 @@ void zmq::null_mechanism_t::send_zap_request ()
|
|||||||
memcpy (msg.data (), "1", 1);
|
memcpy (msg.data (), "1", 1);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Domain frame
|
// Domain frame
|
||||||
rc = msg.init_size (options.zap_domain.length ());
|
rc = msg.init_size (options.zap_domain.length ());
|
||||||
@ -246,7 +251,8 @@ void zmq::null_mechanism_t::send_zap_request ()
|
|||||||
memcpy (msg.data (), options.zap_domain.c_str (), options.zap_domain.length ());
|
memcpy (msg.data (), options.zap_domain.c_str (), options.zap_domain.length ());
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Address frame
|
// Address frame
|
||||||
rc = msg.init_size (peer_address.length ());
|
rc = msg.init_size (peer_address.length ());
|
||||||
@ -254,7 +260,8 @@ void zmq::null_mechanism_t::send_zap_request ()
|
|||||||
memcpy (msg.data (), peer_address.c_str (), peer_address.length ());
|
memcpy (msg.data (), peer_address.c_str (), peer_address.length ());
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Identity frame
|
// Identity frame
|
||||||
rc = msg.init_size (options.identity_size);
|
rc = msg.init_size (options.identity_size);
|
||||||
@ -262,14 +269,18 @@ void zmq::null_mechanism_t::send_zap_request ()
|
|||||||
memcpy (msg.data (), options.identity, options.identity_size);
|
memcpy (msg.data (), options.identity, options.identity_size);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Mechanism frame
|
// Mechanism frame
|
||||||
rc = msg.init_size (4);
|
rc = msg.init_size (4);
|
||||||
errno_assert (rc == 0);
|
errno_assert (rc == 0);
|
||||||
memcpy (msg.data (), "NULL", 4);
|
memcpy (msg.data (), "NULL", 4);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int zmq::null_mechanism_t::receive_and_process_zap_reply ()
|
int zmq::null_mechanism_t::receive_and_process_zap_reply ()
|
||||||
|
@ -75,7 +75,7 @@ namespace zmq
|
|||||||
int process_error_command (
|
int process_error_command (
|
||||||
const unsigned char *cmd_data, size_t data_size);
|
const unsigned char *cmd_data, size_t data_size);
|
||||||
|
|
||||||
void send_zap_request ();
|
int send_zap_request ();
|
||||||
int receive_and_process_zap_reply ();
|
int receive_and_process_zap_reply ();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -191,7 +191,9 @@ int zmq::plain_server_t::process_hello (msg_t *msg_)
|
|||||||
// Use ZAP protocol (RFC 27) to authenticate the user.
|
// Use ZAP protocol (RFC 27) to authenticate the user.
|
||||||
int rc = session->zap_connect ();
|
int rc = session->zap_connect ();
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
send_zap_request (username, password);
|
rc = send_zap_request (username, password);
|
||||||
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
rc = receive_and_process_zap_reply ();
|
rc = receive_and_process_zap_reply ();
|
||||||
if (rc == 0)
|
if (rc == 0)
|
||||||
state = status_code == "200"
|
state = status_code == "200"
|
||||||
@ -277,7 +279,7 @@ int zmq::plain_server_t::produce_error (msg_t *msg_) const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void zmq::plain_server_t::send_zap_request (const std::string &username,
|
int zmq::plain_server_t::send_zap_request (const std::string &username,
|
||||||
const std::string &password)
|
const std::string &password)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
@ -288,7 +290,8 @@ void zmq::plain_server_t::send_zap_request (const std::string &username,
|
|||||||
errno_assert (rc == 0);
|
errno_assert (rc == 0);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Version frame
|
// Version frame
|
||||||
rc = msg.init_size (3);
|
rc = msg.init_size (3);
|
||||||
@ -296,7 +299,8 @@ void zmq::plain_server_t::send_zap_request (const std::string &username,
|
|||||||
memcpy (msg.data (), "1.0", 3);
|
memcpy (msg.data (), "1.0", 3);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Request id frame
|
// Request id frame
|
||||||
rc = msg.init_size (1);
|
rc = msg.init_size (1);
|
||||||
@ -304,7 +308,8 @@ void zmq::plain_server_t::send_zap_request (const std::string &username,
|
|||||||
memcpy (msg.data (), "1", 1);
|
memcpy (msg.data (), "1", 1);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Domain frame
|
// Domain frame
|
||||||
rc = msg.init_size (options.zap_domain.length ());
|
rc = msg.init_size (options.zap_domain.length ());
|
||||||
@ -312,7 +317,8 @@ void zmq::plain_server_t::send_zap_request (const std::string &username,
|
|||||||
memcpy (msg.data (), options.zap_domain.c_str (), options.zap_domain.length ());
|
memcpy (msg.data (), options.zap_domain.c_str (), options.zap_domain.length ());
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Address frame
|
// Address frame
|
||||||
rc = msg.init_size (peer_address.length ());
|
rc = msg.init_size (peer_address.length ());
|
||||||
@ -320,7 +326,8 @@ void zmq::plain_server_t::send_zap_request (const std::string &username,
|
|||||||
memcpy (msg.data (), peer_address.c_str (), peer_address.length ());
|
memcpy (msg.data (), peer_address.c_str (), peer_address.length ());
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Identity frame
|
// Identity frame
|
||||||
rc = msg.init_size (options.identity_size);
|
rc = msg.init_size (options.identity_size);
|
||||||
@ -328,7 +335,8 @@ void zmq::plain_server_t::send_zap_request (const std::string &username,
|
|||||||
memcpy (msg.data (), options.identity, options.identity_size);
|
memcpy (msg.data (), options.identity, options.identity_size);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Mechanism frame
|
// Mechanism frame
|
||||||
rc = msg.init_size (5);
|
rc = msg.init_size (5);
|
||||||
@ -336,7 +344,8 @@ void zmq::plain_server_t::send_zap_request (const std::string &username,
|
|||||||
memcpy (msg.data (), "PLAIN", 5);
|
memcpy (msg.data (), "PLAIN", 5);
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Username frame
|
// Username frame
|
||||||
rc = msg.init_size (username.length ());
|
rc = msg.init_size (username.length ());
|
||||||
@ -344,14 +353,18 @@ void zmq::plain_server_t::send_zap_request (const std::string &username,
|
|||||||
memcpy (msg.data (), username.c_str (), username.length ());
|
memcpy (msg.data (), username.c_str (), username.length ());
|
||||||
msg.set_flags (msg_t::more);
|
msg.set_flags (msg_t::more);
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
// Password frame
|
// Password frame
|
||||||
rc = msg.init_size (password.length ());
|
rc = msg.init_size (password.length ());
|
||||||
errno_assert (rc == 0);
|
errno_assert (rc == 0);
|
||||||
memcpy (msg.data (), password.c_str (), password.length ());
|
memcpy (msg.data (), password.c_str (), password.length ());
|
||||||
rc = session->write_zap_msg (&msg);
|
rc = session->write_zap_msg (&msg);
|
||||||
errno_assert (rc == 0);
|
if (rc != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int zmq::plain_server_t::receive_and_process_zap_reply ()
|
int zmq::plain_server_t::receive_and_process_zap_reply ()
|
||||||
|
@ -83,7 +83,7 @@ namespace zmq
|
|||||||
int process_hello (msg_t *msg_);
|
int process_hello (msg_t *msg_);
|
||||||
int process_initiate (msg_t *msg_);
|
int process_initiate (msg_t *msg_);
|
||||||
|
|
||||||
void send_zap_request (const std::string &username,
|
int send_zap_request(const std::string &username,
|
||||||
const std::string &password);
|
const std::string &password);
|
||||||
int receive_and_process_zap_reply ();
|
int receive_and_process_zap_reply ();
|
||||||
};
|
};
|
||||||
|
@ -183,14 +183,11 @@ int zmq::session_base_t::read_zap_msg (msg_t *msg_)
|
|||||||
|
|
||||||
int zmq::session_base_t::write_zap_msg (msg_t *msg_)
|
int zmq::session_base_t::write_zap_msg (msg_t *msg_)
|
||||||
{
|
{
|
||||||
if (zap_pipe == NULL) {
|
if (zap_pipe == NULL || !zap_pipe->write (msg_)) {
|
||||||
errno = ENOTCONN;
|
errno = ENOTCONN;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool ok = zap_pipe->write (msg_);
|
|
||||||
zmq_assert (ok);
|
|
||||||
|
|
||||||
if ((msg_->flags () & msg_t::more) == 0)
|
if ((msg_->flags () & msg_t::more) == 0)
|
||||||
zap_pipe->flush ();
|
zap_pipe->flush ();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user