Parse error reasons from crypto/err/openssl.txt. Detected lines match " _R_ : : ", e.g., "ASN1_R_ADDING_OBJECT:171:adding object". The part is not stored as it will be recovered at runtime when needed.
(args)
| 126 | |
| 127 | |
| 128 | def parse_openssl_error_text(args): |
| 129 | """Parse error reasons from crypto/err/openssl.txt. |
| 130 | |
| 131 | Detected lines match "<LIBNAME>_R_<ERRNAME>:<ERRCODE>:<MESSAGE>", |
| 132 | e.g., "ASN1_R_ADDING_OBJECT:171:adding object". The <MESSAGE> part |
| 133 | is not stored as it will be recovered at runtime when needed. |
| 134 | """ |
| 135 | # ignore backslash line continuation (placed before <MESSAGE> if present) |
| 136 | pat = re.compile(r"^((\w+?)_R_(\w+)):(\d+):") |
| 137 | seen = {} |
| 138 | for match in _file_search(args.errtxt, pat): |
| 139 | reason, libname, errname, num = match.groups() |
| 140 | if "_F_" in reason: # ignore function codes |
| 141 | # FEAT(picnixz): in the future, we may want to also check |
| 142 | # the consistency of the OpenSSL files with an external tool. |
| 143 | # See https://github.com/python/cpython/issues/132745. |
| 144 | continue |
| 145 | yield reason, libname, errname, int(num) |
| 146 | |
| 147 | |
| 148 | def parse_extra_reasons(args): |
no test coverage detected
searching dependent graphs…