diff options
author | tb <> | 2024-06-17 05:31:26 +0000 |
---|---|---|
committer | tb <> | 2024-06-17 05:31:26 +0000 |
commit | e439b8d63e4da3a92c2f01e1a961af48d18eae31 (patch) | |
tree | 528a222420b347d3261eacb9ebc8744a2aea9e43 /src/lib/libc | |
parent | 9eed80a22f73108382491d3ba6c90c41dd616a8a (diff) | |
download | openbsd-e439b8d63e4da3a92c2f01e1a961af48d18eae31.tar.gz openbsd-e439b8d63e4da3a92c2f01e1a961af48d18eae31.tar.bz2 openbsd-e439b8d63e4da3a92c2f01e1a961af48d18eae31.zip |
Rewrite X509V3_get_d2i()
This API is wrapped by nine *_get{,1}_ext_d2i() functions and they all
have the same defect: if an idx variable is passed in, multiple extensions
are handled incorrectly.
Clean up the mess that was the current implementation by replacing the
reimplementation of X509v3_get_ext_by_NID() with extra twists by actual
calls to the real thing. This way the madness is implemented explicitly
and can be explained in comments. The code still gets shorter.
In brief: always call this API with a known nid, pass crit, and a NULL idx.
If NULL is returned, crit != -1 is an error (malformed cert or allocation
failure).
ok jsing
Diffstat (limited to 'src/lib/libc')
0 files changed, 0 insertions, 0 deletions