arun11299 / cpp-jwt

JSON Web Token library for C++
MIT License
386 stars 112 forks source link

Problems installing this lib #74

Open noctera opened 3 years ago

noctera commented 3 years ago

Hi I have some Problems installing this lib on Linux Manjaro

I have cloned this project moved into the directory and

cmake -S . -B build

to build it. Everything was fine with it. Openssl was also found. No Error. But when executing cmake --build build I get the following error

PS: Conan isn't working either

[  5%] Building CXX object tests/CMakeFiles/test_jwt_object.dir/test_jwt_object.cc.o
In file included from /home/julian/AUR/cpp-jwt/include/jwt/error_codes.hpp:134,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:49,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/impl/error_codes.ipp: In member function ‘virtual std::string jwt::{anonymous}::AlgorithmErrCategory::message(int) const’:
/home/julian/AUR/cpp-jwt/include/jwt/impl/error_codes.ipp:41:12: warning: enumeration value ‘InvalidKeyErr’ not handled in switch [-Wswitch]
   41 |     switch (static_cast<AlgorithmErrc>(ev))
      |            ^
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp: In static member function ‘static void jwt::PEMSign<Hasher>::ECDSA_SIG_get0(const ECDSA_SIG*, const BIGNUM**, const BIGNUM**)’:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:530:33: warning: invalid use of incomplete type ‘const ECDSA_SIG’ {aka ‘const struct ECDSA_SIG_st’}
  530 |     if (pr != nullptr) *pr = sig->r;
      |                                 ^~
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:531:33: warning: invalid use of incomplete type ‘const ECDSA_SIG’ {aka ‘const struct ECDSA_SIG_st’}
  531 |     if (ps != nullptr) *ps = sig->s;
      |                                 ^~
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp: In static member function ‘static int jwt::PEMSign<Hasher>::ECDSA_SIG_set0(ECDSA_SIG*, BIGNUM*, BIGNUM*)’:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:540:22: warning: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  540 |     BN_clear_free(sig->r);
      |                      ^~
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:541:22: warning: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  541 |     BN_clear_free(sig->s);
      |                      ^~
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:543:8: warning: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  543 |     sig->r = r;
      |        ^~
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:544:8: warning: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  544 |     sig->s = s;
      |        ^~
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp: In instantiation of ‘static int jwt::PEMSign<Hasher>::ECDSA_SIG_set0(ECDSA_SIG*, BIGNUM*, BIGNUM*) [with Hasher = jwt::algo::RS256; ECDSA_SIG = ECDSA_SIG_st; BIGNUM = bignum_st]’:
/home/julian/AUR/cpp-jwt/include/jwt/impl/algorithm.ipp:136:19:   required from ‘static jwt::verify_result_t jwt::PEMSign<Hasher>::verify(jwt::string_view, jwt::string_view, jwt::string_view) [with Hasher = jwt::algo::RS256; jwt::verify_result_t = std::pair<bool, std::error_code>; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/impl/jwt.ipp:267:33:   required from here
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:540:24: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  540 |     BN_clear_free(sig->r);
      |                   ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:541:24: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  541 |     BN_clear_free(sig->s);
      |                   ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:543:10: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  543 |     sig->r = r;
      |     ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:544:10: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  544 |     sig->s = s;
      |     ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp: In instantiation of ‘static int jwt::PEMSign<Hasher>::ECDSA_SIG_set0(ECDSA_SIG*, BIGNUM*, BIGNUM*) [with Hasher = jwt::algo::RS384; ECDSA_SIG = ECDSA_SIG_st; BIGNUM = bignum_st]’:
/home/julian/AUR/cpp-jwt/include/jwt/impl/algorithm.ipp:136:19:   required from ‘static jwt::verify_result_t jwt::PEMSign<Hasher>::verify(jwt::string_view, jwt::string_view, jwt::string_view) [with Hasher = jwt::algo::RS384; jwt::verify_result_t = std::pair<bool, std::error_code>; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/impl/jwt.ipp:270:33:   required from here
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:540:24: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  540 |     BN_clear_free(sig->r);
      |                   ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:541:24: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  541 |     BN_clear_free(sig->s);
      |                   ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:543:10: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  543 |     sig->r = r;
      |     ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:544:10: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  544 |     sig->s = s;
      |     ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp: In instantiation of ‘static int jwt::PEMSign<Hasher>::ECDSA_SIG_set0(ECDSA_SIG*, BIGNUM*, BIGNUM*) [with Hasher = jwt::algo::RS512; ECDSA_SIG = ECDSA_SIG_st; BIGNUM = bignum_st]’:
/home/julian/AUR/cpp-jwt/include/jwt/impl/algorithm.ipp:136:19:   required from ‘static jwt::verify_result_t jwt::PEMSign<Hasher>::verify(jwt::string_view, jwt::string_view, jwt::string_view) [with Hasher = jwt::algo::RS512; jwt::verify_result_t = std::pair<bool, std::error_code>; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/impl/jwt.ipp:273:33:   required from here
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:540:24: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  540 |     BN_clear_free(sig->r);
      |                   ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:541:24: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  541 |     BN_clear_free(sig->s);
      |                   ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:543:10: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  543 |     sig->r = r;
      |     ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:544:10: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  544 |     sig->s = s;
      |     ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp: In instantiation of ‘static int jwt::PEMSign<Hasher>::ECDSA_SIG_set0(ECDSA_SIG*, BIGNUM*, BIGNUM*) [with Hasher = jwt::algo::ES256; ECDSA_SIG = ECDSA_SIG_st; BIGNUM = bignum_st]’:
/home/julian/AUR/cpp-jwt/include/jwt/impl/algorithm.ipp:136:19:   required from ‘static jwt::verify_result_t jwt::PEMSign<Hasher>::verify(jwt::string_view, jwt::string_view, jwt::string_view) [with Hasher = jwt::algo::ES256; jwt::verify_result_t = std::pair<bool, std::error_code>; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/impl/jwt.ipp:276:33:   required from here
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:540:24: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  540 |     BN_clear_free(sig->r);
      |                   ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:541:24: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  541 |     BN_clear_free(sig->s);
      |                   ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:543:10: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  543 |     sig->r = r;
      |     ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:544:10: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  544 |     sig->s = s;
      |     ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp: In instantiation of ‘static int jwt::PEMSign<Hasher>::ECDSA_SIG_set0(ECDSA_SIG*, BIGNUM*, BIGNUM*) [with Hasher = jwt::algo::ES384; ECDSA_SIG = ECDSA_SIG_st; BIGNUM = bignum_st]’:
/home/julian/AUR/cpp-jwt/include/jwt/impl/algorithm.ipp:136:19:   required from ‘static jwt::verify_result_t jwt::PEMSign<Hasher>::verify(jwt::string_view, jwt::string_view, jwt::string_view) [with Hasher = jwt::algo::ES384; jwt::verify_result_t = std::pair<bool, std::error_code>; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/impl/jwt.ipp:279:33:   required from here
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:540:24: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  540 |     BN_clear_free(sig->r);
      |                   ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:541:24: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  541 |     BN_clear_free(sig->s);
      |                   ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:543:10: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  543 |     sig->r = r;
      |     ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:544:10: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  544 |     sig->s = s;
      |     ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp: In instantiation of ‘static int jwt::PEMSign<Hasher>::ECDSA_SIG_set0(ECDSA_SIG*, BIGNUM*, BIGNUM*) [with Hasher = jwt::algo::ES512; ECDSA_SIG = ECDSA_SIG_st; BIGNUM = bignum_st]’:
/home/julian/AUR/cpp-jwt/include/jwt/impl/algorithm.ipp:136:19:   required from ‘static jwt::verify_result_t jwt::PEMSign<Hasher>::verify(jwt::string_view, jwt::string_view, jwt::string_view) [with Hasher = jwt::algo::ES512; jwt::verify_result_t = std::pair<bool, std::error_code>; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/impl/jwt.ipp:282:33:   required from here
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:540:24: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  540 |     BN_clear_free(sig->r);
      |                   ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:541:24: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  541 |     BN_clear_free(sig->s);
      |                   ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:543:10: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  543 |     sig->r = r;
      |     ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:544:10: error: invalid use of incomplete type ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
  544 |     sig->s = s;
      |     ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp: In instantiation of ‘static void jwt::PEMSign<Hasher>::ECDSA_SIG_get0(const ECDSA_SIG*, const BIGNUM**, const BIGNUM**) [with Hasher = jwt::algo::RS256; ECDSA_SIG = ECDSA_SIG_st; BIGNUM = bignum_st]’:
/home/julian/AUR/cpp-jwt/include/jwt/impl/algorithm.ipp:290:17:   required from ‘static std::string jwt::PEMSign<Hasher>::public_key_ser(EVP_PKEY*, jwt::string_view, std::error_code&) [with Hasher = jwt::algo::RS256; std::string = std::__cxx11::basic_string<char>; EVP_PKEY = evp_pkey_st; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:496:28:   required from ‘static jwt::sign_result_t jwt::PEMSign<Hasher>::sign(jwt::string_view, jwt::string_view) [with Hasher = jwt::algo::RS256; jwt::sign_result_t = std::pair<std::__cxx11::basic_string<char>, std::error_code>; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/impl/jwt.ipp:222:33:   required from here
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:530:35: error: invalid use of incomplete type ‘const ECDSA_SIG’ {aka ‘const struct ECDSA_SIG_st’}
  530 |     if (pr != nullptr) *pr = sig->r;
      |                              ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:531:35: error: invalid use of incomplete type ‘const ECDSA_SIG’ {aka ‘const struct ECDSA_SIG_st’}
  531 |     if (ps != nullptr) *ps = sig->s;
      |                              ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp: In instantiation of ‘static void jwt::PEMSign<Hasher>::ECDSA_SIG_get0(const ECDSA_SIG*, const BIGNUM**, const BIGNUM**) [with Hasher = jwt::algo::RS384; ECDSA_SIG = ECDSA_SIG_st; BIGNUM = bignum_st]’:
/home/julian/AUR/cpp-jwt/include/jwt/impl/algorithm.ipp:290:17:   required from ‘static std::string jwt::PEMSign<Hasher>::public_key_ser(EVP_PKEY*, jwt::string_view, std::error_code&) [with Hasher = jwt::algo::RS384; std::string = std::__cxx11::basic_string<char>; EVP_PKEY = evp_pkey_st; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:496:28:   required from ‘static jwt::sign_result_t jwt::PEMSign<Hasher>::sign(jwt::string_view, jwt::string_view) [with Hasher = jwt::algo::RS384; jwt::sign_result_t = std::pair<std::__cxx11::basic_string<char>, std::error_code>; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/impl/jwt.ipp:225:33:   required from here
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:530:35: error: invalid use of incomplete type ‘const ECDSA_SIG’ {aka ‘const struct ECDSA_SIG_st’}
  530 |     if (pr != nullptr) *pr = sig->r;
      |                              ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:531:35: error: invalid use of incomplete type ‘const ECDSA_SIG’ {aka ‘const struct ECDSA_SIG_st’}
  531 |     if (ps != nullptr) *ps = sig->s;
      |                              ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp: In instantiation of ‘static void jwt::PEMSign<Hasher>::ECDSA_SIG_get0(const ECDSA_SIG*, const BIGNUM**, const BIGNUM**) [with Hasher = jwt::algo::RS512; ECDSA_SIG = ECDSA_SIG_st; BIGNUM = bignum_st]’:
/home/julian/AUR/cpp-jwt/include/jwt/impl/algorithm.ipp:290:17:   required from ‘static std::string jwt::PEMSign<Hasher>::public_key_ser(EVP_PKEY*, jwt::string_view, std::error_code&) [with Hasher = jwt::algo::RS512; std::string = std::__cxx11::basic_string<char>; EVP_PKEY = evp_pkey_st; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:496:28:   required from ‘static jwt::sign_result_t jwt::PEMSign<Hasher>::sign(jwt::string_view, jwt::string_view) [with Hasher = jwt::algo::RS512; jwt::sign_result_t = std::pair<std::__cxx11::basic_string<char>, std::error_code>; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/impl/jwt.ipp:228:33:   required from here
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:530:35: error: invalid use of incomplete type ‘const ECDSA_SIG’ {aka ‘const struct ECDSA_SIG_st’}
  530 |     if (pr != nullptr) *pr = sig->r;
      |                              ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:531:35: error: invalid use of incomplete type ‘const ECDSA_SIG’ {aka ‘const struct ECDSA_SIG_st’}
  531 |     if (ps != nullptr) *ps = sig->s;
      |                              ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp: In instantiation of ‘static void jwt::PEMSign<Hasher>::ECDSA_SIG_get0(const ECDSA_SIG*, const BIGNUM**, const BIGNUM**) [with Hasher = jwt::algo::ES256; ECDSA_SIG = ECDSA_SIG_st; BIGNUM = bignum_st]’:
/home/julian/AUR/cpp-jwt/include/jwt/impl/algorithm.ipp:290:17:   required from ‘static std::string jwt::PEMSign<Hasher>::public_key_ser(EVP_PKEY*, jwt::string_view, std::error_code&) [with Hasher = jwt::algo::ES256; std::string = std::__cxx11::basic_string<char>; EVP_PKEY = evp_pkey_st; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:496:28:   required from ‘static jwt::sign_result_t jwt::PEMSign<Hasher>::sign(jwt::string_view, jwt::string_view) [with Hasher = jwt::algo::ES256; jwt::sign_result_t = std::pair<std::__cxx11::basic_string<char>, std::error_code>; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/impl/jwt.ipp:231:33:   required from here
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:530:35: error: invalid use of incomplete type ‘const ECDSA_SIG’ {aka ‘const struct ECDSA_SIG_st’}
  530 |     if (pr != nullptr) *pr = sig->r;
      |                              ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:531:35: error: invalid use of incomplete type ‘const ECDSA_SIG’ {aka ‘const struct ECDSA_SIG_st’}
  531 |     if (ps != nullptr) *ps = sig->s;
      |                              ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp: In instantiation of ‘static void jwt::PEMSign<Hasher>::ECDSA_SIG_get0(const ECDSA_SIG*, const BIGNUM**, const BIGNUM**) [with Hasher = jwt::algo::ES384; ECDSA_SIG = ECDSA_SIG_st; BIGNUM = bignum_st]’:
/home/julian/AUR/cpp-jwt/include/jwt/impl/algorithm.ipp:290:17:   required from ‘static std::string jwt::PEMSign<Hasher>::public_key_ser(EVP_PKEY*, jwt::string_view, std::error_code&) [with Hasher = jwt::algo::ES384; std::string = std::__cxx11::basic_string<char>; EVP_PKEY = evp_pkey_st; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:496:28:   required from ‘static jwt::sign_result_t jwt::PEMSign<Hasher>::sign(jwt::string_view, jwt::string_view) [with Hasher = jwt::algo::ES384; jwt::sign_result_t = std::pair<std::__cxx11::basic_string<char>, std::error_code>; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/impl/jwt.ipp:234:33:   required from here
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:530:35: error: invalid use of incomplete type ‘const ECDSA_SIG’ {aka ‘const struct ECDSA_SIG_st’}
  530 |     if (pr != nullptr) *pr = sig->r;
      |                              ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:531:35: error: invalid use of incomplete type ‘const ECDSA_SIG’ {aka ‘const struct ECDSA_SIG_st’}
  531 |     if (ps != nullptr) *ps = sig->s;
      |                              ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp: In instantiation of ‘static void jwt::PEMSign<Hasher>::ECDSA_SIG_get0(const ECDSA_SIG*, const BIGNUM**, const BIGNUM**) [with Hasher = jwt::algo::ES512; ECDSA_SIG = ECDSA_SIG_st; BIGNUM = bignum_st]’:
/home/julian/AUR/cpp-jwt/include/jwt/impl/algorithm.ipp:290:17:   required from ‘static std::string jwt::PEMSign<Hasher>::public_key_ser(EVP_PKEY*, jwt::string_view, std::error_code&) [with Hasher = jwt::algo::ES512; std::string = std::__cxx11::basic_string<char>; EVP_PKEY = evp_pkey_st; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:496:28:   required from ‘static jwt::sign_result_t jwt::PEMSign<Hasher>::sign(jwt::string_view, jwt::string_view) [with Hasher = jwt::algo::ES512; jwt::sign_result_t = std::pair<std::__cxx11::basic_string<char>, std::error_code>; jwt::string_view = jwt::basic_string_view<char>]’
/home/julian/AUR/cpp-jwt/include/jwt/impl/jwt.ipp:237:33:   required from here
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:530:35: error: invalid use of incomplete type ‘const ECDSA_SIG’ {aka ‘const struct ECDSA_SIG_st’}
  530 |     if (pr != nullptr) *pr = sig->r;
      |                              ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
In file included from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:531:35: error: invalid use of incomplete type ‘const ECDSA_SIG’ {aka ‘const struct ECDSA_SIG_st’}
  531 |     if (ps != nullptr) *ps = sig->s;
      |                              ~~~~~^
In file included from /usr/include/openssl/x509.h:22,
                 from /usr/include/openssl/pem.h:17,
                 from /home/julian/AUR/cpp-jwt/include/jwt/algorithm.hpp:39,
                 from /home/julian/AUR/cpp-jwt/include/jwt/jwt.hpp:37,
                 from /home/julian/AUR/cpp-jwt/tests/test_jwt_object.cc:2:
/usr/include/openssl/ec.h:1127:16: note: forward declaration of ‘ECDSA_SIG’ {aka ‘struct ECDSA_SIG_st’}
 1127 | typedef struct ECDSA_SIG_st ECDSA_SIG;
      |                ^~~~~~~~~~~~
make[2]: *** [tests/CMakeFiles/test_jwt_object.dir/build.make:82: tests/CMakeFiles/test_jwt_object.dir/test_jwt_object.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:150: tests/CMakeFiles/test_jwt_object.dir/all] Error 2
make: *** [Makefile:160: all] Error 2
arun11299 commented 3 years ago

Hello @noctera Can you provide more details on which openssl version you are trying to link against ?

noctera commented 3 years ago

I'm trying to build it with this openssl version OpenSSL 1.1.1h 22 Sep 2020

arun11299 commented 3 years ago

Hmm..I can suggest 2 things for now:

  1. Try with maybe an older open ssl version.
  2. Check if comments in https://github.com/arun11299/cpp-jwt/issues/68 help.

I would suggest point 2 where @gocarlos has suggested or explained the build in quite a detail.

ybbetter commented 3 years ago

Ubuntu16.04 OpenSSL 1.0.2g 1 Mar 2016 I have the same problem,how can I fix it?