Commit graph

8 commits

Author SHA1 Message Date
Yury Yarashevich
c7ff896999 Rewrite 'generate_sslroots' w/o OpenSSL.
OpenSSL removed ability to generate C code:
a18cf8fc63

CL rewrites generation script to use pure Python asn1crypto library.

The changes in generated code leading to huge diff in generated file:
- Certificate array names are based on certificate fingerprints instead
of semi-human readable names, which were not referenced externally;
- Order of arrays in generated file matches the order of certificates
as they are appeared in source pem file. Previously re-ordering happen
due to writing temporary files on disk;


Bug: webrtc:11710
Change-Id: Ie7a97b3658f6ccb397f0fd0c21d341934a2cc12e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304642
Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40039}
2023-05-10 12:57:37 +00:00
Raman Budny
9790e546fc Adapt generate_sslroots.py to work with different openssl versions
Command [1] on openssl 1.1.1m and newer generates output
containing "unsigned char the_(subject_name|public_key|certificate)"
records, making it incompatible with current version of the script
that relies on "unsigned char XXX_".

This patch handles both cases by using regular expression so as
to match strings and provide an adequate replacement.

[1] - openssl x509 -in <path-to-cacert.pem> -noout -C

Bug: webrtc:11710
Change-Id: I46b87d2980ec2dd26660b93fcf9019254950ce12
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257420
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38173}
2022-09-22 15:15:20 +00:00
Saúl Ibarra Corretgé
fabc3a5aa7 Add script to generate ssl_roots.h from Mozilla's CA bundle
Bug: webrtc:11710
Change-Id: I6eac35a111f89f3c74ce8c2ffc0ab607ad881be2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253220
Reviewed-by: Christoffer Jansson <jansson@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36131}
2022-03-04 13:50:58 +00:00
Christoffer Jansson
4e8a773b4b tools_webrtc dir converted to py3 + top level PRESUBMIT script
Bug: webrtc:13607
Change-Id: Ib018e43ea977cc24dd71048e68e3343741f7f31b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249083
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/main@{#35953}
2022-02-08 14:42:26 +00:00
Mirko Bonadei
8cc6695652 Reformat python files checked by pylint (part 1/2).
After recently changing .pylintrc (see [1]) we discovered that
the presubmit check always checks all the python files when just
one python file gets updated.

This CL moves all these files one step closer to what the linter
wants.

Autogenerated with:

# Added all the files under pylint control to ~/Desktop/to-reformat
cat ~/Desktop/to-reformat | xargs sed -i '1i\\'
git cl format --python --full

This is part 1 out of 2. The second part will fix function names and
will not be automated.

[1] - https://webrtc-review.googlesource.com/c/src/+/186664

No-Presubmit: True
Bug: webrtc:12114
Change-Id: Idfec4d759f209a2090440d0af2413a1ddc01b841
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190980
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32530}
2020-10-30 10:13:11 +00:00
Taylor Brandstetter
bee5983b8f 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}
2020-10-29 21:08:10 +00:00
Mirko Bonadei
86bd33a1e7 Fix the name of the file generated by generate_sslroots.py.
WebRTC filenames use underscores to separate words so the ssl roots
file is rtc_base/ssl_roots.h instead of rtc_base/sslroots.h.

Bug: chromium:978779
Change-Id: I2fa11c38a566e177775deb3d42230d956efc8ccc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173800
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31132}
2020-04-25 13:37:30 +00:00
Henrik Kjellander
90fd7d84fd Rename tools-webrtc -> tools_webrtc
This aligns with established naming convention for all
other directories.

BUG=webrtc:7593
NOTRY=True
NOTREECHECKS=True
R=ehmaldonado@webrtc.org, mbonadei@webrtc.org
TBR=henrika@webrtc.org

Review-Url: https://codereview.webrtc.org/2864213004 .
Cr-Commit-Position: refs/heads/master@{#18059}
2017-05-09 06:30:13 +00:00
Renamed from tools-webrtc/sslroots/generate_sslroots.py (Browse further)