JoshKaufman / ursa

URSA - RSA public/private key OpenSSL bindings for Node.js
Other
620 stars 135 forks source link

arm architecture support : aarch64 #188

Closed jvmvik closed 1 year ago

jvmvik commented 3 years ago

platform

hardware: Nvidia Jetson Nano
architecture: aarch64
os: Ubuntu / Jetpack 4.1

Node version

node --version
v14.15.1

Install

npm install ursa

Error output:

../src/ursaNative.cc: In function ‘char* copyBufferToUtf8String(v8::Local<v8::String>)’:
../src/ursaNative.cc:208:34: error: no matching function for call to ‘v8::String::Utf8Length()’
     int length = str->Utf8Length();
                                  ^
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/node.h:67:0,
                 from ../src/ursaNative.h:9,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2977:7: note: candidate: int v8::String::Utf8Length(v8::Isolate*) const
   int Utf8Length(Isolate* isolate) const;
       ^~~~~~~~~~
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2977:7: note:   candidate expects 1 argument, 0 provided
../src/ursaNative.cc:217:38: error: no matching function for call to ‘v8::String::WriteUtf8(char*&, int)’
     str->WriteUtf8(result, length + 1);
                                      ^
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/node.h:67:0,
                 from ../src/ursaNative.h:9,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:3037:7: note: candidate: int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const
   int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
       ^~~~~~~~~
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:3037:7: note:   no known conversion for argument 1 from ‘char*’ to ‘v8::Isolate*’
../src/ursaNative.cc: In static member function ‘static void RsaWrap::InitClass(v8::Local<v8::Object>)’:
../src/ursaNative.cc:342:70: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
     target->Set(NanNew("RsaWrap").ToLocalChecked(), tpl->GetFunction());
                                                                      ^
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/node.h:67:0,
                 from ../src/ursaNative.h:9,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:6475:46: note: candidate: v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)
   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
                                              ^~~~~~~~~~~
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:6475:46: note:   candidate expects 1 argument, 0 provided
../src/ursaNative.cc:343:40: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
     constructor.Reset(tpl->GetFunction());
                                        ^
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/node.h:67:0,
                 from ../src/ursaNative.h:9,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:6475:46: note: candidate: v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)
   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
                                              ^~~~~~~~~~~
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:6475:46: note:   candidate expects 1 argument, 0 provided
../src/ursaNative.cc:345:106: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
     target->Set(NanNew("textToNid").ToLocalChecked(), Nan::New<FunctionTemplate>(TextToNid)->GetFunction());
                                                                                                          ^
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/node.h:67:0,
                 from ../src/ursaNative.h:9,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:6475:46: note: candidate: v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)
   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
                                              ^~~~~~~~~~~
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:6475:46: note:   candidate expects 1 argument, 0 provided
../src/ursaNative.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE RsaWrap::OpenPublicSshKey(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/ursaNative.cc:389:13: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     obj->rsa->n = BN_bin2bn(data_n, n_length, NULL);
             ^~
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/crypto.h:25:0,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/bio.h:20,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/asn1.h:16,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/rsa.h:16,
                 from ../src/ursaNative.h:13,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
 typedef struct rsa_st RSA;
                ^~~~~~
../src/ursaNative.cc:390:13: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     obj->rsa->e = BN_bin2bn(data_e, e_length, NULL);
             ^~
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/crypto.h:25:0,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/bio.h:20,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/asn1.h:16,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/rsa.h:16,
                 from ../src/ursaNative.h:13,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
 typedef struct rsa_st RSA;
                ^~~~~~
../src/ursaNative.cc: In static member function ‘static RsaWrap* RsaWrap::expectPrivateKey(RsaWrap*)’:
../src/ursaNative.cc:407:35: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     if ((obj == NULL) || (obj->rsa->d != NULL)) {
                                   ^~
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/crypto.h:25:0,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/bio.h:20,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/asn1.h:16,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/rsa.h:16,
                 from ../src/ursaNative.h:13,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
 typedef struct rsa_st RSA;
                ^~~~~~
../src/ursaNative.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE RsaWrap::GeneratePrivateKey(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/ursaNative.cc:488:44: error: no matching function for call to ‘v8::Value::Uint32Value()’
     int modulusBits = args[0]->Uint32Value();
                                            ^
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/node.h:67:0,
                 from ../src/ursaNative.h:9,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2866:41: note: candidate: v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
                                         ^~~~~~~~~~~
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2866:41: note:   candidate expects 1 argument, 0 provided
../src/ursaNative.cc:489:41: error: no matching function for call to ‘v8::Value::Uint32Value()’
     int exponent = args[1]->Uint32Value();
                                         ^
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/node.h:67:0,
                 from ../src/ursaNative.h:9,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2866:41: note: candidate: v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
                                         ^~~~~~~~~~~
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2866:41: note:   candidate expects 1 argument, 0 provided
../src/ursaNative.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE RsaWrap::GetExponent(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/ursaNative.cc:536:34: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     bignumToBuffer(args, obj->rsa->e);
                                  ^~
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/crypto.h:25:0,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/bio.h:20,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/asn1.h:16,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/rsa.h:16,
                 from ../src/ursaNative.h:13,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
 typedef struct rsa_st RSA;
                ^~~~~~
../src/ursaNative.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE RsaWrap::GetPrivateExponent(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/ursaNative.cc:552:34: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     bignumToBuffer(args, obj->rsa->d);
                                  ^~
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/crypto.h:25:0,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/bio.h:20,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/asn1.h:16,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/rsa.h:16,
                 from ../src/ursaNative.h:13,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
 typedef struct rsa_st RSA;
                ^~~~~~
../src/ursaNative.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE RsaWrap::GetModulus(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/ursaNative.cc:567:34: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     bignumToBuffer(args, obj->rsa->n);
                                  ^~
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/crypto.h:25:0,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/bio.h:20,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/asn1.h:16,
                 from /home/victor/.cache/node-gyp/14.15.1/include/node/openssl/rsa.h:16,
                 from ../src/ursaNative.h:13,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/openssl/ossl_typ.h:110:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
 typedef struct rsa_st RSA;
                ^~~~~~
../src/ursaNative.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE RsaWrap::PrivateDecrypt(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/ursaNative.cc:683:40: error: no matching function for call to ‘v8::Value::Uint32Value()’
     int padding = args[1]->Uint32Value();
                                        ^
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/node.h:67:0,
                 from ../src/ursaNative.h:9,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2866:41: note: candidate: v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
                                         ^~~~~~~~~~~
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2866:41: note:   candidate expects 1 argument, 0 provided
../src/ursaNative.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE RsaWrap::PrivateEncrypt(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/ursaNative.cc:730:40: error: no matching function for call to ‘v8::Value::Uint32Value()’
     int padding = args[1]->Uint32Value();
                                        ^
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/node.h:67:0,
                 from ../src/ursaNative.h:9,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2866:41: note: candidate: v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
                                         ^~~~~~~~~~~
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2866:41: note:   candidate expects 1 argument, 0 provided
../src/ursaNative.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE RsaWrap::PublicDecrypt(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/ursaNative.cc:776:40: error: no matching function for call to ‘v8::Value::Uint32Value()’
     int padding = args[1]->Uint32Value();
                                        ^
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/node.h:67:0,
                 from ../src/ursaNative.h:9,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2866:41: note: candidate: v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
                                         ^~~~~~~~~~~
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2866:41: note:   candidate expects 1 argument, 0 provided
../src/ursaNative.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE RsaWrap::PublicEncrypt(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/ursaNative.cc:822:40: error: no matching function for call to ‘v8::Value::Uint32Value()’
     int padding = args[1]->Uint32Value();
                                        ^
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/node.h:67:0,
                 from ../src/ursaNative.h:9,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2866:41: note: candidate: v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
                                         ^~~~~~~~~~~
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2866:41: note:   candidate expects 1 argument, 0 provided
../src/ursaNative.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE RsaWrap::Sign(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/ursaNative.cc:928:36: error: no matching function for call to ‘v8::Value::Uint32Value()’
     int nid = args[0]->Uint32Value();
                                    ^
In file included from /home/victor/.cache/node-gyp/14.15.1/include/node/node.h:67:0,
                 from ../src/ursaNative.h:9,
                 from ../src/ursaNative.cc:3:
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2866:41: note: candidate: v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
                                         ^~~~~~~~~~~
/home/victor/.cache/node-gyp/14.15.1/include/node/v8.h:2866:41: note:   candidate expects 1 argument, 0 provided
../src/ursaNative.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE RsaWrap::Verify(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/ursaNative.cc:982:36: error: no matching function for call to ‘v8::Value::Uint32Value()’
     int nid = args[0]->Uint32Value();
--More--(53%)