Coder Social home page Coder Social logo

abumq / licensepp Goto Github PK

View Code? Open in Web Editor NEW
364.0 364.0 96.0 382 KB

Software licensing and registration using digital signatures and public cryptography 🪪

License: Other

CMake 13.07% Makefile 0.16% C++ 60.21% CSS 22.05% C 4.51%
licensing security software-license software-licensing

licensepp's Introduction

Note

☝️ This is not a true representation of most used languages, as I have over 30 private repositories in my personal Github account and over 50 private repositories spread across 3 personally owned organizations. These repositories use mixture of C++, BASH, SQL, Javascript (for Vanilla JS, React and Node.js) and Python (for ML/AI, Jupyter notebooks, APIs and scripts)

Sponsorship

If my work benefits you or your organization in any way, or you want to support me by resuming work on my dream project, please consider supporting me via Github sponsorship program.

licensepp's People

Contributors

abumq avatar ignogueiras avatar majorerror avatar michaelmigliore avatar myd7349 avatar sgiurgiu avatar vkresch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

licensepp's Issues

Versioning issue?

Hi When I try to make CLI I get undefined references. Could this be a versioning issue? Thanks!

licensepp/cli$ make
g++ main.cc licensing/license-manager-key-register.cc -I/usr/local/lib -llicensepp -std=c++11 -O3 -o license-manager
/usr/bin/ld: /usr/local/lib/liblicensepp.so: undefined reference to Ripe::base64Encode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /usr/local/lib/liblicensepp.so: undefined reference to Ripe::encryptRSA(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: /usr/local/lib/liblicensepp.so: undefined reference to Ripe::encryptAES(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /usr/local/lib/liblicensepp.so: undefined reference to Ripe::decryptRSA(std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool, bool, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: /usr/local/lib/liblicensepp.so: undefined reference to Ripe::hexToString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /usr/local/lib/liblicensepp.so: undefined reference to Ripe::base64Decode(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: /usr/local/lib/liblicensepp.so: undefined reference to Ripe::signRSA(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /usr/local/lib/liblicensepp.so: undefined reference to Ripe::generateNewKeyabi:cxx11'
/usr/bin/ld: /usr/local/lib/liblicensepp.so: undefined reference to Ripe::decryptAES(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool, bool)' /usr/bin/ld: /usr/local/lib/liblicensepp.so: undefined reference to Ripe::stringToHex(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: /usr/local/lib/liblicensepp.so: undefined reference to `Ripe::verifyRSA(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
collect2: error: ld returned 1 exit status
make: *** [Makefile:2: license-manager] Error 1

Installation links for Crypto++ down

The links in the README for the installation doesn't work anymore.

wget https://muflihun.github.io/downloads/cryptocpp.tar.gz
tar xf cryptocpp.tar.gz
cd cryptopp-CRYPTOPP_5_6_5
wget https://muflihun.github.io/downloads/pem_pack.zip
unzip pem_pack.zip
cmake .
make
make install

I can install Crypto++ with
sudo apt-get install libcrypto++-dev libcrypto++-doc libcrypto++-utils
but I can't seem to find pem_pack.zip. Any help would be appreciated. I'm using Ubuntu 18.04.

can't create valid licenses

I have made a test license which first decodes JSON is. The Signature is an empty string
{"authority_signature":"","expiry_date":1612447411,"issue_date":1580911411

and validating the file fails with:
Failed to verify the licensing authority

security license

the problem is that if the license has expired, then you can change the system time ago and get a valid license

should be fixed?

Question about usage!

i have been success compiled this library on macOS.
but, I have an usage question.

Does it can be work like this behavior.
if so, could you give me a hint?

thanks

Bunch of errors at the building phase of cryptopp_5_6_5

Following the indications found here: https://github.com/abumq/licensepp?tab=readme-ov-file#getting-started I tried to compile and build licensepp in Ubuntu 23.10 but got ad the building phase of cryptopp_5_6_5 a bunch of errors:

raphy@raohy:~$ git clone https://github.com/abumq/licensepp.git
Cloning into 'licensepp'...
remote: Enumerating objects: 740, done.
remote: Counting objects: 100% (269/269), done.
remote: Compressing objects: 100% (128/128), done.
remote: Total 740 (delta 145), reused 224 (delta 126), pack-reused 471
Receiving objects: 100% (740/740), 368.36 KiB | 5.05 MiB/s, done.
Resolving deltas: 100% (432/432), done.

raphy@raohy:~$ cd licensepp/

raphy@raohy:~/licensepp$ mkdir dependencies
raphy@raohy:~/licensepp$ cd dependencies/

raphy@raohy:~/licensepp/dependencies$ wget https://raw.githubusercontent.com/abumq/abumq.github.io/master/downloads/cryptocpp.tar.gz
--2024-04-18 11:55:01--  https://raw.githubusercontent.com/abumq/abumq.github.io/master/downloads/cryptocpp.tar.gz
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8002::154, 2606:50c0:8000::154, 2606:50c0:8003::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8002::154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4126569 (3,9M) [application/octet-stream]
Saving to: ‘cryptocpp.tar.gz’

cryptocpp.tar.gz                   100%[=============================================================>]   3,93M  --.-KB/s    in 0,1s    

2024-04-18 11:55:01 (41,1 MB/s) - ‘cryptocpp.tar.gz’ saved [4126569/4126569]

raphy@raohy:~/licensepp/dependencies$ tar xf cryptocpp.tar.gz
raphy@raohy:~/licensepp/dependencies$ cd cryptopp-CRYPTOPP_5_6_5/
raphy@raohy:~/licensepp/dependencies/cryptopp-CRYPTOPP_5_6_5$ wget https://raw.githubusercontent.com/abumq/abumq.github.io/master/downloads/pem_pack.zip
--2024-04-18 11:55:43--  https://raw.githubusercontent.com/abumq/abumq.github.io/master/downloads/pem_pack.zip
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8003::154, 2606:50c0:8000::154, 2606:50c0:8002::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8003::154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20769 (20K) [application/zip]
Saving to: ‘pem_pack.zip’

pem_pack.zip                            100%[===============================================================================>]  20,28K  --.-KB/s    in 0,002s  

2024-04-18 11:55:44 (13,1 MB/s) - ‘pem_pack.zip’ saved [20769/20769]

raphy@raohy:~/licensepp/dependencies/cryptopp-CRYPTOPP_5_6_5$ unzip pem_pack.zip 
Archive:  pem_pack.zip
  inflating: pem-com.cpp             
  inflating: pem-rd.cpp              
  inflating: pem-wr.cpp              
  inflating: pem-test.cxx            
  inflating: pem-create-keys.sh      
  inflating: pem-verify-keys.sh      
  inflating: pem.h                   
  inflating: pem-com.h               


raphy@raohy:~/licensepp/dependencies/cryptopp-CRYPTOPP_5_6_5$ cmake .
CMake Deprecation Warning at CMakeLists.txt:7 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is GNU 12.3.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_OPT_ARCH_NATIVE_SUPPORTED
-- Performing Test COMPILER_OPT_ARCH_NATIVE_SUPPORTED - Success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Compiler: 
-- Flags:  -march=native
-- Build type: RelWithDebInfo
-- The following OPTIONAL packages have been found:

 * Threads

-- Configuring done (0.6s)
-- Generating done (0.0s)
-- Build files have been written to: /home/raphy/licensepp/dependencies/cryptopp-CRYPTOPP_5_6_5


raphy@raohy:~/licensepp/dependencies/cryptopp-CRYPTOPP_5_6_5$ make
g++ -DNDEBUG -g2 -O2 -fPIC -m64 -pipe -c cryptlib.cpp
In file included from filters.h:22,
                 from cryptlib.cpp:20:
algparam.h: In destructor ‘virtual CryptoPP::AlgorithmParametersBase::~AlgorithmParametersBase()’:
algparam.h:404:45: warning: ‘bool std::uncaught_exception()’ is deprecated: use 'std::uncaught_exceptions()' instead [-Wdeprecated-declarations]
  404 |                 if (!std::uncaught_exception())
      |                      ~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/c++/13/ext/concurrence.h:34,
                 from /usr/include/c++/13/bits/shared_ptr_base.h:62,
                 from /usr/include/c++/13/bits/shared_ptr.h:53,
                 from /usr/include/c++/13/memory:80,
                 from stdcpp.h:10,
                 from cryptlib.h:87,
                 from cryptlib.cpp:18:
/usr/include/c++/13/exception:122:8: note: declared here
  122 |   bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
      |        ^~~~~~~~~~~~~~~~~~
g++ -DNDEBUG -g2 -O2 -fPIC -m64 -pipe -c cpu.cpp
g++ -DNDEBUG -g2 -O2 -fPIC -m64 -pipe -c integer.cpp
In file included from nbtheory.h:11,
                 from integer.cpp:21:
algparam.h: In destructor ‘virtual CryptoPP::AlgorithmParametersBase::~AlgorithmParametersBase()’:
algparam.h:404:45: warning: ‘bool std::uncaught_exception()’ is deprecated: use 'std::uncaught_exceptions()' instead [-Wdeprecated-declarations]
  404 |                 if (!std::uncaught_exception())
      |                      ~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/c++/13/ext/concurrence.h:34,
                 from /usr/include/c++/13/bits/shared_ptr_base.h:62,
                 from /usr/include/c++/13/bits/shared_ptr.h:53,
                 from /usr/include/c++/13/memory:80,
                 from stdcpp.h:10,
                 from cryptlib.h:87,
                 from integer.h:15,
                 from integer.cpp:18:
/usr/include/c++/13/exception:122:8: note: declared here
  122 |   bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
      |        ^~~~~~~~~~~~~~~~~~
g++ -DNDEBUG -g2 -O2 -fPIC -m64 -pipe -c 3way.cpp
g++ -DNDEBUG -g2 -O2 -fPIC -m64 -pipe -c adler32.cpp
g++ -DNDEBUG -g2 -O2 -fPIC -m64 -pipe -c algebra.cpp
g++ -DNDEBUG -g2 -O2 -fPIC -m64 -pipe -c algparam.cpp
In file included from algparam.cpp:7:
algparam.h: In destructor ‘virtual CryptoPP::AlgorithmParametersBase::~AlgorithmParametersBase()’:
algparam.h:404:45: warning: ‘bool std::uncaught_exception()’ is deprecated: use 'std::uncaught_exceptions()' instead [-Wdeprecated-declarations]
  404 |                 if (!std::uncaught_exception())
      |                      ~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/c++/13/ext/concurrence.h:34,
                 from /usr/include/c++/13/bits/shared_ptr_base.h:62,
                 from /usr/include/c++/13/bits/shared_ptr.h:53,
                 from /usr/include/c++/13/memory:80,
                 from stdcpp.h:10,
                 from cryptlib.h:87,
                 from algparam.h:12:
/usr/include/c++/13/exception:122:8: note: declared here
  122 |   bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
      |        ^~~~~~~~~~~~~~~~~~
g++ -DNDEBUG -g2 -O2 -fPIC -m64 -pipe -c arc4.cpp
g++ -DNDEBUG -g2 -O2 -fPIC -m64 -pipe -c asn.cpp
In file included from filters.h:22,
                 from asn.h:10,
                 from asn.cpp:8:
algparam.h: In destructor ‘virtual CryptoPP::AlgorithmParametersBase::~AlgorithmParametersBase()’:
algparam.h:404:45: warning: ‘bool std::uncaught_exception()’ is deprecated: use 'std::uncaught_exceptions()' instead [-Wdeprecated-declarations]
  404 |                 if (!std::uncaught_exception())
      |                      ~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/c++/13/ext/concurrence.h:34,
                 from /usr/include/c++/13/bits/shared_ptr_base.h:62,
                 from /usr/include/c++/13/bits/shared_ptr.h:53,
                 from /usr/include/c++/13/memory:80,
                 from stdcpp.h:10,
                 from cryptlib.h:87,
                 from asn.h:9:
/usr/include/c++/13/exception:122:8: note: declared here
  122 |   bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
      |        ^~~~~~~~~~~~~~~~~~
asn.cpp: In function ‘size_t CryptoPP::DERLengthEncode(BufferedTransformation&, lword)’:
asn.cpp:22:24: error: reference to ‘byte’ is ambiguous
   22 |                 bt.Put(byte(length));
      |                        ^~~~
In file included from /usr/include/c++/13/bits/memory_resource.h:38,
                 from /usr/include/c++/13/string:58,
                 from stdcpp.h:9:
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
In file included from pch.h:13,
                 from asn.cpp:3:
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:27:24: error: reference to ‘byte’ is ambiguous
   27 |                 bt.Put(byte(BytePrecision(length) | 0x80));
      |                        ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:31:32: error: reference to ‘byte’ is ambiguous
   31 |                         bt.Put(byte(length >> (j-1)*8));
      |                                ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp: In function ‘bool CryptoPP::BERLengthDecode(BufferedTransformation&, lword&, bool&)’:
asn.cpp:40:9: error: reference to ‘byte’ is ambiguous
   40 |         byte b;
      |         ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:42:21: error: ‘b’ was not declared in this scope; did you mean ‘bt’?
   42 |         if (!bt.Get(b))
      |                     ^
      |                     bt
asn.cpp:45:15: error: ‘b’ was not declared in this scope; did you mean ‘bt’?
   45 |         if (!(b & 0x80))
      |               ^
      |               bt
asn.cpp: In function ‘void CryptoPP::BERDecodeNull(BufferedTransformation&)’:
asn.cpp:95:9: error: reference to ‘byte’ is ambiguous
   95 |         byte b;
      |         ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:96:21: error: ‘b’ was not declared in this scope
   96 |         if (!in.Get(b) || b != TAG_NULL)
      |                     ^
asn.cpp: At global scope:
asn.cpp:104:63: error: reference to ‘byte’ is ambiguous
  104 | size_t DEREncodeOctetString(BufferedTransformation &bt, const byte *str, size_t strLen)
      |                                                               ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp: In function ‘size_t CryptoPP::DEREncodeOctetString(BufferedTransformation&, const int*, size_t)’:
asn.cpp:108:16: error: invalid conversion from ‘const int*’ to ‘byte’ {aka ‘unsigned char’} [-fpermissive]
  108 |         bt.Put(str, strLen);
      |                ^~~
      |                |
      |                const int*
cryptlib.h:1385:33: note:   initializing argument 1 of ‘size_t CryptoPP::BufferedTransformation::Put(byte, bool)’
 1385 |                 size_t Put(byte inByte, bool blocking=true)
      |                            ~~~~~^~~~~~
asn.cpp: In function ‘size_t CryptoPP::BERDecodeOctetString(BufferedTransformation&, SecByteBlock&)’:
asn.cpp:119:9: error: reference to ‘byte’ is ambiguous
  119 |         byte b;
      |         ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:120:21: error: ‘b’ was not declared in this scope; did you mean ‘bt’?
  120 |         if (!bt.Get(b) || b != OCTET_STRING)
      |                     ^
      |                     bt
asn.cpp: In function ‘size_t CryptoPP::BERDecodeOctetString(BufferedTransformation&, BufferedTransformation&)’:
asn.cpp:135:9: error: reference to ‘byte’ is ambiguous
  135 |         byte b;
      |         ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:136:21: error: ‘b’ was not declared in this scope; did you mean ‘bt’?
  136 |         if (!bt.Get(b) || b != OCTET_STRING)
      |                     ^
      |                     bt
asn.cpp: At global scope:
asn.cpp:147:80: error: reference to ‘byte’ is ambiguous
  147 | size_t DEREncodeTextString(BufferedTransformation &bt, const std::string &str, byte asnTag)
      |                                                                                ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:147:80: error: ‘byte’ has not been declared
  147 | size_t DEREncodeTextString(BufferedTransformation &bt, const std::string &str, byte asnTag)
      |                                                                                ^~~~
asn.cpp: In function ‘size_t CryptoPP::DEREncodeTextString(BufferedTransformation&, const std::string&, int)’:
asn.cpp:151:23: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
  151 |         bt.Put((const byte *)str.data(), str.size());
      |                       ^~~~
asn.cpp:151:17: error: expected primary-expression before ‘const’
  151 |         bt.Put((const byte *)str.data(), str.size());
      |                 ^~~~~
asn.cpp:151:17: error: expected ‘)’ before ‘const’
  151 |         bt.Put((const byte *)str.data(), str.size());
      |                ~^~~~~
      |                 )
asn.cpp: At global scope:
asn.cpp:155:74: error: reference to ‘byte’ is ambiguous
  155 | size_t BERDecodeTextString(BufferedTransformation &bt, std::string &str, byte asnTag)
      |                                                                          ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:155:74: error: ‘byte’ has not been declared
  155 | size_t BERDecodeTextString(BufferedTransformation &bt, std::string &str, byte asnTag)
      |                                                                          ^~~~
asn.cpp: In function ‘size_t CryptoPP::BERDecodeTextString(BufferedTransformation&, std::string&, int)’:
asn.cpp:157:9: error: reference to ‘byte’ is ambiguous
  157 |         byte b;
      |         ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:158:21: error: ‘b’ was not declared in this scope; did you mean ‘bt’?
  158 |         if (!bt.Get(b) || b != asnTag)
      |                     ^
      |                     bt
asn.cpp: At global scope:
asn.cpp:173:61: error: reference to ‘byte’ is ambiguous
  173 | size_t DEREncodeBitString(BufferedTransformation &bt, const byte *str, size_t strLen, unsigned int unusedBits)
      |                                                             ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp: In function ‘size_t CryptoPP::DEREncodeBitString(BufferedTransformation&, const int*, size_t, unsigned int)’:
asn.cpp:177:17: error: reference to ‘byte’ is ambiguous
  177 |         bt.Put((byte)unusedBits);
      |                 ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:178:16: error: invalid conversion from ‘const int*’ to ‘byte’ {aka ‘unsigned char’} [-fpermissive]
  178 |         bt.Put(str, strLen);
      |                ^~~
      |                |
      |                const int*
cryptlib.h:1385:33: note:   initializing argument 1 of ‘size_t CryptoPP::BufferedTransformation::Put(byte, bool)’
 1385 |                 size_t Put(byte inByte, bool blocking=true)
      |                            ~~~~~^~~~~~
asn.cpp: In function ‘size_t CryptoPP::BERDecodeBitString(BufferedTransformation&, SecByteBlock&, unsigned int&)’:
asn.cpp:184:9: error: reference to ‘byte’ is ambiguous
  184 |         byte b;
      |         ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:185:21: error: ‘b’ was not declared in this scope; did you mean ‘bt’?
  185 |         if (!bt.Get(b) || b != BIT_STRING)
      |                     ^
      |                     bt
asn.cpp:192:9: error: reference to ‘byte’ is ambiguous
  192 |         byte unused;
      |         ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:193:21: error: ‘unused’ was not declared in this scope
  193 |         if (!bt.Get(unused))
      |                     ^~~~~~
asn.cpp:195:22: error: ‘unused’ was not declared in this scope
  195 |         unusedBits = unused;
      |                      ^~~~~~
asn.cpp: In function ‘void CryptoPP::DERReencode(BufferedTransformation&, BufferedTransformation&)’:
asn.cpp:204:9: error: reference to ‘byte’ is ambiguous
  204 |         byte tag;
      |         ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:205:21: error: ‘tag’ was not declared in this scope
  205 |         source.Peek(tag);
      |                     ^~~
asn.cpp: In static member function ‘static void CryptoPP::OID::EncodeValue(CryptoPP::BufferedTransformation&, CryptoPP::word32)’:
asn.cpp:222:25: error: reference to ‘byte’ is ambiguous
  222 |                 bt.Put((byte)(0x80 | ((v >> i) & 0x7f)));
      |                         ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:223:17: error: reference to ‘byte’ is ambiguous
  223 |         bt.Put((byte)(v & 0x7f));
      |                 ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp: In static member function ‘static size_t CryptoPP::OID::DecodeValue(CryptoPP::BufferedTransformation&, CryptoPP::word32&)’:
asn.cpp:228:9: error: reference to ‘byte’ is ambiguous
  228 |         byte b;
      |         ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:233:29: error: ‘b’ was not declared in this scope
  233 |                 if (!bt.Get(b))
      |                             ^
asn.cpp:239:22: error: ‘b’ was not declared in this scope
  239 |                 v += b & 0x7f;
      |                      ^
asn.cpp: In member function ‘void CryptoPP::OID::DEREncode(CryptoPP::BufferedTransformation&) const’:
asn.cpp:249:18: error: reference to ‘byte’ is ambiguous
  249 |         temp.Put(byte(m_values[0] * 40 + m_values[1]));
      |                  ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp: In member function ‘void CryptoPP::OID::BERDecode(CryptoPP::BufferedTransformation&)’:
asn.cpp:259:9: error: reference to ‘byte’ is ambiguous
  259 |         byte b;
      |         ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:260:21: error: ‘b’ was not declared in this scope; did you mean ‘bt’?
  260 |         if (!bt.Get(b) || b != OBJECT_IDENTIFIER)
      |                     ^
      |                     bt
asn.cpp:267:21: error: ‘b’ was not declared in this scope; did you mean ‘bt’?
  267 |         if (!bt.Get(b))
      |                     ^
      |                     bt
asn.cpp:272:23: error: ‘b’ was not declared in this scope; did you mean ‘bt’?
  272 |         m_values[0] = b / 40;
      |                       ^
      |                       bt
asn.cpp: At global scope:
asn.cpp:301:37: error: reference to ‘byte’ is ambiguous
  301 | void EncodedObjectFilter::Put(const byte *inString, size_t length)
      |                                     ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:301:6: error: no declaration matches ‘void CryptoPP::EncodedObjectFilter::Put(const int*, size_t)’
  301 | void EncodedObjectFilter::Put(const byte *inString, size_t length)
      |      ^~~~~~~~~~~~~~~~~~~
asn.h:216:14: note: candidate is: ‘void CryptoPP::EncodedObjectFilter::Put(const byte*, size_t)’
  216 |         void Put(const byte *inString, size_t length);
      |              ^~~
asn.h:202:7: note: ‘class CryptoPP::EncodedObjectFilter’ defined here
  202 | class EncodedObjectFilter : public Filter
      |       ^~~~~~~~~~~~~~~~~~~
asn.cpp:381:71: error: reference to ‘byte’ is ambiguous
  381 | BERGeneralDecoder::BERGeneralDecoder(BufferedTransformation &inQueue, byte asnTag)
      |                                                                       ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:381:71: error: ‘byte’ has not been declared
  381 | BERGeneralDecoder::BERGeneralDecoder(BufferedTransformation &inQueue, byte asnTag)
      |                                                                       ^~~~
asn.cpp:381:1: error: no declaration matches ‘CryptoPP::BERGeneralDecoder::BERGeneralDecoder(CryptoPP::BufferedTransformation&, int)’
  381 | BERGeneralDecoder::BERGeneralDecoder(BufferedTransformation &inQueue, byte asnTag)
      | ^~~~~~~~~~~~~~~~~
asn.h:234:20: note: candidates are: ‘constexpr CryptoPP::BERGeneralDecoder::BERGeneralDecoder(const CryptoPP::BERGeneralDecoder&)’
  234 | class CRYPTOPP_DLL BERGeneralDecoder : public Store
      |                    ^~~~~~~~~~~~~~~~~
asn.h:238:18: note:                 ‘CryptoPP::BERGeneralDecoder::BERGeneralDecoder(CryptoPP::BERGeneralDecoder&, byte)’
  238 |         explicit BERGeneralDecoder(BERGeneralDecoder &inQueue, byte asnTag);
      |                  ^~~~~~~~~~~~~~~~~
asn.h:237:18: note:                 ‘CryptoPP::BERGeneralDecoder::BERGeneralDecoder(CryptoPP::BufferedTransformation&, byte)’
  237 |         explicit BERGeneralDecoder(BufferedTransformation &inQueue, byte asnTag);
      |                  ^~~~~~~~~~~~~~~~~
asn.h:234:20: note: ‘class CryptoPP::BERGeneralDecoder’ defined here
  234 | class CRYPTOPP_DLL BERGeneralDecoder : public Store
      |                    ^~~~~~~~~~~~~~~~~
asn.cpp:387:66: error: reference to ‘byte’ is ambiguous
  387 | BERGeneralDecoder::BERGeneralDecoder(BERGeneralDecoder &inQueue, byte asnTag)
      |                                                                  ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:387:66: error: ‘byte’ has not been declared
  387 | BERGeneralDecoder::BERGeneralDecoder(BERGeneralDecoder &inQueue, byte asnTag)
      |                                                                  ^~~~
asn.cpp:387:1: error: no declaration matches ‘CryptoPP::BERGeneralDecoder::BERGeneralDecoder(CryptoPP::BERGeneralDecoder&, int)’
  387 | BERGeneralDecoder::BERGeneralDecoder(BERGeneralDecoder &inQueue, byte asnTag)
      | ^~~~~~~~~~~~~~~~~
asn.h:234:20: note: candidates are: ‘constexpr CryptoPP::BERGeneralDecoder::BERGeneralDecoder(const CryptoPP::BERGeneralDecoder&)’
  234 | class CRYPTOPP_DLL BERGeneralDecoder : public Store
      |                    ^~~~~~~~~~~~~~~~~
asn.h:238:18: note:                 ‘CryptoPP::BERGeneralDecoder::BERGeneralDecoder(CryptoPP::BERGeneralDecoder&, byte)’
  238 |         explicit BERGeneralDecoder(BERGeneralDecoder &inQueue, byte asnTag);
      |                  ^~~~~~~~~~~~~~~~~
asn.h:237:18: note:                 ‘CryptoPP::BERGeneralDecoder::BERGeneralDecoder(CryptoPP::BufferedTransformation&, byte)’
  237 |         explicit BERGeneralDecoder(BufferedTransformation &inQueue, byte asnTag);
      |                  ^~~~~~~~~~~~~~~~~
asn.h:234:20: note: ‘class CryptoPP::BERGeneralDecoder’ defined here
  234 | class CRYPTOPP_DLL BERGeneralDecoder : public Store
      |                    ^~~~~~~~~~~~~~~~~
asn.cpp:393:6: error: variable or field ‘Init’ declared void
  393 | void BERGeneralDecoder::Init(byte asnTag)
      |      ^~~~~~~~~~~~~~~~~
asn.cpp:393:30: error: reference to ‘byte’ is ambiguous
  393 | void BERGeneralDecoder::Init(byte asnTag)
      |                              ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:430:1: error: reference to ‘byte’ is ambiguous
  430 | byte BERGeneralDecoder::PeekByte() const
      | ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:438:6: error: variable or field ‘CheckByte’ declared void
  438 | void BERGeneralDecoder::CheckByte(byte check)
      |      ^~~~~~~~~~~~~~~~~
asn.cpp:438:35: error: reference to ‘byte’ is ambiguous
  438 | void BERGeneralDecoder::CheckByte(byte check)
      |                                   ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:488:72: error: reference to ‘byte’ is ambiguous
  488 | DERGeneralEncoder::DERGeneralEncoder(BufferedTransformation &outQueue, byte asnTag)
      |                                                                        ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:488:72: error: ‘byte’ has not been declared
  488 | DERGeneralEncoder::DERGeneralEncoder(BufferedTransformation &outQueue, byte asnTag)
      |                                                                        ^~~~
asn.cpp:488:1: error: no declaration matches ‘CryptoPP::DERGeneralEncoder::DERGeneralEncoder(CryptoPP::BufferedTransformation&, int)’
  488 | DERGeneralEncoder::DERGeneralEncoder(BufferedTransformation &outQueue, byte asnTag)
      | ^~~~~~~~~~~~~~~~~
asn.h:271:20: note: candidates are: ‘CryptoPP::DERGeneralEncoder::DERGeneralEncoder(const CryptoPP::DERGeneralEncoder&)’
  271 | class CRYPTOPP_DLL DERGeneralEncoder : public ByteQueue
      |                    ^~~~~~~~~~~~~~~~~
asn.h:279:18: note:                 ‘CryptoPP::DERGeneralEncoder::DERGeneralEncoder(CryptoPP::DERGeneralEncoder&, byte)’
  279 |         explicit DERGeneralEncoder(DERGeneralEncoder &outQueue, byte asnTag /*= SEQUENCE | CONSTRUCTED*/);
      |                  ^~~~~~~~~~~~~~~~~
asn.h:278:18: note:                 ‘CryptoPP::DERGeneralEncoder::DERGeneralEncoder(CryptoPP::BufferedTransformation&, byte)’
  278 |         explicit DERGeneralEncoder(BufferedTransformation &outQueue, byte asnTag /*= SEQUENCE | CONSTRUCTED*/);
      |                  ^~~~~~~~~~~~~~~~~
asn.h:271:20: note: ‘class CryptoPP::DERGeneralEncoder’ defined here
  271 | class CRYPTOPP_DLL DERGeneralEncoder : public ByteQueue
      |                    ^~~~~~~~~~~~~~~~~
asn.cpp:495:67: error: reference to ‘byte’ is ambiguous
  495 | DERGeneralEncoder::DERGeneralEncoder(DERGeneralEncoder &outQueue, byte asnTag)
      |                                                                   ^~~~
/usr/include/c++/13/cstddef:69:14: note: candidates are: ‘enum class std::byte’
   69 |   enum class byte : unsigned char {};
      |              ^~~~
config.h:230:23: note:                 ‘typedef unsigned char byte’
  230 | typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
      |                       ^~~~
asn.cpp:495:67: error: ‘byte’ has not been declared
  495 | DERGeneralEncoder::DERGeneralEncoder(DERGeneralEncoder &outQueue, byte asnTag)
      |                                                                   ^~~~
asn.cpp:495:1: error: no declaration matches ‘CryptoPP::DERGeneralEncoder::DERGeneralEncoder(CryptoPP::DERGeneralEncoder&, int)’
  495 | DERGeneralEncoder::DERGeneralEncoder(DERGeneralEncoder &outQueue, byte asnTag)
      | ^~~~~~~~~~~~~~~~~
asn.h:271:20: note: candidates are: ‘CryptoPP::DERGeneralEncoder::DERGeneralEncoder(const CryptoPP::DERGeneralEncoder&)’
  271 | class CRYPTOPP_DLL DERGeneralEncoder : public ByteQueue
      |                    ^~~~~~~~~~~~~~~~~
asn.h:279:18: note:                 ‘CryptoPP::DERGeneralEncoder::DERGeneralEncoder(CryptoPP::DERGeneralEncoder&, byte)’
  279 |         explicit DERGeneralEncoder(DERGeneralEncoder &outQueue, byte asnTag /*= SEQUENCE | CONSTRUCTED*/);
      |                  ^~~~~~~~~~~~~~~~~
asn.h:278:18: note:                 ‘CryptoPP::DERGeneralEncoder::DERGeneralEncoder(CryptoPP::BufferedTransformation&, byte)’
  278 |         explicit DERGeneralEncoder(BufferedTransformation &outQueue, byte asnTag /*= SEQUENCE | CONSTRUCTED*/);
      |                  ^~~~~~~~~~~~~~~~~
asn.h:271:20: note: ‘class CryptoPP::DERGeneralEncoder’ defined here
  271 | class CRYPTOPP_DLL DERGeneralEncoder : public ByteQueue
      |                    ^~~~~~~~~~~~~~~~~
make: *** [GNUmakefile:784: asn.o] Error 1
raphy@raohy:~/licensepp/dependencies/cryptopp-CRYPTOPP_5_6_5$ 

depence is not available

https://github.com/amraynweb/cryptopp-pem is not available now!
Are you have any alternative?

repo cryptopp-pem not accessible

In the install instructions, the command

git clone https://github.com/amraynweb/cryptopp-pem.git

does not work, asking for a username/password.

Error Compiling on Mac OS X Mojave - Clang 3.9

Hello! First of all congratulations for this awesome library. I'm trying it on linux and windows. I had to tweak the code a little to compile on both OSs so I'm going to share it if you want!

As for compiling on Mac OS X, i followed all your steps but got the following error when attempting to compile, do you know any solution?

Rodrigos-MacBook-Air-8:build rodrigo$ make
Scanning dependencies of target licensepp-lib
[ 10%] Building CXX object CMakeFiles/licensepp-lib.dir/src/external/Ripe.cc.o
In file included from /Users/rodrigo/Downloads/licensepp-master/src/external/Ripe.cc:26:
In file included from /Users/rodrigo/Downloads/cryptopp/pem.h:23:
In file included from /Users/rodrigo/Downloads/cryptopp/rsa.h:14:
/Users/rodrigo/Downloads/cryptopp/pkcspad.h:86:53: error: instantiation of variable 'CryptoPP::PKCS_DigestDecorationCryptoPP::SHA1::decoration'
required here, but no definition is available [-Werror,-Wundefined-var-template]
return HashIdentifier(PKCS_DigestDecoration::decoration, PKCS_DigestDecoration::length);
^
/Users/rodrigo/Downloads/cryptopp/pubkey.h:615:19: note: in instantiation of member function
'CryptoPP::PKCS1v15_SignatureMessageEncodingMethod::HashIdentifierLookup::HashIdentifierLookup2CryptoPP::SHA1::Lookup' requested here
return L::Lookup();
^
/Users/rodrigo/Downloads/licensepp-master/src/external/Ripe.cc:147:35: note: in instantiation of member function
'CryptoPP::TF_ObjectImplBase<CryptoPP::TF_VerifierBase, CryptoPP::TF_SignatureSchemeOptions<CryptoPP::TF_SS<CryptoPP::PKCS1v15,
CryptoPP::SHA1, CryptoPP::RSA, int>, CryptoPP::RSA, CryptoPP::PKCS1v15_SignatureMessageEncodingMethod, CryptoPP::SHA1>,
CryptoPP::RSAFunction>::GetHashIdentifier' requested here
RSASS<PKCS1v15,SHA>::Verifier verifier(publicKey);
^
/Users/rodrigo/Downloads/cryptopp/pkcspad.h:37:20: note: forward declaration of template entity is here
static const byte decoration[];
^
/Users/rodrigo/Downloads/cryptopp/pkcspad.h:86:53: note: add an explicit instantiation declaration to suppress this warning if
'CryptoPP::PKCS_DigestDecorationCryptoPP::SHA1::decoration' is explicitly instantiated in another translation unit
return HashIdentifier(PKCS_DigestDecoration::decoration, PKCS_DigestDecoration::length);
^
1 error generated.
make[2]: *** [CMakeFiles/licensepp-lib.dir/src/external/Ripe.cc.o] Error 1
make[1]: *** [CMakeFiles/licensepp-lib.dir/all] Error 2
make: *** [all] Error 2

Build Issue with cmake and cryto++

Hi, When I'm executing the cmake command, I get a static linking issue of cmake and crypto++. Mentioning Explicitly, CryptoPP could not be found by cmake.
(missing: CRYPTOPP_ROOT_DIR CRYPTOPP_INCLUDE_DIR, CRYPTOPP_LIBRARY)

I have attached screenshot of the same.

Screenshot 2020-02-01 at 5 14 14 PM

Issued License does not contain authority's signature on Windows

In the definition of copy constructor and assignment operator of class License, I needed to add code lines for m_authoritySignature respectively. Are the following modifications valid?

License::License(const License& other):
    m_issueDate(other.m_issueDate),
    m_expiryDate(other.m_expiryDate),
    m_licensee(other.m_licensee),
    m_issuingAuthorityId(other.m_issuingAuthorityId),
    m_licenseeSignature(other.m_licenseeSignature),
+++ m_authoritySignature(other.m_authoritySignature)
{
}

License& License::operator=(License other)
{
    std::swap(m_issueDate, other.m_issueDate);
    std::swap(m_expiryDate, other.m_expiryDate);
    std::swap(m_licensee, other.m_licensee);
    std::swap(m_licenseeSignature, other.m_licenseeSignature);
    std::swap(m_issuingAuthorityId, other.m_issuingAuthorityId);
+++ std::swap(m_authoritySignature, other.m_authoritySignature);
    return *this;
}

Unable to build ...

Any thoughs on trying to build this?

 cmake -DCMAKE_INSTALL_PREFIX=/opt/licensepp ..
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
==> Static linking to Crypto++
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find CryptoPP (missing: CRYPTOPP_LIBRARY) (found version "8.2.0")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindCryptoPP.cmake:117 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:46 (find_package)


-- Configuring incomplete, errors occurred!

compiling error on macOS!

macOS: 10.15.3
cmake: 3.16.5

I try to compile but get an error about Could NOT find CryptoPP issue.

thx

message

% cmake ..
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
==> Static linking to Crypto++
CMake Error at /Volumes/Developer/opt/macOS-10.15/cmake-3.16.5/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find CryptoPP (missing: CRYPTOPP_ROOT_DIR CRYPTOPP_INCLUDE_DIR
  CRYPTOPP_LIBRARY)
Call Stack (most recent call first):
  /Volumes/Developer/opt/macOS-10.15/cmake-3.16.5/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindCryptoPP.cmake:117 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:46 (find_package)


-- Configuring incomplete, errors occurred!
See also "/Downloads/licensepp/build/CMakeFiles/CMakeOutput.log".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.