summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/objects/obj_dat.c
diff options
context:
space:
mode:
authortb <>2024-01-06 17:17:08 +0000
committertb <>2024-01-06 17:17:08 +0000
commitca00b1e55ab503cc77058c62611b0b6ec94882f2 (patch)
tree542d1e5cc853bc1b3fbe0eb77ff56e21067b795b /src/lib/libcrypto/objects/obj_dat.c
parentc75f680fbdc8f13b45b60c1e3502617bea21071d (diff)
downloadopenbsd-ca00b1e55ab503cc77058c62611b0b6ec94882f2.tar.gz
openbsd-ca00b1e55ab503cc77058c62611b0b6ec94882f2.tar.bz2
openbsd-ca00b1e55ab503cc77058c62611b0b6ec94882f2.zip
Remove X509_PURPOSE extensibility
Another bit of global state without lock protection. The by now familiar complications of a stack to make this user configurable, which, of course, no one ever did. The table is not currently const, and the API exposes its entries directly, so anyone can modify it. This fits very well with the safety guarantees of Rust's 'static lifetime, which is how rust-openssl exposes it (for no good reason). Remove the stack and make the X509_PURPOSE_add() API always fail. Simplify the other bits accordingly. In addition, this API inflicts the charming difference between purpose identifiers and purpose indexes (the former minus one) onto the user. Neither of the two obvious solutions to avoid this trap seems to have crossed the implementer's mind. ok jsing
Diffstat (limited to 'src/lib/libcrypto/objects/obj_dat.c')
0 files changed, 0 insertions, 0 deletions