diff options
author | Benjamin Peterson <benjamin@python.org> | 2020-04-14 03:11:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-14 03:11:40 (GMT) |
commit | 584a3cfda4d7a65ea0c1ea1ee541378bb7be46ca (patch) | |
tree | d01152df7f4fb4f087fa055b6b42c0e3ce299e69 /Tools | |
parent | 02152b7332593a00ccf0eb77faf066ba97ca8687 (diff) | |
download | cpython-584a3cfda4d7a65ea0c1ea1ee541378bb7be46ca.zip cpython-584a3cfda4d7a65ea0c1ea1ee541378bb7be46ca.tar.gz cpython-584a3cfda4d7a65ea0c1ea1ee541378bb7be46ca.tar.bz2 |
closes bpo-40266, closes bpo-39953: Use numeric lib code if compiling against old OpenSSL. (GH-19506)
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/ssl/make_ssl_data.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Tools/ssl/make_ssl_data.py b/Tools/ssl/make_ssl_data.py index a8562a2..a29c04a 100755 --- a/Tools/ssl/make_ssl_data.py +++ b/Tools/ssl/make_ssl_data.py @@ -46,9 +46,13 @@ if __name__ == "__main__": continue mnemonic = base[:-5].upper() if mnemonic == "": - # Skip err.h. - continue - error_libraries[mnemonic] = (f'ERR_LIB_{mnemonic}', f'{mnemonic}_R_', error_header) + # err.h + lib_codes = { + code: num + for (code, (_, _, num)) in parse_error_codes(error_header, 'ERR_LIB_', None) + } + else: + error_libraries[mnemonic] = (f'ERR_LIB_{mnemonic}', f'{mnemonic}_R_', error_header) # Read codes from libraries new_codes = [] @@ -88,7 +92,7 @@ if __name__ == "__main__": w(' #ifdef %s' % (errcode)) w(' {"%s", %s, %s},' % (name, libcode, errcode)) w(' #else') - w(' {"%s", %s, %d},' % (name, libcode, num)) + w(' {"%s", %s, %d},' % (name, lib_codes[libcode], num)) w(' #endif') w(' { NULL }') w('};') |