Fix no_post_quantum
parent
d9d09c9cc5
commit
e124a3f448
|
|
@ -3,6 +3,7 @@
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
@ -71,6 +72,7 @@
|
||||||
#include "net/traffic_annotation/network_traffic_annotation.h"
|
#include "net/traffic_annotation/network_traffic_annotation.h"
|
||||||
#include "net/url_request/url_request_context.h"
|
#include "net/url_request/url_request_context.h"
|
||||||
#include "net/url_request/url_request_context_builder.h"
|
#include "net/url_request/url_request_context_builder.h"
|
||||||
|
#include "third_party/boringssl/src/include/openssl/ssl.h"
|
||||||
#include "url/gurl.h"
|
#include "url/gurl.h"
|
||||||
#include "url/scheme_host_port.h"
|
#include "url/scheme_host_port.h"
|
||||||
#include "url/url_util.h"
|
#include "url/url_util.h"
|
||||||
|
|
@ -252,6 +254,12 @@ std::unique_ptr<URLRequestContext> BuildURLRequestContext(
|
||||||
struct NoPostQuantum : public SSLConfigService {
|
struct NoPostQuantum : public SSLConfigService {
|
||||||
SSLContextConfig GetSSLContextConfig() override {
|
SSLContextConfig GetSSLContextConfig() override {
|
||||||
SSLContextConfig config;
|
SSLContextConfig config;
|
||||||
|
std::erase_if(
|
||||||
|
config.supported_named_groups, [](const SSLNamedGroupInfo& g) {
|
||||||
|
return g.group_id == SSL_GROUP_X25519_MLKEM768 ||
|
||||||
|
g.group_id == SSL_GROUP_X25519_KYBER768_DRAFT00 ||
|
||||||
|
g.group_id == SSL_GROUP_MLKEM1024;
|
||||||
|
});
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue