@@ -4818,7 +4818,7 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
48184818
48194819bool DiffieHellman::Init (int primeLength, int g) {
48204820 dh_.reset (DH_new ());
4821- if (!DH_generate_parameters_ex (dh_.get (), primeLength, g, 0 ))
4821+ if (!DH_generate_parameters_ex (dh_.get (), primeLength, g, nullptr ))
48224822 return false ;
48234823 return VerifyContext ();
48244824}
@@ -4841,8 +4841,10 @@ bool DiffieHellman::Init(const char* p, int p_len, int g) {
48414841
48424842bool DiffieHellman::Init (const char * p, int p_len, const char * g, int g_len) {
48434843 dh_.reset (DH_new ());
4844- BIGNUM* bn_p = BN_bin2bn (reinterpret_cast <const unsigned char *>(p), p_len, 0 );
4845- BIGNUM* bn_g = BN_bin2bn (reinterpret_cast <const unsigned char *>(g), g_len, 0 );
4844+ BIGNUM* bn_p =
4845+ BN_bin2bn (reinterpret_cast <const unsigned char *>(p), p_len, nullptr );
4846+ BIGNUM* bn_g =
4847+ BN_bin2bn (reinterpret_cast <const unsigned char *>(g), g_len, nullptr );
48464848 if (!DH_set0_pqg (dh_.get (), bn_p, nullptr , bn_g)) {
48474849 BN_free (bn_p);
48484850 BN_free (bn_g);
@@ -5010,7 +5012,7 @@ void DiffieHellman::ComputeSecret(const FunctionCallbackInfo<Value>& args) {
50105012 BignumPointer key (BN_bin2bn (
50115013 reinterpret_cast <unsigned char *>(Buffer::Data (args[0 ])),
50125014 Buffer::Length (args[0 ]),
5013- 0 ));
5015+ nullptr ));
50145016
50155017 MallocedBuffer<char > data (DH_size (diffieHellman->dh_ .get ()));
50165018
0 commit comments