Update set of known root certificates.
Removes:
AddTrust_External_Root_certificate
GlobalSign_Root_CA___R8_certificate
This has been automatically generated by running [1]. It also updates
[1] to produce the full ssl_roots.h file without requiring any manual
modifications.
See https://codereview.webrtc.org/1503473002 for some background about
the generator script.
[1] - https://cs.chromium.org/chromium/src/third_party/webrtc/tools_webrtc/sslroots/generate_sslroots.py
No-Presubmit: True
Bug: webrtc:12105
Change-Id: I0ee979bd8ab4e5f4ff4d55ad6f2fd21bf122a7ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190761
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32523}
diff --git a/tools_webrtc/sslroots/generate_sslroots.py b/tools_webrtc/sslroots/generate_sslroots.py
index 7d8bf14..e4a86d3 100644
--- a/tools_webrtc/sslroots/generate_sslroots.py
+++ b/tools_webrtc/sslroots/generate_sslroots.py
@@ -36,7 +36,7 @@
_CERTIFICATE_VARIABLE = 'Certificate'
_CERTIFICATE_SIZE_VARIABLE = 'CertificateSize'
_INT_TYPE = 'size_t'
-_CHAR_TYPE = 'const unsigned char*'
+_CHAR_TYPE = 'unsigned char* const'
_VERBOSE = 'verbose'
@@ -119,6 +119,7 @@
output_header_file.write(certificate_list)
certificate_size_list += _CreateArraySectionFooter()
output_header_file.write(certificate_size_list)
+ output_header_file.write(_CreateOutputFooter())
output_header_file.close()
@@ -151,13 +152,34 @@
def _CreateOutputHeader():
- output = ('// This file is the root certificates in C form that are needed to'
+ output = ('/*\n'
+ ' * Copyright 2004 The WebRTC Project Authors. All rights '
+ 'reserved.\n'
+ ' *\n'
+ ' * Use of this source code is governed by a BSD-style license\n'
+ ' * that can be found in the LICENSE file in the root of the '
+ 'source\n'
+ ' * tree. An additional intellectual property rights grant can be '
+ 'found\n'
+ ' * in the file PATENTS. All contributing project authors may\n'
+ ' * be found in the AUTHORS file in the root of the source tree.\n'
+ ' */\n\n'
+ '#ifndef RTC_BASE_SSL_ROOTS_H_\n'
+ '#define RTC_BASE_SSL_ROOTS_H_\n\n'
+ '// This file is the root certificates in C form that are needed to'
' connect to\n// Google.\n\n'
'// It was generated with the following command line:\n'
- '// > python tools/certs/generate_sslroots.py'
- '\n// https://pki.google.com/roots.pem\n\n')
+ '// > python tools_webrtc/sslroots/generate_sslroots.py'
+ '\n// https://pki.goog/roots.pem\n\n'
+ '// clang-format off\n'
+ '// Don\'t bother formatting generated code,\n'
+ '// also it would breaks subject/issuer lines.\n\n')
return output
+def _CreateOutputFooter():
+ output = ('// clang-format on\n\n'
+ '#endif // RTC_BASE_SSL_ROOTS_H_\n')
+ return output
def _CreateArraySectionHeader(type_name, type_type, options):
output = ('const %s kSSLCert%sList[] = {\n') %(type_type, type_name)