summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa/dsa_meth.c
diff options
context:
space:
mode:
authorjsing <>2022-05-07 10:03:49 +0000
committerjsing <>2022-05-07 10:03:49 +0000
commit8e89c8ed54794eef9e23fdc4c69d9896eae2bb89 (patch)
tree5a3cc6a41afff35410e053b557ab38020bc57d33 /src/lib/libcrypto/dsa/dsa_meth.c
parente1722600a0a7e0b3d60235d3052a2203c73e84b0 (diff)
downloadopenbsd-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/dsa_meth.c')
0 files changed, 0 insertions, 0 deletions