diff options
author | jsing <> | 2024-06-22 16:33:00 +0000 |
---|---|---|
committer | jsing <> | 2024-06-22 16:33:00 +0000 |
commit | 9e2d9b677cb77ea4d6a866fc0c09c9352843e319 (patch) | |
tree | 7ea187e7cc01db66a27e1bacaa1a64b22a2ad4f6 /src/lib/libcrypto/cpt_err.c | |
parent | b5b93f3e56996c0034f98d6244c49b48e309478a (diff) | |
download | openbsd-9e2d9b677cb77ea4d6a866fc0c09c9352843e319.tar.gz openbsd-9e2d9b677cb77ea4d6a866fc0c09c9352843e319.tar.bz2 openbsd-9e2d9b677cb77ea4d6a866fc0c09c9352843e319.zip |
Rewrite BN_bn2mpi() using CBB.
The content is effectively a u32 length prefixed field, so use
CBB_add_u32_length_prefixed(). Use BN_bn2binpad() rather than manually
padding if we need to extend and use sensible variable names so that the
code becomes more readable.
Note that since CBB can fail we now need to be able to indicate failure.
This means that BN_bn2mpi() can now return -1 when it would not have
previously (correct callers will check that BN_bn2mpi() returns a positive
length).
ok tb@
Diffstat (limited to 'src/lib/libcrypto/cpt_err.c')
0 files changed, 0 insertions, 0 deletions