summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/arc4random
diff options
context:
space:
mode:
authortb <>2026-05-16 06:27:05 +0000
committertb <>2026-05-16 06:27:05 +0000
commitdc2bc2fdb63a9fb33bbf79f46442082c460bfbb1 (patch)
treefcb4802c9b8a825b7323882a58795673c4dc1f0e /src/lib/libcrypto/arc4random
parente740a3d7e0e3f1c423427518b031110af001410f (diff)
downloadopenbsd-dc2bc2fdb63a9fb33bbf79f46442082c460bfbb1.tar.gz
openbsd-dc2bc2fdb63a9fb33bbf79f46442082c460bfbb1.tar.bz2
openbsd-dc2bc2fdb63a9fb33bbf79f46442082c460bfbb1.zip
Ensure X509V3_EXT_print() only returns 0 and 1
In a rare mistake by schwarze, X509V3_EXT_print() is documented to return 0 and 1. This is also what most internal callers expect. However, if either X509V3_EXT_DUMP_UNKNOWN or X509V3_EXT_PARSE_UNKNOWN is set, the extension has an unknown NID or on failure to deserialize the extension value, the return values of BIO_dump_indent() (which is number of bytes written or -1 on error) and ASN1_parse_dump() (which is 0, 1, or 2 on EOC) are propagated. Follow what OpenSSL did and translate to Boolean returns. Error indicators are rather useless here since most errors are ignored anyway. Most callers do if (!X509V3_EXT_print(...)) but they also pass a zero flag. Reported by N. Dossche ok kenjiro
Diffstat (limited to 'src/lib/libcrypto/arc4random')
0 files changed, 0 insertions, 0 deletions