closes bpo-40266, closes bpo-39953: Use numeric lib code if compiling against old OpenSSL. (GH-19506)
This commit is contained in:
parent
02152b7332
commit
584a3cfda4
2496
Modules/_ssl_data.h
2496
Modules/_ssl_data.h
File diff suppressed because it is too large
Load Diff
|
@ -46,8 +46,12 @@ if __name__ == "__main__":
|
||||||
continue
|
continue
|
||||||
mnemonic = base[:-5].upper()
|
mnemonic = base[:-5].upper()
|
||||||
if mnemonic == "":
|
if mnemonic == "":
|
||||||
# Skip err.h.
|
# err.h
|
||||||
continue
|
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)
|
error_libraries[mnemonic] = (f'ERR_LIB_{mnemonic}', f'{mnemonic}_R_', error_header)
|
||||||
|
|
||||||
# Read codes from libraries
|
# Read codes from libraries
|
||||||
|
@ -88,7 +92,7 @@ if __name__ == "__main__":
|
||||||
w(' #ifdef %s' % (errcode))
|
w(' #ifdef %s' % (errcode))
|
||||||
w(' {"%s", %s, %s},' % (name, libcode, errcode))
|
w(' {"%s", %s, %s},' % (name, libcode, errcode))
|
||||||
w(' #else')
|
w(' #else')
|
||||||
w(' {"%s", %s, %d},' % (name, libcode, num))
|
w(' {"%s", %s, %d},' % (name, lib_codes[libcode], num))
|
||||||
w(' #endif')
|
w(' #endif')
|
||||||
w(' { NULL }')
|
w(' { NULL }')
|
||||||
w('};')
|
w('};')
|
||||||
|
|
Loading…
Reference in New Issue