diff options
author | jsing <> | 2022-05-07 10:03:49 +0000 |
---|---|---|
committer | jsing <> | 2022-05-07 10:03:49 +0000 |
commit | 8e89c8ed54794eef9e23fdc4c69d9896eae2bb89 (patch) | |
tree | 5a3cc6a41afff35410e053b557ab38020bc57d33 /src/lib/libcrypto/dsa | |
parent | e1722600a0a7e0b3d60235d3052a2203c73e84b0 (diff) | |
download | openbsd-8e89c8ed54794eef9e23fdc4c69d9896eae2bb89.tar.gz openbsd-8e89c8ed54794eef9e23fdc4c69d9896eae2bb89.tar.bz2 openbsd-8e89c8ed54794eef9e23fdc4c69d9896eae2bb89.zip |
Refactor asn1_ex_c2i()
The asn1_ex_c2i() function currently handles the V_ASN1_ANY case inline,
which means there multiple special cases, with pointer fudging and
restoring. Instead, split asn1_ex_c2i() into three functions - one that
only handles storage into a primitive type (asn1_ex_c2i_primitive()), one
that handles the V_ASN1_ANY case (asn1_ex_c2i_any()) and calls
asn1_ex_c2i_primitive() with the correct pointer and an asn1_ex_c2i()
that handles the custom functions case, before dispatching to
asn1_ex_c2i_any() or asn1_ex_c2i_primitive(), as appropriate.
This results in cleaner and simpler code.
With input from and ok tb@
Diffstat (limited to 'src/lib/libcrypto/dsa')
0 files changed, 0 insertions, 0 deletions