aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/tls.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2024-08-07 13:18:47 +0100
committerMichael Brown <mcb30@ipxe.org>2024-08-07 16:26:19 +0100
commit59e2b03e6ac842d0e69bc4f757bf6da452fca074 (patch)
treed6abd6a8253b235cc4eadfa0c05f29c3e0ae9041 /src/net/tls.c
parent0e73b48f77589f69a5418c211b77b95ed26520c8 (diff)
downloadipxe-59e2b03e6ac842d0e69bc4f757bf6da452fca074.tar.gz
[crypto] Extend asn1_enter() to handle partial object cursors
Handling large ASN.1 objects such as encrypted CMS files will require the ability to use the asn1_enter() and asn1_skip() family of functions on partial object cursors, where a defined additional length is known to exist after the end of the data buffer pointed to by the ASN.1 object cursor. We already have support for partial object cursors in the underlying asn1_start() operation used by both asn1_enter() and asn1_skip(), and this is used by the DER image probe routine to check that the potential DER file comprises a single ASN.1 SEQUENCE object. Add asn1_enter_partial() to formalise the process of entering an ASN.1 partial object, and refactor the DER image probe routine to use this instead of open-coding calls to the underlying asn1_start() operation. There is no need for an equivalent asn1_skip_partial() function, since only objects that are wholly contained within the partial cursor may be successfully skipped. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/tls.c')
0 files changed, 0 insertions, 0 deletions