@@ -4827,7 +4827,7 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
4827
4827
4828
4828
bool DiffieHellman::Init (int primeLength, int g) {
4829
4829
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 ))
4831
4831
return false ;
4832
4832
return VerifyContext ();
4833
4833
}
@@ -4850,8 +4850,10 @@ bool DiffieHellman::Init(const char* p, int p_len, int g) {
4850
4850
4851
4851
bool DiffieHellman::Init (const char * p, int p_len, const char * g, int g_len) {
4852
4852
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 );
4855
4857
if (!DH_set0_pqg (dh_.get (), bn_p, nullptr , bn_g)) {
4856
4858
BN_free (bn_p);
4857
4859
BN_free (bn_g);
@@ -5019,7 +5021,7 @@ void DiffieHellman::ComputeSecret(const FunctionCallbackInfo<Value>& args) {
5019
5021
BignumPointer key (BN_bin2bn (
5020
5022
reinterpret_cast <unsigned char *>(Buffer::Data (args[0 ])),
5021
5023
Buffer::Length (args[0 ]),
5022
- 0 ));
5024
+ nullptr ));
5023
5025
5024
5026
MallocedBuffer<char > data (DH_size (diffieHellman->dh_ .get ()));
5025
5027
0 commit comments