File tree 2 files changed +171
-152
lines changed
2 files changed +171
-152
lines changed Original file line number Diff line number Diff line change @@ -399,20 +399,18 @@ std::unique_ptr<CryptoHooks> MongoCrypt::createJSCryptoHooks() {
399
399
return true ;
400
400
};
401
401
402
- return std::make_unique<CryptoHooks>(CryptoHooks {
403
- " js" ,
404
- aes_256_cbc_encrypt,
405
- aes_256_cbc_decrypt,
406
- random ,
407
- hmac_sha_512,
408
- hmac_sha_256,
409
- sha_256,
410
- aes_256_ctr_encrypt,
411
- aes_256_ctr_decrypt,
412
- nullptr ,
413
- sign_rsa_sha256,
414
- this
415
- });
402
+ return std::make_unique<CryptoHooks>(CryptoHooks{" js" ,
403
+ aes_256_cbc_encrypt,
404
+ aes_256_cbc_decrypt,
405
+ random ,
406
+ hmac_sha_512,
407
+ hmac_sha_256,
408
+ sha_256,
409
+ aes_256_ctr_encrypt,
410
+ aes_256_ctr_decrypt,
411
+ nullptr ,
412
+ sign_rsa_sha256,
413
+ this });
416
414
}
417
415
418
416
bool MongoCrypt::installCryptoHooks () {
@@ -441,9 +439,7 @@ bool MongoCrypt::installCryptoHooks() {
441
439
}
442
440
443
441
if (hooks.aes_256_ecb_encrypt &&
444
- !mongocrypt_setopt_aes_256_ecb (
445
- _mongo_crypt.get (), hooks.aes_256_ecb_encrypt , hooks.ctx )
446
- ) {
442
+ !mongocrypt_setopt_aes_256_ecb (_mongo_crypt.get (), hooks.aes_256_ecb_encrypt , hooks.ctx )) {
447
443
return false ;
448
444
}
449
445
@@ -565,7 +561,8 @@ Value MongoCrypt::CryptSharedLibVersionInfo(const CallbackInfo& info) {
565
561
}
566
562
567
563
Value MongoCrypt::CryptoHooksProvider (const CallbackInfo& info) {
568
- if (!_crypto_hooks) return Env ().Null ();
564
+ if (!_crypto_hooks)
565
+ return Env ().Null ();
569
566
return String::New (Env (), _crypto_hooks->id );
570
567
}
571
568
You can’t perform that action at this time.
0 commit comments