@@ -4827,7 +4827,7 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
48274827
48284828bool DiffieHellman::Init (int primeLength, int g) {
48294829 dh_.reset (DH_new ());
4830- if (!DH_generate_parameters_ex (dh_.get (), primeLength, g, 0 ))
4830+ if (!DH_generate_parameters_ex (dh_.get (), primeLength, g, nullptr ))
48314831 return false ;
48324832 return VerifyContext ();
48334833}
@@ -4850,8 +4850,10 @@ bool DiffieHellman::Init(const char* p, int p_len, int g) {
48504850
48514851bool DiffieHellman::Init (const char * p, int p_len, const char * g, int g_len) {
48524852 dh_.reset (DH_new ());
4853- BIGNUM* bn_p = BN_bin2bn (reinterpret_cast <const unsigned char *>(p), p_len, 0 );
4854- BIGNUM* bn_g = BN_bin2bn (reinterpret_cast <const unsigned char *>(g), g_len, 0 );
4853+ BIGNUM* bn_p =
4854+ BN_bin2bn (reinterpret_cast <const unsigned char *>(p), p_len, nullptr );
4855+ BIGNUM* bn_g =
4856+ BN_bin2bn (reinterpret_cast <const unsigned char *>(g), g_len, nullptr );
48554857 if (!DH_set0_pqg (dh_.get (), bn_p, nullptr , bn_g)) {
48564858 BN_free (bn_p);
48574859 BN_free (bn_g);
@@ -5019,7 +5021,7 @@ void DiffieHellman::ComputeSecret(const FunctionCallbackInfo<Value>& args) {
50195021 BignumPointer key (BN_bin2bn (
50205022 reinterpret_cast <unsigned char *>(Buffer::Data (args[0 ])),
50215023 Buffer::Length (args[0 ]),
5022- 0 ));
5024+ nullptr ));
50235025
50245026 MallocedBuffer<char > data (DH_size (diffieHellman->dh_ .get ()));
50255027
0 commit comments