PKCS #7 message parsing. More...
Go to the source code of this file.
Functions | |
| error_t | pkcs7ParseContentInfo (const uint8_t *data, size_t length, size_t *totalLength, Pkcs7ContentInfo *contentInfo) |
| Parse contentInfo structure. More... | |
| error_t | pkcs7ParseSignedData (const uint8_t *data, size_t length, Pkcs7SignedData *signedData) |
| Parse signed-data content. More... | |
| error_t | pkcs7ParseEnvelopedData (const uint8_t *data, size_t length, Pkcs7EnvelopedData *envelopedData) |
| Parse enveloped-data content. More... | |
| error_t | pkcs7ParseDigestAlgos (const uint8_t *data, size_t length, size_t *totalLength, Pkcs7DigestAlgos *digestAlgos) |
| Parse digestAlgorithms structure. More... | |
| error_t | pkcs7ParseCertificates (const uint8_t *data, size_t length, size_t *totalLength, Pkcs7Certificates *certificates) |
| Parse certificates. More... | |
| error_t | pkcs7ParseCrls (const uint8_t *data, size_t length, size_t *totalLength, Pkcs7Crls *crls) |
| Parse CRLs. More... | |
| error_t | pkcs7ParseSignerInfos (const uint8_t *data, size_t length, size_t *totalLength, Pkcs7SignerInfos *signerInfos) |
| Parse signerInfos structure. More... | |
| error_t | pkcs7ParseSignerInfo (const uint8_t *data, size_t length, size_t *totalLength, Pkcs7SignerInfo *signerInfo) |
| Parse SignerInfo structure. More... | |
| error_t | pkcs7ParseIssuerAndSerialNumber (const uint8_t *data, size_t length, size_t *totalLength, Pkcs7IssuerAndSerialNumber *issuerAndSerialNumber) |
| Parse IssuerAndSerialNumber structure. More... | |
| error_t | pkcs7ParseAuthenticatedAttributes (const uint8_t *data, size_t length, size_t *totalLength, Pkcs7AuthenticatedAttributes *authenticatedAttributes) |
| Parse authenticatedAttributes structure. More... | |
| error_t | pkcs7ParseDigestEncryptionAlgo (const uint8_t *data, size_t length, size_t *totalLength, X509SignAlgoId *digestEncryptionAlgo) |
| Parse digestEncryptionAlgorithm structure. More... | |
| error_t | pkcs7ParseEncryptedDigest (const uint8_t *data, size_t length, size_t *totalLength, X509OctetString *encryptedDigest) |
| Parse encryptedDigest structure. More... | |
| error_t | pkcs7ParseUnauthenticatedAttributes (const uint8_t *data, size_t length, size_t *totalLength, Pkcs7UnauthenticatedAttributes *unauthenticatedAttributes) |
| Parse unauthenticatedAttributes structure. More... | |
| error_t | pkcs7ParseAttribute (const uint8_t *data, size_t length, size_t *totalLength, Pkcs7Attribute *attribute) |
| Parse attribute. More... | |
| error_t | pkcs7FindAttribute (const uint8_t *data, size_t length, const uint8_t *oid, size_t oidLen, Pkcs7Attribute *attribute) |
| Search a set of attributes for a given attribute type. More... | |
| error_t | pkcs7ParseRecipientInfos (const uint8_t *data, size_t length, size_t *totalLength, Pkcs7RecipientInfos *recipientInfos) |
| Parse recipientInfos structure. More... | |
| error_t | pkcs7ParseRecipientInfo (const uint8_t *data, size_t length, size_t *totalLength, Pkcs7RecipientInfo *recipientInfo) |
| Parse RecipientInfo structure. More... | |
| error_t | pkcs7ParseEncryptedKey (const uint8_t *data, size_t length, size_t *totalLength, X509OctetString *encryptedKey) |
| Parse encryptedKey structure. More... | |
| error_t | pkcs7ParseEncryptedContentInfo (const uint8_t *data, size_t length, size_t *totalLength, Pkcs7EncryptedContentInfo *encryptedContentInfo) |
| Parse encryptedContentInfo structure. More... | |
| error_t | pkcs7ParseContentEncrAlgo (const uint8_t *data, size_t length, size_t *totalLength, Pkcs7ContentEncrAlgo *contentEncrAlgo) |
| Parse contentEncryptionAlgorithm structure. More... | |
| error_t | pkcs7ParseAlgoId (const uint8_t *data, size_t length, size_t *totalLength, X509AlgoId *algoId) |
| Parse AlgorithmIdentifier structure. More... | |
Detailed Description
PKCS #7 message parsing.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneCRYPTO Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.5.4
Definition in file pkcs7_parse.h.
Function Documentation
◆ pkcs7FindAttribute()
| error_t pkcs7FindAttribute | ( | const uint8_t * | data, |
| size_t | length, | ||
| const uint8_t * | oid, | ||
| size_t | oidLen, | ||
| Pkcs7Attribute * | attribute | ||
| ) |
Search a set of attributes for a given attribute type.
- Parameters
-
[in] data Pointer to the set of attributes [in] length Length of the set of attributes, in bytes [out] oid Object identifier that specified the attribute type [out] oidLen Length of the object identifier [out] attribute Pointer to the matching attribute, if any
- Returns
- Error code
Definition at line 1088 of file pkcs7_parse.c.
◆ pkcs7ParseAlgoId()
| error_t pkcs7ParseAlgoId | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| X509AlgoId * | algoId | ||
| ) |
Parse AlgorithmIdentifier structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] algoId Information resulting from the parsing process
- Returns
- Error code
Definition at line 1447 of file pkcs7_parse.c.
◆ pkcs7ParseAttribute()
| error_t pkcs7ParseAttribute | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| Pkcs7Attribute * | attribute | ||
| ) |
Parse attribute.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] attribute Information resulting from the parsing process
- Returns
- Error code
Definition at line 1011 of file pkcs7_parse.c.
◆ pkcs7ParseAuthenticatedAttributes()
| error_t pkcs7ParseAuthenticatedAttributes | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| Pkcs7AuthenticatedAttributes * | authenticatedAttributes | ||
| ) |
Parse authenticatedAttributes structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] authenticatedAttributes Information resulting from the parsing process
- Returns
- Error code
Definition at line 737 of file pkcs7_parse.c.
◆ pkcs7ParseCertificates()
| error_t pkcs7ParseCertificates | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| Pkcs7Certificates * | certificates | ||
| ) |
Parse certificates.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] certificates Information resulting from the parsing process
- Returns
- Error code
Definition at line 356 of file pkcs7_parse.c.
◆ pkcs7ParseContentEncrAlgo()
| error_t pkcs7ParseContentEncrAlgo | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| Pkcs7ContentEncrAlgo * | contentEncrAlgo | ||
| ) |
Parse contentEncryptionAlgorithm structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] contentEncrAlgo Information resulting from the parsing process
- Returns
- Error code
Definition at line 1390 of file pkcs7_parse.c.
◆ pkcs7ParseContentInfo()
| error_t pkcs7ParseContentInfo | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| Pkcs7ContentInfo * | contentInfo | ||
| ) |
Parse contentInfo structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] contentInfo Information resulting from the parsing process
- Returns
- Error code
Definition at line 56 of file pkcs7_parse.c.
◆ pkcs7ParseCrls()
| error_t pkcs7ParseCrls | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| Pkcs7Crls * | crls | ||
| ) |
Parse CRLs.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] crls Information resulting from the parsing process
- Returns
- Error code
Definition at line 431 of file pkcs7_parse.c.
◆ pkcs7ParseDigestAlgos()
| error_t pkcs7ParseDigestAlgos | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| Pkcs7DigestAlgos * | digestAlgos | ||
| ) |
Parse digestAlgorithms structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] digestAlgos Information resulting from the parsing process
- Returns
- Error code
Definition at line 289 of file pkcs7_parse.c.
◆ pkcs7ParseDigestEncryptionAlgo()
| error_t pkcs7ParseDigestEncryptionAlgo | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| X509SignAlgoId * | digestEncryptionAlgo | ||
| ) |
Parse digestEncryptionAlgorithm structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] digestEncryptionAlgo Information resulting from the parsing process
- Returns
- Error code
Definition at line 850 of file pkcs7_parse.c.
◆ pkcs7ParseEncryptedContentInfo()
| error_t pkcs7ParseEncryptedContentInfo | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| Pkcs7EncryptedContentInfo * | encryptedContentInfo | ||
| ) |
Parse encryptedContentInfo structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] encryptedContentInfo Information resulting from the parsing process
- Returns
- Error code
Definition at line 1309 of file pkcs7_parse.c.
◆ pkcs7ParseEncryptedDigest()
| error_t pkcs7ParseEncryptedDigest | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| X509OctetString * | encryptedDigest | ||
| ) |
Parse encryptedDigest structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] encryptedDigest Information resulting from the parsing process
- Returns
- Error code
Definition at line 913 of file pkcs7_parse.c.
◆ pkcs7ParseEncryptedKey()
| error_t pkcs7ParseEncryptedKey | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| X509OctetString * | encryptedKey | ||
| ) |
Parse encryptedKey structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] encryptedKey Information resulting from the parsing process
- Returns
- Error code
Definition at line 1276 of file pkcs7_parse.c.
◆ pkcs7ParseEnvelopedData()
| error_t pkcs7ParseEnvelopedData | ( | const uint8_t * | data, |
| size_t | length, | ||
| Pkcs7EnvelopedData * | envelopedData | ||
| ) |
Parse enveloped-data content.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] envelopedData Information resulting from the parsing process
- Returns
- Error code
Definition at line 224 of file pkcs7_parse.c.
◆ pkcs7ParseIssuerAndSerialNumber()
| error_t pkcs7ParseIssuerAndSerialNumber | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| Pkcs7IssuerAndSerialNumber * | issuerAndSerialNumber | ||
| ) |
Parse IssuerAndSerialNumber structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] issuerAndSerialNumber Information resulting from the parsing process
- Returns
- Error code
Definition at line 686 of file pkcs7_parse.c.
◆ pkcs7ParseRecipientInfo()
| error_t pkcs7ParseRecipientInfo | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| Pkcs7RecipientInfo * | recipientInfo | ||
| ) |
Parse RecipientInfo structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] recipientInfo Information resulting from the parsing process
- Returns
- Error code
Definition at line 1203 of file pkcs7_parse.c.
◆ pkcs7ParseRecipientInfos()
| error_t pkcs7ParseRecipientInfos | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| Pkcs7RecipientInfos * | recipientInfos | ||
| ) |
Parse recipientInfos structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] recipientInfos Information resulting from the parsing process
- Returns
- Error code
Definition at line 1129 of file pkcs7_parse.c.
◆ pkcs7ParseSignedData()
| error_t pkcs7ParseSignedData | ( | const uint8_t * | data, |
| size_t | length, | ||
| Pkcs7SignedData * | signedData | ||
| ) |
Parse signed-data content.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] signedData Information resulting from the parsing process
- Returns
- Error code
Definition at line 131 of file pkcs7_parse.c.
◆ pkcs7ParseSignerInfo()
| error_t pkcs7ParseSignerInfo | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| Pkcs7SignerInfo * | signerInfo | ||
| ) |
Parse SignerInfo structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] signerInfo Information resulting from the parsing process
- Returns
- Error code
Definition at line 577 of file pkcs7_parse.c.
◆ pkcs7ParseSignerInfos()
| error_t pkcs7ParseSignerInfos | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| Pkcs7SignerInfos * | signerInfos | ||
| ) |
Parse signerInfos structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] signerInfos Information resulting from the parsing process
- Returns
- Error code
Definition at line 506 of file pkcs7_parse.c.
◆ pkcs7ParseUnauthenticatedAttributes()
| error_t pkcs7ParseUnauthenticatedAttributes | ( | const uint8_t * | data, |
| size_t | length, | ||
| size_t * | totalLength, | ||
| Pkcs7UnauthenticatedAttributes * | unauthenticatedAttributes | ||
| ) |
Parse unauthenticatedAttributes structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] unauthenticatedAttributes Information resulting from the parsing process
- Returns
- Error code
Definition at line 946 of file pkcs7_parse.c.
