Skip to content

Commit

Permalink
Add cert-new and cert-public commands with validation and test.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Feb 12, 2015
1 parent 2edcfa2 commit 8eb0359
Show file tree
Hide file tree
Showing 133 changed files with 1,199 additions and 430 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ libbitcoin-explorer.pc
/bx-build/
/release/staging/bx-*
/release/bx
/release/bx.exe
/release/bx.exe
*.zpl
6 changes: 6 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ bitcoin_explorer_commands_include_HEADERS = \
include/bitcoin/explorer/commands/bitcoin256.hpp \
include/bitcoin/explorer/commands/blke-fetch-transaction.hpp \
include/bitcoin/explorer/commands/btc-to-satoshi.hpp \
include/bitcoin/explorer/commands/cert-new.hpp \
include/bitcoin/explorer/commands/cert-public.hpp \
include/bitcoin/explorer/commands/ec-add.hpp \
include/bitcoin/explorer/commands/ec-add-secrets.hpp \
include/bitcoin/explorer/commands/ec-lock.hpp \
Expand Down Expand Up @@ -258,6 +260,8 @@ src_libbitcoin_explorer_la_SOURCES += \
src/commands/bitcoin256.cpp \
src/commands/blke-fetch-transaction.cpp \
src/commands/btc-to-satoshi.cpp \
src/commands/cert-new.cpp \
src/commands/cert-public.cpp \
src/commands/ec-add.cpp \
src/commands/ec-add-secrets.cpp \
src/commands/ec-lock.cpp \
Expand Down Expand Up @@ -398,6 +402,8 @@ test_libbitcoin_explorer_test_SOURCES += \
test/commands/bitcoin256.cpp \
test/commands/blke-fetch-transaction.cpp \
test/commands/btc-to-satoshi.cpp \
test/commands/cert-new.cpp \
test/commands/cert-public.cpp \
test/commands/ec-add.cpp \
test/commands/ec-add-secrets.cpp \
test/commands/ec-lock.cpp \
Expand Down
12 changes: 6 additions & 6 deletions builds/msvc/vs2013/bx/bx.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@
<Import Project="..\..\..\..\..\..\nuget\boost_program_options-vc120.1.56.0.0\build\native\boost_program_options-vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\boost_program_options-vc120.1.56.0.0\build\native\boost_program_options-vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\boost_regex-vc120.1.56.0.0\build\native\boost_regex-vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\boost_regex-vc120.1.56.0.0\build\native\boost_regex-vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\boost_system-vc120.1.56.0.0\build\native\boost_system-vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\boost_system-vc120.1.56.0.0\build\native\boost_system-vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\czmq_vc120.2.2.0.8\build\native\czmq_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\czmq_vc120.2.2.0.8\build\native\czmq_vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\czmqpp_vc120.1.0.0.10\build\native\czmqpp_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\czmqpp_vc120.1.0.0.10\build\native\czmqpp_vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\czmq_vc120.3.0.1.0\build\native\czmq_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\czmq_vc120.3.0.1.0\build\native\czmq_vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\czmqpp_vc120.1.1.0.0\build\native\czmqpp_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\czmqpp_vc120.1.1.0.0\build\native\czmqpp_vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\libsodium_vc120.1.0.0.0\build\native\libsodium_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\libsodium_vc120.1.0.0.0\build\native\libsodium_vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\libzmq_vc120.4.1.0.7\build\native\libzmq_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\libzmq_vc120.4.1.0.7\build\native\libzmq_vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\libzmq_vc120.4.2.0.0\build\native\libzmq_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\libzmq_vc120.4.2.0.0\build\native\libzmq_vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\secp256k1_vc120.0.1.0.4\build\native\secp256k1_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\secp256k1_vc120.0.1.0.4\build\native\secp256k1_vc120.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Expand All @@ -97,10 +97,10 @@
<Error Condition="!Exists('..\..\..\..\..\..\nuget\boost_program_options-vc120.1.56.0.0\build\native\boost_program_options-vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\boost_program_options-vc120.1.56.0.0\build\native\boost_program_options-vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\boost_regex-vc120.1.56.0.0\build\native\boost_regex-vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\boost_regex-vc120.1.56.0.0\build\native\boost_regex-vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\boost_system-vc120.1.56.0.0\build\native\boost_system-vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\boost_system-vc120.1.56.0.0\build\native\boost_system-vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\czmq_vc120.2.2.0.8\build\native\czmq_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\czmq_vc120.2.2.0.8\build\native\czmq_vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\czmqpp_vc120.1.0.0.10\build\native\czmqpp_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\czmqpp_vc120.1.0.0.10\build\native\czmqpp_vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\czmq_vc120.3.0.1.0\build\native\czmq_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\czmq_vc120.3.0.1.0\build\native\czmq_vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\czmqpp_vc120.1.1.0.0\build\native\czmqpp_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\czmqpp_vc120.1.1.0.0\build\native\czmqpp_vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\libsodium_vc120.1.0.0.0\build\native\libsodium_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\libsodium_vc120.1.0.0.0\build\native\libsodium_vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\libzmq_vc120.4.1.0.7\build\native\libzmq_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\libzmq_vc120.4.1.0.7\build\native\libzmq_vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\libzmq_vc120.4.2.0.0\build\native\libzmq_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\libzmq_vc120.4.2.0.0\build\native\libzmq_vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\secp256k1_vc120.0.1.0.4\build\native\secp256k1_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\secp256k1_vc120.0.1.0.4\build\native\secp256k1_vc120.targets'))" />
</Target>
<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions builds/msvc/vs2013/bx/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<package id="boost_program_options-vc120" version="1.56.0.0" targetFramework="Native" />
<package id="boost_regex-vc120" version="1.56.0.0" targetFramework="Native" />
<package id="boost_system-vc120" version="1.56.0.0" targetFramework="Native" />
<package id="czmq_vc120" version="2.2.0.8" targetFramework="Native" />
<package id="czmqpp_vc120" version="1.0.0.10" targetFramework="Native" />
<package id="czmq_vc120" version="3.0.1.0" targetFramework="Native" />
<package id="czmqpp_vc120" version="1.1.0.0" targetFramework="Native" />
<package id="libsodium_vc120" version="1.0.0.0" targetFramework="Native" />
<package id="libzmq_vc120" version="4.1.0.7" targetFramework="Native" />
<package id="libzmq_vc120" version="4.2.0.0" targetFramework="Native" />
<package id="secp256k1_vc120" version="0.1.0.4" targetFramework="Native" />
</packages>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!--
#################################################################
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY #
Expand Down Expand Up @@ -69,42 +69,6 @@
<Import Project="$(ProjectDir)..\..\properties\Output.props" />
<Import Project="$(ProjectDir)$(ProjectName).props" />
</ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLEXE|Win32'">
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDEXE|Win32'">
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSEXE|Win32'">
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSEXE|Win32'">
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDEXE|Win32'">
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugLEXE|Win32'">
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLEXE|x64'">
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDEXE|x64'">
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSEXE|x64'">
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSEXE|x64'">
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDEXE|x64'">
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugLEXE|x64'">
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\..\..\test\primitives\address.cpp" />
<ClCompile Include="..\..\..\..\test\primitives\base58.cpp" />
Expand Down Expand Up @@ -133,6 +97,8 @@
<ClCompile Include="..\..\..\..\test\commands\bitcoin256.cpp" />
<ClCompile Include="..\..\..\..\test\commands\blke-fetch-transaction.cpp" />
<ClCompile Include="..\..\..\..\test\commands\btc-to-satoshi.cpp" />
<ClCompile Include="..\..\..\..\test\commands\cert-new.cpp" />
<ClCompile Include="..\..\..\..\test\commands\cert-public.cpp" />
<ClCompile Include="..\..\..\..\test\commands\ec-add.cpp" />
<ClCompile Include="..\..\..\..\test\commands\ec-add-secrets.cpp" />
<ClCompile Include="..\..\..\..\test\commands\ec-lock.cpp" />
Expand Down Expand Up @@ -227,10 +193,10 @@
<Import Project="..\..\..\..\..\..\nuget\boost_regex-vc120.1.56.0.0\build\native\boost_regex-vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\boost_regex-vc120.1.56.0.0\build\native\boost_regex-vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\boost_system-vc120.1.56.0.0\build\native\boost_system-vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\boost_system-vc120.1.56.0.0\build\native\boost_system-vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\boost_unit_test_framework-vc120.1.56.0.0\build\native\boost_unit_test_framework-vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\boost_unit_test_framework-vc120.1.56.0.0\build\native\boost_unit_test_framework-vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\czmq_vc120.2.2.0.8\build\native\czmq_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\czmq_vc120.2.2.0.8\build\native\czmq_vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\czmqpp_vc120.1.0.0.10\build\native\czmqpp_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\czmqpp_vc120.1.0.0.10\build\native\czmqpp_vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\czmq_vc120.3.0.1.0\build\native\czmq_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\czmq_vc120.3.0.1.0\build\native\czmq_vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\czmqpp_vc120.1.1.0.0\build\native\czmqpp_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\czmqpp_vc120.1.1.0.0\build\native\czmqpp_vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\libsodium_vc120.1.0.0.0\build\native\libsodium_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\libsodium_vc120.1.0.0.0\build\native\libsodium_vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\libzmq_vc120.4.1.0.7\build\native\libzmq_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\libzmq_vc120.4.1.0.7\build\native\libzmq_vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\libzmq_vc120.4.2.0.0\build\native\libzmq_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\libzmq_vc120.4.2.0.0\build\native\libzmq_vc120.targets')" />
<Import Project="..\..\..\..\..\..\nuget\secp256k1_vc120.0.1.0.4\build\native\secp256k1_vc120.targets" Condition="Exists('..\..\..\..\..\..\nuget\secp256k1_vc120.0.1.0.4\build\native\secp256k1_vc120.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Expand All @@ -245,15 +211,15 @@
<Error Condition="!Exists('..\..\..\..\..\..\nuget\boost_regex-vc120.1.56.0.0\build\native\boost_regex-vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\boost_regex-vc120.1.56.0.0\build\native\boost_regex-vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\boost_system-vc120.1.56.0.0\build\native\boost_system-vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\boost_system-vc120.1.56.0.0\build\native\boost_system-vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\boost_unit_test_framework-vc120.1.56.0.0\build\native\boost_unit_test_framework-vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\boost_unit_test_framework-vc120.1.56.0.0\build\native\boost_unit_test_framework-vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\czmq_vc120.2.2.0.8\build\native\czmq_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\czmq_vc120.2.2.0.8\build\native\czmq_vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\czmqpp_vc120.1.0.0.10\build\native\czmqpp_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\czmqpp_vc120.1.0.0.10\build\native\czmqpp_vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\czmq_vc120.3.0.1.0\build\native\czmq_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\czmq_vc120.3.0.1.0\build\native\czmq_vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\czmqpp_vc120.1.1.0.0\build\native\czmqpp_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\czmqpp_vc120.1.1.0.0\build\native\czmqpp_vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\libsodium_vc120.1.0.0.0\build\native\libsodium_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\libsodium_vc120.1.0.0.0\build\native\libsodium_vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\libzmq_vc120.4.1.0.7\build\native\libzmq_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\libzmq_vc120.4.1.0.7\build\native\libzmq_vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\libzmq_vc120.4.2.0.0\build\native\libzmq_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\libzmq_vc120.4.2.0.0\build\native\libzmq_vc120.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\..\nuget\secp256k1_vc120.0.1.0.4\build\native\secp256k1_vc120.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\..\nuget\secp256k1_vc120.0.1.0.4\build\native\secp256k1_vc120.targets'))" />
</Target>
<ItemGroup>
<ProjectReference Include="..\libbitcoin-explorer\libbitcoin-explorer.vcxproj">
<Project>{4A1D71D5-3DEE-47F0-A189-21C301E2808F}</Project>
</ProjectReference>
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@
<ClCompile Include="..\..\..\..\test\commands\btc-to-satoshi.cpp">
<Filter>src\tests\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\commands\cert-new.cpp">
<Filter>src\tests\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\commands\cert-public.cpp">
<Filter>src\tests\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\commands\ec-add.cpp">
<Filter>src\tests\commands</Filter>
</ClCompile>
Expand Down
6 changes: 3 additions & 3 deletions builds/msvc/vs2013/libbitcoin-explorer-test/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<package id="boost_regex-vc120" version="1.56.0.0" targetFramework="Native" />
<package id="boost_system-vc120" version="1.56.0.0" targetFramework="Native" />
<package id="boost_unit_test_framework-vc120" version="1.56.0.0" targetFramework="Native" />
<package id="czmq_vc120" version="2.2.0.8" targetFramework="Native" />
<package id="czmqpp_vc120" version="1.0.0.10" targetFramework="Native" />
<package id="czmq_vc120" version="3.0.1.0" targetFramework="Native" />
<package id="czmqpp_vc120" version="1.1.0.0" targetFramework="Native" />
<package id="libsodium_vc120" version="1.0.0.0" targetFramework="Native" />
<package id="libzmq_vc120" version="4.1.0.7" targetFramework="Native" />
<package id="libzmq_vc120" version="4.2.0.0" targetFramework="Native" />
<package id="secp256k1_vc120" version="0.1.0.4" targetFramework="Native" />
</packages>
Loading

0 comments on commit 8eb0359

Please sign in to comment.