-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
667 additions
and
1,240 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
CMakeLists.txt.user | ||
build | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,21 +23,23 @@ I created a concept of digital software licence and implemented it under this pr | |
|
||
### Dependencies | ||
|
||
* C++11 | ||
* C++11 (C++14 if building with test since latest Google C++ Testing Library requires C++14) | ||
* [Crypto++](https://www.cryptopp.com/) v5.6.5+ [with Pem Pack](https://abumq.github.io/downloads/pem_pack.zip) | ||
* [cmake](https://cmake.org/) v2.8.12+ | ||
* [Ripe](https://github.com/abumq/ripe) | ||
|
||
### Installation | ||
* [Download](https://github.com/abumq/licensepp/archive/master.zip) or [clone]([email protected]:abumq/licensepp.git) the repository | ||
* Install Crypto++ | ||
``` | ||
git clone https://github.com/abumq/licensepp | ||
git clone https://github.com/weidai11/cryptopp.git | ||
git clone https://github.com/noloader/cryptopp-pem.git | ||
cp cryptopp-pem/* cryptopp/ | ||
cd cryptopp | ||
make | ||
sudo make install | ||
wget https://raw.githubusercontent.com/abumq/abumq.github.io/master/downloads/cryptocpp.tar.gz | ||
tar xf cryptocpp.tar.gz | ||
cd cryptopp-CRYPTOPP_5_6_5 | ||
wget https://raw.githubusercontent.com/abumq/abumq.github.io/master/downloads/pem_pack.zip | ||
unzip pem_pack.zip | ||
cmake . | ||
make | ||
sudo make install | ||
``` | ||
* Use CMake to build the project | ||
``` | ||
|
@@ -48,7 +50,7 @@ I created a concept of digital software licence and implemented it under this pr | |
make | ||
sudo make install | ||
## build with test | ||
## build with test (make sure you have Google C++ Testing Library) | ||
cmake -Dtest=ON .. | ||
make | ||
sudo make install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
license-manager: main.cc licensing/license-manager-key-register.cc | ||
g++ main.cc licensing/license-manager-key-register.cc -I/usr/local/lib -llicensepp -lcryptopp -std=c++11 -O3 -o license-manager | ||
g++ main.cc licensing/license-manager-key-register.cc -I/usr/local/lib -llicensepp -std=c++11 -O3 -o license-manager | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# | ||
# CMake module for Ripe cryptography wrapper | ||
# | ||
# Creates ${RIPE_INCLUDE_DIR} and ${RIPE_LIBRARY} | ||
# | ||
# If ${RIPE_USE_STATIC_LIBS} is ON then static libs are preferred over shared | ||
# | ||
# Copyright 2017-present @abumq (Majid Q.) | ||
# | ||
# https://github.com/abumq/ripe | ||
# | ||
|
||
set(RIPE_PATHS ${RIPE_ROOT} $ENV{RIPE_ROOT}) | ||
|
||
find_path(RIPE_INCLUDE_DIR | ||
Ripe.h | ||
PATH_SUFFIXES include | ||
PATHS ${RIPE_PATHS} | ||
) | ||
|
||
if (RIPE_USE_STATIC_LIBS) | ||
message ("-- Ripe: Static linking") | ||
find_library(RIPE_LIBRARY | ||
NAMES libripe.a | ||
HINTS "${CMAKE_PREFIX_PATH}/lib" | ||
) | ||
else() | ||
message ("-- Ripe: Dynamic linking") | ||
find_library(RIPE_LIBRARY | ||
NAMES libripe.dylib | ||
HINTS "${CMAKE_PREFIX_PATH}/lib" | ||
) | ||
endif() | ||
|
||
message ("-- Ripe: Include: " ${RIPE_INCLUDE_DIR} ", Binary: " ${RIPE_LIBRARY}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
|
||
find_package_handle_standard_args(Ripe REQUIRED_VARS RIPE_INCLUDE_DIR RIPE_LIBRARY) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.