Skip to content

Commit 82c82c8

Browse files
Jake ChampionJakeChampion
authored andcommitted
add this->
1 parent 0f44c7e commit 82c82c8

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

c-dependencies/js-compute-runtime/builtins/backend.cpp

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ class OpenSSLCipherConfigurationParser {
253253
static constexpr auto ALL = "ALL";
254254

255255
void moveToEnd(const AliasMap &aliases, std::vector<Cipher> &ciphers, std::string_view cipher) {
256-
moveToEnd(ciphers, aliases.at(cipher));
256+
this->moveToEnd(ciphers, aliases.at(cipher));
257257
}
258258

259259
void moveToEnd(std::vector<Cipher> &ciphers, const std::vector<Cipher> &ciphersToMoveToEnd) {
@@ -297,17 +297,17 @@ class OpenSSLCipherConfigurationParser {
297297
std::sort(ciphers.begin(), ciphers.end(), byStrength);
298298

299299
auto it =
300-
std::stable_partition(ciphers.begin(), ciphers.end(), byKeyExchange(KeyExchange::EECDH));
300+
std::stable_partition(ciphers.begin(), ciphers.end(), this->byKeyExchange(KeyExchange::EECDH));
301301

302302
/* AES is our preferred symmetric cipher */
303303
auto aes = {Encryption::AES128, Encryption::AES128GCM, Encryption::AES256,
304304
Encryption::AES256GCM};
305305

306306
/* Now arrange all ciphers by preference: */
307-
it = std::stable_partition(it, ciphers.end(), byEncryption(aes));
307+
it = std::stable_partition(it, ciphers.end(), this->byEncryption(aes));
308308

309309
/* Move ciphers without forward secrecy to the end */;
310-
std::stable_partition(it, ciphers.end(), [compare = byKeyExchange(KeyExchange::RSA)](auto &c) {
310+
std::stable_partition(it, ciphers.end(), [compare = this->byKeyExchange(KeyExchange::RSA)](auto &c) {
311311
return !compare(c);
312312
});
313313
}
@@ -374,11 +374,11 @@ class OpenSSLCipherConfigurationParser {
374374
std::vector<std::string_view> result;
375375

376376
while (!string.empty()) {
377-
auto [line, rest] = split_on(string, ':');
377+
auto [line, rest] = this->split_on(string, ':');
378378
string = rest;
379379

380380
while (!line.empty()) {
381-
auto [part, rest] = split_on(line, ',');
381+
auto [part, rest] = this->split_on(line, ',');
382382
line = rest;
383383
result.push_back(part);
384384
}
@@ -418,29 +418,29 @@ class OpenSSLCipherConfigurationParser {
418418
// bits, and some cipher suites with 128-bit keys.
419419
std::vector<Cipher> high;
420420
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(high),
421-
byEncryptionLevel(EncryptionLevel::HIGH));
421+
this->byEncryptionLevel(EncryptionLevel::HIGH));
422422
aliases.insert({HIGH, high});
423423
// "Medium" encryption cipher suites, currently some of those using 128 bit encryption.
424424
std::vector<Cipher> medium;
425425
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(medium),
426-
byEncryptionLevel(EncryptionLevel::MEDIUM));
426+
this->byEncryptionLevel(EncryptionLevel::MEDIUM));
427427
aliases.insert({MEDIUM, medium});
428428

429429
// Cipher suites using RSA key exchange or authentication. RSA is an alias for kRSA.
430430
std::vector<Cipher> krsa;
431431
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(krsa),
432-
byKeyExchange(KeyExchange::RSA));
432+
this->byKeyExchange(KeyExchange::RSA));
433433
aliases.insert({kRSA, krsa});
434434
std::vector<Cipher> arsa;
435435
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(arsa),
436-
byAuthentication(Authentication::RSA));
436+
this->byAuthentication(Authentication::RSA));
437437
aliases.insert({aRSA, arsa});
438438
aliases.insert({RSA, krsa});
439439

440440
// Cipher suites using ephemeral ECDH key agreement, including anonymous cipher suites.
441441
std::vector<Cipher> ecdh;
442442
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(ecdh),
443-
byKeyExchange(KeyExchange::EECDH));
443+
this->byKeyExchange(KeyExchange::EECDH));
444444
aliases.insert({kEECDH, ecdh});
445445
aliases.insert({kECDHE, ecdh});
446446
aliases.insert({ECDH, ecdh});
@@ -455,27 +455,27 @@ class OpenSSLCipherConfigurationParser {
455455
// or TLS, they only affect the list of available cipher suites.
456456
std::vector<Cipher> tlsv2;
457457
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(tlsv2),
458-
byProtocol(Protocol::TLSv1_2));
458+
this->byProtocol(Protocol::TLSv1_2));
459459
aliases.insert({SSL_PROTO_TLSv1_2, tlsv2});
460460
std::vector<Cipher> tlsv1;
461461
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(tlsv1),
462-
byProtocol(Protocol::TLSv1));
462+
this->byProtocol(Protocol::TLSv1));
463463
aliases.insert({SSL_PROTO_TLSv1_0, tlsv1});
464464
aliases.insert({SSL_PROTO_TLSv1, tlsv1});
465465
std::vector<Cipher> sslv3;
466466
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(sslv3),
467-
byProtocol(Protocol::SSLv3));
467+
this->byProtocol(Protocol::SSLv3));
468468
aliases.insert({SSL_PROTO_SSLv3, sslv3});
469469

