mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 05:03:43 +01:00
update codegen script to work with latest mozilla
This commit is contained in:
parent
cd14405a43
commit
a02f6e3d23
@ -29,7 +29,7 @@ def ossl(s):
|
|||||||
#####
|
#####
|
||||||
# Read the cpp file to understand what Ciphers map to what name :
|
# Read the cpp file to understand what Ciphers map to what name :
|
||||||
# Make "ciphers" a map from name used in the javascript to a cipher macro name
|
# Make "ciphers" a map from name used in the javascript to a cipher macro name
|
||||||
fileA = open(ff('security/manager/ssl/src/nsNSSComponent.cpp'),'r')
|
fileA = open(ff('security/manager/ssl/nsNSSComponent.cpp'),'r')
|
||||||
|
|
||||||
# The input format is a file containing exactly one section of the form:
|
# The input format is a file containing exactly one section of the form:
|
||||||
# static CipherPref CipherPrefs[] = {
|
# static CipherPref CipherPrefs[] = {
|
||||||
@ -71,7 +71,7 @@ for line in cipherLines:
|
|||||||
assert not key_pending
|
assert not key_pending
|
||||||
key_pending = m.group(1)
|
key_pending = m.group(1)
|
||||||
continue
|
continue
|
||||||
m = re.search(r'^\s*(\S+)(?:,\s*(true|false))?\s*}', line)
|
m = re.search(r'^\s*(\S+)(?:,\s*(true|false))+\s*}', line)
|
||||||
if m:
|
if m:
|
||||||
assert key_pending
|
assert key_pending
|
||||||
key = key_pending
|
key = key_pending
|
||||||
@ -107,7 +107,7 @@ fileC.close()
|
|||||||
# Build a map enabled_ciphers from javascript name to "true" or "false",
|
# Build a map enabled_ciphers from javascript name to "true" or "false",
|
||||||
# and an (unordered!) list of the macro names for those ciphers that are
|
# and an (unordered!) list of the macro names for those ciphers that are
|
||||||
# enabled.
|
# enabled.
|
||||||
fileB = open(ff('netwerk/base/public/security-prefs.js'), 'r')
|
fileB = open(ff('netwerk/base/security-prefs.js'), 'r')
|
||||||
|
|
||||||
enabled_ciphers = {}
|
enabled_ciphers = {}
|
||||||
for line in fileB:
|
for line in fileB:
|
||||||
|
Loading…
Reference in New Issue
Block a user