diff options
| author | Michael Brown | 2024-08-23 13:25:36 +0200 |
|---|---|---|
| committer | Michael Brown | 2024-08-23 14:43:42 +0200 |
| commit | bdb5b4aef46ed34b47094652f3eefc7d0463d166 (patch) | |
| tree | fe75769107040f350e611c0bb4b4f5c340e1f861 /src/include | |
| parent | [crypto] Remove the concept of a public-key algorithm reusable context (diff) | |
| download | ipxe-bdb5b4aef46ed34b47094652f3eefc7d0463d166.tar.gz ipxe-bdb5b4aef46ed34b47094652f3eefc7d0463d166.tar.xz ipxe-bdb5b4aef46ed34b47094652f3eefc7d0463d166.zip | |
[crypto] Hold CMS message as a single ASN.1 object
Reduce the number of dynamic allocations required to parse a CMS
message by retaining the ASN.1 cursor returned from image_asn1() for
the lifetime of the CMS message. This allows embedded ASN.1 cursors
to be used for parsed objects within the message, such as embedded
signatures.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/ipxe/cms.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/ipxe/cms.h b/src/include/ipxe/cms.h index 1c8a0c587..bffb06bfe 100644 --- a/src/include/ipxe/cms.h +++ b/src/include/ipxe/cms.h @@ -48,15 +48,15 @@ struct cms_participant { struct pubkey_algorithm *pubkey; /** Signature or key value */ - void *value; - /** Length of signature or key value */ - size_t len; + struct asn1_cursor value; }; /** A CMS message */ struct cms_message { /** Reference count */ struct refcnt refcnt; + /** Raw ASN.1 data */ + struct asn1_cursor *raw; /** Message type */ struct cms_type *type; |