470470
// cipher suites using 128 bit AES.
471471
std::vector<Cipher> aes128;
472472
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(aes128),
473-
byEncryption({Encryption::AES128, Encryption::AES128GCM}));
473+
this->byEncryption({Encryption::AES128, Encryption::AES128GCM}));
474474
aliases.insert({AES128, aes128});
475475
// cipher suites using 256 bit AES.
476476
std::vector<Cipher> aes256;
477477
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(aes256),
478-
byEncryption({Encryption::AES256, Encryption::AES256GCM}));
478+
this->byEncryption({Encryption::AES256, Encryption::AES256GCM}));
479479
aliases.insert({AES256, aes256});
480480
// cipher suites using either 128 or 256 bit AES.
481481
auto aes(aes128);
@@ -485,36 +485,36 @@ class OpenSSLCipherConfigurationParser {
485485
// AES in Galois Counter Mode (GCM).
486486
std::vector<Cipher> aesgcm;
487487
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(aesgcm),
488-
byEncryption({Encryption::AES128GCM, Encryption::AES256GCM}));
488+
this->byEncryption({Encryption::AES128GCM, Encryption::AES256GCM}));
489489
aliases.insert({AESGCM, aesgcm});
490490

491491
// Cipher suites using ChaCha20.
492492
std::vector<Cipher> chacha20;
493493
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(chacha20),
494-
byEncryption(Encryption::CHACHA20POLY1305));
494+
this->byEncryption(Encryption::CHACHA20POLY1305));
495495
aliases.insert({CHACHA20, chacha20});
496496

497497
// Cipher suites using triple DES.
498498
std::vector<Cipher> triple_des;
499499
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(triple_des),
500-
byEncryption(Encryption::TRIPLE_DES));
500+
this->byEncryption(Encryption::TRIPLE_DES));
501501
aliases.insert({TRIPLE_DES, triple_des});
502502

503503
// Cipher suites using SHA1.
504504
std::vector<Cipher> sha1;
505505
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(sha1),
506-
byMessageDigest(MessageDigest::SHA1));
506+
this->byMessageDigest(MessageDigest::SHA1));
507507
aliases.insert({SHA1, sha1});
508508
aliases.insert({SHA, sha1});
509509
// Cipher suites using SHA256.
510510
std::vector<Cipher> sha256;
511511
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(sha256),
512-
byMessageDigest(MessageDigest::SHA256));
512+
this->byMessageDigest(MessageDigest::SHA256));
513513
aliases.insert({SHA256, sha256});
514514
// Cipher suites using SHA384.
515515
std::vector<Cipher> sha384;
516516
std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(sha384),
517-
byMessageDigest(MessageDigest::SHA384));
517+
this->byMessageDigest(MessageDigest::SHA384));
518518
aliases.insert({SHA384, sha384});
519519

520520
// COMPLEMENTOFDEFAULT:
@@ -528,22 +528,22 @@ class OpenSSLCipherConfigurationParser {
528528

529529
// The content of the default list is determined at compile time and normally corresponds to
530530
// ALL:!COMPLEMENTOFDEFAULT:!eNULL.
531-
aliases.insert({DEFAULT, parse("ALL:!COMPLEMENTOFDEFAULT:!eNULL")});
531+
aliases.insert({DEFAULT, this->parse("ALL:!COMPLEMENTOFDEFAULT:!eNULL")});
532532
}
533533

534534
std::vector<Cipher> parse(std::string_view expression) {
535535
/**
536536
* All ciphers by their openssl alias name.
537537
*/
538-
auto elements = splitCipherSuiteString(expression);
538+
auto elements = this->splitCipherSuiteString(expression);
539539
std::vector<Cipher> ciphers;
540540
std::vector<Cipher> removedCiphers;
541541
for (auto &element : elements) {
542542

543543
if (element.rfind(DELETE, 0) == 0) {
544544
auto alias = element.substr(1);
545545
if (aliases.find(alias) != aliases.end()) {
546-
remove(aliases, ciphers, alias);
546+
this->remove(aliases, ciphers, alias);
547547
}
548548
} else if (element.rfind(EXCLUDE, 0) == 0) {
549549
auto alias = element.substr(1);
@@ -554,15 +554,15 @@ class OpenSSLCipherConfigurationParser {
554554
} else if (element.rfind(TO_END, 0) == 0) {
555555
auto alias = element.substr(1);
556556
if (aliases.find(alias) != aliases.end()) {
557-
moveToEnd(aliases, ciphers, alias);
557+
this->moveToEnd(aliases, ciphers, alias);
558558
}
559559
} else if ("@STRENGTH" == element) {
560-
strengthSort(ciphers);
560+
this->strengthSort(ciphers);
561561
break;
562562
} else if (aliases.find(element) != aliases.end()) {
563-
add(aliases, ciphers, element);
563+
this->add(aliases, ciphers, element);
564564
} else if (element.find(AND) != std::string::npos) {
565-
auto intersections = split(element, "+\\");
565+
auto intersections = this->split(element, "+\\");
566566
if (intersections.size() > 0 && aliases.find(intersections[0]) != aliases.end()) {
567567
auto result{aliases[intersections[0]]};
568568
for (int i = 1; i < intersections.size(); i++) {

0 commit comments

Comments
 (0)